0% found this document useful (0 votes)
15 views58 pages

CN Mod3

IPv4 addressing includes three modes: unicast, broadcast, and multicast, each serving different communication needs. It employs a hierarchical addressing scheme with a 32-bit IP address divided into network and host IDs, and utilizes subnet masks for network identification. Classful addressing categorizes IP addresses into five classes (A, B, C, D, E) based on network size and usage, while also addressing design issues in the network layer such as routing and packet switching.

Uploaded by

Harsh Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views58 pages

CN Mod3

IPv4 addressing includes three modes: unicast, broadcast, and multicast, each serving different communication needs. It employs a hierarchical addressing scheme with a 32-bit IP address divided into network and host IDs, and utilizes subnet masks for network identification. Classful addressing categorizes IP addresses into five classes (A, B, C, D, E) based on network size and usage, while also addressing design issues in the network layer such as routing and packet switching.

Uploaded by

Harsh Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

IPV4 ADDRESSING

IPv4 supports three different types of addressing modes. −

Unicast Addressing Mode


In this mode, data is sent only to one destined host. The Destination Address field contains
32- bit IP address of the destination host. Here the client sends data to the targeted server −

Broadcast Addressing Mode


In this mode, the packet is addressed to all the hosts in a network segment. The Destination
Address field contains a special broadcast address, i.e. 255.255.255.255. When a host sees
this packet on the network, it is bound to process it. Here the client sends a packet, which is
entertained by all the Servers −
Multicast Addressing Mode
This mode is a mix of the previous two modes, i.e. the packet sent is neither destined to a
single host nor all the hosts on the segment. In this packet, the Destination Address contains a
special address which starts with 224.x.x.x and can be entertained by more than one host.

Here a server sends packets which are entertained by more than one servers. Every network
has one IP address reserved for the Network Number which represents the network and one
IP address reserved for the Broadcast Address, which represents all the hosts in that network.

Hierarchical Addressing Scheme


IPv4 uses hierarchical addressing scheme. An IP address, which is 32-bits in length, is
divided into two or three parts as depicted −

A single IP address can contain information about the network and its sub-network and
ultimately the host. This scheme enables the IP Address to be hierarchical where a network
can have many sub-networks which in turn can have many hosts.

Subnet Mask
The 32-bit IP address contains information about the host and its network. It is very necessary
to distinguish both. For this, routers use Subnet Mask, which is as long as the size of the
network address in the IP address. Subnet Mask is also 32 bits long. If the IP address in
binary is ANDed with its Subnet Mask, the result yields the Network address. For example,
say the IP Address is 192.168.1.152 and the Subnet Mask is 255.255.255.0 then −

This way the Subnet Mask helps extract the Network ID and the Host from an IP Address. It
can be identified now that 192.168.1.0 is the Network number and 192.168.1.152 is the host
on that network.

Binary Representation
The positional value method is the simplest form of converting binary from decimal value. IP
address is 32 bit value which is divided into 4 octets. A binary octet contains 8 bits and the
value of each bit can be determined by the position of bit value '1' in the octet.

Positional value of bits is determined by 2 raised to power (position – 1), that is the value of a
bit 1 at position 6 is 2^(6-1) that is 2^5 that is 32. The total value of the octet is determined by
adding up the positional value of bits. The value of 11000000 is 128+64 = 192. Some
examples are shown in the table below −
Classful Addressing
IP address is an address having information about how to reach a specific host, especially
outside the LAN. An IP address is a 32-bit unique address having an address space of 232.
Generally, there are two notations in which IP address is written, dotted decimal notation and
hexadecimal notation.

Dotted Decimal Notation:

Hexadecimal Notation:

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
• Class E

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. Each ISP or network
administrator assigns IP address to each device that is connected to its network.

Note: IP addresses are globally managed by Internet Assigned Numbers Authority(IANA)


and regional Internet registries(RIR).

Note: While finding the total number of host IP addresses, 2 IP addresses are not counted and are
therefore, decreased from the total count because the first IP address of any network is the network
number and whereas the last IP address is reserved for broadcast IP.

Class A:

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 address 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:

IP address belonging to class D are reserved for multi-casting. The higher order bits of the
first octet of IP addresses belonging to class D are always set to 1110. The remaining bits are
for the address that interested hosts recognize.

Class D does not posses any sub-net mask. IP addresses belonging to class D ranges from
224.0.0.0 – 239.255.255.255.

