Professional Documents
Culture Documents
Masking Masks
ARP
RARP
The physical and data link layers of a network operate locally. These two
layers are jointly responsible for data delivery on the network from one node to the
next.
IP address is the 3-bit number for representing a host or system in the network.
One portion of the IP address indicates a networking and the other represents the
host in a network.
4. What is redundancy?
It is the error detecting mechanism, which means a shorter group of bits or
extra bits may be app ended at the destination of each unit.
8. Write short notes on CRC. The third and most powerful of the redundancy
checking techniques is the cyclic redundancy checks (CRC) CRC is based on binar y
division. Here a sequence of redundant bits, called the CRC remainder is appended
to the end of data unit.
b) Each bit of the divisor is subtracted from the corresponding bit of the dividend
without disturbing the next higher bit.
b) A receiver can use an error correcting coder, which automatically corrects certain
errors.
22. Mention the advantage and disadvantage of stop and wait f low control.
Advantage: simplicity Disadvantage: inefficiency
.
23. Define ARQ.
Error control in the data link layer is based on Automatic repeat request
(ARQ), which means retransmission of data in 3 cases.
a) Damaged frame
b) Lost frame
c) Lost acknowledgment.
35. Define LAN. A Local Area Network (LAN) is a data communication system that
allows a number of independ ent devices to communicate directly with each other in
a limited geographic area.
38. List the most command kinds of Base band 802.3 LAN.
a) 10 Base 5
b) 10 Base 2
c) 10 Base T d) 1 Base 5 e) 100 Base T
PART-B
14. Illustrate with a neat sketch, the IPV4 datagram format. Compare the fields
in the main headers of IPV4 and IPV6. (A/M-2011)
IP version 4 (IPv4):
Recall that the 16 bits in the total length field express the
total length of a packet. Hence, the total length of the packet is
limited to 216 bytes. However, the maximum packet size of 216
bytes is rarely used, since the packet size is limited by the physical
network capacity. The real physical network capacity per packet is
normally less than 10K and even gets smaller, to 1.5K when the
packet reaches a LAN. To accomplish packet partitioning, the
identification, flags, and fragment offset fields perform and keep
track of the packet-fragmentation process when needed.
IP Version 6 (IPv6):
The use of IPv4 has resulted in the exhaustion of the 32-bit address space to
the extent that IPv4 has run out of addressing spaces. Therefore, 128-bit address
spacing was introduced with Internet Protocol version 6 (IPv6). It enjoys tremendous
popularity because of its simplicity and flexibility in adapting to diverse network
technologies. Compatible with IPv4, IPv6 also supports real-time applications,
including those that require guaranteed QoS. Figure 2.9 shows the IPv6 header. A
brief description of the fields in the header follows.
Version is the same as in IPv4, indicating the version number of the protocol.
Traffic class specifies the priority level assigned to a packet.
Flow label indicates the delay period within which application packets, such
as real-time video, must be delivered.
Payload length is the 16-bit specification of the length of the data, excluding
the header.
Next header specifies the type of extension header used. The functionality of
the option field in IPv4 is specified in the extension header. In addition, the
extension header is more flexible than the options field.
Hop limit is the same as the time-to-live field in IPv4.
Source address and destination address are each identified by a 128-bit field
address.
Extension Header
Extension headers are positioned between the header and the
payload. If multiple extension headers are used, they are
concatenated, as shown in Figure 2.10, making it mandatory for
them to be processed in the sequence in which they are listed.
Figure 2.10 specifies the sequence in which the extension headers
are to be listed.
Figure 2.10. Concatenated IPv6 extension header
Packet Fragmentation
In IPv6, fragmentation is permitted only at the source. The
result of this restriction is faster processing of packets at routers.
Before transmitting a packet, a host performs a maximum
transmission unit (MTU) discovery in the route of the packet. The
minimum MTU obtained determines the packet size and thus
requires the route from the host to the destination to remain
steady. If this minimum value of the physical network is less than
DEPT. OF ECE/UNIT-II Page 12
SENGUNTHAR COLLEGE OF ENGINEERING, TIRUCHENGIDE
Figure 2.8. With ICMP, a redirect message cannot be sent to R1, since R6 does
not know the address of R1.
Least-cost-path algorithms
The majority of Internet routing methods are based on least-
cost algorithms. In such algorithms, a link cost is proportional to
the links's current traffic load. However, the link cost may not
always be proportional to the current load. The link cost is defined
on both directions between each pair of nodes. Several least-cost-
path algorithms have been developed for packet-switched
networks. In particular, Dijkstra's algorithm and the Bellman-Ford
algorithm are the most effective and widely used algorithms.
Dijkstra's Algorithm
2.Initialize:
k ={s}
sj = .sj for j s
3. Next node:
Find x k that .sx = min .sj for j k.
Add x to k.
4. Least-cost paths:
.sj = min(.sj, .sx + .xj) for j k
If any two nodes i and j are not connected directly, the cost for that link is
infinity, indicated by .ij =x. Steps 2 and 3 are repeated until paths are assigned to all
nodes. At step 1, k represents s, and .sj computes the cost of the least-cost path from
s to node j. At step 2, we want to find x among the neighbouring nodes but not in k
such that the cost is minimized. At step 3, we simply update the least-cost path. The
algorithm ends when all nodes have been visited and included in the algorithm.
Bellman-Ford Algorithm
The Bellman-Ford algorithm finds the least-cost path from a source to a destination
by passing through no more than links. The essence of the algorithm consists of the
following steps
s = Source node
.ij = Cost of the link from node i to node j
.ij( ) = Cost of the least-cost path from i to j with no more than links
2. Initialize:
.sj(0) = x, for all j s
ss( ) = 0, for all
3. Least-cost path:
for any node j s with predecessor node i:
.sj( + 1) = mini[.si( ) + .ij]
If any two nodes i and j are not connected directly, .ij( ) =x. At step 2, every value of
is initialized. At step 3, we increase the number of links in a sequence of iterations.
During each iteration, we find the least-cost path, given the value. The algorithm
ends when all nodes have been visited and included in the algorithm.
yiaddr (“your” IP address) field and sending it to the client. Other information such
as the default router to be used by this client can be included in the options field.
In the case where DHCP dynamically assigns IP addresses to hosts, it is clear that
hosts cannot keep addresses indefinitely, as this would eventually cause the server to
exhaust its address pool. At the same time, a host cannot be depended upon to give
back its address, since it might have crashed, been unplugged from the network, or
been turned off. Thus, DHCP allows addresses to be “leased” for some period of
time. Once the lease expires, the server is free to return that address to its pool. A
host with a leased address clearly needs to renew the lease periodically if in fact it is
still connected to the network and functioning correctly.
Physical Addresses:
The physical address, also known as the link address, is the address of a node
as defined by its LAN or WAN. It is included in the frame used by the data link
layer. It is the lowest-level address.
The physical addresses have authority over the network (LAN or WAN). The
size and format of these addresses vary depending on the network. For example,
Ethernet uses a 6-byte (48-bit) physical address that is imprinted on the network
interface card (NIC). LocalTalk (Apple), however, has a I-byte dynamic address that
changes each time the station comes up.
Logical Addresses:
Logical addresses are necessary for universal communications that are
independent of underlying physical networks. Physical addresses are not adequate in
an internetwork environment where different networks can have different address
The computer with logical address A and physical address 10 needs to send a
packet to the computer with logical address P and physical address 95. We use letters
to show the logical addresses and numbers for physical addresses, but note that both
are actually numbers, as we will see later in the chapter.
The sender encapsulates its data in a packet at the network layer and adds two
logical addresses (A and P). Note that in most protocols, the logical source address
comes before the logical destination address (contrary to the order of physical
addresses). The network layer, however, needs to find the physical address of the
next hop before the packet can be delivered. The network layer consults its routing
table (see Chapter 22) and finds the logical address of the next hop (router I) to be F.
The ARP discussed previously finds the physical address of router 1 that
corresponds to the logical address of 20. Now the network layer passes this address
to the data link layer, which in tum, encapsulates the packet with physical
destination address 20 and physical source address 10.
The frame is received by every device on LAN 1, but is discarded by all
except router 1, which finds that the destination physical address in the frame
matches with its own physical address. The router decapsulates the packet from the
frame to read the logical destination address P. Since the logical destination address
does not match the router's logical address, the router knows that the packet needs to
be forwarded. The router consults its routing table and ARP to find the physical
destination address of the next hop (router 2), creates a new frame, encapsulates the
packet, and sends it to router 2.
Port Addresses
The IP address and the physical address are necessary for a quantity of data to
travel from a source to the destination host. However, arrival at the destination host
is not the final objective of data communications on the Internet. A system that sends
nothing but data from one computer to another is not complete. Today, computers
are devices that can run multiple processes at the same time. The end objective of
Internet communication is a process communicating with another process. For
example, computer A can communicate with computer C by using TELNET. At the
same time, computer A communicates with computer B by using the File Transfer
Protocol (FTP). For these processes to receive data simultaneously, we need a
method to label the different processes. In other words, they need addresses. In the
TCPIIP architecture, the label assigned to a process is called a port address. A port
address in TCPIIP is 16 bits in length.
Network Layer
At the network layer (or, more accurately, the internetwork layer), TCP/IP
supports the Internetworking Protocol. IP, in turn, uses four supporting protocols:
ARP, RARP, ICMP, and IGMP.
Transport Layer
Traditionally the transport layer was represented in TCP/IP by two protocols:
TCP and UDP. IP is a host-to-host protocol, meaning that it can deliver a packet
from one physical device to another. UDP and TCP are transport level protocols
responsible for delivery of a message from a process (running program) to another
process. A new transport layer protocol, SCTP, has been devised to meet the needs of
some newer applications.
applications. TCP is a reliable stream transport protocol. The term stream, in this
context, means connection-oriented: A connection must be established between both
ends of a transmission before either can transmit data.
At the sending end of each transmission, TCP divides a stream of data into
smaller units called segments. Each segment includes a sequence number for
reordering after receipt, together with an acknowledgment number for the segments
received. Segments are carried across the internet inside of IP datagrams. At the
receiving end, TCP collects each datagram as it comes in and reorders the
transmission based on sequence numbers.
Application Layer
The application layer in TCPIIP is equivalent to the combined session, presentation,
and application layers in the OSI modeL Many protocols are defined at this layer.
Figure 8.10 is an example of a virtual-circuit network. The network has switches that
allow traffic from sources to destinations. A source or destination can be a computer,
packet switch, bridge, or any other device that connects other networks.
Addressing
In a virtual-circuit network, two types of addressing are involved: global and
local (virtual-circuit identifier).
Global Addressing
A source or a destination needs to have a global address-an address that can be
unique in the scope of the network or internationally if the network is part of an
international network. However, we will see that a global address in virtual-circuit
networks is used only to create a virtual-circuit identifier, as discussed next.
Virtual-Circuit Identifier
The identifier that is actually used for data transfer is called the virtual-circuit
identifier (Vel). A vel, unlike a global address, is a small number that has only switch
scope; it is used by a frame between two switches. When a frame arrives at a switch,
it has a VCI; when it leaves, it has a different VCl. Figure 8.11 shows how the VCI
in a data frame changes from one switch to another. Note that a VCI does not need to
be a large number since each switch can use its own unique set of VCls.
Layered Architecture
The OSI model is composed of seven ordered layers: physical (layer 1), data
link (layer 2), network (layer 3), transport (layer 4), session (layer 5), presentation
(layer 6), and application (layer 7). Figure 2.3 shows the layers involved when a
message is sent from device A to device B. As the message travels from A to B, it
may pass through many intermediate nodes. These intermediate nodes usually
involve only the first three layers of the OSI model.
In developing the model, the designers distilled the process of transmitting
data to its most fundamental elements. They identified which networking functions
had related uses and collected those functions into discrete groups that became the
layers. Each layer defines a family of functions distinct from those of the other
layers. By defining and localizing functionality in this fashion, the designers created
an architecture that is both comprehensive and flexible. Most importantly, the OSI
model allows complete interoperability between otherwise incompatible systems.
Within a single machine, each layer calls upon the services of the layer just
below it. Layer 3, for example, uses the services provided by layer 2 and provides
services for layer 4. Between machines, layer x on one machine communicates with
layer x on another machine. This communication is governed by an agreed-upon
series of rules and conventions called protocols. The processes on each machine that
communicate at a given layer are called peer-to-peer processes. Communication
between machines is therefore a peer-to-peer process using the protocols appropriate
to a given layer.
Peer-to-Peer Processes
At the physical layer, communication is direct: In Figure 2.3, device A sends a
stream of bits to device B (through intermediate nodes). At the higher layers,
however, communication must move down through the layers on device A, over to
device B, and then
back up through the layers. Each layer in the sending device adds its own
information to the message it receives from the layer just above it and passes the
whole package to the layer just below it.
more logical (IP) addresses, which are unique and independent of the physical
(hardware) address of the machine. To create an IP datagram, a host or a router needs
to know its own IP address or addresses. The IP address of a machine is usually read
from its configuration file stored on a disk file.
However, a diskless machine is usually booted from ROM, which has
minimum booting information. The ROM is installed by the manufacturer. It cannot
include the IP address because the IP addresses on a network are assigned by the
network administrator.
The machine can get its physical address (by reading its NIC, for example),
which is unique locally. It can then use the physical address to get the logical address
by using the RARP protocol. A RARP request is created and broadcast on the local
network. Another machine on the local network that knows all the IP addresses will
respond with a RARP reply. The requesting machine must be running a RARP client
program; the responding machine must be running a RARP server program.
There is a serious problem with RARP: Broadcasting is done at the data link
layer. The physical broadcast address, allis in the case of Ethernet, does not pass the
boundaries of a network. This means that if an administrator has several networks or
several subnets, it needs to assign a RARP server for each network or subnet. This is
the reason that RARP is almost obsolete. 1\vo protocols, BOOTP and DHCp, are
replacing RARP.