Computer Networks and Protocols Overview
Computer Networks and Protocols Overview
MODULE1
Computer Networks and Protocols – BEC702
-----------------------------------------------------------------------------------------------------------------------------------
Introduction: Data communication: Components, Data representation, Data flow, Networks:
Network criteria, Physical Structures, Network types: LAN, WAN, Switching, The Internet.
Network Models:Protocol Layering: Scenarios, Principles, Logical Connections, TCP/IP Protocol
Suite: Layered Architecture, Layers in TCP/IP suite, Description of layers, Encapsulation and
Decapsulation, Addressing, Multiplexing and Demultiplexing, The OSI Model: OSI Versus
TCP/IP, Data-Link Layer: Introduction: Nodes and Links, Services, Two Categories’ of link, Sublayers, Link
Layer addressing:Types of addresses, ARP(1.1,1.2, 1.3.1to 1.3.4,2.2, 2.3 ,9.1, 9.2.1, 9.2.2 )
------------------------------------------------------------------------------------------------------------------------------
Data communication is the exchange of data between two devices via some form of transmission
medium such as a wire cable.
Explain in detail the five components of data communication system with neat diagram.
.IN
C
N
SY
2. Sender. The sender is the device that sends the data message. It can be a computer,
U
Simplex
In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two
devices on a link can transmit; the other can only receive (see Figure 1.2a). Keyboards and traditional
monitors are examples of simplex devices.
Half-Duplex
In half-duplex mode, each station can both transmit and receive, but not at the same time. When one
device is sending, the other can only receive, and vice [Link]-talkies and CB (citizens band)
.IN
radios are both half-duplex systems.
Full-duplex
In full-duplex mode (also called duplex), both stations can transmit and receive simultaneously. In
C
full-duplex mode, signals going in one direction share the capacity of the link with signals going inthe
other direction. One common example of full-duplex communication is the telephone network. When
N
two people are communicating by a telephone line, both can talk and listen at the same time.
SY
NETWORKS
phone, or security system. A connecting device can be a router, which connects the network to other
networks, a switch, which connects devices together, a modem (modulator-demodulator), which
VT
changes the form of data, and so on. In a network these devices are connected usingwired or wireless
transmission media such as cable or air.
Listtheperformancecriteriaofthe network.
A network must be able to meet a certain number of criteria. The most important of these are
performance, reliability, and security.
Performance:
The performance of a network depends on a number of factors, including the number of users, thetype
of transmission medium, the capabilities of the connected hardware, and the efficiency of the
software.
Performance can be measured in many ways, including transit time and response time. Transit time is
the amount of time required for a message to travel from one device to another. Response time is the
elapsed time between an inquiry and a response.
Performance is often evaluated by two networking metrics: throughput and delay. An efficient
network needs more throughput and less delay
Reliability:
Network reliability is measured by the frequency of failure, the time it takes a link to recover from a
failure, and the network’s robustness in a catastrophe.
Security:
Network security issues include protecting data from unauthorized access, protecting data from
damage and development, and implementing policies and procedures for recovery from breaches and
data losses.
TypesofNetworkConnection:
Anetwork is two or more devices connected through links. A link is a communications pathway that
transfers data from one device to another. There are two possible types of connections: point-to-point
and multipoint.
.IN
Point-to-Point:
Apoint-to-point connection provides a dedicated link between two devices. The entire capacity of the
link is reserved for transmission between those two devices. Point-to-point connections use an actual
length of wire or cable to connect the two ends or wireless links such as microwave or satellite links.
C
Eg. A point-to-point connection between the remote control and television’s control system.
Multipoint:
N
A multipoint connection is one in which more than two specific devices share a single link. In a
multipoint environment, the capacity of the channel is shared, either spatially or temporally (time
SY
.IN
(ii) A mesh topology is robust.
If one link becomes unusable, it does not incapacitate the entire system.
(iii) Mesh topology supports privacy or security.
When every message travels along a dedicated line, only the intended recipient sees it.
C
Physical boundaries prevent other users from gaining access to messages.
(iv) Finally, point-to-point links make fault identification and fault isolation easy.
N
Traffic can be routed to avoid links with suspected problems. This facility enables the
network manager to discover the precise location of the fault and aids in finding its cause
SY
and solution.
Disadvantages:
U
VT
The main disadvantages of a mesh are related to the amount of cabling and the number of I/O
ports required.
(i) Installation and reconnection are difficult, because every device must be connected to
every other device.
(ii) The sheer bulk of the wiring can be greater than the available space (in walls, ceilings, or
floors) can accommodate.
(iii) The hardware required to connect each link (I/Oports and cable)can be prohibitively
expensive.
One practical example of a mesh topology is the connection of telephone regional offices in which
each regional office needs to be connected to every other regional office.
Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central controller, usually
called a hub. The devices are not directly linked to one another. Unlike a mesh topology, a star
topology does not allow direct traffic between devices. The controller acts as an exchange: If one
device wants to send data to another, it sends the data to the controller, which then relays the data to
the other connected device (see Figure 1.5)
Advantages:
.IN
C
N
SY
(i) A star topology is less expensive and easy to install and reconfigure than a mesh
topology.
In a star, each device needs only one link and one I/O port to connect it to any number of
others. Far less cabling needs to be housed and additions, moves, and deletions involve
U
isolation.
If one link fails, only that link is affected. All other links remain active. As long as thehub
is working, it can be used to monitor link problems and bypass defective links.
Disadvantages:
(i) One big disadvantage of a star topology is the dependency of the whole topology on one
single point, the hub. If the hub goes down, the whole system is dead.
(ii) Although a star requires far less cable than a mesh, each node must be linked to a central
hub. For this reason, often more cabling is required in a star than in some other topologies
(such as ring or bus).
between the device and the main cable. A tap is a connector that either splices into the main cable or
punctures the sheathing of a cable to create a contact with the metallic core.
Advantages:
(i) Ease of installation.
.IN
(ii) Bus topology uses less cabling than mesh or star topologies.
Disadvantages:
(i) Difficult reconnection and fault isolation.
(ii) Difficult to add new devices.
(iii)
C
Signal reflection at the taps can cause degradation in quality.
(iv) Limits the number of devices and spacing of devices connected to a given length of cable.
N
(v) A fault or break in the bus cable stops all transmission, even between devices on the same
side of the problem.
SY
Ring Topology:
In a ring topology, each device has a dedicated point-to-point connection with only the two devices
on either side of it. A signal is passed along the ring in one direction, from device to device, until it
reaches its destination. Each device in the ring incorporates a repeater. When a device receives a
U
signal intended for another device, its repeater regenerates the bits and passes them along. Ring
topology was prevalent when IBM introduced its local-area network, Token Ring. Today, the need for
VT
Advantages:
(i) A ring is relatively easy to install and reconfigure.
(ii) To add or delete a device requires changing only two connections.
(iii) Fault isolation is simplified.
Disadvantages:
(i) Unidirectional traffic in the network.
(ii) In a simple ring, a break in the ring(such as a disabled station) can disable the entire
network.
NETWORKTYPES:
Networks are classified into two types as LAN (Local Area Network) and WAN (Wide Area
Network) on the basis of a few criteria such as size, geographical coverage, and ownership.
Local Area Network (LAN):
A local area network (LAN) is usually privately owned and connects some hosts in a single office,
building, or campus. Depending on the needs of an organization, a LAN can be as simple as two PCs
and a printer in someone’s home office, or it can extend throughout a company and include audio and
video devices.
.IN
Each host in a LAN has an identifier, an address, that uniquely defines the host in the LAN. Apacket
sent by a host to another host carries both the source host’s and the destination host’s addresses.
In the past, all hosts in a network were connected through a common cable, which meant that a
packet sent from one host to another was received by all hosts. The intended recipient keeps the
packet; the others drop the packet.
C
Today, most LANs use a smart connecting switch, which is able to recognize the destination address
N
of the packet and guide the packet to its destination without sending it to all other hosts. Figure 1.8
shows a LAN using either a common cable or a switch.
SY
U
VT
.IN
C
N
SY
A switched WAN is a network with more than two ends. A switched WAN is used in the backbone of
global communication today. A switched WAN is a combination of several point-to-point WANs that
U
When two or more networks are connected, they make an internetwork, or internet. As an example,
assume that an organization has two offices, one on the east coast and the other on the west coast.
Each office has a LAN that allows all employees in the office to communicate with each other. To
make the communication between employees at different offices possible, the management leases a
point-to-point dedicated WAN from a service provider, such as a telephone company, and connectsthe
two LANs. Now the company has an internetwork, or a private internet (with lowercase i).
Communication between offices is now possible. Figure 1.11 shows this internet.
When a host in the west coast office sends a message to another host in the same office, the router
blocks the message, but the switch directs the message to the destination. On the other hand, when a
host on the west coast sends a message to a host on the east coast, router R1 routes the packet torouter
R2, and the packet reaches the destination.
Switching:
An internet is a switched network in which a switch connects at least two links together. A switch
.IN
needs to forward data from a network to another network when required. The two most common types
of switched networks are circuit-switched and packet-switched networks.
Circuit-Switched Network:
In a circuit-switched network, a dedicated connection, called a circuit, is always available betweenthe
C
two end systems; the switch can only make it active or inactive. Figure 1.13 shows a very simple
switched network that connects four telephones to each end instead of computers as an end system
N
because circuit switching was very common in telephone networks in the [Link] Figure 1.13, the
fourtelephones at each side areconnected to aswitch. The switch connectsa telephone set atone side to
SY
a telephone set at the other side. The thick line connecting two switches is a high-capacity
communication line that can handle four voice communications at the same time; the capacity can be
shared between all pairs of telephone sets.
Packet-Switched Network:
U
In a computer network, the communication between the two ends is done in blocks of data called
VT
packets. The exchange of individual data packets between the two computers allows switches to
function for both storing and forwarding, because a packet is an independent entity that can be stored
and sent later.Figure1.14 shows a small packet-switched network that connects four computers at
onsite to four computers at the other site.A router in a packet-switched network has a queue that can
store and forward the packet.
If only two computers (one at each site) need to communicate with each other, there is no waiting for
the packets. However, if packets arrive at one router when the thick line is already working at its full
capacity, the packets should be stored and forwarded in the order they arrived. The two simple
.IN
examples show that a packet-switched network is more efficient than a circuit switched network, but
the packets may encounter some
The Internet:
Internet (uppercase I ), is composed of thousands of interconnected networks. Figure 1.15 shows a
C
conceptual (not geographical) view of the Internet. The figure shows the Internet as severalbackbones,
provider networks, and customer networks. At the top level, the backbones are large networks owned
N
by some communication companies such as Sprint, Verizon (MCI), AT&T, andNTT. The backbone
networks are connected through some complex switching systems, called peering points. At the
SY
second level, there are smaller networks, called provider networks, that use the services of the
backbones for a fee. The provider networks are connected to backbones and sometimes to other
provider networks. The customer networks are
PROTOCOLLAYERING:
U
Protocol:
In data communication and networking, a protocol defines the rules that both the sender and receiver
VT
.IN
C
N
SY
U
Computer A communicates with computer B. As the figure shows, we have five communicating
devices in this communication: source host (computer A), the link-layer switch in link 1, the router,
VT
the link-layer switch in link 2, and the destination host (computer B). Each device is involved with a
set of layers depending on the role of the device in the internet. The two hosts are involved in all five
layers; the source host needs to create a message in theapplication layer and send it down the layers so
that it is physically sent to the destination host. The destination host needs to receive the
communication at the physical layer and then deliver it through the other layers to the application
layer.
.IN
The router is involved in only three layers; there is no transport or application layer in a router as long
as the router is used only for routing. Although a router is always involved in one network layer, it is
C
involved in n combinations of link and physical layers in which n is the number of links the router is
connected to. The reason is that each link may use its own data-link or physical protocol. Forexample,
N
in the above figure, the router is involved in three links, but the message sent from source A to
destination B is involved in two links. Each link may be using different link-layer and physical- layer
SY
protocols; the router needs to receive a packet from link 1 based on one pair of protocols and deliver it
to link 2 based on another pair of protocols.
Layers of TCP/IP Protocol Suite
Physical Layer:
U
Physical layer is responsible for carrying individual bits in a frame across the link. Physical layer is
the lowest layer in the TCP/IP protocol suite. The communication between two devices at the physical
VT
layer is still a logical communication because there is another, hidden layer, the transmission media,
under the physical layer. Two devices are connected by a transmission medium (cable or air). The
transmission medium does not carry bits; it carries electrical or optical signals. So the bits received in
a frame from the data-link layer are transformed and sent through the transmission media, but the
logical unit between two physical layers in two devices is a bit. There are several protocols that
transform a bit to a signal.
Data-linkLayer:
The data-link layer is responsible for taking the datagram and moving it across the link. The link can
be a wired LAN with a link-layer switch, a wireless LAN, a wired WAN, or a wireless WAN. Ineach
case, the data-link layer is responsible for moving the packet through the link. TCP/IP does not define
any specific protocol for the data-link layer. It supports all the standard and proprietary protocols. Any
protocol that can take the datagram and carry it through the link suffices for the network layer. The
major services of the protocols in data link layer are framing, error control and flow control. The data-
link layer takes a datagram and encapsulates it in a packet called a frame. Each link-layer protocol
may provide a different service. Some link-layer protocols provide complete error detection and
correction, some provide only error correction.
Network Layer:
The network layer is responsible for creating a connection between the source computer and the
destination computer. The communication at the network layer is host-to-host. However, since there
can be several routers from the source to the destination, the routers in the path are responsible for
choosing the best route for each packet. The network layer is responsible for host-to-host
communication and routing the packet through possible routes.
The network layer in the Internet includes the main protocol, Internet Protocol (IP), that defines the
format of the packet, called a datagram at the network layer. IP also defines the format and the
structure of addresses used in this layer. IP is also responsible for routing a packet from its source to
itsdestination, whichisachieved byeach routerforwarding thedatagram to thenextrouterinitspath. IP is a
connectionless protocol that provides no flow control, no error control, and no congestion control
.IN
services. The network layer also includes unicast (one-to-one) and multicast (one-to-many) routing
protocols. A routing protocol does not take part in routing (it is the responsibility of IP), but it creates
forwarding tables for routers to help them in the routing process. The network layer also has some
auxiliary protocols that help IP in its delivery and routing tasks. The Internet Control Message
C
Protocol (ICMP) helps IP to report some problems when routing a packet. The Internet Group
Management Protocol (IGMP) is another protocol that helps IP in multitasking. The Dynamic Host
N
Configuration Protocol (DHCP) helps IP to get the network-layer address for a host. The Address
Resolution Protocol (ARP) is a protocol that helps IP to find the link-layer address of a host or arouter
SY
segment (inTCP) or a user datagram (in UDP) in different protocols) and sends it, through the logical
(imaginary) connection, to the transport layer at the destination host. In other words, the transport
VT
layer is responsible for giving services to the application layer: to get a message from an application
program running on the source host and deliver it to the corresponding application program on the
destination host. There are a few transport-layer protocols like TCP, UDP and SCTP in the Internet,
each designed for some specific task.
Transmission Control Protocol (TCP), is a connection-oriented protocol that first establishes a logical
[Link]
between two TCPs for transferring a stream of bytes. TCP provides flow control (matching the
sending data rate of the source host with the receiving data rate of the destination host to prevent
overwhelming of data packets at the destination), error control (to guarantee that the segments arriveat
the destination without error and resending the corrupted ones), and congestion control to reducethe
loss of segments due to congestion in the network.
User Datagram Protocol (UDP), is a connectionless protocol that transmits user datagrams without
first creating a logical connection. In UDP, each user datagram is an independent entity without being
related to the previous or the next one (the meaning of the term connectionless). UDP is a simple
protocol that does not provide flow, error, or congestion control. Its simplicity, which means small
overhead, is attractive to an application program that needs to send short messages and cannot afford
the retransmission of the packets involved in TCP, when a packet is corrupted or lost.
Stream Control Transmission Protocol (SCTP) is designed to respond to new applications that are
emerging in the multimedia.
Application Layer:
The two application layers exchange messages between each other as though there were a bridge
between the two layers. Communication at the application layer is between two processes (two
.IN
programs running at this layer). To communicate, a process sends a request to the other process and
receives a response. Process-to-process communication is the duty of the application layer. The
application layer in the Internet includes many predefined protocols, but a user can also create a pairof
processes to be run at the two hosts. The Hypertext Transfer Protocol (HTTP) is a vehicle for
C
accessing the World Wide Web (WWW). The Simple Mail Transfer Protocol (SMTP) is the main
protocol used in electronic mail (e-mail) service. The File Transfer Protocol (FTP) is used for
N
transferring files from one host to [Link] Terminal Network (TELNET) and Secure Shell (SSH)
are used for accessing a site remotely. The Simple Network Management Protocol(SNMP) is used by
SY
an administrator to manage the Internet at global and local levels. The Domain Name System (DNS)is
used by other protocols to find the network-layer address of a computer. The Internet Group
Management Protocol (IGMP) is used to collect membership in a group.
Encapsulation and Decapsulation:
U
One of the important concepts in protocol layering in the Internet is encapsulation/decapsulation. The
process of encapsulation and decapsulation in a small internet is shown in Figure
VT
.IN
Encapsulation is the process of adding header to the message or payload that is received from itsupper
layer. Decapsulation is the process of removing header from the message or payload that is received
from its lower layer. In the source host the process of encapsulation alone happens, in the destination
host the process of Decapsulation only happens, and in the router the process of both encapsulation
C
and Decapsulation happens.
Encapsulation at the Source Host
N
At the source, only encapsulation happens
1. At the application layer, the data to be exchanged is referred to as a message. A message normally
SY
does not contain any header or trailer. The message is passed to the transport layer.
2. The transport layer takes the message as the payload, the load that the transport layer should take
care of. It adds the transport layer header to the payload, which contains the identifiers of the source
and destination application programs. The result is the transport-layer packet, which is called the
U
segment (in TCP) and the user datagram (in UDP). The transport layer then passes the packet to the
network layer.
VT
1. After the set of bits are delivered to the data-link layer, this layer decapsulates the datagram from
the frame and passes it to the network layer.
2. The network layer only inspects the source and destination addresses in the datagram header and
consults its forwarding table to find the next hop to which the datagram is to be delivered. The
contents of the datagram should not be changed by the network layer in the router unless there is a
need to fragment the datagram if it is too big to be passed through the next link. The datagram is then
passed to the data-link layer of the next link.
3. The data-link layer of the next link encapsulates the datagram in a frame and passes it to the
physical layer for transmission.
Decapsulation at the Destination Host:
At the destination host, each layer only decapsulates the packet received, removes the payload, and
delivers the payload to the next-higher layer protocol until the message reaches the application layer.
It is necessary to say that decapsulation in the host involves error checking.
Addressing:
Any communication that involves two parties needs two addresses: source address and destination
address. Figure shows the addressing at each layer. As the figure shows, there is a relationship
.IN
between the layer, the address used in that layer, and the packet name at that layer.
At the application layer, names are normally used to define the site that provides services, such as
[Link], or the e-mail address, such as somebody@[Link].
At the transport layer, addresses are called port numbers, and these define the application-layer
C
programs at the source and destination. Port numbers are local addresses that distinguish between
several programs running at the same time.
N
At the network-layer, the addresses are global(32 bit IP Address), with the whole Internet as the
scope. A network-layer address uniquely defines the connection of a device to the Internet.
SY
At the Data link Layer, the link-layer addresses, sometimes called MAC addresses(48 bit), are
locally defined addresses, each of which defines a specific host or router in a network (LAN orWAN).
U
VT
Multiplexingand Demultiplexing
TCP/IP protocol suite uses several protocols at some layers, so it needs multiplexing at the source and
demultiplexing at the destination. Multiplexing in this case means that a protocol at a layer can
encapsulate a packet from several next-higher layer protocols (one at a time); demultiplexing means
that a protocol can decapsulate and deliver a packet to several next-higher layer protocols (one at a
time). Figure shows the concept of multiplexing and demultiplexing at the three upper layers.
.IN
Multiplexing at the source host:
At the transport layer, either UDP or TCP can accept a message from several application-layer
C
protocols. At the network layer, IP can accept a segment from TCP or a user datagram from UDP. IP
can also accept a packet from other protocols such as ICMP, IGMP, and so on. At the data-link layer,a
N
frame may carry the payload coming from IP or other protocols such as ARP.
Demultiplexing at the destination host:
SY
At the network layer, IP can decapsulate an IP datagram from a frame of data link layer and deliver a
segment to TCP or a user datagram to UDP. IP can also deliver a packet to other protocols such as
ICMP, IGMP, and so on. At the transport layer, either UDP or TCP can decapsulate a datagram or
segment and delivers a message to several application-layer protocols.
U
.IN
These two layers were not added to TCP/IP protocol suite after the publication of
OSI model
The application layer in TCP/IP is considered as a combination of 3 layers in OSI
model
C
The 2 reasons for removing these layers in TCP/IP are:
1. TCP/IP has more than one transport layer protocols. Some of the functionalities
N
of session layer are available in some of the transport layer protocols
2. Many applications can be developed and added into the application layer. If some
SY
.IN
switches).
If a packet is to travel from a host to another host, it needs to pass through these networks.
Communication at the data-link layer is made up of five separate logical connections between the
data-link layers in the path.
C
The data-link layer at Alice’s computer communicates with the data-link layer atrouter R2.
The data-link layer at router R2 communicates with the data-link layer at router R4, and so on.
N
Finally, the data-link layer at router R7 communicates with the data-link layer at Bob’s computer.
Only one data-link layer is involved at the source or the destination, but two data-link
SY
For the sake of simplicity, although switches are also involved in the data-link-layer
communication, it is not shown in the figure.
VT
These LANs and WANs are connected by routers. It is customary to refer to the two
End hosts and the routers as nodes and the networks in between as links.
Figure 9.2 is a simple representation of links and nodes when the path of the data unit is only
six nodes.
.IN
The first node is the source host; the last node is the destination host.
The other four nodes are four routers.
The first, the third, and the fifth links represent the three LANs; the second and the fourth
links represent the two WANs.
C
Services provided by data link layer are listed below
N
1. Framing
SY
The node also needs to de-capsulate the datagram from the frame received on the logical
channel.
VT
LINK-LAYERADDRESSING
IP addresses are the identifiers at the network layer that define the exact points in the Internet where the
.IN
source and destination hosts are connected.
The source and destination IPaddresses define the two ends but cannot define which links the datagram
should pass through.
The IP addresses in a datagram should not be changed. If the destination IP address in a datagram changes,
C
the packet never reaches its destination; if the source IP address in a datagram changes, the destination host
or a router can never communicate with the source if a response needs to be sent back or an error needs to be
N
reported back to the source
The above discussion shows that there is a need for another addressing mechanism (i.e) link-layer
SY
frame and two data-link addresses are added to the frame header.
These two addresses are changed every time the frame moves from one link to another.
VT
Consider an internet with three links and two routers as shown in figure. only two hosts: Alice (source) and Bob
(destination) have been shown
For each host, there are two addresses, the IPaddresses (N) and the link-layer addresses (L).
Note: a router has as many pairs of addresses as the number of links the router is connected
to.
Three frames have been shown, one in each link.
Each frame carries the same datagram with the same source and destination addresses (N1 and
N8), but the link-layer addresses of the frame change from link to link.
In link1,the link-layer addresses are L1 and L2.
In link2, they are L4 and L5.
In link3, they are L7 and L8.
Note that the IP addresses and the link-layer addresses are not in the same order. For
IPaddresses, the source address comes before the destination address; for link-layer
addresses,the destination address comes before the source
.IN
C
N
SY
Q1: How are the source and destination link-layer addresses determined for each link?
Answer: Again, each hop(router or host) should know its own link-layer address. The destination
link-layer address is determined by using the Address Resolution Protocol.
Three Types of addresses
U
Some link-layer protocols define three types of addresses: unicast, multicast, and broadcast.
Unicast Address
Each host or each interface of a router is assigned a unicast address. Unicasting means
VT
[Link],[Link],SCE,Bangalore Page 24
.IN
Each router except the last one in the path gets the IP address of the next router by using
its forwarding table.
The last router knows the IP address of the destination host.
The IP address of the next node is not helpful in moving a frame through a link; it needs the
link-layer address of the next node.
C
This is the time when the Address Resolution Protocol(ARP) becomes helpful
N
The ARP protocol is one of the auxiliary protocols defined in the network layer to map an IP
address to a logical-link address.
SY
ARP accepts an IP address from the IP protocol, maps the address to the
corresponding link-layer address, and passes it to the data-link layer
U
VT
Anytime a host or a router needs to find the link-layer address of another host or routern in its
network, it sends an ARP request packet.
The packet includes the link-layer and IP addresses of the sender and the IP address of
the receiver.
Because the sender does not know the link-layer address of the receiver, the query is
Broadcast over the link using the link-layer broadcast address.
Every host or router on the network receives and processes the ARP request packet, but only
the intended recipient recognizes its IP address and sends back an ARP response packet.
The response packet contains the recipient’s IP and link-layer addresses.
The packet is unicast directly to the node that sent the request packet.
.IN
C
N
SY
In Figure 9.7a, the system on the left (A) has a packet that needs to be delivered to another
system (B) with IP address N2.
U
System A needs to pass the packet to its data-link layer for the actual delivery, but it does
not know the physical address of the recipient.
VT
It uses the services of ARP by asking the ARP protocol to send a broadcast ARP request
packet to ask for the physical address of a system with an IP address of N2.
This packet is received by every system on the physical network, but only system B will
Answer it, as shown in Figure 9.7b.
System B sends an ARP reply packet that includes its physical address.
Now system A can send all the packets it has for this destination using the physical address
it received.
Caching
A question that is often asked is this: If system A can broadcast a frame to find the link
layer address of system B, why can’t system A send the datagram for system Busing a
broadcast frame?
In other words, instead of sending one broadcast frame (ARP request), one unicast frame
(ARP response), and another unicast frame (for sending the datagram), system A can
encapsulate the datagram and send it to the network.
System B receives it and keep it; other systems discard it.
To answer the question, we need to think about the efficiency.
It is probable that system A has more than one datagram to send to system B in a short
period of time.
For example, if system B is supposed to receive a long e-mail or a long file, the data do
[Link],not fit in one datagram.
[Link], SCE, Bangalore Page 28
Let us assume that there are 20 systems connected to the network (link): system A,
system B, and 18 other systems.
We also assume that system A has 10 datagrams to send to system B in one second.
a. Without using ARP, system A needs to send 10 broadcast frames. Each of the 18 other
systems need to receive the frames, decapsulate the frames, remove the datagram and pass
it to their network-layer to find out the datagrams do not belong to them. This means
processing and discarding 180 broadcast frames.
b. Using ARP, system A needs to send only one broadcast frame. Each of the 18 other
systems need to receive the frames, decapsulate the frames, remove the ARP message and
pass the message to their ARP protocol to find that the frame must be discarded. This
means processing and discarding only 18 (instead of 180) broadcast frames. After system B
responds with its own data-link address, system A can store the link- layer address in its
cache memory. The rest of the nine frames are only unicast. Since processing broadcast
frames is expensive (time consuming), the first method is preferable.
ARP Packet Format
Figure9.8 shows the format of an ARP packet.
.IN
The names of the fields are self explanatory. The hardware type field defines the type
of the link-layer protocol. Ethernet is given the type 1.
The protocol type field defines the network-layer protocol: IPv4 protocol is (0800)16.
The source hardware and source protocol addresses are variable-length fields
C
defining the link-layer and network-layer addresses of the sender.
The destination hardware address and destination protocol address fields define the
N
receiver link-layer and network-layer addresses.
An ARP packet is encapsulated directly into a data-link frame.
SY
The frame needs to have a field to show that the payload belongs to the ARP and not
to the network-layer datagram.
U
VT