The document discusses the functions of the transport layer in the OSI model. It explains that the transport layer accepts data from the session layer, breaks it into packets and delivers them to the network layer. It is responsible for guaranteeing successful arrival of data at the destination and provides end-to-end communication between source and destination transport layers. The transport layer separates upper layers from low-level data transmission details and handles any data loss or damage. It can transmit packets in the same order or as isolated messages depending on the network and protocol.
Transaction Management in Database Management System
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
1. NAME:- MOHD. SHAHNAWAZ ALAM
ROLL NO:-
COURSE:-B.SC (IT)
SEMESTER: - THIRD
BOOK NO:- BT0076(TCP/IP)
SESSION:- SPRING 2012
1. Briefly discuss the functions of transport layer.
Transport layer accepts data from session layer breaks it into packets and delivers
these packets to the network layer. It is the responsibility of transport layer to guarantee
successful arrival of data at the destination device. It provides an end-to-end dialog that
is the transport layer at the source device directly communicates with transport layer at
destination device. Message headers and control messages are used for this purpose.
It separates the upper layers from the low level details of data transmission and makes
sure an efficient delivery. OSI model provides connection-oriented service at transport
layer.
It is responsible for the determination of the type of service that is to be provided to the
upper layer. Normally it transmits packets in the same order in which they are sent
however it can also facilitate the transmission of isolated messages. There is no surety
that these isolated messages are delivered to the destination devices in case of
broadcast networks and they will be in the same order as were sent from the source.
If the network layer do not provide adequate services for the data transmission. Data
loss due to poor network management is handled by using transport layer. It checks for
any packets that are lost or damaged along the way
2. 2. Explain the purpose of NCP in PPP.
The Network Control Protocol (NCP) phase in the PPP link connection process is used for establishing
and configuring different network-layer protocols such as IP, IPX or AppleTalk.
After a NCP has reached the Opened state, PPP will carry the corresponding network-layer protocol
packets. Any supported network-layer protocol packets received when the corresponding NCP is not in
the Opened state MUST be silently discarded.
During this phase, link traffic consists of any possible combination of LCP, NCP, and network-layer
protocol packets.
The most common layer 3 protocol negotiated is IP. The routers exchange IP Control Protocol (IPCP)
messages negotiating options specific to the protocol. The corresponding network control protocol for
IPv6 is IPv6CP.
IPCP negotiates two options: compression and IP address assignments. However, IPCP is also used to
pass network related information such as primary and backup Windows Name Service (WINS) and
Domain Name System (DNS) servers.
3. There are a large number of proposed standard protocols, which specify the operation of PPP over
different kinds of point-to-point links. Each has a status of elective. Point-to-point circuits in the form
of asynchronous and synchronous lines have long been the mainstay for data communications. In the
TCP/IP world, the de facto standard SLIP protocol has served admirably in this area, and is still in
widespread use for dial-up TCP/IP connections. However, SLIP has a number of drawbacks that are
addressed by the Point-to-Point Protocol. PPP has three main components:
• A method for encapsulating datagrams over serial links.
• A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.
• A family of Network Control Protocols (NCPs) for establishing and configuring different network-layer
protocols.
3. What is fragmentation? Explain its significance.
When an IP datagram travels from one host to another, it can pass through different physical
networks. Each physical network has a maximum frame size. This is called the maximum transmission
unit (MTU). It limits the length of a datagram that can be placed in one physical frame. IP implements
a process to fragment datagrams exceeding the MTU. The process creates a set of datagrams within
the maximum size. The receiving host reassembles the
original datagram. IP requires that each link support a minimum MTU of 68 octets. This is the sum of
the maximum IP header length (60 octets) and the minimum possible length of data in a non-final
fragment (8 octets). If any network provides a lower value than this, fragmentation and reassembly
must be implemented in the network interface layer. This must be transparent to IP. IP
implementations are not required to handle unfragmented datagrams larger than 576 bytes. In
practice, most implementations will accommodate larger values.
An unfragmented datagram has an all-zero fragmentation information field. That is, the more
fragments flag bit is zero and the fragment offset is zero. The following steps fragment the datagram:
4. 1. The DF flag bit is checked to see if fragmentation is allowed. If the bit is set, the datagram will be
discarded and an ICMP error returned to the originator.
2. Based on the MTU value, the data field is split into two or more parts. All newly created data
portions must have a length that is a multiple of 8 octets, with the exception of the last data portion.
3. Each data portion is placed in an IP datagram. The headers of these datagrams are minor
modifications of the original:
The more fragments flag bit is set in all fragments except the last.
The fragment offset field in each is set to the location this data portion occupied in the original
datagram,relative to the beginning of the original unfragmented datagram. The offset is measured in
8-octet units.
If options were included in the original datagram, the high order bit of the option type byte determines
if this information is copied to all fragment datagrams or only the first datagram. For example, source
route options are copied in all fragments.
– The header length field of the new datagram is set.
– The total length field of the new datagram is set.
– The header checksum field is re-calculated.
4. Each of these fragmented datagrams is now forwarded as a normal IP datagram. IP handles each
fragment independently. The fragments can traverse different routers to the intended destination.
They can be subject to further fragmentation if they pass through networks specifying a smaller MTU.
At the destination host, the data is reassembled into the original datagram. The identification field set
by the sending host is used together with the source and destination IP addresses in the datagram.
Fragmentation does not alter this field. In order to reassemble the fragments, the receiving host
allocates a storage buffer when the first fragment arrives. The host also starts a timer. When
subsequent fragments of the datagram arrive, the data is copied into the buffer storage at the location
indicated by the fragment offset field. When all fragments have arrived, the complete original
unfragmented datagram is restored. Processing continues as for unfragmented datagrams. If the
timer is exceeded and fragments remain outstanding,the datagram is discarded. The initial value of
5. this timer is called the IP datagram time to live (TTL) value.It is implementation-dependent. Some
implementations allow it to be configured. The netstat command can be used on some IP hosts to list
the details of fragmentation.
3. What Is a Socket?
A server application normally listens to a specific port waiting for connection requests from a client.
When a connection request arrives, the client and the server establish a dedicated connection over
which they can communicate. During the connection process, the client is assigned a local port number,
and binds a socket to it. The client talks to the server by writing to the socket and gets information from
the server by reading from it. Similarly, the server gets a new local port number (it needs a new port
number so that it can continue to listen for connection requests on the original port). The server also
binds a socket to its local port and communicates with the client by reading from and writing to it.
The client and the server must agree on a protocol--that is, they must agree on the language of
the information transferred back and forth through the socket.
Definition: A socket is one end-point of a two-way communication link between two programs running
on the network.
The java.net package in the Java development environment provides a class--Socket--that
represents one end of a two-way connection between your Java program and another program on
the network. The Socket class implements the client side of the two-way link. If you are writing
server software, you will also be interested in the ServerSocket class which implements the
server side of the two-way link. This lesson shows you how to use the Socket and ServerSocket
classes.
If you are trying to connect to the World Wide Web, the URL class and related classes
(URLConnection, URLEncoder) are probably more suitable than the socket classes to what you
are doing. In fact, URLs are a relatively high level connection to the Web and use sockets as part
of the underlying implementation. See Working with URLs for information about connecting
to the Web via URLs.
Internet Socket Client Example
The following example demonstrates an Internet socket client. It connects to the HTTP daemon
running on the local machine and returns the contents of the root index URL.
(let ((s (socket PF_INET SOCK_STREAM 0)))
(connect s AF_INET (inet-pton AF_INET "127.0.0.1") 80)
(display "GET / HTTP/1.0rnrn" s)
6. (do ((line (read-line s) (read-line s)))
((eof-object? line))
(display line)
(newline)))
5. Differentiate between FQDN and PQDN.
FQDN
A fully qualified domain name (FQDN) is the complete domain name for a specific computer, or host, on
the Internet. The FQDN consists of two parts: the hostname and the domain name. For example, an
FQDN for a hypothetical mail server might be mymail.somecollege.edu. The hostname is mymail,
and the host is located within the domain somecollege.edu.
PQDN
If a label is not terminated by a null string, it is called a partially qualified domain name (PQDN). A PQDN
starts from a node, but it does not reach the root. It is used when the name to be resolved belongs to
the same site as the client. Here the resolver can supply the missing part, called suffix, to create an
FQDN.
6. What do you mean by option negotiation explain with example?
All of the DO/DONT/WILL/WONT stuff above only serves to enable or disable an option. Some options
are only either off or on, in which case the negotiation above is sufficient. An example would be the
binary transmission option, TRANSMIT-BINARY. Others require that after they are enabled, the client
and server exchange parameters to control how the option works. For example, the TERMINAL-TYPE
option requires some way for the client to send the server the name of the terminal.
Telnet allows the client and server to send an arbitrary amount of data related to the option using a
process called option subnegotiation. A device begins this process by sending a special sequence of
Telnet protocol commands and data. First the command SB is sent, followed by the option number and
parameters as defined by the particular option; the end of the subnegotiation data is marked by the
protocol command SE. Of course, both SB and SE must be preceded by the Interpret As Command (IAC)
command byte.
7. Discuss FTP proxy transfer through firewall.
FTP provides the ability for a client to have data transferred from one FTP server to another FTP
server. Several justifications for such a transfer exist, including:
To transfer data from one host to another when direct access to the two hosts are not
possible.
To bypass a slow client connection.
To bypass a firewall restriction.
To reduce the amount of traffic within the client’s network
7. The process of setting up a proxy transfer begins with the use of a proxy open command. Any
FTP command can then be sent to the proxy server by preceding the command with proxy. For
example, executing the dir command lists the files on the primary FTP server. Executing the
proxy dir command lists the files on the proxy server. The proxy get and proxy put commands
can then be used to transfer data between the two hosts.
1. The FTP client opens a connection and logs on to the FTP server A.
2. The FTP client issues a proxy open command, and a new control connection is established
with FTP server B.
3. The FTP client then issues a proxy get command (though this can also be a proxy put).
4. A data connection is established between server A and server B. Following data connection
establishment, the data flows from server B to server A.
8. Explain various steps involved in SMTP Mail Transaction flow.
Although mail commands and replies are rigidly defined, the exchange can easily be followed in
Fig. 8.2. All exchanged commands, replies, and data are text lines delimited by a <CRLF>. All
replies have a numeric code at the beginning of the line. The steps of this flow are:
1. The sender SMTP establishes a TCP connection with the destination SMTP and then waits for
the server to send a 220 Service ready message or a 421 Service not available message when the
destination is temporarily unable to proceed.
8. 2. HELO (HELO is an abbreviation for hello) is sent, to which the receiver will identify itself by
sending back its domain name. The sender-SMTP can use this to verify that it contacted the right
destination SMTP. The sender SMTP can substitute an EHLO command in place of the HELO
command. A receiver SMTP that does not support service extensions will respond with a 500
Syntax Error, command unrecognized message. The sender SMTP then retries with HELO, or if
it cannot transmit the message without one or more service extensions, it sends a QUIT message.
If a receiver-SMTP supports service extensions, it responds with a multiline 250 OK message,
which includes a list of service extensions that it supports.
3. The sender now initiates the start of a mail transaction by sending a MAIL command to the
receiver. This command contains the reverse-path that can be used to report errors. Note that a
path can be more than just the user mailbox@host domain name pair. In addition, it can contain a
list of routing hosts. Examples of this are when we pass a mail bridge, or when explicit routing
information is provided in the destination address. If accepted, the receiver replies with a 250
OK.
4. The second step of the actual mail exchange consists of providing the server SMTP with the
destinations for the message. There can be more than one recipient. This is done by sending one
or more RCPTTO:<forward-path> commands. Each of them will receive a reply 250 OK if the
destination is known to the server, or a 550 No such user here if it is not.
5. When all RCPT commands are sent, the sender issues a DATA command to notify the
receiver that the message contents will follow. The server replies with 354 Start mail input, end
with <CRLF>.<CRLF>. Note the ending sequence that the sender should use to terminate the
message data.
6. The client now sends the data line by line, ending with the 5-character sequence
<CRLF>.<CRLF> line, upon which the receiver will acknowledge with a 250 OK, or an
appropriate error message if anything went wrong.
7. At this juncture, the client now has several possible actions:
If the client has no more messages to send, it can end the connection with a QUIT
command, which will be answered with a 221 Service closing transmission channel reply.
If the sender has no more messages to send, but is ready to receive messages (if any)
from the other side, it can issue the TURN command. The two SMTPs now switch their
role of sender/receiver, and the sender (previously the receiver) can now send messages
by starting with step 3.
If the sender has another message to send, it returns to step 3 and sends a new MAIL
command.
Fig. 8.2 illustrates the normal transmission of a single message from a client to a server.
Additionally, we provide a textual scenario in Fig. 8.3.
9. 9. Discuss various HTTP protocol parameters.
Protocol parameters: We provide some of the HTTP protocol parameters here.
· HTTP version: HTTP uses a <major>.<minor> numbering scheme to indicate the versions of
the protocol. The furthermost connection is performed according to the protocol versioning
policy. The <major> number is incremented when there are significant changes in protocol, such
as changing a message format. The <minor> number is incremented when the changes do not
affect the message format. The version of HTTP messages is sent by an HTTP-Version field in
the first line of the message. The HTTP-Version field is in the following format: HTTP-Version
= "HTTP" "/" 1*DIGIT "." 1*DIGIT
· Uniform Resource Identifiers (URIs): Uniform Resource Identifiers are generally referred to as
WWW addresses and a combination of Uniform Resource Locators (URLs) and Uniform
Resource Names (URNs). In fact, URIs are strings that indicate the location and name of the
source on the server.
10. · HTTP URL: The HTTP URL scheme enables you to locate network resources through the
HTTP protocol. It is based on the URI Generic Syntax and described in RFC 3986. The general
syntax of a URL scheme is: HTTP_URL = "http" "//" host [ ":" port ] [ abs_path ]. The port
number is optional. If it is not specified, the default value is 80.
10. with example, explain how OIDs are assigned to managed objects?
1. The original intention of the Recommendation ITU-T X.660 | ISO/IEC 9834 series was that
anyone should be able to get an OID if they needed one. There are registrars from which it is easy
and quite cheap (sometimes even free!) to have an OID assigned, such as:
o Several countries are handling out OIDs under their country arc {joint-iso-itu-
t(2) country(16)} and/or {iso(1) member-body(2)}.
o If you are representing a country and want to allocate an arc under {iso(1) member-
body(2)} or {joint-iso-itu-t(2) country(16)}, please see question 11 below.
o IANA (Internet Assigned Numbers Authority) hands out OIDs for free under {iso(1)
identified-organization(3) dod(6) internet(1) private(4)
enterprise(1)}; these OIDs are mainly intended for identifying MIBs in an SNMP
context.
o You can generate a UUID (or use a UUID that you already hold) and append it as a
subsequent arc of {joint-iso-itu-t(2) uuid(25)} (without registering it because
it is guaranteed to be globally unique with a high probability) according to
Recommendation ITU-T X.667 | ISO/IEC 9834-8 (but see question 30 about size
limitations of OID encodings).
o ETSI (European Telecommunication Standards Institute) hands out OIDs under {itu-t(0)
identified-organization(4) etsi(0) reserved(127) etsi-identified-organization(0)} even for non-
ETSI-members.
o You can obtain an OID from Microsoft to extend the Active Directory schema .
o Network operators can have an OID assigned by ITU-T under {itu-t(0) network-
operator(3)}; telecom operators can have an OID assigned by their national PTT
administration under {itu-t(0) administration(2)}.
o Dave Harvey (UK) has offered to sub-delegate ranges of his own root to anyone who uses
a DICOM toolkit (communication in medicine).