Escolar Documentos
Profissional Documentos
Cultura Documentos
C H A P T E R -S P E C I F I C I N P U T S
Chapter One
Objectives
In this chapter, the students have learned to:
Define computer networks
Discuss the evolution of computer networks
Focus Areas
This chapter explains the evolution of computer networks. You can start the session by asking
the students that what do they understand of the Internet. Then tell them that the Internet is a
network of computers. Now tell them that earlier computers were stand-alone units. But
gradually it was required to share resources and exchange information amongst the computers.
This led to the evolution of computer networks.
After discussing the evolution of network, explain the topics given in the Additional Inputs
section
Additional Inputs
The following section provides some extra inputs on the important topics covered in the SG:
Types of Network
The most common types of network are as follows:
Local Area Network (LAN): LAN consists of a group of computers and associated devices,
such as printers, modem, fax machine, and scanners. It provides networking capability to a
group of computers that are located within a single physical location such as a building. You
can connect LAN to MAN and WAN using routers. The data transmission speeds normally
ranges from 1 to 100 megabits per second.
Metropolitan Area Network (MAN): MAN connects computers over a large geographical
area, such as a city or a state. The size of MAN is intermediate between LAN and WAN. In
addition, the data transmission speeds ranges between the speeds of LAN and WAN.
Wide Area Network (WAN): WAN can spread over a large physical distance, such as the
Internet that spans across countries. You can use routers to connect a LAN to WAN.
Normally, the transmission rates are 2 Mbps, 34 Mbps, 45 Mbps, 155 Mbps, 625 Mbps.
Organizations that support WAN and use the Internet Protocol are called NSP (Network
Service Providers). NSP forms the core of the Internet.
Network Configurations
The network configurations can be categorized as follows:
Peer-to-peer network: You can design a peer-to-peer network if you have a small network,
which does not require security. A peer-to- peer network is also called as a workgroup. In a
peer-to-peer network, the computers communicate with each other directly. This network
type does not have a server, which manages the resources on the network. A single device
such as a hub can centrally connect and control all the nodes on the network. Each
computer on the network can share files and peripherals that are connected to the network.
Peer-to-peer network is a low-cost solution. However, if you have to share large and
complex files, such as databases or graphics, then the peer-to-peer network is not an
efficient solution. In this situation, client-server network will be efficient.
Client-server network: If your network requirements include more than ten nodes, and
work with large files such as databases, then you need to design a client-server network.
The computers in a client-server network are connected to a server. The server enables
FAQ
1. What is the use of sharing computers over the network?
Ans:
Sharing computers over the network enable you to exchange information and resources among
computers and their users. Information exchange can be electronic mail or file transfer.
Resource sharing can be usage of peripheral device, such as printer, connected to other
computers.
2. What is a workgroup?
Ans:
A group of users who share information in a multi-user environment is known as a workgroup.
5. What is a modem?
Ans:
A modem (MOdulate DEmodulate) is a device used to connect to the Internet through
telephone lines.
Focus Areas
This chapter explains protocol architecture. You can start the session by telling the students
that rules are defined for many activities. For example, there are rules to conduct business,
which should be followed to get effective results. Similarly, there is a set of rules that
coordinates the exchange of information over the network. Then tell the students that these
rules are called protocols.
Stress upon the OSI protocol architecture. Explain in detail the function of each layer.
Stress upon the fact that TCP/IP is a suite of protocols. Explain the functionality of each layer in
TCP/IP. Refer to the Additional Inputs section while explaining TCP/IP.
After explaining the two protocol architectures, ask the students to compare the two.
Additional Inputs
The following section provides some extra inputs on the important topics covered in the SG:
TCP/IP
TCP/IP is a connection-based protocol that provides a reliable flow of data between two
computers. It is a suite of protocols and is based on industry standards. TCP/IP is a routable
protocol capable of switching packets of data between subnets by using the address of the
destination that is contained in the packet.
Features of TCP/IP
The features of TCP/IP are as follows:
TCP/IP supports large window support. If large number of data packets is broadcasted and
the session is lengthy, then the size of the window is dynamically changed. This increases
the bandwidth and enables more data packets to be broadcasted in the network at one
time.
A TCP/IP host can notify and request the sender if any data packets are missing or
corrupted during the broadcast. This enables the sender to send only the corrupted or
missing data packets to the receiver again.
The time taken for a round-trip communication between the sender and receiver is called
RTT (Round Trip Time). Estimating RTT enables you to estimate the packet transit times
and adjust for optimum retransmission time for packets.
Advantages of TCP/IP
The advantages offered by TCP/IP are as follows:
It connects disparate hosts. In addition, TCP/IP is a routable protocol, which can be
connected to different networks by using gateways.
It provides a reliable, robust, and scalable cross-platform client-server framework.
It can establish a virtual private network (VPN) or extranet with Internet for providing remote
access.
4. The __________ layer uses the services provided by the network layer.
Ans.
Transport
5. At the receiving end, the data is passed to transport layer from ________.
Ans.
Network
6. Each layer adds ________ to the data it received from the upper layer.
Ans.
Its own information
8. The layers not present in TCP/IP model are __________ and ___________.
Ans.
Session and Presentation
9. At transport layer the protocols defined by TCP/IP model are _________ and _________.
Ans.
UDP and TCP
Part 2
1. Briefly explain what is meant by protocol and protocol architecture.
Ans.
A protocol is software that resides either in a computer's memory or in the memory of a
transmission device, such as a network interface card. Protocols govern format, timing,
sequencing, and error control. A protocol is used for communication between entities in
different systems. For two entities to communicate successfully, they must speak the same
language. What is communicated, how it is communicated, and when it is communicated must
conform to some mutually acceptable convention or protocol between the entities involved. The
following are the key elements of a protocol:
6. What are the layers present in TCP/IP model? Explain the layer, which provides the transport
functionalities along with the protocols defined for that layer.
Ans.
The TCP/IP model is made up of five layers:
Physical layer
Data Link layer
Network layer (IP)
Transport layer (UDP and TCP)
Application layer
The layer that provides the transport functionalities along with the protocols defined for that
layer is Network layer. The network layer is concerned with access to and routing data across a
network for two end systems attached to multiple interconnected networks. The Internet
Protocol (IP) is used at this layer to provide the routing function across multiple networks. This
protocol is implemented not only in the end systems but also in routers. A router is a processor
that connects two or more networks and whose primary function is to relay data from one
network to the other on its route from the source to the destination end system.
The Internet Protocol (IP) is the transmission mechanism used by the TCP/IP protocols. It is an
unreliable and connectionless datagram protocol – i.e. it provides a best-effort delivery service.
The term best-effort means that IP provides no error checking or tracking. IP assumes the
unreliability of the underlying layers and does its best to get the get a transmission through to its
destination, but with no guarantees. IP transports data in packets called datagrams each of
which is transported separately. Datagram can travel through different routes and can arrive out
of sequence or be duplicated. IP does not keep track of routes and has no facility to reorganize
datagrams once they arrive at their destination. These limitations should not be considered as
the weakness of the protocol stack. It is intentional, to get the maximum efficiency. The purpose
at this layer is to provide the bare-bone transmission functions that free the user to add only
those facilities necessary for a given application.
At this network layer TCP/IP supports the Internetworking Protocol (IP). IP, in turn, contains four
supporting protocols: ARP, RARP, ICMP and IGMP.
5. What is TCP/IP protocol architecture? How many layers are present in the TCP/IP protocol
architecture?
Ans:
TCP/IP is the most widely used architecture and is a result of protocol research and
development work conducted on the experimental network, ARPANET. The TCP/IP model is
made up of five layers: Physical layer, Data link layer, Network layer, Transport layer, and
Application layer. The first four layers provide physical standards, network interface,
internetworking and transport functions that correspond to the first four layers of the OSI model.
However, the three top layers of the OSI model are represented in the TCP/IP by a single layer
called Application layer.
6. Explain the data flow from device A to device B through different OSI layers.
Ans:
The sequence of data transfer from device A to device B through different OSI layers is:
Application layer of device A Presentation layer of device A Session layer of device
A Transport layer of device ANetwork layer of device A Data link layer of device A
Physical layer of device A Physical layer of device B Data link layer of device B
Network layer of device B Transport layer of device B Session layer of device B
Presentation layer of device B Application layer of device B.
7. What is the difference between physical layer and data link layer?
Ans:
The physical layer is the lowest layer of the OSI model and deals with the "mechanical,
electrical, functional, and procedural means" required for transmission of data. The physical
layer is responsible for data transmission from one host to another. The data link layer provides
for the control of the physical layer, and detects and corrects errors that can occur during
transmission. The data link layer adds header and trailer at the transmitting end and removes
the same at the receiving end.
Focus Areas
This chapter explains IP addressing. You can start the session by telling the students that while
requesting for some website, they must have seen some numbers separated with dots in the
status bar of the browser. This address is known as the IP address. Tell the students that each
system on the Internet has a unique IP address.
You should stress upon the various IP address classes. Explain the three levels of addressing
used in TCP/IP, namely Physical address, Internetwork (IP) address, and Transport or Port
address. Discuss the ways of determining the class of an address. Refer to IP addressing in the
Additional Inputs section.
Explain the concepts of unicast, multicast, and broadcast addresses. Explain the reserved
blocks of address for private networks. Discuss the need for private networks. If time permits,
explain the other topics given in the Additional Inputs section.
Additional Inputs
The following section provides some extra inputs on the important topics covered in the SG:
IP Addressing
A TCP/IP host is identified by a logical and unique IP address. It identifies the physical location
of the host in the network and is similar to a street address that identifies a house on a city
block.
The IP address consists of two parts, netid and hostid:
Netid: The netid is also called network address. The netid identifies all hosts that are
located on the same physical network. All the hosts of one physical network are assigned
the same netid to facilitate communication among them. The netid must be unique in the
internetwork.
Hostid: The hostid is also called host address. The hostid identifies a host in the network. A
hostid is unique for every computer in the netid.
Note
You cannot assign 127 as a netid in the network. This ID is
reserved for loopback and diagnostic functions. In addition, you
cannot have netid and hostid as 255. This ID is reserved for IP
broadcast functions.
The IP address is a 32-bit number that uniquely identifies a host such as computer, printer, and
router. The IP address is expressed in a dotted-decimal format and the IP address consists of
four octets. Each octet is separated by a dot. 191.168.3.24 is an example of IP address.
A bit that is set to one can be converted to a decimal value. The following graphic illustrates the
conversion of the number 191 to binary digits:
Note
You cannot have all bits within the netid set to 0. All 0’s in the
netid are used to denote a specific host on the local network.
The data from these hosts will not be routed.
Subnets
In a physical network, all the hosts that are bounded by IP routers share the same IP traffic.
This is because all the hosts are a part of a single domain. It is not possible to have millions of
hosts in a single broadcast domain. You can divide the network to smaller domains called
subnets. This process is called subnetting. Each subnet has a unique subnetted netid. Using
bits from the hostid portion of the original class-based netid create the subnetted ID.
However, if you use more bits than needed, then you can have more subnets and few hosts. If
you use fewer bits than needed, then you can have less subnets and more hosts.
Subnet Mask
A subnet mask is a 32-bit address that is used for distinguishing the netid from a hostid in the IP
address. In addition, it is used for specifying if the IP address of a host is located in a local
network or in a remote network.
Note
A default subnet mask is specified for TCP/IP networks that do
not have subnets. Although there is a single network, all TCP/IP
hosts require a subnet mask. The default subnet mask depends
on the type of class IP addresses used on the network.
The following table lists the bits used for subnet mask and the dotted decimal notation for each
class IP address:
Dotted
Class Binary Format Decimal
Format
1 AND 1 1
1 AND 0 0
0 AND 1 0
0 AND 0 0
Consider an example. The network of your organization consists of two subnets, Subnet A and
Subnet B. The TCP/IP host in Subnet A needs to send a packet to another TCP/IP host in
Subnet A. When TCP/IP is initialized, the IP address of the destination is ANDed with the
subnet mask. Since the subnet mask of the destination is same as that of the source, the
resulting bit is one. Therefore, TCP/IP determines that the packet is destined for the local
network, Subnet A.
2. In this scenario, you require three bits. Therefore, you configure the first three bits of the
hostid as subnet ID. This would mean that the values for first three bits of the third octet
would be one, as shown in the figure above. The decimal value for 11100000 is 224.
Therefore, the subnet mask for the above-specified bits is 255.255.224.0.
Defining Hostids
The first three bits in the third octet of the hostid are used for defining the subnet. Therefore,
you can calculate the range of hostids by changing the rest five bits to 11111. The decimal
value of 00111111 is 32.
The third octet in the subnet mask indicates the starting value in the range of the values in the
third octet of the IP address. The ending value in range of IP address is one less than the
starting value.
The following table displays the range of hostids possible in a Class B network:
For a Class B Network, that uses 14 bits for the hostid, you can have 16,384 hosts on the
network. The decimal value of 11111111111111 (14 bits that are used for host ID) is 16,384.
Supernetting
Supernetting enables you to have multiple IP networks on the same network interface. This is in
contrast with subnetting in which you have a single IP network on multiple network interfaces. If
the IP addresses are contiguous, then you can use a supernet.
3. What is a subnet?
Ans.
A subnet is one of the networks that is created when a large physical network is divided into
smaller networks.
6. What is IP multicasting?
Ans.
When a data packet is sent from an individual source to a group of destinations, a multicast
communication takes place. A multicast address is a Class D address. The whole address
defines a multicast group id. The multicast address can never be a source IP address. It can
only be a destination addresses in an IP datagram packet.
Some of the multicast addresses are:
224.0.0.1: All systems on this SUBNET
224.0.0.7: ST routers
224.0.1.7: Audio news
FAQ
1. What are IP addresses? Briefly explain them.
Ans:
4. What are IP address classes? Classify the IP address classes and briefly explain them.
Ans:
The InterNIC (The Internet's Network Information Center) allocates the IP addresses. The bits
that correspond to the network ID are set to one. The bits that correspond to the host ID are set
to zero. These IP addresses are divided into Class A, Class B, Class C, Class D, and Class E.
End users do not use the Class D and Class E IP addresses.
Class A IP address: You can have Class A IP addresses in your network if you have large
number of hosts. The high-order bit is always set to binary 0. The next seven bits complete
the network ID. The last three octets represent the host ID. The default subnet mask used
in the Class A IP address is 255.0.0.0. In addition, they have the first octet from 0-126. The
number of networks possible in class A IP addresses is 128. The number of hosts possible
per network is 16,777,216. For example, 11.52.36.8 is a Class A IP address.
Class B IP address: You can have Class B IP addresses if your organization has medium-
sized networks. The two high-order bits are always set to binary 1 0. The next 14 bits
complete the network ID. The last two octets represent the host ID. The default subnet
mask used in the Class B IP address is 255.255.0.0. In addition, they have the first octet
from 128-191. The number of networks possible in class B IP addresses is 16,384. The
number of hosts possible per network is 65,536. For example, 172.52.36.8 is a Class B IP
address.
Class C IP address: Class C IP addresses are used in small local area networks. The
three high-order bits are always set to binary 1 1 0. The next 21 bits complete the network
ID. The last octet represents the host ID. The default subnet mask used in the Class C IP
address is 255.255.255.0. In addition, they have the first octet from 192-223. The number of
networks possible in class A IP addresses is 2,097,152. The number of hosts possible per
network is 256. For example, 192.52.56.8 is a Class C IP address.
Class D IP address: Class D IP addresses are reserved for IP multicast addresses. The
four high-order bits are always set to binary 1 1 1 0. The remaining bits represent the
specific group in which the client participates. Microsoft supports class D IP addresses for
multicast applications to multicast data to hosts on an internetwork. These hosts are
designed to receive multicast data.
Class E IP address: The class E IP addresses are for experimental purposes. They are not
in use. The four high-order bits are always set to binary 1 1 1 1.
Focus Areas
This chapter explains protocols and routing. You can start the session by telling the students
that information over a network travels in the form of packets. Sending information through
packets requires the knowledge of various protocols.
Explain the difference between direct and indirect routing. Refer to routing protocols given in the
Additional Inputs section.
Describe the fields of an IP header. Explain checksum calculation.
Ask the students to differentiate between ARP and RARP. Discuss the format of an ARP
packet.
Explain the two categories of ICMP messages. Explain the types of messages present in each
category.
Additional Inputs
The following section provides some extra inputs on the important topics covered in the SG:
Routing Protocols
Routing is the process of transmitting information from one computer in a network to another
computer in the same or a different network. The OSI model provides a conceptual framework
about how communication takes place between computers. Internet protocols and routing
protocols govern the actual process, which takes place at the Network layer of the Open
System Interconnection (OSI) reference model.
Most networks are IP-based and use routing protocols for transmitting data. The routing of data
packets, both within a network and between networks, is made possible by a device called the
Router. A Router receives the data packet from a host device, looks at the IP address, and
forwards the packet to another router or destination device.
5. A device whose primary function is routing the IP datagrams over the physical network is
called
as ___________.
Ans.
Router
6. The two types of routing are _________ routing and _________ routing.
Ans.
Direct and indirect
8. The IP datagram header has the IP addresses of _______ and _________ systems.
Ans.
Source, destination
9. In the IP datagram __________ field is used for the error detection purpose.
Ans.
Checksum
10. Protocol used to find out the physical address of a destination host from its IP address is
known as _______.
Ans.
ARP
11. Protocol used for reporting the errors occurred during the datagram transfer is ________.
Ans.
ICMP
2. Explain the different classes of IP addresses. Write briefly about, given an IP address how to
find its class.
Ans.
The InterNIC (The Internet's Network Information Center) allocates the IP addresses. The bits
that correspond to the network ID are set to 1. The bits that correspond to the host ID are set to
0. These IP addresses are divided into Class A, Class B, Class C, Class D, and Class E. End
users do not use the Class D and Class E IP addresses.
Class A IP address: You can have Class A IP addresses in your network if you have large
number of hosts. The high-order bit is always set to binary 0. The next seven bits complete
the network ID. The last three octets represent the host ID. The default subnet mask used
in the Class A IP address is 255.0.0.0. In addition, they have the first octet from 0-127. The
number of networks possible in class A IP addresses is 128. The number of hosts possible
per network is 16,777,216. For example, 11.52.36.8 is a Class A IP address.
Class B IP address: You can have Class B IP addresses if your organization has medium-
sized networks. The two high-order bits are always set to binary 1 0. The next 14 bits
complete the network ID. The last two octets represent the host ID. The default subnet
mask used in the Class B IP address is 255.255.0.0. In addition, they have the first octet
from 128-191. The number of networks possible in class B IP addresses is 16,384. The
number of hosts possible per network is 65,536. For example, 172.52.36.8 is a Class B IP
address.
6.Write the IP header datagram. Explain the fields Service Type, Protocol, Checksum, Source
IP address and Destination IP address.
Ans.
The unit of transfer in an IP network is called an IP datagram header. A datagram is a variable
length packet consisting of two parts, header and data. The maximum length of an IP datagram
is 65,535 bytes (octets). The header can be from 20 to 60 bytes long and contains information
essential for routing and delivery. The length of the data part varies from packet to packet but
the total length of the IP datagram should be within 65,535 bytes.
The following are some of the fields of the header:
Service Type: The service type is an indication of the quality of service requested for this
IP datagram.
10. What are the error reporting messages present in the ICMP? Explain any two of them.
Ans.
IP provides an unreliable and connectionless datagram delivery. IP protocol does not have any
error-reporting or error-correcting mechanism. Therefore, if something goes wrong, the router
does not find route for the IP packet and so discards it. The sender will be never aware of it,
and he would keep resending the same. The ICMP was designed to compensate these
deficiencies of IP. It is a companion to the IP protocol and is part of the network layer along with
the IP.
FAQ
1. What is the functionality of a network layer?
Ans:
The network layer is responsible for transferring the data from the source to the destination host
across several physical networks. A key aspect of this transfer is the routing of packets fast,
efficiently, and reliably from the source to the destination machine typically traversing a number
of transmission links and network nodes where routing is carried out.
The network layer also provides the virtual network concept to the upper layers. As far as the
upper layers are concerned, there is only one network, and each host is recognized by a unique
IP address.
3. Define routing.
Ans:
Routing is the process by which a path is selected out of many available paths to the
destination host so that data packet reaches the destination fast, efficiently, reliably as required.
It uses the destination IP address that is stored in the IP datagram packet to reach the correct
destination.
4. Define ARP.
Ans:
ARP (Address Resolution Protocol) is a network-specific standard protocol. ARP is responsible
for converting the higher-level protocol addresses (IP addresses) to physical network
addresses.
Focus Areas
This chapter explains the transport layer. Explain the features of UDP and TCP. Explain the
basic function of the transport layer. Refer to the topics given in the Additional Inputs
section. List and explain the protocols used in the transport layer, namely, UDP (User
Datagram Protocol) and TCP (Transmission Control Protocol).
When discussing UDP, explain the following features of UDP:
a. Simple protocol
b. Connectionless service
c. No flow control
d. Process to process communication
e. Limited error checking
f. Provides unreliable service
Sensitize the students to the fact that UDP is used in applications that require high data transfer
rate and can have low reliability. Explain the UDP datagram format. Also explain the operation
of UDP.
When discussing TCP, explain the following features of TCP:
a. Simple network communication from the application programmer's point of view.
b. Reliable service
c. Connection-oriented protocol
d. Built-in flow-control
e. Stream data transfer
f. Full-duplex service
Explain the TCP segment. Explain how connection is established and terminated in TCP using
three-way handshake and four-way handshake respectively. Explain the flow control and error
control mechanisms in TCP. Also explain the operation of TCP.
Additional Inputs
The following section provides some extra inputs on the important topics covered in the SG:
Transport Layer
There may be several processes running on a computer. Thus, source to destination delivery
involves not only the delivery of a message from one computer system to another but also from
one process to another across the two systems. The Transport layer does this by including a
service-point address on its header, which ensures the delivery of the message to the right
process.
Reliable Delivery
There are a number of aspects that the Transport layer needs to manage for reliable delivery of
data between the computers on a network. These are error control, sequence control, loss
control, and duplication control.
Error control: The Transport layer implements error control by ensuring that the data sent
by the sending machine is delivered at the destination machine exactly as it originated from
the source machine. The Data Link layer takes care of error control, but only for computer-
to-computer delivery. However, the Transport layer ensures source-to-destination reliability
while implementing error control. One method of implementing reliability is through
acknowledgements. When a packet is delivered to a destination computer, an
acknowledgement of receipt is returned to the source computer. In this way, the Transport
layer tracks and validates the transmission of each packet.
Sequence control: The Transport layer is responsible for ensuring the correct sequence of
data both at the sender’s end and at the receiver’s end. At the sender’s end, the Transport
layer receives data from the upper layers and ensures that the data is usable by the lower
layers. At the receiver’s end, the Transport layer ensures that the data is assembled
correctly. The Transport layer makes use of the sequence numbers. It assigns a sequence
number to each segment that it transfers. These sequence numbers enable the message to
be reassembled in an ordered manner at the destination. The sequence numbers also help
to identify and replace the packets that are lost during transmission.
Loss control: The Transport layer also ensures that all the segments of data are delivered
to the destination machine. Some segments of data may be lost during transmission due to
the segmentation of data. The Transport layer uses the sequence numbers to identify the
segments that are missing and requests for the redelivery of those segments.
Duplication control: The Transport layer guarantees that none of the segments of data
arrives duplicated at the destination machine. In addition to identifying the missing
segments of data, the sequence numbers also help to identify and discard the segments
that are duplicated.
Multiplexing
Generally, the Transport layer creates different network connections for each transport
connection that the Session layer requires. However, if a particular transport connection
requires a high throughput, the Transport layer might create multiple network connections and
divide the data among the network connections. Though this improves throughput, it also
increases the cost of creating and maintaining a network connection. Therefore, the Transport
layer might transfer and merge several transport connections into the same network connection
to reduce the cost. This process is called multiplexing. In all cases, the Transport layer is
responsible for notifying the Session layer about the multiplexing process. Multiplexing can be
of two types – upward and downward:
Upward: In upward multiplexing, the Transport layer uses virtual circuits depending on the
services of the layers below it. Generally, the underlying networks charge all the virtual
circuits for their established connections. By using upward multiplexing, the Transport layer
sends multiple transmissions that are bound for the same destination along the same path
or circuit. By doing this, the Transport layer makes use of the established circuit in a cost-
effective manner.
Downward: In downward multiplexing, the Transport layer splits up a single connection into
several paths to improve the speed of delivery. Downward multiplexing is helpful when the
capacity of the underlying networks is low or slow.
2. In the sending system, UDP receives data unit from the ______________ layer.
Ans.
Network
3. UDP needs the _________ address to deliver the data to the correct process.
Ans.
Port
8. _________ field in the TCP header is used to detect errors in the TCP segment.
Ans.
Checksum
9. In TCP, before sending data, a __________ is established between the sending and
receiving processes.
Ans.
Virtual path
Part 2
1. Write a short note on, services offered by the UDP and what kind of applications UDP service
is used.
Ans.
UDP is a connectionless, unreliable transport protocol. UDP provides process-to-process
communication. In addition, it performs very limited error checking. UDP is very efficient
because of its simplicity. Establishing a connection with the destination process is fast, and if
reliability is not an important criterion then the transfer of data is faster for bulk transfer.
The services offered by UDP are as follows:
Connectionless Services: UDP provides a connectionless service. This means that each
user datagram sent by the UDP is an independent datagram. There is no relationship
between the different user datagrams even if they are coming from the same source
process and going to the same destination program. The user datagrams are not
numbered. Also, there is no connection establishment and no connection termination at the
beginning and end of a transaction. This means that each user datagram can travel a
different path.
One of the ramifications of being connectionless is that the process that uses UDP cannot
send a stream of data to UDP and expect to receive the same stream of data at the
destination. Instead each request must be small enough to fit into one user datagram. Only
those processes sending short messages should use UDP. Otherwise if needed, the end
application should take care of section of data arriving out of order and reordering them to
get the original stream.
Flow and Error Control: UDP is a very simple, unreliable transport protocol. There is no
flow control, and hence no windowing mechanism. The receiver may overflow with
incoming messages. Again it is left for the end application to take of it. The end applications
which uses UDP either generates less data or they have inbuilt mechanism to take care of
flow control.
There is no error control mechanism in UDP except for the checksum. This means that the
sender does not know if a message has been lost or duplicated. When the receiver detects
an error using the checksum, the user datagram is silently discarded.
Encapsulation ad Decapsulation: To send a message from one process to another, the
UDP protocol encapsulates and decapsulates the messages.
Multiplexing and Demultiplexing: In a host running a TCP/IP protocol, there is only one
UDP but possibly several processes that may want to use the services of UDP. To handle
this situation, UDP uses the concept called Multiplexing and Demultiplexing.
The applications at the Transport layer use the services of UDP. There are several multimedia
applications with powerful desktop computer and high bandwidth communication network that
uses UDP. The multimedia applications, which require bulk transfer of data, needs no fool-proof
reliability. The reliability provided by the underlying networks is sufficient. Loss of data to some
extent is tolerable, and in fact in some cases there are techniques available to recover the lost
data with the source requiring sending it again.
Today’s multimedia applications, such as VoIP (Voice over IP) and Video conferencing
applications use a protocol known as RTP (Real Time Protocol) for data transfer at the
application layer. This RTP protocol uses the services of UDP.
2. Explain how port number concept is used to offer process-process data communication in
UDP.
Ans.
9. Describe briefly how error-control mechanism is achieved in TCP when data is corrupted,
and when acknowledgement is lost.
Ans.
TCP is a reliable transport layer protocol. This means that an application program that delivers
a stream of data to TCP relies on TCP to deliver the entire stream to the application program on
10. Explain why one needs the service of Urgent Data operation of TCP.
Ans.
TCP is a stream-oriented protocol. This means that the data is presented from the application
program to the TCP as a stream of characters. Each byte of data has a position in the stream.
However, there are occasions in which an application program needs to send urgent bytes.
This means that the sending application program wants a piece of data to be read out of order
by the receiving application program. Suppose that the sending application program is sending
data to be processed by the receiving application program. When the result of processing
comes back, the sending application program finds that everything is wrong. It wants to abort
the process, but it has already sent a huge amount of data. If it issues an abort command
(Control + C), these two characters will be stored at the end of the receiving TCP buffer. It will
be delivered to the receiving application program after all the data has been processed.
The solution is to send a segment with the URG bit set. The sending application program tells
the sending TCP that the piece of data is urgent. The sending TCP creates a segment and
inserts the urgent data at the beginning of the segment. The rest of the segment can contain
normal data from the buffer. The urgent pointer field in the header defines the end of the urgent
data and the start of normal data.
13. Explain how connection is established in TCP using three-way hand shaking.
Ans.
The connection establishment in TCP is called three-way handshaking. In this procedure, an
application program, called the client, wants to make a connection with another application
program, called the server, using TCP as the transport layer protocol.
The three-way handshaking procedure starts with the server. The server program tells its TCP
that it is ready to accept a connection. This is called a request for a passive open.
The client program makes a request for an active open. A client that wishes to connect to a
server tells its TCP that it needs to be connected to a particular server. The clients TCP can
now start the three-way handshaking process.
The steps of the process are as follows:
The client sends the first segment, with the SYN bit set, which is known as SYN segment. The
segment includes the source and destination port numbers. The destination port number
clearly defines the server to which the client wants to be connected. The segment also
contains the client Initialization Sequence Number (ISN) used for numbering the bytes of data
14. Describe briefly how Flow-control is achieved in TCP using sliding window mechanism.
Ans.
To accomplish flow control, TCP uses a sliding window protocol. With this method, both hosts
use a window for each connection. The window covers a portion of the buffer that a host can
send before worrying about an acknowledgement from the other host. The window is called a
sliding window because it slides over the buffer as the receiver sends acknowledgement of the
bytes received without any error. Consider a sliding window of size 10. Before receiving any
acknowledgement from the destination, the source can send up to 10 bytes. However, if it
receives acknowledgement of the first three bytes, it can slide the window three bytes to the
right. This means that now it can send 10 more bytes before worrying about an
acknowledgement.
The previous example shown is a fixed size window. However flow-control needs the size of the
window to vary to achieve the flow control. Hence in TCP window size is variable. The
destination, in each acknowledgement segment, can define the size of the window. The
advertised size is relative to the acknowledgement number. For example, if the receiver
acknowledges the receipt of byte 3,000 and defines the size of the window to be 200, it means
that the window now expands from byte 3001 to byte 3,200.
The destination can also increase or decrease the size of the window in an acknowledgement
segment.
FAQ
1. What does process-to-process communication mean?
Ans:
There may be several processes running on a computer. Thus, source to destination delivery
involves not only the delivery of a message from one computer system to another but also from
one process to another across the two systems. The Transport layer does this by including a
service-point address on its header, which ensures the delivery of the message to the right
process.
3. What is checksum?
Ans:
©NIIT Coordinator Guide – Computer Networks 51
The error detection method used by most of the TCP/IP protocols is called checksum. The
checksum protects against the corruption that may occur during the transmission of a packet.
5. What is buffer?
Ans:
A buffer is a data area shared by hardware devices or program processes that operate at
different speeds or with different sets of priorities. The buffer allows each device or process to
operate without being held up by the other. In order for a buffer to be effective, the size of the
buffer and the algorithms for moving data into and out of the buffer need to be considered by
the buffer designer. For stream delivery, the sending and receiving TCPs use buffers. The
sending TCP uses a buffer to store the data coming from the sending application program. The
receiving TCP receives the segments and stores them in a receiving buffer. The receiving
application program uses the read operation to read the data from the receiving buffer, but it
does not have to read all of the data contained in one segment in one operation. Since the rate
of reading can be slower than the rate of receiving, the data is kept in the buffer until the
receiving application reads if completely.
Focus Areas
This chapter explains the application layer. You can explain the client server model with the
help of an example. You can say that in a market when you requesting for an item from the
shopkeeper, you are the client. Similarly, there is the concept of client in a network. The Web
browser is the client, which requests for websites from the server. The server is like the
shopkeeper.
You should refer to application layer given in the Additional Inputs section.
Explain the issues involved in the application layer using a client server model. Explain how a
client program operates. Explain the concepts of active open, passive open, and concurrency.
Also explain the two ways in which a server program can operate, concurrently or iteratively.
Explain the difference between a program and a process. Finally, explain how the FTP (File
Transfer Protocol) network application operates. Discuss the various commands of FTP.
If time permits, you can list the various protocols in the application layer given in the Additional
Inputs section.
Additional Inputs
The following section provides some extra inputs on the important topics covered in the SG:
Protocol Description
2. In TCP/IP the two communicating process can be best described using the
__________________ model.
Ans.
Client-server
5. In client-server model, a user wanting a particular service runs the ________ program.
Ans.
Application
10. Information regarding the file, such as file type, structure, and transmission mode are sent
to the server _______ the data transfer takes place.
Ans.
Before
Part 2
1. Write a brief description about Client-server model.
Ans.
The purpose of a TCP/IP or Internet is to provide data communication services to users. The
hurdles created because of the geographical distance while accessing information from another
host should be minimized. If a user at a local host computer wishes to receive a service from a
computer at a remote site. Computer executes specific programs to perform the specific job.
There would be a program to do the Word processing, a program to browse the web site and so
on. In other words for data communication to take place, a computer runs a program to request
a service from another program residing on the destination computer. This means that two
computers connected by an Internet should each run a program, one to provide a service and
one to request a service.
It is important to determine beforehand, who makes the request for service and who offers it.
Issue of whether both the application programs are able to request services and provide
Connectionless-Iterative Server
8. Write a brief note on the Commands processing. Describe the groups into which Commands
(that are sent from client to server) can be divided.
Ans.
FTP uses the control connection to establish a communication between the client control
process and the server control process. During this communication, the commands are sent
from the client to the server and the responses are sent back from the server to the client.
Commands: We can roughly divide the commands into six groups: access commands, file
management commands, data formatting commands, port defining commands, file transferring
commands, and miscellaneous commands.
Access commands: These commands let the user access the remote system.
Commands are - USER, PASS, ACCT, REIN, QUIT, ABOR
File management commands: These commands let the user access the file system on the
remote computer. They allow the user to navigate through the directory structure, create new
directories, delete files, and so on.
Commands are – CWD, CDUP, DELE, LIST, ….
Data formatting commands: These commands let the user define the data structure, file type
and transmission mode. The defined format is then used by the file transfer commands.
Commands are – TYPE, STRU, and MODE.
Port defining commands: These commands define the port number for the data connection
on the client site.
Commands are – PORT, PASV
9. Briefly explain the steps involved in storing an image file into the server from client side.
Ans.
The steps involved in storing an image file into the server from client side are as follows:
18. The control connection to port 21 is created.
19. After the control connection to port 21 is created, the FTP server sends the 220 (service
ready) response on the control connection.
20. The client sends the USE command (this USER command passes the user information to
server).
21. The server responds with 331 (user name is OK, a password is required).
22. The client sends the PASS command (sends the password for the user).
23. The server responds with 230 (user login OK, if user id and password match).
24. The client issues a passive open on an ephemeral port for data connection and sends the
PORT command (over the control connection) to give this port number to the server.
25. The server does not open the connection at this time, but prepares itself for issuing an
active open on the data connection between port 20 (server side) and the ephemeral port
received from the client. It sends the response 150 (data connection will be open shortly).
26. The client sends the TYPE command (to indicate the type of data as binary …)
27. The server responds with response 200 (command OK)
28. The client sends the STRU command (defines the data following as of file type.)
29. The server responds with response 200 (command OK)
30. The client sends the STOR command (to request the server to store the data)
31. The server opens the data connection and sends the message 250.
32. The client sends the file on the data connection. After the entire file is sent the data
connection is closed. Closing the data connection means end-of-file.
33. The server sends the response 226 on the control connection.
34. The client sends the QUIT command (or it can send the other commands to open another
data connection for transferring another file).
35. The server responds with 221 (service closing) and it closes the control connection.
FAQ
1. What is concurrency?
Ans:
Concurrency means the ability to run simultaneously. Both clients and serves can run in
concurrent mode. However, the concurrency in clients and server differ from each other.
Concurrency in Clients:
Clients can be run on a computer either iteratively or concurrently. Running clients iteratively
means running them one by one; one client must start, run, and terminate before the computer
can start another client. However today, most computers allow concurrent clients, that is, two
or more clients running at the same time.
Concurrency in Servers
Because an iterative server can process only one request at a time, it receives a request,
processes it, and sends the response to the requestor before it handles another request. If
there is a request from another client, then it has to either reject the request or keep the request
in waiting until the server finishes the first one. On the other hand, a concurrent server can
process many requests at the same time and thus can share its time between many requests.