Class E:

IP addresses belonging to class E are reserved for experimental and research purposes. IP
addresses of class E ranges from 240.0.0.0 – 255.255.255.254. This class doesn’t have any
sub-net mask. The higher order bits of first octet of class E are always set to 1111.

Range of special IP addresses:

169.254.0.0 – 169.254.0.16: Link local addresses


127.0.0.0 – 127.0.0.8: Loop-back addresses
0.0.0.0 – 0.0.0.8: used to communicate within the current network.

Rules for assigning Host ID:

Host ID’s are used to identify a host within a network. The host ID are assigned based on the
following rules:
• Within any network, the host ID must be unique to that network.
• Host ID in which all bits are set to 0 cannot be assigned because this host ID is used
to represent the network ID of the IP address.
• Host ID in which all bits are set to 1 cannot be assigned because this host ID is
reserved as a broadcast address to send packets to all the hosts present on that
particular network.

Rules for assigning Network ID:

Hosts that are located on the same physical network are identified by the network ID, as all
host on the same physical network is assigned the same network ID. The network ID is
assigned based on the following rules:

• The network ID cannot start with 127 because 127 belongs to class A address and is
reserved for internal loop-back functions.
• All bits of network ID set to 1 are reserved for use as an IP broadcast address and
therefore, cannot be used.
• All bits of network ID set to 0 are used to denote a specific host on the local network
and are not routed and therefore, aren’t used.

Summary of Classful addressing:

Problems with Classful Addressing:

The problem with this classful addressing method is that millions of class A address are wasted,
many of the class B address are wasted, whereas, number of addresses available in class C is
so small that it cannot cater the needs of organizations. Class D addresses are used for multicast
routing and are therefore available as a single block only. Class E addresses are reserved.
Design Issues in Network Layer
Network layer is majorly focused on getting packets from the source to the destination, routing
error handling and congestion control.
• Addressing:
Maintains the address at the frame header of both source and destination and performs
addressing to detect various devices in network.
• Packeting:
This is performed by Internet Protocol. The network layer converts the packets from its
upper layer.
• Routing:
It is the most important functionality. The network layer chooses the most relevant and
best path for the data transmission from source to destination.
• Inter-networking:
It works to deliver a logical connection across multiple devices.
Network layer design issues:
The network layer comes with some design issues they are described as follows:
1. Store and Forward packet switching:
The host sends the packet to the nearest router. This packet is stored there until it has fully
arrived once the link is fully processed by verifying the checksum then it is forwarded to the next
router till it reaches the destination. This mechanism is called “Store and Forward packet
switching.”
2. Services provided to Transport Layer:
Through the network/transport layer interface, the network layer transfers it’s services to the
transport layer. These services are described below.
But before providing these services to the transfer layer following goals must be kept in mind :-
• Offering services must not depend on router technology.
• The transport layer needs to be protected from the type, number and topology of the
available router.
• The network addresses for the transport layer should use uniform numbering pattern also
at LAN and WAN connections.
Based on the connections there are 2 types of services provided :
• Connectionless – The routing and insertion of packets into subnet is done individually.
No added setup is required.
• Connection-Oriented – Subnet must offer reliable service and all the packets must be
transmitted over a single route.
3. Implementation of Connectionless Service:
Packet are termed as “datagrams” and corresponding subnet as “datagram subnets”. When the
message size that has to be transmitted is 4 times the size of the packet, then the network layer
divides into 4 packets and transmits each packet to router via. a few protocol.Each data packet
has destination address and is routed independently irrespective of the packets.
4. Implementation of Connection Oriented service:
To use a connection-oriented service, first we establishes a connection, use it and then release it.
In connection-oriented services, the data packets are delivered to the receiver in the same order
in which they have been sent by the sender.
It can be done in either two ways :
• Circuit Switched Connection – A dedicated physical path or a circuit is established
between the communicating nodes and then data stream is transferred.
• Virtual Circuit Switched Connection – The data stream is transferred over a packet
switched network, in such a way that it seems to the user that there is a dedicated path
from the sender to the receiver. A virtual path is established here. While, other
connections may also be using the same path.
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Internet Protocol Version 4-

• IPv4 short for Internet Protocol Version 4 is the fourth version of the Internet
Protocol (IP).
• IP is responsible to deliver data packets from the source host to the destination
host.
• This delivery is solely based on the IP Addresses in the packet headers.
• IPv4 is the first major version of IP.
• IPv4 is a connectionless protocol for use on packet-switched networks.

