mc0075_february_2011_computer networks-assignement
TRANSCRIPT
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
1/23
February 2011
Master of Computer Application (MCA) Semester 3
MC0075 Computer Networks 4 Credits
(Book ID: B0813 & B0814) Assignment Set 1
1. Discuss the advantages and disadvantages of synchronous and asynchronoustransmission.
Ans:There are different ways of transmitting the information. In this section we will study these
various methods with their relative merits and demerits.
Serial & Parallel
Serial communication is the sequential transmission of the signal elements of a group
representing a character or other entity of data. The characters are transmitted in a sequenceover a single line, rather than simultaneously over two or more lines, as in parallel
transmission as shown in below figure.
Serial transmission: one bit at a time
The sequential elements may be transmitted with or without interruption. Parallelcommunication refers to when data is transmitted byte-by-byte i.e., all bits of one or more
bytes are transmitted simultaneously over separate wires as shown in given figure.
Parallel transmissions: Several bits at a time
Most transmission lines are serial, whereas information transfer within computers and
communications devices is in parallel. Therefore, there must be tech-niques for converting
between parallel and serial, and vice versa. A Universal Asynchronous Receiver Transmitter
(UART) usually accomplishes such data conversions.
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
2/23
The comparisons of the serial and parallel transmission modes are listed in table.
SERIAL MODE PARALLEL MODE
COST Less costly (only one wire) More costly (many wires)
SPEED Low ( only 1 bit at a time) High (more bits at a time)
THROUGHPUT Low High
USED IN Longer distance comm. Shorter distance comm..
Comparison of serial and parallel transmission mode
Simplex, Half duplex & Full duplex
Simplex refers to communications in only one direction from the transmitter to the receiver as
shown in figure (a). There is no acknowledgement of reception from the receiver, so errors
cannot be conveyed to the transmitter. Half-duplex refers to two-way communications but in
only one direction at a time as shown in figure (b).
(a) Simplex
(b) Half Duplex
(c) Full Duplex
Full duplex refers to simultaneous two-way transmission as shown in figure (c). For example,
a radio is a simplex device, a walkie-talkie is a half-duplex device, and certain computer video
cards are full-duplex devices. Similarly, radio or TV broadcast is a simplex system, transfer of
inventory data from a warehouse to an accounting office is a half duplex system, and
videoconferencing represents a full-duplex application. Full Duplex provides maximum
function and performance.
Synchronous & Asynchronous transmission
Synchronous Transmission: Synchronous is any type of communication in which the
parties communicating are "live" or present in the same space and time. A chat room where
both parties must be at their computer, connected to the Internet, and using software to
communicate in the chat room protocols is a synchronous method of communication. E-mail
is an example of an asynchronous mode of communication where one party can send a note
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
3/23
to another person and the recipient need not be online to receive the e-mail. Synchronous
mode of transmissions are illustrated in shown figure
SYNCHRONOUSSERIALDATATAIL DATA HEADER7E7E 7E 7E7E7E
DATAPACKET
IdleLineState=7E
Synchronous and Asynchronous Transmissions
The two ends of a link are synchronized, by carrying the transmitters clock information along
with data. Bytes are transmitted continuously, if there are gaps then inserts idle bytes as
padding
Advantage:
This reduces overhead bits
It overcomes the two main deficiencies of the asynchronous method, that of inefficiency and
lack of error detection.
Disadvantage:
For correct operation the receiver must start to sample the line at the correct instant
Application:
Used in high speed transmission example: HDLC
Asynchronous transmission: Asynchronous refers to processes that proceed
independently of each other until one process needs to "interrupt" the other process with a
request. Using the client- server model, the server handles many asynchronous requests from
its many clients. The client is often able to proceed with other work or must wait on the
service requested from the server.
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
4/23
ASYNCHRONOUSSERIALDATACharacter
IdleLineState=7E
1
Stop Start
Asynchronous Transmissions
synchronous mode of transmissions is illustrated in figure 3.12. Here a Start and Stop signal
is necessary before and after the character. Start signal is of same length as information bit.
Stop signal is usually 1, 1.5 or 2 times the length of the information signal
Advantage:
The character is self contained & Transmitter and receiver need not be synchronized
Transmitting and receiving clocks are independent of each other
Disadvantage:
Overhead of start and stop bits
False recognition of these bits due to noise on the channel
Application:
If channel is reliable, then suitable for high speed else low speed transmission
Most common use is in the ASCII terminals
Efficiency of transmission is the ratio of the actual message bits to the total number of bits,
including message and control bits, as shown in Equation 3.4. In any transmission, the
synchronization, error detection, or any other bits that are not messages are collectively
referred to as overheads, represented in Equation. 3.5. The higher are the overheads; thelower is the efficiency of transmission, as shown in Equation 3.6.
Efficiency = M/ (M+C) x 100% (3.4)
Overhead = (1 M/ (M+C)) x 100% (3.5)
Where M = Number of message bits
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
5/23
C = Number of control bits
In other words,
Efficiency % = 100 -Overhead % (3.6)
2. Describe the ISO-OSI reference model and discuss the importance of every layer.
Ans: The OSI Reference Model: This reference model is proposed by International standard
organization (ISO) as a a first step towards standardization of the protocols used in various
layers in 1983 by Day and Zimmermann. This model is called Open system Interconnection
(OSI) reference model. It is referred OSI as it deals with connection open systems. That is the
systems are open for communication with other systems. It consists of seven layers.
Layers of OSI Model
The principles that were applied to arrive at 7 layers:
1. A layer should be created where a different level of abstraction is needed.
2. Each layer should perform a well defined task.
3. The function of each layer should define internationally standardized protocols
4. Layer boundaries should be chosen to minimize the information flow across the interface.
5. The number of layers should not be high or too small.
The ISO-OSI reference model is as shown in figure 2.5. As such this model is not a network
architecture as it does not specify exact services and protocols. It just tells what each layer
should do and where it lies. The bottom most layer is referred as physical layer. ISO has
produced standards for each layers and are published separately.
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
6/23
Each layer of the ISO-OSI reference model are discussed below:
1. Physical Layer
This layer is the bottom most layer that is concerned with transmitting raw bits over the
communication channel (physical medium). The design issues have to do with making sure
that when one side sends a 1 bit, it is received by other side as a 1 bit, and not as a 0 bit. It
performs direct transmission of logical information that is digital bit streams into physical
phenomena in the form of electronic pulses. Modulators/demodulators are used at this layer.
The design issue here largely deals with mechanical, electrical, and procedural interfaces,
and the physical transmission medium, which lies below this physical layer.
In particular, it defines the relationship between a device and a physical medium. This
includes the layout of pins, voltages, and cable specifications. Hubs, repeaters, network
adapters and Host Bus Adapters (HBAs used in Storage Area Networks) are physical-layer
devices. The major functions and services performed by the physical layer are:
Establishment and termination of a connection to a communications medium.
Participation in the process whereby the communication resources are effectively shared
among multiple users. For example, contention resolution and flow control.
Modulation, is a technique of conversion between the representation of digital data in user
equipment and the corresponding signals transmitted over a communications channel.
These are signals operating over the physical cabling (such as copper and fiber optic) or
over a radio link.
Parallel SCSI buses operate in this layer. Various physical-layer Ethernet standards are also
in this layer; Ethernet incorporates both this layer and the data-link layer. The same applies to
other local-area networks, such as Token ring, FDDI, and IEEE 802.11, as well as personal
area networks such as Bluetooth and IEEE 802.15.4.
2. Data Link Layer
The Data Link layer provides the functional and procedural means to transfer data between
network entities and to detect and possibly correct errors that may occur in the Physical layer.
That is it makes sure that the message indeed reach the other end without corruption or
without signal distortion and noise. It accomplishes this task by having the sender break the
input data up into the frames called data frames. The DLL of transmitter, then transmits the
frames sequentially, and processes acknowledgement frames sent back by the receiver. After
processing acknowledgement frame, may be the transmitter needs to re-transmit a copy of
the frame. So therefore the DLL at receiver is required to detect duplications of frames.
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
7/23
The best known example of this is Ethernet. This layer manages the interaction of devices
with a shared medium. Other examples of data link protocols are HDLC and ADCCP for point-
to-point or packet-switched networks and Aloha for local area networks. On IEEE 802 local
area networks, and some non-IEEE 802 networks such as FDDI, this layer may be split into a
Media Access Control (MAC) layer and the IEEE 802.2 Logical Link Control (LLC) layer. Itarranges bits from the physical layer into logical chunks of data, known as frames.
This is the layer at which the bridges and switches operate. Connectivity is provided only
among locally attached network nodes forming layer 2 domains for unicast or broadcast
forwarding. Other protocols may be imposed on the data frames to create tunnels and
logically separated layer 2 forwarding domain.
The data link layer might implement a sliding window flow control and acknowledgment
mechanism to provide reliable delivery of frames; that is the case for SDLC and HDLC, and
derivatives of HDLC such as LAPB and LAPD. In modern practice, only error detection, notflow control using sliding window, is present in modern data link protocols such as Point-to-
Point Protocol (PPP), and, on local area networks, the IEEE 802.2 LLC layer is not used for
most protocols on Ethernet, and, on other local area networks, its flow control and
acknowledgment mechanisms are rarely used. Sliding window flow control and
acknowledgment is used at the transport layers by protocols such as TCP.
3. Network Layer
The Network layer provides the functional and procedural means of transferring variable
length data sequences from a source to a destination via one or more networks whilemaintaining the quality of service requested by the Transport layer. The Network layer
performs network routing functions, and might also perform fragmentation and reassembly,
and report delivery errors. Routers operate at this layer sending data throughout the extended
network and making the Internet possible. This is a logical addressing scheme values are
chosen by the network engineer. The addressing scheme is hierarchical.
The best known example of a layer 3 protocol is the Internet Protocol (IP). Perhaps its easier
to visualize this layer as managing the sequence of human carriers taking a letter from the
sender to the local post office, trucks that carry sacks of mail to other post offices or airports,
airplanes that carry airmail between major cities, trucks that distribute mail sacks in a city, andcarriers that take a letter to its destinations. Think of fragmentation as splitting a large
document into smaller envelopes for shipping, or, in the case of the network layer, splitting an
application or transport record into packets.
The major tasks of network layer are listed
It controls routes for individual message through the actual topology.
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
8/23
Finds the best route.
Finds alternate routes.
It accomplishes buffering and deadlock handling.
4. Transport Layer
The Transport layer provides transparent transfer of data between end users, providing
reliable data transfer while relieving the upper layers of it. The transport layer controls the
reliability of a given link through flow control, segmentation/de-segmentation, and error
control. Some protocols are state and connection oriented. This means that the transport
layer can keep track of the segments and retransmit those that fail. The best known example
of a layer 4 protocol is the Transmission Control Protocol (TCP).
The transport layer is the layer that converts messages into TCP segments or User Datagram
Protocol (UDP), Stream Control Transmission Protocol (SCTP), etc. packets. Perhaps an
easy way to visualize the Transport Layer is to compare it with a Post Office, which deals with
the dispatch and classification of mail and parcels sent. Do remember, however, that a post
office manages the outer envelope of mail. Higher layers may have the equivalent of double
envelopes, such as cryptographic Presentation services that can be read by the addressee
only.
Roughly speaking, tunneling protocols operate at the transport layer, such as carrying non-IP
protocols such as IBMs SNA or Novells IPX over an IP network, or end-to-end encryption
with IP security (IP sec). While Generic Routing Encapsulation (GRE) might seem to be anetwork layer protocol, if the encapsulation of the payload takes place only at endpoint, GRE
becomes closer to a transport protocol that uses IP headers but contains complete frames or
packets to deliver to an endpoint.
The major tasks of Transport layer are listed below:
It locates the other party
It creates a transport pipe between both end-users.
It breaks the message into packets and reassembles them at the destination.
It applies flow control to the packet stream.
5. Session Layer
The Session layer controls the dialogues/connections (sessions) between computers. It
establishes, manages and terminates the connections between the local and remote
application. It provides for either full-duplex or half-duplex operation, and establishes check
pointing, adjournment, termination, and restart procedures. The OSI model made this layer
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
9/23
responsible for "graceful close" of sessions, which is a property of TCP, and also for session
check pointing and recovery, which is not usually used in the Internet protocols suite.
The major tasks of session layer are listed
It is responsible for the relation between two end-users.
It maintains the integrity and controls the data exchanged between the end-users.
The end-users are aware of each other when the relation is established (synchronization).
It uses naming and addressing to identify a particular user.
It makes sure that the lower layer guarantees delivering the message (flow control).
6. Presentation Layer
The Presentation layer transforms the data to provide a standard interface for the Applicationlayer. MIME encoding, data encryption and similar manipulation of the presentation are done
at this layer to present the data as a service or protocol developer sees fit. Examples of this
layer are converting an EBCDIC-coded text file to an ASCII-coded file, or serializing objects
and other data structures into and out of XML.
The major tasks of presentation layer are listed below:
It translates the language used by the application layer.
It makes the users as independent as possible, and then they can concentrate on
conversation.
7. Application Layer (end users)
The application layer is the seventh level of the seven-layer OSI model. It interfaces directly to
the users and performs common application services for the application processes. It also
issues requests to the presentation layer. Note carefully that this layer provides services to
user-defined application processes, and not to the end user. For example, it defines a file
transfer protocol, but the end user must go through an application process to invoke file
transfer. The OSI model does not include human interfaces.
The common application services sub layer provides functional elements including the
Remote Operations Service Element (comparable to Internet Remote Procedure Call),
Association Control, and Transaction Processing (according to the ACID requirements).
Above the common application service sub layer are functions meaningful to user application
programs, such as messaging (X.400), directory (X.500), file transfer (FTAM), virtual terminal
(VTAM), and batch job manipulation (JTAM).
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
10/23
A Comparison of OSI and TCP/IP Reference Models
Concepts central to the OSI model are:
Services: It tells what the layer does.
Interfaces: It tells the processes above it how to access it. It specifies what parameters are
and what result to expect.
Protocols: It provides the offered service. It is used in a layer and are layers own business.
The TCP/IP did not originally distinguish between the service, interface & protocols. The only
real services offered by the internet layer are SEND IP packets and RECEIVE IP packets.
The OSI model was devised before the protocols were invented. Data link layer originally
dealt only with point-to-point networks. When broadcast networks came around, a new sub-
layer had to be hacked into the model. With TCP/IP the reverse was true, the protocols camefirst and the model was really just a description of the existing protocols. This TCP/IP model
did fit any other protocol stack.
Then OSI model has seven layers and TCP/IP has four layers as shown in figure below
Comparisons of the two reference models
Another difference is in the area of connectionless and connection oriented services. The OSI
model supports both these services in the network layer but supports only connection
oriented communication in the transport layer. Where as the TCP/IP has supports only
connection less communication in the network layer, and supports both these services in the
transport layer.
A Critique of the OSI Model and Protocols
Why OSI did not take over the world
Bad timing
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
11/23
Bad technology
Bad implementations
Bad politics
A Critique of the TCP/IP Reference Model
Problems:
Service, interface, and protocol not distinguished
Not a general model
Host-to-network layer not really a layer
No mention of physical and data link layers
Minor protocols deeply entrenched, hard to replace
Network standardization
Network standardization is a definition that has been approved by a recognized standards
organization. Standards exist for programming languages, operating systems, data formats,
communications protocols, and electrical interfaces.
Two categories of standards:
De facto (Latin for from the fact) standards:
These are those that have just happened without any formal plan. These are formats that
have become standard simply because a large number of companies have agreed to use
them. They have not been formally approved as standards E.g., IBM PC for small office
computers, UNIX for operating systems in CS departments. PostScript is a good example of a
de facto standard.
De jure (Latin for by law) standards:
These are formal legal standards adopted by some authorized standardization body.
Two classes of standard organizations
Organizations established by treaty among national governments.
Voluntary, nontreaty organizations.
From a users standpoint, standards are extremely important in the computer industry
because they allow the combination of products from different manufacturers to create a
customized system. Without standards, only hardware and software from the same company
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
12/23
could be used together. In addition, standard user interfaces can make it much easier to learn
how to use new applications.
Most official computer standards are set by one of the following organizations:
ANSI (American National Standards Institute)
ITU (International Telecommunication Union)
IEEE (Institute of Electrical and Electronic Engineers)
ISO (International Standards Organization)
VESA (Video Electronics Standards Association)
Benefits of standardization:
Allow different computers to communicate.
Increase the market for products adhering to the standard.
Whos who in the telecommunication world?
Common carriers: private telephone companies (e.g., AT&T, USA).
PTT (Post, Telegraph & Telephone) administration: nationalized telecommunication
companies (most of the world).
ITU (International Telecommunication Union): an agency of the UN for international
telecommunication coordination.
CCITT (an acronym for its French name): one of the organs of ITU (i.e., ITU-T), specialized
for telephone and data communication systems.
3. Explain the following with respect to Data Communications:
A) Fourier analysis
Ans: In 19th century, the French mathematician Fourier proved that any periodic function of time g
(t) with period T can be constructed by summing a number of cosines and sines.
Where f=1/T is the fundamental frequency, and are the sine and cosine amplitudes of the
nth harmonics. Such decomposition is called a Fourier series.
B) Band limited signals
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
13/23
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
14/23
faster than 2H per second is pointless. If the signal consists of V discrete levels, then Nyquist
theorem states that, for a noiseless channel
Maximum data rate = 2H.log2 (V) bits per second. (3.2)
For a noisy channel with bandwidth is again H, knowing signal to noise ratio S/N, the
maximum data rate according to Shannon is given as
Maximum data rate = H.log2 (1+S/N) bits per second. (3.3)
4. Explain the following concepts of Internetworking:
A) Internet architecture
Ans: Internet Architecture: B1-226, B2-56: The Internet is a worldwide, publicly accessible
network of interconnected computer networks that transmit data by packet switching using the
standard Internet Protocol (IP). It is a "network of networks" that consists of millions of smaller
domestic, academic, business, and government networks, which together carry various
information and services, such as electronic mail, online chat, file transfer, and the interlinked
web pages and other documents of the World Wide Web.
How are networks interconnected to form an internetwork? The answer has two parts.
Physically, two networks can only be connected by a computer that attaches both of them.
But just a physical connection cannot provide interconnection where information can be
exchanged as there is no guarantee that the computer will cooperate with other machines that
wish to communicate.
Internet is not restricted in size. Internets exist that contain a few networks and internets also
exist that contain thousands of networks. Similarly the number of computers attached to each
network in an internet can vary. Some networks have no computers attached, while others
have hundreds.
To have a viable internet, we need a special computer that is willing to transfer packets from
one network to another. Computers that interconnect two networks and pass packets from
one to the other are called internet gateways or internet routers.
B) Protocols and Significance for Internetworking
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
15/23
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
16/23
Layer 1: Physical layer
This layer corresponds to basic network hardware
Layer 2: Network interface
This layer specifies how to organize data into frames and how a computer transfers frames
over a network. It interfaces the TCP/IP protocol stack to the physical network.
Layer 3: Internet
This layer specifies the format of packets sent across an internet. It also specifies the
mechanism used to forward packets from a computer through one or more routers to the final
destination.
Layer 4: Transport
This layer deals with opening and maintaining connections, ensuring that packets are in fact
received. The transport layer is the interface between the application layer and the complex
hardware of the network. It is designed to allow peer entities on the source and destination
hosts to carry on conversations.
Layer 5: Network interface
Each protocol of this layer specifies how one application uses an internet.
5. What is the use of IDENTIFIER and SEQUENCE NUMBER fields of echo request andecho reply message? Explain.
Ans:The echo request contains an optional data area. The echo reply contains the copy of the
data sent in the request message. The format for the echo request and echo reply is as
shown in figure below
echo request and echo reply message format
The field OPTIONALDATA is a variable length that contains data to be returned to the original
sender. An echo reply always returns exactly the same data as ws to receive in the request.
Field IDENTIFIER and SEQUENCE NUMBER are used by the sender to match replies to
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
17/23
requests. The value of the TYPE field specifies whether it is echo request when equal to 8 or
echo reply when equal to 0.
Reports of Unreachability
When a router cannot forward or deliver the datagram to the destination owing to various
problems, it sends a destination unreachable message back to the original sender and then
drops the datagram.
Destination unreachable message format
The format of destination unreachable is as shown in figure 5.3. The TYPE field in destination
unreachable message contains an integer equal to 3. The CODE field here contains an
integer that describes the problem why the datagram is not reachable. Possible values for
CODE field are listed in below figure.
DE VALUE MEANING
0 Network unreachable
1 Host unreachable
2 Protocol unreachable
3 Port unreachable
4 Fragment needed and DF set
5 Source route failed
6 Destination network unknown
7 Destination host unknown
8 Source host isolated
9 Communication with destination network administratively prohibited
10 Communication with destination host administratively prohibited
11 Network unreachable for type of service
12 Host unreachable for type of service
Possible problems in Destination unreachable message
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
18/23
Network unreachable errors imply routing failures and host unreachable errors imply delivery
failures. As ICMP error message contains a short prefix of the datagram that caused the
problem, the source will know exactly which address is unreachable.
The port is the destination point discussed at the transport layer. If the datagram contains the
source route option with a wrong route, it may report source route failure message. If a router
needs to fragment a datagram and DF-bit which is dont fragment bit in IP header is set, the
router sends a Fragment needed and DF set message back to the source. Rests of the errors
listed in figure 5.4 are self explanatory.
Obtaining a subnet mask
To participate in subnet addressing, a host needs to know which bits of the 32-bit internet
address correspond to physical network and which corresponds to host identifiers. The
information needed to interpret the address is represented in 32-bit quantity is called subnet
mask. To learn the subnet mask used for local network, a machine can send an address
mask request message to a router and receive address mask reply message.
Address mask request or reply message format
Address mask request or reply message format
The format address mask request or reply message is as shown in figure 5.10. Host
broadcasts a request without knowing which specific router will respond. The TYPE field
value is 17 for address mask request and 18 for address mask reply message. A reply
contains the networks subnet address mask in the ADDRESS MASK field. IDENTIFIER and
SEQUENCE NUMBER fields allow to associate replies with requests.
6. In what conditions is ARP protocol used? Explain.
Ans:ARP protocol: In computer networking, the Address Resolution Protocol (ARP) is the standard
method for finding a hosts hardware address when only its network layer address is known.
ARP is primarily used to translate IP addresses to Ethernet MAC addresses. It is also used
for IP over other LAN technologies, such as Token Ring, FDDI, or IEEE 802.11, and for IP
over ATM.
ARP is used in four cases of two hosts communicating:
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
19/23
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
20/23
Let us assume the sender on host 1 want to send a packet to a receiver on host 2. Sender
knows the name of the intended receiver say [email protected]. The first step is to find
the IP address for host 2 known as eagle.cs.uni.edu. This mapping of name to IP address is
done by domain name server (DNS). Here we will assume that DNS gives the IP address of
host 2 as 192.31.65.5.
The upper layer software on host 1 builds a packet with 192.31.65.5 in the destination
address field and gives it to IP software to transmit. The IP software can look at the address
see that the destination is on its own network, but needs a way to find the destinations
physical address. A mapping table can be used as discussed in resolution by direct mapping.
A better solution is for host 1 to output a broadcast packet onto the Ethernet asking WHO
owns IP address 192.31.65.5? The broadcast will arrive at every machine on Ethernet
192.31.65.0, and each one will check its IP address. Host 2 alone will respond with its
physical address E2. The packet used for asking this question is called ARP request. And thepacket which is reply to this ARP request is called ARP replies.
IP software on host 1 builds an Ethernet frame addressed to E2, puts the IP packet
addresses to 192.31.65.5 in the payload field and dumps it onto the Ethernet. The Ethernet
board of host 2 detects this frame, recognizes it as frame for itself, scoops it up, and causes
an interrupt. The Ethernet driver extracts IP packet from the payload and passes it to the IP
software, which sees that it is correctly addressed and processes it.
ARP frame format
An ARP protocol uses two frame formats as seen in above example. One is ARP request and
the other is ARP reply.
ARP request
An ARP request is structured in a particular way. As shown in figure 3.2 an ARP request
frame consists of two fields
1. Frame header
2. ARP request message
FrameHeader ARPrequestmessageMayIknowyourphysicalAddress?
(a) ARP request frame
Frame header is subdivided into
1. Physical address
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
21/23
2. IP address
A complete ARP request frame is as shown in figure 3.2(b). We have seen that broadcast
address consists of all 1s. hence the destinations physical address in ARP request frame is
broadcast address with all ones equivalently FF-FF-FF-FF-FF-FF.
(b) ARP request frame
ARP replies
An ARP reply frame is also structured in a similar way as ARP request frame. As shown in
figure (a) an ARP reply frame also consists of two fields
1. Frame header
2. ARP reply message
FrameHeader FrameHeaderThis
is
my
physical
Address
(a) ARP reply frame
ARP reply Frame header is subdivided again into
1. Physical address
2. IP address
A complete ARP request frame is as shown in figure (b).
(b) ARP request frame
ARP replies
An ARP reply frame is also structured in a similar way as ARP request frame. As shown in
figure (a) an ARP reply frame also consists of two fields
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
22/23
1. Frame header
2. ARP reply message
FrameHeader ARPreplymessageThisismyphysicalAddress
(a) ARP reply frame
ARP reply Frame header is subdivided again into
1. Physical address
2. IP address
A complete ARP request frame is as shown in figure (b).
(b) ARP reply frame
The Address Resolution Cache
Broadcasting the ARP request packet is too expensive to be used every time one machine
wants to transmit a packet to another. As with this broadcasting every machine on the
network must receive and then process the broadcast packet. To reduce the communication
cost due to broadcast computers that use ARP protocol maintain a cache of recently acquired
IP to physical address bindings. Thus cache is used to store the recently used mappings of IP
address and physical address
That whenever a computer sends an ARP request and receives an ARP reply, it saves the IP
address and corresponding hardware address information in its cache for successive look
ups. When transmitting a packet, a computer always looks in its cache for binding before
sending an ARP request. If it finds the desired binding in its ARP cache, the computer need
not broadcast on the network. Thus when two computers on a network communicate, theybegin with an ARP request and response, and then repeatedly transfer packets without using
ARP for each packet.
ARP cache timeouts
An ARP cache provides an example of soft state, a technique commonly used in network
protocols. The name describes a situation in which information can become stale without
warning. In case of ARP consider two computers A and B, both connected to Ethernet.
-
8/7/2019 MC0075_February_2011_Computer Networks-Assignement
23/23
Assume A has sent an ARP request, and B has replied. Further assume that after the
exchange, computer B crashes. Computer A will not receive any information of the crash. And
moreover as it already has binding information for B in its ARP cache, computer A will
continue to send packets to B. the Ethernet hardware provides no indication that B is not on-
line because Ethernet does not have guarantee delivery. Thus A has no way of knowing wheninformation in its Arp cache has become incorrect.
Usually such protocols use timers, with the state information being deleted when the timer
expires. That is when a computer places the address bindings in cache it needs to set the
timer. Typical value of timeout being say 20 minutes, and when the timer expires, that
address binding information is deleted.