Mod3 1
Mod3 1
Mod3 1
Network Layer:
• MODULE 3 8 Hrs
The routing protocols use the metric to determine the best path
for the packet delivery.
How it works:
In DVR, each router maintains a routing table. It contains only one entry for each
router. It contains two parts − a preferred outgoing line to use for that destination and
an estimate of time (delay). Tables are updated by exchanging the information with the
neighbor’s nodes.
Each router knows the delay in reaching its neighbors (Ex − send echo request).
Routers periodically exchange routing tables with each of their neighbors.
It compares the delay in its local table with the delay in the neighbor’s table and the
cost of reaching that neighbor.
If the path via the neighbor has a lower cost, then the router updates its local table to
forward packets to the neighbor.
• Distance Vector Routing (Bellman-Ford routing algorithm)
• Operation:
– Each router maintain a table (i.e., a vector) giving the best known distance to each
destination and which link to use to get there.
– In distance vector routing, each router periodically shares its knowledge
about the entire network with its neighbors.
– The preferred outgoing line to use for that destination and an estimate of the distance to that
destination. Eventually, every router knows the best link to reach each destination.
COMPUTER NETWORKS - 19CS3602
What is The Count to Infinity problem
• The Count to Infinity problem arises from the routing
loop in this Distance Vector Routing(DVR) network.
Such Routing Loops usually occurs when 2 routers send
an update together at the same time or when an
interface goes down
Count to Infinity Problem
IP addresses, when started a few decades ago, used the concept of classes.
This architecture is called classful addressing. In the mid-1990s, a new
architecture, called classless addressing, was introduced and will
eventually supersede the original architecture. However, part of the
Internet is still using classful addressing, but the migration is very fast.
Some points to be noted about dotted decimal notation:
1.The value of any segment (byte) is between 0 and 255 (both included).
2.There are no zeroes preceding the value in any segment (054 is wrong, 54 is
correct).
Classful Addressing
The 32-bit IP address is divided into five sub-classes. These
are:
•Class A
•Class B
•Class C
•Class D
Each of these classes has a valid range of IP addresses. Classes D and E are
reserved for multicast and experimental purposes respectively. The order of
bits in the first octet determine the classes of IP address.
IPv4 address is divided into two parts:
•Network ID
•Host ID
The class of IP address is used to determine the bits used for network ID and
host ID and the number of total networks and hosts possible in that particular
class.
IP address belonging to class A are assigned to the networks that contain a large
number of hosts.
•The network ID is 8 bits long.
•The host ID is 24 bits long.
The higher order bit of the first octet in class A is always set to 0. The remaining
7 bits in first octet are used to determine network ID. The 24 bits of host ID are
used to determine the host in any network.
The default subnet mask for class A is 255.x.x.x. Therefore, class A has a total
of:
•2^7-2= 126 network ID(Here 2 address is subtracted because 0.0.0.0 and
127.x.y.z are special address. )
•2^24 – 2 = 16,777,214 host ID
IP addresses belonging to class A ranges from 1.x.x.x – 126.x.x.x
Class B:
IP address belonging to class B are assigned to the networks that ranges from
medium-sized to large-sized networks.
•The network ID is 16 bits long.
•The host ID is 16 bits long.
The higher order bits of the first octet of IP addresses of class B are always set to
10. The remaining 14 bits are used to determine network ID. The 16 bits of host ID
is used to determine the host in any network. The default sub-net mask for class B
is 255.255.x.x. Class B has a total of:
•2^14 = 16384 network address
•2^16 – 2 = 65534 host address
•IP addresses belonging to class B ranges from 128.0.x.x – 191.255.x.x.
Class C:
IP addresses belonging to class C are assigned to small-sized networks.
• The network ID is 24 bits long.
• The host ID is 8 bits long.
The higher order bits of the first octet of IP addresses of class C are always set to
110. The remaining 21 bits are used to determine network ID. The 8 bits of host
ID is used to determine the host in any network. The default sub-net mask for
class C is 255.255.255.x. Class C has a total of:
• 2^21 = 2097152 network address
• 2^8 – 2 = 254 host address
IP addresses belonging to class C ranges from 192.0.0.x – 223.255.255.x.
Class D:
Version: It is a four-bit field that defines the version number of the IP. IP6 version is 6,
IP4 version is 4.
Priority: It is a 4-bit priority field that defines the priority of the packet with respect to
traffic congestion that a packet is to reject or not.
Flow Label: It is three bytes or 24-bit field designed to provide special handling for a
particular flow of data to speed flow on an already flowing packet path.
Payload Length: It is a two-byte payload length field that defines the total length of
the IP datagram, excluding the base header.
Next Header: It is an 8-bit field that defines the header that follows the base header
in the datagram.
Source Address: This field is 16-byte which specifies the original source of the
datagram destination address. This is a 16-byte internet address that usually identifies
the final destination of the datagram.
Priority: IPV6 divides traffic into two broad categories, which are as follows:
IPV6
Congestion Control Traffic: If a source adopts itself to traffic showdown when there is
congestion. In TCP protocol, congestion-control data is assigned priority 0 to 7, such
as 0 for lowest and 7 for highest in congestion.
Priority Meaning
0 There is no specific traffic
1 Background data
2 Unattended data traffic
3 Reserved
4 Attended Bulk data traffic
5 Reserved
6 Interactive Traffic
7 Control Traffic
IP Tunneling
IP tunnels provide a virtual link between two nodes that are reachable by using IP.
The link can thus be used to transport IPv6 packets over the IPv4 networks to enable
IPv6 communication between the two IPv6 sites.
Split Tunneling: Split tunneling allows some traffic to go outside of the VPN tunnel. In
essence, split tunneling lets user devices connect to two networks simultaneously:
one public and one private.
54
Traffic Shaping
Congestion control in data-gram and sub-nets :
• A special bit (warning bit) in the packet header is set by
the router to warn the source when congestion is
detected.
• The usual purpose of piggybacking is simply to gain free network access rather than any malicious intent, but it can slow down data transfer for legitimate users of the
network. Piggybacking is sometimes referred to as "Wi-Fi squatting
A choke packet
A choke packet is used in network
maintenance and quality management to
inform a specific node or transmitter that
its transmitted traffic is creating
congestion over the network.
This forces the node or transmitter to reduce
its output rate.
Choke packets are used for congestion and
flow control over a network
Hop-by-Hop
Choke Packets
94
Jitter Control
10
2
Congestion control algorithms
Leaky Bucket Algorithm:
• In the figure, we assume that the network has committed a bandwidth of 3 Mbps for a host.
• The use of the leaky bucket shapes the input traffic to make it conform to this commitment.
• In Figure the host sends a burst of data at a rate of 12 Mbps for 2 s, for a total of 24 Mbits of
data.
• The host is silent for 5 s and then sends data at a rate of 2 Mbps for 3 s, for a total of 6 Mbits
of data.
• In all, the host has sent 30 Mbits of data in 10 s.
• The leaky bucket smooths the traffic by sending out data at a rate of 3 Mbps during the same
10 s.
Without the leaky bucket, the beginning burst may have hurt the network by consuming more
bandwidth than is set aside for this host. We can also see that the leaky bucket may prevent
congestion.
• A simple leaky bucket algorithm can be implemented using FIFO queue.
• A FIFO queue holds the packets.
• If the traffic consists of fixed-size packets (e.g., cells in ATM networks), the
process removes a fixed number of packets from the queue at each tick of the
clock.
• If the traffic consists of variable-length packets, the fixed output rate must be
based on the number of bytes or bits.
• Burst size
• Average bandwidth
• Peak bandwidth
Contd.
Burst Size: When the workload is greater than average bandwidth it is known
as burst. Maximum amount of bytes that are permitted to move in a burst are
defined by burst size. Burst Size = Time*Bandwidth
Part of the packet scheduler's responsibility is shaping the way packets are
transmitted from a network device, a capability often referred to as packet
shaping. Though often referenced by its own name, the packet shaper is
simply a part of overall packet scheduler functionality.