IPv4 Header-

The following diagram represents the IPv4 header-

1. Version-

• Version is a 4 bit field that indicates the IP version used.


• The most popularly used IP versions are version-4 (IPv4) and version-6 (IPv6).
• Only IPv4 uses the above header.
• So, this field always contains the decimal value 4.
2. Header Length-

• Header length is a 4 bit field that contains the length of the IP header.
• It helps in knowing from where the actual data begins.
Minimum And Maximum Header Length-

The length of IP header always lies in the range-


[20 bytes , 60 bytes]

• The initial 5 rows of the IP header are always used.


• So, minimum length of IP header = 5 x 4 bytes = 20 bytes.
• The size of the 6th row representing the Options field vary.
• The size of Options field can go up to 40 bytes.
• So, maximum length of IP header = 20 bytes + 40 bytes = 60 bytes.
Concept of Scaling Factor-

• Header length is a 4 bit field.


• So, the range of decimal values that can be represented is [0, 15].
• But the range of header length is [20, 60].
• So, to represent the header length, we use a scaling factor of 4.

In general,

Header length = Header length field value x 4 bytes

Examples-

• If header length field contains decimal value 5 (represented as 0101), then-


Header length = 5 x 4 = 20 bytes
• If header length field contains decimal value 10 (represented as 1010), then-
Header length = 10 x 4 = 40 bytes
• If header length field contains decimal value 15 (represented as 1111), then-
Header length = 15 x 4 = 60 bytes
3. Type Of Service-

• Type of service is a 8 bit field that is used for Quality of Service (QoS).
• The datagram is marked for giving a certain treatment using this field.

4. Total Length-

• Total length is a 16 bit field that contains the total length of the datagram (in
bytes).

Total length = Header length + Payload length

• Minimum total length of datagram = 20 bytes (20 bytes header + 0 bytes data)
• Maximum total length of datagram = Maximum value of 16 bit word = 65535
bytes
5. Identification-

• Identification is a 16 bit field.


• It is used for the identification of the fragments of an original IP datagram.

When an IP datagram is fragmented,


• Each fragmented datagram is assigned the same identification number.
• This number is useful during the re assembly of fragmented datagrams.
• It helps to identify to which IP datagram, the fragmented datagram belongs to.

6. DF Bit-

• DF bit stands for Do Not Fragment bit.


• Its value may be 0 or 1.

When DF bit is set to 0,


• It grants the permission to the intermediate devices to fragment the datagram if
required.

When DF bit is set to 1,


• It indicates the intermediate devices not to fragment the IP datagram at any cost.
• If network requires the datagram to be fragmented to travel further but settings
does not allow its fragmentation, then it is discarded.
• An error message is sent to the sender saying that the datagram has been
discarded due to its settings.
7. MF Bit-

• MF bit stands for More Fragments bit.


• Its value may be 0 or 1.

When MF bit is set to 0,


• It indicates to the receiver that the current datagram is either the last fragment in
the set or that it is the only fragment.

When MF bit is set to 1,


• It indicates to the receiver that the current datagram is a fragment of some larger
datagram.
• More fragments are following.
• MF bit is set to 1 on all the fragments except the last one.

8. Fragment Offset-

• Fragment Offset is a 13 bit field.


• It indicates the position of a fragmented datagram in the original unfragmented IP
datagram.
• The first fragmented datagram has a fragment offset of zero.

8. Fragment Offset-

• Fragment Offset is a 13 bit field.


• It indicates the position of a fragmented datagram in the original unfragmented IP
datagram.
• The first fragmented datagram has a fragment offset of zero.

Fragment offset for a given fragmented datagram


= Number of data bytes ahead of it in the original unfragmented
datagram
Concept Of Scaling Factor-

• We use a scaling factor of 8 for the fragment offset.


• Fragment offset field value = Fragment Offset / 8

Need Of Scaling Factor For Fragment


Offset

• In IPv4 header, the total length field comprises of 16 bits.


