Professional Documents
Culture Documents
Unit III
Part A
1. Outline the functions of ICMP.
2. How do routers differentiate the incoming unicast, multicast and broadcast IP
packets?
3. What is BGP?
4. What is multicast routing?
5. What are the two major mechanism defined to help transition from IP4 to IP6?
Part B
1. Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol (DHCP) is a network management
protocol used to dynamically assign an IP address to any device, or node, on
a network so they can communicate using IP (Internet Protocol).
It is an application layer protocol which is used to provide:
a. Subnet Mask (Option 1 – e.g., 255.255.255.0)
b. Router Address (Option 3 – e.g., 192.168.1.1)
c. DNS Address (Option 6 – e.g., 8.8.8.8)
d. Vendor Class Identifier (Option 43 – e.g., „unifi‟ = 192.168.1.9 ##where unifi
= controller)
DHCP is based on a client-server model and based on discovery, offer, request,
and ACK.
DHCP port number for server is 67 and for the client is 68.
It is a Client server protocol which uses UDP services.
Message Format
Operations of DHCP
Algorithm
A router transmits its distance vector to each of its neighbors in a routing
packet.
Each router receives and saves the most recently received distance vector from
each of its neighbors.
A router recalculates its distance vector when:
o It receives a distance vector from a neighbor containing different
information than before.
o It discovers that a link to a neighbor has gone down.
The DV calculation is based on minimizing the cost to each destination
o Dx(y) = Estimate of least cost from x to y
o C(x,v) = Node x knows cost to each neighbor v
o Dx = [Dx(y): y ∈ N ] = Node x maintains distance vector Node x also
maintains its neighbors' distance vectors – For each neighbor v, x
maintains Dv = [Dv(y): y ∈ N ]
Note –
From time-to-time, each node sends its own distance vector estimate to
neighbors.
When a node x receives new DV estimate from any neighbor v, it saves v‟s
distance vector and it updates its own DV using B-F equation:
o Dx(y) = min { C(x,v) + Dv(y), Dx(y) } for each node y ∈ N
Example
3. Link State Routing Protocol
The term link-state to define the characteristic of a link (an edge) that
represents a network in the internet.
In this algorithm the cost associated with an edge defines the state of the
link.
Links with lower costs are preferred to links with higher costs; if the cost of a
link is infinity, it means that the link does not exist or has been broken.
The collection of states for all links is called the link-state database (LSDB).
Flooding - LS packet (LSP) - identity of the node and the cost of the link.
Algorithm
4. Open Shortest Path First Protocol
Open Shortest Path First (OSPF) is also an intradomain routing protocol
like RIP, but it is based on the link-state routing protocol
In OSPF, like RIP, the cost of reaching a destination from the host is
calculated from the source router to the destination network.
Each link (network) can be assigned a weight based on the throughput, round-
trip time, reliability, and so on.
An administration can also decide to use the hop count as the cost.
Types of LSPs
Headers
5. Routing Information Protocol
Intradomain routing protocols based on the distance-vector routing algorithm
RIP is implemented as a process that uses the service of UDP on the well-
known port number 520.
Two versions: RIP-1 and RIP-2
Modification:
a. a router in an AS needs to know how to forward a packet to different
networks (subnets) in an AS
b. the cost is defined as the number of hops, which means the number of
networks (subnets) a packet needs to travel through from the source router to
the final destination host.
Features:
a. Updates of the network are exchanged periodically.
b. Updates (routing information) are always broadcast.
c. Full routing tables are sent in updates.
d. Routers always trust routing information received from neighbor routers. This
is also known as Routing on rumors.
RIP Messages:
RIP Algorithm:
If the received route does not exist in the old forwarding table, it should be
added to the route.
If the cost of the received route is lower than the cost of the old one, the
received route should be selected as the new one.
If the cost of the received route is higher than the cost of the old one, but the
value of the next router is the same in both routes, the received route should be
selected as the new one.
RIP Timers
Update timer
Invalid timer
Hold down timer
Flush timer
6. Border Gateway Protocol
It is an interdomain routing protocol, and it uses the path-vector routing.
It is a gateway protocol that is used to exchange routing information among
the autonomous system on the internet.
Types
o External BGP (eBGP)
o Internal BGP (iBGP)
Operation of External BGP
7. Internet Protocol
IP stands for internet protocol.
It is a protocol defined in the TCP/IP model used for sending the packets from
source to destination.
The main task of IP is to deliver the packets from source to the destination
based on the IP addresses available in the packet headers.
IP defines the packet structure that hides the data which is to be delivered as
well as the addressing method that labels the datagram with a source and
destination information.
8. IPv4 vs IPv6
Ipv4 Ipv6
Address length IPv4 is a 32-bit address. IPv6 is a 128-bit address.
Fields IPv4 is a numeric address that consists of 4 IPv6 is an alphanumeric address that
fields which are separated by dot (.). consists of 8 fields, which are
separated by colon.
Classes IPv4 has 5 different classes of IP address IPv6 does not contain classes of IP
that includes Class A, Class B, Class C, addresses.
Class D, and Class E.
Number of IP IPv4 has a limited number of IP addresses. IPv6 has a large number of IP
address addresses.
VLSM It supports VLSM (Virtual Length Subnet It does not support VLSM.
Mask). Here, VLSM means that Ipv4
converts IP addresses into a subnet of
different sizes.
Address It supports manual and DHCP It supports manual, DHCP, auto-
configuration configuration. configuration, and renumbering.
Address space It generates 4 billion unique addresses It generates 340 undecillion unique
addresses.
End-to-end In IPv4, end-to-end connection integrity is In the case of IPv6, end-to-end
connection unachievable. connection integrity is achievable.
integrity
Security features In IPv4, security depends on the In IPv6, IPSEC is developed for
application. This IP address is not security purposes.
developed in keeping the security feature in
mind.
Address In IPv4, the IP address is represented in In IPv6, the representation of the IP
representation decimal. address in hexadecimal.
Fragmentation Fragmentation is done by the senders and Fragmentation is done by the
the forwarding routers. senders only.
Packet flow It does not provide any mechanism for It uses flow label field in the header
identification packet flow identification. for the packet flow identification.
Checksum field The checksum field is available in IPv4. The checksum field is not available
in IPv6.
Transmission IPv4 is broadcasting. On the other hand, IPv6 is
scheme multicasting, which provides
efficient network operations.
Encryption and It does not provide encryption and It provides encryption and
Authentication authentication. authentication.
Number of octets It consists of 4 octets. It consists of 8 fields, and each field
contains 2 octets. Therefore, the
total number of octets in IPv6 is 16.
Unit IV
Part A
1. List down the advantages of connection oriented services over connectionless
services.
2. How does UDP address flow control mechanism works?
3. Define congestion control.
4. What are the approaches used to provide a range of Quality of Service?
5. Difference between TCP and UDP.
Part B
1. User Datagram Protocol (UDP)
Introduction:
UDP is a short form for User Datagram protocol. It is one of the simplest
transport layer protocols. It is a connectionless and unreliable transport
protocol.
UDP packets, called user datagrams, have a fixed-size header of 8 bytes.
Operations of UDP:
1. Process to Process Communication
2. Connectionless Services
3. Encapsulation and decapsulation
4. Multiplexing and Demultiplexing
UDP checksum:
UDP Checksum calculation is similar to TCP Checksum computation. It‟s also
a 16-bit field of one‟s complement of one‟s complement sum of a pseudo UDP
header + UDP datagram.
Sender side:
o It treats segment contents as sequence of 16-bit integers.
o All segments are added. Let's call it sum.
o Checksum: 1's complement of sum.(In 1's complement all 0s are
converted into 1s and all 1s are converted into 0s).
o Sender puts this checksum value in UDP checksum field.
Receiver side:
o Calculate checksum
o All segments are added and then sum is added with sender's checksum.
o Check that any 0 bit is presented in checksum. If receiver side
checksum contains any 0 then error is detected. So the packet is
discarded by receiver.
Example:
o Suppose that we have the bit stream
0110011001100110 0110011001100110 0000111100001111:
o This bit stream is divided into segments of 16-bits integers.
0110011001100110 (16-bit integer segment)
0101010101010101
0000111100001111
o The sum of first of these 16-bit words is:
0110011001100110
0101010101010101
−−−−−−−−−−−−−−−−−−−−−−
1011101110111011
Now to calculate checksum 1's complement of sum is taken. So, the checksum
at sender side is: 0011010100110101.
Now at the receiver side, again all segments are added .and sum is added with
sender's checksum.
If no error than check of receiver would be: 1111111111111111.
If any 0 bit is presented in the header than there is an error in checksum. So,
the packet is discarded.
Although UDP provides error checking, it does not do anything to recover
from an error. Some implementations of UDP simply discard the damaged
segment; others pass the damaged segment to the application with a warning.
2. TCP state transition diagram for congestion management.
3. Quality of Service (QoS) Support in TCP
Scheduling
o FIFO Queuing
o Priority Queuing
o Weighted Fair Queuing
Resource reservation
Traffic Shaping
o Leaky bucket
o Token bucket