• Total length = Header length + Payload length.
• Minimum header length = 20 bytes.
• So, maximum amount of data that can be sent in the payload field
= 216 – 20 bytes.
• In worst case, a datagram containing 216 – 20 bytes of data might
be fragmented in such a way that the last fragmented datagram
contains only 1 byte of data.
• Then, fragment offset for the last fragmented datagram will be
(216 – 20) – 1 = 216 -21 ≅ 216
(if no scaling factor is used)
• Now, this fragment offset value of 216 can not be represented.
• This is because the fragment offset field consists of only 13 bits.
• Using 13 bits, a maximum number of 213 can be represented.
• So, to represent 216 we use the concept of scaling factor.
• Scaling factor = 216 / 213 = 23 = 8.

9. Time To Live-

• Time to live (TTL) is a 8 bit field.


• It indicates the maximum number of hops a datagram can take to reach the
destination.
• The main purpose of TTL is to prevent the IP datagrams from looping around
forever in a routing loop.

The value of TTL is decremented by 1 when-


• Datagram takes a hop to any intermediate device having network layer.
• Datagram takes a hop to the destination.
If the value of TTL becomes zero before reaching the destination, then datagram is
discarded.

NOTES
It is important to note-
• Both intermediate devices having network layer and destination
decrements the TTL value by 1.
• If the value of TTL is found to be zero at any intermediate device,
then the datagram is discarded.
• So, at any intermediate device, the value of TTL must be greater
than zero to proceed further.
• If the value of TTL becomes zero at the destination, then the
datagram is accepted.
• So, at the destination, the value of TTL may be greater than or
equal to zero.

10. Protocol-

• Protocol is a 8 bit field.


• It tells the network layer at the destination host to which protocol the IP datagram
belongs to.
• In other words, it tells the next level protocol to the network layer at the
destination side.
• Protocol number of ICMP is 1, IGMP is 2, TCP is 6 and UDP is 17.

Why Protocol Number Is A Part Of IP


Header?

Consider-
• An IP datagram is sent by the sender to the receiver.
• When datagram reaches at the router, it’s buffer is already full.

In such a case,
• Router does not discard the datagram directly.
• Before discarding, router checks the next level protocol number
mentioned in its IP header.
• If the datagram belongs to TCP, then it tries to make room for the
datagram in its buffer.
• It creates a room by eliminating one of the datagrams having
lower priority.
• This is because it knows that TCP is a reliable protocol and if it
discards the datagram, then it will be sent again by the sender.
• The order in which router eliminate the datagrams from its buffer
is-
ICMP > IGMP > UDP > TCP

If protocol number would have been inside the datagram, then-


• Router could not look into it.
• This is because router has only three layers- physical layer, data
link layer and network layer.

That is why, protocol number is made a part of IP header.

11. Header Checksum-

• Header checksum is a 16 bit field.


• It contains the checksum value of the entire header.
• The checksum value is used for error checking of the header.

At each hop,
• The header checksum is compared with the value contained in this field.
• If header checksum is found to be mismatched, then the datagram is discarded.
• Router updates the checksum field whenever it modifies the datagram header.

The fields that may be modified are-


1. TTL
2. Options
3. Datagram Length
4. Header Length
5. Fragment Offset

NOTE
It is important to note-
• Computation of header checksum includes IP header only.
• Errors in the data field are handled by the encapsulated protocol.

Also Read- Checksum

12. Source IP Address-

• Source IP Address is a 32 bit field.


• It contains the logical address of the sender of the datagram.

13. Destination IP Address-

• Destination IP Address is a 32 bit field.


• It contains the logical address of the receiver of the datagram.

14. Options-

• Options is a field whose size vary from 0 bytes to 40 bytes.


• This field is used for several purposes such as-
1. Record route
2. Source routing
3. Padding

1. Record Route-

• A record route option is used to record the IP Address of the routers through
which the datagram passes on its way.
• When record route option is set in the options field, IP Address of the router gets
recorded in the Options field.

NOTE
The maximum number of IPv4 router addresses that can be recorded in the
Record Route option field of an IPv4 header is 9.

Explanation-

• In IPv4, size of IP Addresses = 32 bits = 4 bytes.


• Maximum size of Options field = 40 bytes.
• So, it seems maximum number of IP Addresses that can be
recorded = 40 / 4 = 10.
• But some space is required to indicate the type of option being
used.
• Also, some space is to be left between the IP Addresses.
• So, the space of 4 bytes is left for this purpose.
• Therefore, the maximum number of IP addresses that can be
recorded = 9.

2. Source Routing-

• A source routing option is used to specify the route that the datagram must take
to reach the destination.
• This option is generally used to check whether a certain path is working fine or
not.
• Source routing may be loose or strict.

3. Padding-

• Addition of dummy data to fill up unused space in the transmission unit and make
it conform to the standard size is called as padding.
• Options field is used for padding.

Example-

• When header length is not a multiple of 4, extra zeroes are padded in the Options
field.
• By doing so, header length becomes a multiple of 4.
• If header length = 30 bytes, 2 bytes of dummy data is added to the header.
• This makes header length = 32 bytes.
• Then, the value 32 / 4 = 8 is put in the header length field.
• In worst case, 3 bytes of dummy data might have to be padded to make the
header length a multiple of 4.
Introduction to Internet Protocol version 6
IP version 6 is the new version of Internet Protocol, which is way better than
IP version 4 in terms of complexity and efficiency. Let’s look at the header of
IP version 6 and understand how it is different from the IPv4 header.
IP version 6 Header Format :

Version (4-bits): Indicates version of Internet Protocol which contains bit


sequence 0110.
Traffic Class (8-bits): The Traffic Class field indicates class or priority of
IPv6 packet which is similar to Service Field in IPv4 packet. It helps routers
to handle the traffic based on the priority of the packet. If congestion occurs
on the router then packets with the least priority will be discarded.
As of now, only 4-bits are being used (and the remaining bits are under
research), in which 0 to 7 are assigned to Congestion controlled traffic and 8
to 15 are assigned to Uncontrolled traffic.
Priority assignment of Congestion controlled traffic :
Uncontrolled data traffic is mainly used for Audio/Video data. So we give
higher priority to Uncontrolled data traffic.
The source node is allowed to set the priorities but on the way, routers can
change it. Therefore, the destination should not expect the same priority
which was set by the source node.
Flow Label (20-bits): Flow Label field is used by a source to label the
packets belonging to the same flow in order to request special handling by
intermediate IPv6 routers, such as non-default quality of service or real-time
service. In order to distinguish the flow, an intermediate router can use the
source address, a destination address, and flow label of the packets.
Between a source and destination, multiple flows may exist because many
processes might be running at the same time. Routers or Host that does not
support the functionality of flow label field and for default router handling,
flow label field is set to 0. While setting up the flow label, the source is also
supposed to specify the lifetime of the flow.
Payload Length (16-bits): It is a 16-bit (unsigned integer) field, indicates the
total size of the payload which tells routers about the amount of information a
particular packet contains in its payload. The payload Length field includes
extension headers(if any) and an upper-layer packet. In case the length of
the payload is greater than 65,535 bytes (payload up to 65,535 bytes can be
indicated with 16-bits), then the payload length field will be set to 0 and the
jumbo payload option is used in the Hop-by-Hop options extension header.
Next Header (8-bits): Next Header indicates the type of extension header(if
present) immediately following the IPv6 header. Whereas In some cases it
indicates the protocols contained within upper-layer packets, such as TCP,
UDP.
Hop Limit (8-bits): Hop Limit field is the same as TTL in IPv4 packets. It
indicates the maximum number of intermediate nodes IPv6 packet is allowed
to travel. Its value gets decremented by one, by each node that forwards the
packet and the packet is discarded if the value decrements to 0. This is used
to discard the packets that are stuck in an infinite loop because of some
routing error.
Source Address (128-bits): Source Address is the 128-bit IPv6 address of
the original source of the packet.
Destination Address (128-bits): The destination Address field indicates the
IPv6 address of the final destination(in most cases). All the intermediate
nodes can use this information in order to correctly route the packet.
Extension Headers: In order to rectify the limitations of the IPv4 Option
Field, Extension Headers are introduced in IP version 6. The extension
header mechanism is a very important part of the IPv6 architecture. The next
Header field of IPv6 fixed header points to the first Extension Header and
this first extension header points to the second extension header and so on.

IPv6 packet may contain zero, one or more extension headers but these
should be present in their recommended order:
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Distance Vector Routing
a) The least-cost route between any two nodes is the route with
minimum distance.
b) Each node maintains a vector(table) of minimum distances to
every node.
c) The table at each node also guides the packets to the desired
node by showing the next hop routing.

Example:
Assume each node as the cities.
Lines as the roads connecting them.

1
Final Distance vector routing tables

2
Initialization
a) The table in figure are stable.
b) Each node knows how to reach any other node and their cost.
c) At the beginning, each node know the cost of itself and its
immediate neighbor.[those node directly connected to it.]
d) Assume that each node send a message to the immediate neighbors
and find the distance between itself and these neighbors.
e) The distance of any entry that is not a neighbor is marked as
infinite(unreachable).

3
Initialization of tables in distance vector routing (DVR)

4
Sharing
a) Idea is to share the information between neighbors.
b) The node A does not know the distance about E, but node C does.
c) If node C share it routing table with A, node A can also know how
to reach node E.
d) On the other hand, node C does not know how to reach node D, but
node A does.
e) If node A share its routing table with C, then node C can also know
how to reach node D.
f) Node A and C are immediate neighbors, can improve their routing
tables if they help each other.

5
Sharing Contd.,
a) How much of the table must be shared with each neighbor?
b) The third column of the table(next hop) is not useful for the
neighbor.
c) When the neighbor receives a table, this column needs to be
replaced with the sender’s name.
d) If any of the rows can be used, the next node column filled with
sender of the table.
e) Therefore, a node can send only the first two column of its table to
any neighbor.

6
7
Updating in distance vector routing example: C to A

From C From A

A to A via C: ACA = AC+ CA = 2+2

A to B via C: ACB = AC + CB = 2+4

A to D via C: ACD = AC + CD = 2+ inf.


A to E via C: ACD = AC + CE = 2+4

A to C via C: ACB = AC + CC = 2+0

8
When to share
a) Periodic Update: A node sends its table, normally every 30s, in a
periodic update, it depends on the protocol that is using DVR.
b) Triggered Update: A node sends its two-column routing table to its
neighbors anytime there is a change in its routing table.
c) This is called triggered update the change can result from the
following:
 A node receives a table from a neighbor, resulting in changes in its
own table after updating.
 A node detects some failure in the neighboring links which results
in a distance change to infinity.

9
Distance Vector Routing (DVR)
a) 3 keys to understand how this algorithm works:
• Sharing knowledge about the entire AS. Each router
shares its knowledge about the entire AS with
neighbours. It sends whatever it has.
• Sharing only with immediate neighbours. Each router
sends whatever knowledge it has thru all its interface.
• Sharing at regular intervals. sends at fixed intervals,
e.g. every 30 sec.

b) Problems: Tedious comparing/updating process, slow


response to infinite loop problem, huge list to be
maintained!!

10
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Write a short note on: Open loop congestion techniques

Open Loop Congestion Control

i. In this method, policies are used to prevent the congestion before it happens.

ii. Congestion control is handled either by the source or by the destination. The various
methods used for open loop congestion control are:

1) Retransmission Policy

a. The sender retransmits a packet, if it feels that the packet it has sent is lost or corrupted.

b. However retransmission in general may increase the congestion in the network. But we
need to implement good retransmission policy to prevent congestion.

c. The retransmission policy and the retransmission timers need to be designed to optimize
efficiency and at the same time prevent the congestion.

2) Window Policy

a. To implement window policy, selective reject window method is used for congestion
control.

b. Selective Reject method is preferred over Go-back-n window as in Go-back-n method,


when timer for a packet times out, several packets are resent, although some may have
arrived safely at the receiver. Thus, this duplication may make congestion worse.

c. Selective reject method sends only the specific lost or damaged packets.

3) Acknowledgement Policy

a. The acknowledgement policy imposed by the receiver may also affect congestion.

b. If the receiver does not acknowledge every packet it receives it may slow down the sender
and help prevent congestion.

c. Acknowledgments also add to the traffic load on the network. Thus, by sending fewer
acknowledgements we can reduce load on the network.

d. To implement it, several approaches can be used:

• A receiver may send an acknowledgement only if it has a packet to be sent.


• A receiver may send an acknowledgement when a timer expires.
• A receiver may also decide to acknowledge only N packets at a time.

4) Discarding Policy

a. A router may discard less sensitive packets when congestion is likely to happen.
b. Such a discarding policy may prevent congestion and at the same time may not harm the
integrity of the transmission.

5) Admission Policy

a. An admission policy, which is a quality-of-service mechanism, can also prevent congestion


in virtual circuit networks.

b. Switches in a flow first check the resource requirement of a flow before admitting it to the
network.

c. A router can deny establishing a virtual circuit connection if there is congestion in the
"network or if there is a possibility of future congestion.

You might also like