0% found this document useful (0 votes)
17 views36 pages

Network Layer Switching Techniques Explained

The document covers the Network Layer, detailing switching techniques such as Circuit Switching, Packet Switching, and Message Switching, along with their advantages and disadvantages. It also discusses logical addressing with IPv4 and IPv6, including classful addressing and subnetting, highlighting the structure and limitations of IP addresses. Additionally, it provides examples of IP address classification and the challenges posed by the limited availability of IPv4 addresses.
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)
17 views36 pages

Network Layer Switching Techniques Explained

The document covers the Network Layer, detailing switching techniques such as Circuit Switching, Packet Switching, and Message Switching, along with their advantages and disadvantages. It also discusses logical addressing with IPv4 and IPv6, including classful addressing and subnetting, highlighting the structure and limitations of IP addresses. Additionally, it provides examples of IP address classification and the challenges posed by the limited availability of IPv4 addresses.
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

UNIT-3

Network Layer:
Switching Techniques: Circuit Switching, Packet Switching, and
Message Switching.
Logical addressing: IPv4 and IPv6 Address schemes, Classes and
subnetting
Network Layer Protocols: ARP, RARP, BOOTP and DHCP
Routing Techniques: Interdomain and Intradomain routing with
Examples
PART1
Switching Techniques

The switching technique is used to connect the systems for making one-to-one communication.

Classification Of Switching Techniques

Circuit Switching

o Circuit switching is a switching technique that establishes a dedicated path between


sender and receiver.
o In the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
o Circuit switching in a network operates in a similar way as the telephone works.
o A complete end-to-end path must exist before the communication takes place.
o In case of circuit switching technique, when any user wants to send the data, voice,
video, a request signal is sent to the receiver then the receiver sends back the
acknowledgment to ensure the availability of the dedicated path. After receiving the
acknowledgment, dedicated path transfers the data.
o Circuit switching is used in public telephone network. It is used for voice transmission.
o Fixed data can be transferred at a time in circuit switching technology.

Communication through circuit switching has 3 phases:

o Circuit establishment
o Data transfer
o Circuit Disconnect

Circuit Switching can use either of the two technologies:

Space Division Switches:

o Space Division Switching is a circuit switching technology in which a single


transmission path is accomplished in a switch by using a physically separate set of
crosspoints.
o Space Division Switching can be achieved by using crossbar switch. A crossbar switch
is a metallic crosspoint or semiconductor gate that can be enabled or disabled by a
control unit.
o The Crossbar switch is made by using the semiconductor. For example, Xilinx crossbar
switch using FPGAs.
o Space Division Switching has high speed, high capacity, and nonblocking switches.

Space Division Switches can be categorized in two ways:

o Crossbar Switch
o Multistage Switch

Crossbar Switch
The Crossbar switch is a switch that has n input lines and n output lines. The crossbar switch
has n2 intersection points known as crosspoints.

Disadvantage of Crossbar switch:

The number of crosspoints increases as the number of stations is increased. Therefore, it


becomes very expensive for a large switch. The solution to this is to use a multistage switch.

Multistage Switch

o Multistage Switch is made by splitting the crossbar switch into the smaller units and
then interconnecting them.
o It reduces the number of crosspoints.
o If one path fails, then there will be an availability of another path.

Figure:Multi stage switch

Advantages Of Circuit Switching:

o In the case of Circuit Switching technique, the communication channel is dedicated.


o It has fixed bandwidth.

Disadvantages Of Circuit Switching:

o Once the dedicated path is established, the only delay occurs in the speed of data
transmission.
o It takes a long time to establish a connection approx 10 seconds during which no data
can be transmitted.
o It is more expensive than other switching techniques as a dedicated path is required for
each connection.
o It is inefficient to use because once the path is established and no data is transferred,
then the capacity of the path is wasted.
o In this case, the connection is dedicated therefore no other data can be transferred even
if the channel is free.

TIME DIVISION SWITCHING


Time division switching comes under digital switching techniques, where the Pulse
Code Modulated signals are mostly present at the input and the output ports.

The incoming and outgoing signals when received and re-transmitted in a different time
slot, is called Time Division Switching. The digitized speech information is sliced into
a sequence of time intervals or slots. Additional voice circuit slots, corresponding to
other users are inserted into this bit stream of data. Hence, the data is sent in time
frames.

The two popular methods of TDM are TSI (Time and Slot Interchange) and TDM bus.

2)Message Switching
o Message Switching is a switching technique in which a message is transferred as a
complete unit and routed through intermediate nodes at which it is stored and
forwarded.
o In Message Switching technique, there is no establishment of a dedicated path between
the sender and receiver.
o The destination address is appended to the message. Message Switching provides a
dynamic routing as the message is routed through the intermediate nodes based on the
information available in the message.
o Message switches are programmed in such a way so that they can provide the most
efficient routes.
o Each and every node stores the entire message and then forward it to the next node.
This type of network is known as store and forward network.
o Message switching treats each message as an independent entity.
antanes a f a
Ms nesaSwiachite
o Data channels are shared among the communicating devices that improve the efficiency
of using available bandwidth.
o Traffic congestion can be reduced because the message is temporarily stored in the
nodes.
o Message priority can be used to manage the network.
o The size of the message which is sent over the network can be varied. Therefore, it
supports the data of unlimited size.

Disadvantages Of Message Switching

o The message switches must be equipped with sufficient storage to enable them to store
the messages until the message is forwarded.
o The Long delay can occur due to the storing and forwarding facility provided by the
message switching technique.

Packet Switching
o The packet switching is a switching technique in which the message is sent in one go,
but it is divided into smaller pieces, and they are sent individually.
o The message splits into smaller pieces known as packets and packets are given a unique
number to identify their order at the receiving end.
o Every packet contains some information in its headers such as source address,
destination address and sequence number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If any packet is missing or corrupted, then the message will be sent to resend the
message.
o If the correct order of the packets is reached, then the acknowledgment message will be
sent.
Approaches of Packet Switching:

There are two approaches to Packet Switching:

Datagram Packet switching:


o It is a packet switching technology in which packet is known as a datagram, is
considered as an independent entity. Each packet contains the information about the
destination and switch uses this information to forward the packet to the correct
destination.
o The packets are reassembled at the receiving end in correct order.
o In Datagram Packet Switching technique, the path is not fixed.
o Intermediate nodes take the routing decisions to forward the packets.
o Datagram Packet Switching is also known as connectionless switching.

Virtual Circuit Switching

o Virtual Circuit Switching is also known as connection-oriented switching.


o In the case of Virtual circuit switching, a preplanned route is established before the
messages are sent.
o Call request and call accept packets are used to establish the connection between sender
and receiver.
o In this case, the path is fixed for the duration of a logical connection.

Let's understand the concept of virtual circuit switching through a diagram:


o In the above diagram, A and B are the sender and receiver respectively. 1 and 2 are the
nodes.
o Call request and call accept packets are used to establish a connection between the
sender and receiver.
o When a route is established, data will be transferred.
o After transmission of data, an acknowledgment signal is sent by the receiver that the
message has been received.
o If the user wants to terminate the connection, a clear signal is sent for the termination.

Differences b/w Datagram approach and Virtual Circuit approach

Datagram approach Virtual Circuit approach

Node takes routing decisions to forward the Node does not take any routing decision.
packets.

Congestion cannot occur as all the packets Congestion can occur when the node is busy, and it does
travel in different directions. not allow other packets to pass through.

It is more flexible as all the packets are It is not very flexible.


treated as an independent entity.

Advantages Of Packet Switching:


o Cost-effective: In packet switching technique, switching devices do not require
massive secondary storage to store the packets, so cost is minimized to some extent.
Therefore, we can say that the packet switching technique is a cost-effective technique.
o Reliable: If any node is busy, then the packets can be rerouted. This ensures that the
Packet Switching technique provides reliable communication.
o Efficient: Packet Switching is an efficient technique. It does not require any established
path prior to the transmission, and many users can use the same communication channel
simultaneously, hence makes use of available bandwidth very efficiently.

Disadvantages Of Packet Switching:

o Packet Switching technique cannot be implemented in those applications that require


low delay and high-quality services.
o The protocols used in a packet switching technique are very complex and requires high
implementation cost.
o If the network is overloaded or corrupted, then it requires retransmission of lost packets.
It can also lead to the loss of critical information if errors are nor recovered.

PART_2

Logical addressing: IPv4 and IPv6 Address schemes, Classes and


subnetting

An IP address is assigned to each device connected to a network. Each device uses an IP address
for communication. It also behaves as an identifier as this address is used to identify the device
on a network. It defines the technical format of the packets. Mainly, both the networks, i.e., IP
and TCP, are combined together, so together, they are referred to as a TCP/IP. It creates a
virtual connection between the source and the destination.

We can also define an IP address as a numeric address assigned to each device on a network.
An IP address is assigned to each device so that the device on a network can be identified
uniquely. To facilitate the routing of packets, TCP/IP protocol uses a 32-bit logical address
known as IPv4(Internet Protocol version 4).

CLASSFULL ADDRESSING

In the IPv4 IP address space, there are five classes: A, B, C, D and E. Each class has a specific
range of IP addresses (and ultimately dictates the number of devices you can have on your
network). Primarily, class A, B, and C are used by the majority of devices on the Internet. Class
D and class E are for special uses.
In every IP address class, all host-number bits are specified by a power of 2 that indicates the
total numbers of the host's address that can create for a particular network address. Class A
address can contain the maximum number of 224 (16,777,216) host numbers. Class B addresses
contain the maximum number of 216 (65, 536) host numbers. And class C contains a maximum
number of 28 (256) host numbers.

CLASS A
Public IP Range: [Link] to [Link]
First octet value range from 1 to 127
Subnet Mask: [Link] (8 bits)
Number of Networks: 126
Number of Hosts per Network: 16,777,214 (2 to the power 24-2)
CLASS B
Public IP Range: [Link] to [Link]
First octet value range from 128 to 191
Subnet Mask: [Link] (16 bits)
Number of Networks: 16,382
Number of Hosts per Network: 65,534
CLASS C
Public IP Range: [Link] to [Link]
First octet value ranges from 192 to 223
Special IP Range: [Link] to [Link] (See Special IP Addresses below for more
information)
Subnet Mask: [Link] (24 bits)
Number of Networks: 2,097,150
Number of Hosts per Network: 254

Class D

Range: [Link] to [Link]


First octet value range from 224 to 239
Number of Networks: N/A
Number of Hosts per Network: Multicasting
CLASS E
Range: [Link] to [Link]
First octet value range from 240 to 255
Number of Networks: N/A
Number of Hosts per Network: Research/Reserved/Experimental
NUMERICALS

Questions: For the following IP Addresses-


1. [Link]
2. [Link]
3. [Link]
4. [Link]
5. [Link]
6. [Link]
7. [Link]
8. [Link]

Identify the Class, Network IP Address, Direct broadcast address and Limited broadcast
address of each IP Address.

Answer:

(1)

 IP Address belongs to class A


 Network IP Address = [Link]
 Direct Broadcast Address = [Link]
 Limited Broadcast Address = [Link]

(2)

 IP Address belongs to class A


 Network IP Address = [Link]
 Direct Broadcast Address = [Link]
 Limited Broadcast Address = [Link]
3. Given IP Address is-
[Link]

 IP Address belongs to class B


 Network IP Address = [Link]
 Direct Broadcast Address = [Link]
 Limited Broadcast Address = [Link]
4.

Given IP Address is-


[Link]

 IP Address belongs to class B


 Network IP Address = [Link]
 Direct Broadcast Address = [Link]
 Limited Broadcast Address = [Link]

5.

Given IP Address is-


[Link]

 IP Address belongs to class C


 Network IP Address = [Link]
 Direct Broadcast Address = [Link]
 Limited Broadcast Address = [Link]

6.

Given IP Address is-


[Link]

 IP Address belongs to class C


 Network IP Address = [Link]
 Direct Broadcast Address = [Link]
 Limited Broadcast Address = [Link]

7.

Given IP Address is-


[Link]

 IP Address belongs to class E


 Network IP Address = Not available
 Direct Broadcast Address = Not available
 Limited Broadcast Address = Not available

8.

Given IP Address is-


[Link]

 This is not a valid IP Address.


 This is because for any given IP Address, the range of its first octet is always [1, 254].
 First and Last IP Addresses are reserved.

An IP address consists of two parts, i.e., the first one is a network address, and the other one is
a host address.

There are two versions of IP addresses:

1)IPv4

2)IPv6

IPv4 is a version 4 of IP. It is a current version and the most commonly used IP address. It is a
32-bit address written in four numbers separated by 'dot', i.e., periods. This address is unique
for each device.

For example, [Link]

Drawback of IPv4

Currently, the population of the world is 7.6 billion. Every user is having more than one device
connected with the internet, and private companies also rely on the internet. As we know that
IPv4 produces 4 billion addresses, which are not enough for each device connected to the
internet on a planet. Although the various techniques were invented, such as variable-length
mask, network address translation, port address translation, classes, and inter-domain
translation, to conserve the bandwidth of IP addresses and slow down the depletion of an IP
address. In these techniques, public IP is converted into a private IP due to which the user
having public IP can also use the internet. But still, this was not so efficient, so it gave rise to
the development of the next generation of IP addresses, i.e., IPv6.
IPv6

IPv6 is the next generation of IP addresses. The main difference between IPv4 and IPv6 is the
address size of IP addresses. The IPv4 is a 32-bit address, whereas IPv6 is a 128-bit
hexadecimal address. IPv6 provides a large address space, and it contains a simple header as
compared to IPv4.

Transition strategies from IPv4 to IPv6

It provides transition strategies that convert IPv4 into IPv6, and these strategies are as follows:

o Dual stacking: It allows us to have both versions, i.e., IPv4 and IPv6, on the same
device.
o Tunneling: In this approach, all the users have IPv6 communicates with an IPv4
network to reach IPv6.
o Network Address Translation: The translation allows communication between the
hosts having a different version of IP.

This hexadecimal address contains both numbers and alphabets. Due to the usage of both the
numbers and alphabets, IPv6 is capable of producing over 340 undecillion (3.4*1038) addresses.

IPv6 is a 128-bit hexadecimal address made up of 8 sets of 16 bits each, and these 8 sets are
separated by a colon. In IPv6, each hexadecimal character represents 4 bits. So, we need to
convert 4 bits to a hexadecimal number at a time

Address format

The address format of IPv4:

The address format of IPv6:

The above diagram shows the address format of IPv4 and IPv6. An IPv4 is a 32-bit decimal
address. It contains 4 octets or fields separated by 'dot', and each field is 8-bit in size. The
number that each field contains should be in the range of 0-255. Whereas an IPv6 is a 128-bit
hexadecimal address. It contains 8 fields separated by a colon, and each field is 16-bit in size.
Differences between IPv4 and 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.
IPv4 Header vs IPv6 Header
IPv6 is using two main types of headers: Main IPv6 Header and the new IPv6 Extension
Headers. The main IPv6 header is equivalent to the IPv4 one with some field differences
introduced for better efficiency. Figure 1 compares both headers.

Figure 1. Comparing IPv4 and IPv6 headers

Subnetting

Subnetting is the process of dividing a large network into smaller networks called subnets. Each subnet provides its own
space for devices to communicate, improving network performance, security, and management.
Example: In a company, different departments (Sales, HR, IT) can have their own subnets, keeping their traffic separate
and organized.
Why Subnetting is Important
Let's consider a company that follows classful addressing, it has a Class C network ([Link]/24) with 256 IP
addresses. It has three departments:

Without subnetting, all departments share the same network, and all 256 IP addresses are available to everyone, which
leads to:
 IP Waste: Only 80 devices used out of 256 addresses i.e 176 wasted.
 Performance Issues: All traffic floods the same network, slowing communication.
 Security Risks: Devices from different departments can access each other freely.

With Subnetting, we split the network into three subnets, allocating just enough IP addresses for each department:

Department Devices IPs Allocated (after subnetting)

Sales 20 32 ( [Link]/27 )

HR 10 16 ( [Link]/28)

IT 50 64 ( [Link]/26)

By subnetting, we:
 Efficient IP usage: Only 112 addresses used, leaving space for growth.
 Better performance: Traffic stays within each subnet.
 Improved security: Each department is isolated.

Key Concepts in Subnetting

IP Addressing
An IP address is made up of different parts, each serving a specific purpose in identifying a device on a network. An IPv4
address consists of four parts called "octets," separated by dots (e.g., [Link]). It has two main sections:
 Network Portion: Identifies the network the device belongs to.
 Host Portion: Uniquely identifies a device within the network.
IPv4 addresses are divided into classes based on the length of the network and host portions:
 Class A: 8-bit network ID, 24-bit host ID.
 Class B: 16-bit network ID, 16-bit host ID.
 Class C: 24-bit network ID, 8-bit host ID.

Classful Addressing

What is a Subnet Mask?

A subnet mask is a 32-bit number used in IP addressing to separate the network portion of an IP address from the host
portion. It helps computers and devices determine which part of an IP address refers to the network they are present, and
which part refers to their specific location or address within that network.

Subnet mask

CIDR Notation: A Simplified Approach to Subnetting

Instead of using a long subnet mask (e.g., [Link]), CIDR uses a simple format like /24. The number after the slash
(/n) represents the number of bits used for the network portion of the IP address.
How Subnetting Works?
The working of subnets starts in such a way that firstly it divides the subnets into smaller subnets. For communicating
between subnets, routers are used. Each subnet allows its linked devices to communicate with each other. Subnetting for a
network should be done in such a way that it does not affect the network bits.
In class C the first 3 octets are network bits so it remains as it is.
 For Subnet-1: The first bit which is chosen from the host id part is zero and the range will be from
(193.1.2.00000000 till you get all 1's in the host ID part i.e, 193.1.2.01111111) except for the first bit which is chosen
zero for subnet id part.
Thus, the range of subnet 1 is: [Link] to [Link]
Subnet id of Subnet 1 is: [Link]
The direct Broadcast id of Subnet-1 is: [Link]
The total number of hosts possible is: 126 (Out of 128, 2 id's are used for Subnet id & Direct
Broadcast id)
The subnet mask of Subnet- 1 is: [Link]
 For Subnet-2: The first bit chosen from the host id part is one and the range will be from (193.1.2.100000000 till you
get all 1's in the host ID part i.e, 193.1.2.11111111).
Thus, the range of subnet-2 is: [Link] to [Link]
Subnet id of Subnet 2 is : [Link]
The direct Broadcast id of Subnet-2 is: [Link]
The total number of hosts possible is: 126 (Out of 128, 2 id's are used for Subnet id & Direct
Broadcast id)
The subnet mask of Subnet- 2 is: [Link]
The best way to find out the subnet mask of a subnet is to set the fixed bit of host-id to 1 and the rest
to 0.
Finally, after using the subnetting the total number of usable hosts is reduced from 254 to 252.
Note:

1. To divide a network into four (2 2 ) parts you need to choose two bits from the host id part for each subnet i.e, (00, 01,
10, 11).
2. To divide a network into eight (2 3 ) parts you need to choose three bits from the host id part for each subnet i.e, (000,
001, 010, 011, 100, 101, 110, 111) and so on.
3. We can say that if the total number of subnets in a network increases the total number of usable hosts decreases.
The network can be divided into two parts: To divide a network into two parts, you need to choose one bit for each
Subnet from the host ID part.

Subnet

In the above diagram, there are two Subnets.


Note: It is a class C IP so, there are 24 bits in the network id part and 8 bits in the host id part.
Advantages of Subnetting
 Improved Security: Subnets isolate departments, preventing unauthorized access (e.g., HR data hidden from Sales).
 Traffic Prioritization: Critical subnets (e.g., Sales hosting video conferences) can get higher priority.
 Easier Maintenance: Smaller, segmented networks are simpler to manage.

Disadvantages of Subnetting
 Extra Overhead: Each subnet wastes 2 IP addresses (network ID and broadcast address).
 Higher Cost: Subnetting often requires additional devices like routers and switches, increasing expenses.
 More Complexity: Compared to a single flat network,subnetting adds extra steps in communication and requires
careful planning.

PART -3

Network Layer Protocols: ARP, RARP, BOOTP and DHCP


ARP
Address Resolution Protocol (ARP)
o ARP stands for Address Resolution Protocol.
o It is used to associate an IP address with the MAC address.
o Each device on the network is recognized by the MAC address imprinted on the NIC.
Therefore, we can say that devices need the MAC address for communication on a local
area network. MAC address can be changed easily. For example, if the NIC on a
particular machine fails, the MAC address changes but IP address does not change.
ARP is used to find the MAC address of the node when an internet address is known.
o If the host wants to know the physical address of another host on its network, then it
sends an ARP query packet that includes the IP address and broadcast it over the
network. Every host on the network receives and processes the ARP packet, but only
the intended recipient recognizes the IP address and sends back the physical address.
The host holding the datagram adds the physical address to the cache memory and to
the datagram header, then sends back to the sender.

RARP
o RARP stands for Reverse Address Resolution Protocol.
o If the host wants to know its IP address, then it broadcast the RARP query packet that
contains its physical address to the entire network. A RARP server on the network
recognizes the RARP packet and responds back with the host IP address.
o The protocol which is used to obtain the IP address from a server is known as Reverse
Address Resolution Protocol.
o The message format of the RARP protocol is similar to the ARP protocol.
o Like ARP frame, RARP frame is sent from one machine to another encapsulated in the
data portion of a frame.

BOOTP:
Bootstrap Protocol (BOOTP) is a basic protocol that automatically provides each participant
in a network connection with a unique IP address for identification and authentication as soon
as it connects to the network. This helps the server to speed up data transfers and connection
requests.
BOOTP uses a unique IP address algorithm to provide each system on the network with a
completely different IP address in a fraction of a second.
BOOTP uses a combination of TFTP (Trivial File Transfer Protocol) and UDP (User Datagram
Protocol) to request and receive requests from various network-connected participants and to
handle their responses.
In a BOOTP connection, the server and client just need an IP address and a gateway address to
establish a successful connection.
Typically, in a BOOTP network, the server and client share the same LAN, and the routers
used in the network must support BOOTP bridging.
A great example of a network with a TCP / IP configuration is the Bootstrap Protocol network.
Whenever a computer on the network asks for a specific request to the server, BOOTP uses its
unique IP address to quickly resolve them.
How Bootstrap Protocol differs from DHCP:
DHCP network servers have much broader use than a BOOTP network server. It may be used
for the purpose when a user gives request to the server for a particular IP address and it gives
the response of that particular IP address only, hence, time is not wasted for monitoring other
addresses. BOOTP uses UDP (User Datagram Protocol) through an IPv4 address connection
to identify and authenticate each network user.

DHCP

DHCP stands for Dynamic Host Configuration Protocol. It is the critical feature on which the
users of an enterprise network communicate. DHCP helps enterprises to smoothly manage the
allocation of IP addresses to the end-user clients’ devices such as desktops, laptops, cellphones,
etc.
DHCP helps in managing the entire process automatically and centrally. DHCP helps in
maintaining a unique IP Address for a host using the server. DHCP servers maintain
information on TCP/IP configuration and provide configuration of address to DHCP-enabled
clients in the form of a lease offer.

BOOTP DHCP

BOOTP stands for Bootstrap Protocol. While DHCP stands for Dynamic host configuration protocol.

While DHCP provides temporary IP addressing for only limited amount of


BOOTP does not provide temporary IP addressing.
time.

BOOTP does not support DHCP clients. While it support BOOTP clients.

In BOOTP, manual-configuration takes place. While in DHCP, auto-configuration takes place.

BOOTP does not support mobile machines. Whereas DHCP supports mobile machines.

BOOTP can have errors due to manual-


Whereas in DHCP errors do not occur mostly due to auto-configuration.
configuration.
PART -4

Routing Techniques: Interdomain and Intradomain routing with


Examples

Routing is the higher-level decision-making in packet-switching networks that sends network


packets from their source to their destination through intermediate network nodes using
particular packet forwarding techniques.

The passage of network packets from one network interface to another is known as packet
forwarding. Routers, gateways, and other network hardware devices are common intermediate
nodes.

Based on the interaction of domains, the routing protocols can be either InterDomain or
IntraDomain. Read through this article to find out how these two routing protocols are different
from each other.

Intradomain Routing

All routers inside a domain utilize an intradomain routing protocol to share routing information
about the destinations that are accessible within the domain.
There are a number of intradomain routing protocols to choose from. A distance-vector
protocol called RIP is used by several domains. Other domains utilize OSPF or IS-IS, which
are link-state routing protocols. Finally, some domains utilize proprietary protocols like IGRP
or EIGRP or use static routing.

Intradomain routing methods often have two goals. They begin by disseminating routing
information that corresponds to the shortest path between two domain routers. Second, they
must enable routers to recover rapidly from link and router failures.

Interdomain Routing

An interdomain routing protocol's goal is to distribute routing information between domains.


An interdomain routing protocol must distribute aggregated routing information for scalability
considerations, and each domain is treated as a black box.

Difference between Interdomain and Intradomain Routing

The following table highlights the major differences between interdomain and intradomain
routing protocols.

Key Interdomain Routing Intradomain Routing

Interdomain Routing, as name Intradomain Routing is a


suggests, is the protocol in protocol in which the Routing
Definition which the Routing algorithm algorithm works only within
works within and in between the domains.
the domains.

In case of Interdomain Intradomain Routing has to


routing, the interaction is interact within the domain, so
Information
across various domains, so it it requires the information of
Required
requires information of only those components which
components of other domains. are within the domain.

In Interdomain Routing, In Intradomain Routing,


Interior-gateway protocols additional exterior-gateway
Protocols such as RIP (resource protocols such as BGP
Used information protocol) and (Border Gateway Protocol)
OSPF (open shortest path are used.
first) are being used.

Internet connectivity should Internet connectivity should


be available both within the be available within the domain
Prerequisite domain and in the domain and during the transmission.
with which the interaction is
taking place.
Interdomain Routing is more Intradomain Routing is less
Complex and complex and more dependent complex and less
Dependent as compared to Intradomain interdependent than
Routing. Interdomain Routing.

Distance vector routing

In distance vector routing, the least-cost route between any two nodes is the route
with minimum distance. In this protocol, as the name implies, each node maintains a
vector (table) of minimum distances to every node. The table at each node also guides
the packets to the desired node by showing the next stop in the route (next-hop routing).
We can think of nodes as the cities in an area and the lines as the roads connecting
them. A table can show a tourist the minimum distance between cities.

In Figure 1, we show a system of five nodes with their corresponding tables.

Sharing
The whole idea of distance vector routing is the sharing of information between neighbors.
Although node A does not know about node E, node C does. So if node C shares
its routing table with A, node A can also know how to reach node E. On the other hand,
node C does not know how to reach node D, but node A does. If node A shares its routing
table with node C, node C also knows how to reach node D. In other words, nodes
A and C, as immediate neighbors, can improve their routing tables if they help each
other.
There is only one problem. How much of the table must be shared with each
neighbor? A node is not aware of a neighbor's table. The best solution for each node
is to send its entire table to the neighbor and let the neighbor decide what part to
use and what part to discard. However, the third column of a table (next stop) is not
useful for the neighbor. When the neighbor receives a table, this column needs to
be replaced with the sender's name. If any of the rows can be used, the next node is
the sender of the table. A node therefore can send only the first two columns of its
table to any neighbor. In other words, sharing here means sharing only the first two

columns.
Updating
When a node receives a two-column table from a neighbor, it needs to update its routing
table. Updating takes three steps:
1. The receiving node needs to add the cost between itself and the sending node
to each value in the second column. The logic is clear. If node C claims that its
distance to a destination is x mi, and the distance between A and C is y mi, then the
distance between A and that destination, via C, is x + y mi.
2. The receiving node needs to add the name of the sending node to each row as the
third column if the receiving node uses information from any row. The sending
node is the next node in the route.
3. The receiving node needs to compare each row of its old table with the corresponding
row of the modified version of the received table.
a. If the next-node entry is different, the receiving node chooses the row with the
smaller cost. If there is a tie, the old one is kept.
b. If the next-node entry is the same, the receiving node chooses the new row. For
example, suppose node C has previously advertised a route to node X with distance
3. Suppose that now there is no path between C and X; node C now advertises
this route with a distance of infinity. Node A must not ignore this value
even though its old entry is smaller. The old route does not exist any more. The
new route has a distance of infinity.

Initialization of tables in distance vector routing:

FIG 1. Distance vector routing tables:


FIG3. Updating in distance vector routing:

Figure 3 shows how all nodes updates its routing table after receiving the partial table from
other nodes as per shortest path.

Each node can update its table by using the tables received from other nodes. In a
short time, if there is no change in the network itself, such as a failure in a link, each
node reaches a stable condition in which the contents of its table remains the same.
When to Share
The question now is, When does a node send its partial routing table (only two columns)
to all its immediate neighbors? The table is sent both periodically and when there is a
change in the table.
Periodic Update A node sends its routing table, normally every 30 s, in a periodic
update. The period depends on the protocol that is using distance vector routing.
Triggered Update A node sends its two-column routing table to its neighbors anytime
there is a change in its routing table. This is called a triggered update. The
change can result from the following.
1. A node receives a table from a neighbor, resulting in changes in its own table after
updating.
2. A node detects some failure in the neighboring links which results in a distance
change to infinity.
Problem with Distance vector routing

Two-node instability:(count to infinity problem)


A problem with distance vector routing is instability, which means that a network using
this protocol can become unstable. To understand the problem, let us look at the scenario
depicted in Figure

shows a system with three nodes. We have shown only the portions of
the routing table needed for our discussion. At the beginning, both nodes A and B know
how to reach node X. But suddenly, the link between A and X fails. Node A changes its
table. If A can send its table to B immediately, everything is fine. However, the system
becomes unstable if B sends its routing table to A before receiving A's routing table.
Node A receives the update and, assuming that B has found a way to reach X, immediately
updates its routing table. Based on the triggered update strategy, A sends its new update to B.
Now B thinks that something has been changed around A and updates its
routing table. The cost of reaching X increases gradually until it reaches infinity. At this
moment, both A and B know that X cannot be reached. However, during this time the
system is not stable. Node A thinks that the route to X is via B; node B thinks that the
route to X is via A. If A receives a packet destined for X, it goes to B and then comes
back to A. Similarly, if B receives a packet destined for X, it goes to A and comes back
to B. Packets bounce between A and B, creating a two-node loop problem. A few solutions
have been proposed for instability of this kind.
Defining Infinity The first obvious solution is to redefine infinity to a smaller number,
such as 100. For our previous scenario, the system will be stable in less than 20
updates. As a matter of fact, most implementations of the distance vector protocol
define the distance between each node to be I and define 16 as infinity. However, this
means that the distance vector routing cannot be used in large systems. The size of the
network, in each direction, can not exceed 15 hops.
Split Horizon Another solution is called split horizon. In this strategy, instead of
flooding the table through each interface, each node sends only part of its table through
each interface. If, according to its table, node B thinks that the optimum route to reach
X is via A, it does not need to advertise this piece of information to A; the information
has corne from A (A already knows). Taking information from node A, modifying it,
and sending it back to node A creates the confusion. In our scenario, node B eliminates
the last line of its routing table before it sends it to A. In this case, node A keeps the
value of infinity as the distance to X. Later when node A sends its routing table to B,
node B also corrects its routing table. The system becomes stable after the first update:
both node A and B know that X is not reachable.
Split Horizon and Poison Reverse Using the split horizon strategy has one drawback.
Normally, the distance vector protocol uses a timer, and if there is no news about
a route, the node deletes the route from its table. When node B in the previous scenario
eliminates the route to X from its advertisement to A, node A cannot guess that this is
due to the split horizon strategy (the source of information was A) or because B has not
received any news about X recently. The split horizon strategy can be combined with
the poison reverse strategy. Node B can still advertise the value for X, but if the source
of information is A, it can replace the distance with infinity as a warning: "Do not use
this value; what I know about this route comes from you."

Three-node instability
The two-node instability can be avoided by using the split horizon strategy combined
with poison reverse. However, if the instability is between three nodes, stability cannot
be guaranteed. Figure shows the scenario.
Suppose, after finding that X is not reachable, node A sends a packet to Band C to
inform them of the situation. Node B immediately updates its table, but the packet to C
is lost in the network and never reaches C. Node C remains in the dark and still thinks
that there is a route to X via A with a distance of 5. After a while, node C sends to Bits
routing table, which includes the route to X. Node B is totally fooled here. It receives
information on the route to X from C, and according to the algorithm, it updates its

table, showing the route to X via C with a cost of 8. This information has come from C,
not from A, so after awhile node B may advertise this route to A. Now A is fooled and
updates its table to show that A can reach X via B with a cost of 12. Of course, the loop
continues; now A advertises the route to X to C, with increased cost, but not to B. Node
C then advertises the route to B with an increased cost. Node B does the same to A.
And so on. The loop stops when the cost in each node reaches infinity.
Example:RIP
The Routing Information Protocol (RIP) is an intradomain routing protocol used
inside an autonomous system. It is a very simple protocol based on distance vector
routing. RIP implements distance vector routing directly with some considerations:
1. In an autonomous system, we are dealing with routers and networks (links). The
routers have routing tables; networks do not.
2. The destination in a routing table is a network, which means the first column
defines a network address.
3. The metric used by RIP is very simple; the distance is defined as the number of
links (networks) to reach the destination. For this reason, the metric in RIP is called
a hop count.
4. Infinity is defined as 16, which means that any route in an autonomous system using
RIP cannot have more than 15 hops.
5. The next-node column defines the address of the router to which the packet is to be
sent to reach its destination.

Link State Routing


Link state routing has a different philosophy from that of distance vector routing. In
link state routing, if each node in the domain has the entire topology of the domain
list of nodes and links, and how they are connected including the type, cost (metric), and
condition of the links (up or down)-the node can use Dijkstra's algorithm to build a
routing table. Figure

Concept of link state routing

The figure shows a simple domain with five nodes. Each node uses the same topology
to create a routing table, but the routing table for each node is unique because the calculations
are based on different interpretations of the topology. This is analogous to a city
map. While each person may have the same map, each needs to take a different route to
reach her specific destination. The topology must be dynamic, representing the latest state of
each node and each
link. If there are changes in any point in the network (a link is down, for example), the
topology must be updated for each node.
How can a common topology be dynamic and stored in each node? No node can
know the topology at the beginning or after a change somewhere in the network. Link
state routing is based on the assumption that, although the global knowledge about the
topology is not clear, each node has partial knowledge: it knows the state (type, condition,
and cost) of its links. In other words, the whole topology can be compiled from the
partial knowledge of each node. Figure 2 shows the same domain as in Figure 22.20,
indicating the part of the knowledge belonging to each node.

FIG2: Link state knowledge

Node A knows that it is connected to node B with metric 5, to node C with metric 2,
and to node D with metric 3. Node C knows that it is connected to node A with metric 2,
to node B with metric 4, and to node E with metric 4. Node D knows that it is connected
only to node A with metric 3. And so on. Although there is an overlap in the
knowledge, the overlap guarantees the creation of a common topology-a picture of
the whole domain for each node.
Building Routing Tables
In link state routing, four sets of actions are required to ensure that each node has the
routing table showing the least-cost node to every other node.
]. Creation of the states of the links by each node, called the link state packet (LSP).
2. Dissemination of LSPs to every other router, called flooding, in an efficient and
reliable way.
3. Formation of a shortest path tree for each node.
4. Calculation of a routing table based on the shortest path tree.
Creation of Link State Packet (LSP) A link state packet can carry a large amount
of information. For the moment, however, we assume that it carries a minimum amount
of data: the node identity, the list of links, a sequence number, and age. The first two,
node identity and the list of links, are needed to make the topology. The third, sequence
number, facilitates flooding and distinguishes new LSPs from old ones. The fourth, age,
prevents old LSPs from remaining in the domain for a long time. LSPs are generated on
two occasions:
1. When there is a change in the topology of the domain. Triggering of LSP dissemination
is the main way of quickly informing any node in the domain to update its
topology.
2. On a periodic basis. The period in this case is much longer compared to distance
vector routing. As a matter of fact, there is no actual need for this type of LSP dissemination.
It is done to ensure that old information is removed from the domain.
The timer set for periodic dissemination is normally in the range of 60 min or 2 h
based on the implementation. A longer period ensures that flooding does not create
too much traffic on the network.
Flooding of LSPs After a node has prepared an LSP, it must be disseminated to all
other nodes, not only to its neighbors. The process is called flooding and based on the
following:
1. The creating node sends a copy of the LSP out of each interface.
2. A node that receives an LSP compares it with the copy it may already have. If the
newly arrived LSP is older than the one it has (found by checking the sequence
number), it discards the LSP. If it is newer, the node does the following:
a. It discards the old LSP and keeps the new one.
b. It sends a copy of it out of each interface except the one from which the packet
arrived. This guarantees that flooding stops somewhere in the domain (where a
node has only one interface).
Formation of Shortest Path Tree: Dijkstra Algorithm.

The Dijkstra algorithm creates a shortest path tree from a graph. The algorithm
divides the nodes into two sets: tentative and permanent. It finds the neighbors of a
current node, makes them tentative, examines them, and if they pass the criteria,
makes them permanent. We can informally define the algorithm by using the flowchart
Dijkstra algorithm
Example of formation of shortest path tree
EXAMPLE:
OSPF
The Open Shortest Path First or OSPF protocol is an intradomain routing protocol
based on link state routing. Its domain is also an autonomous system.
Areas To handle routing efficiently and in a timely manner, OSPF divides an autonomous
system into areas. An area is a collection of networks, hosts, and routers all
contained within an autonomous system. An autonomous system can be divided into
many different areas. All networks inside an area must be connected.
Path Vector Routing
Distance vector and link state routing are both intradomain routing protocols. They can
be used inside an autonomous system, but not between autonomous systems. These two
protocols are not suitable for interdomain routing mostly because of scalability. Both of
these routing protocols become intractable when the domain of operation becomes
large. Distance vector routing is subject to instability if there are more than a few hops
in the domain of operation. Link state routing needs a huge amount of resources to calculate
routing tables. It also creates heavy traffic because of flooding. There is a need
for a third routing protocol which we call path vector routing.
Path vector routing proved to be useful for interdomain routing. The principle of
path vector routing is similar to that of distance vector routing. In path vector routing,
we assume that there is one node (there can be more, but one is enough for our conceptual
discussion) in each autonomous system that acts on behalf of the entire autonomous
system. Let us call it the speaker node. The speaker node in an AS creates a
routing table and advertises it to speaker nodes in the neighboring ASs. The idea is the
same as for distance vector routing except that only speaker nodes in each AS can communicate
with each other. However, what is advertised is different. A speaker node
advertises the path, not the metric of the nodes, in its autonomous system or other
autonomous systems. Node Al is the speaker node for ASl, Bl for AS2, Cl for AS3, and Dl for
AS4.
Node Al creates an initial table that shows Al to A5 are located in ASI and can be
reached through it. Node Bl advertises that Bl to B4 are located in AS2 and can be
reached through Bl. And so on.
Sharing Just as in distance vector routing, in path vector routing, a speaker in an
autonomous system shares its table with immediate neighbors. In Figure 1, node
Al shares its table with nodes Bl and Cl. Node Cl shares its table with nodes Dl, Bl,
andAl. Node Bl shares its table with Cl andAl. Node Dl shares its table with Cl.
Updating When a speaker node receives a two-column table from a neighbor, it
updates its own table by adding the nodes that are not in its routing table and adding its
own autonomous system and the autonomous system that sent the table. After a while
each speaker has a table and knows how to reach each node in other ASs.
FIG1. Initial routing tables in path vector routing

FIG2. Stabilized tables for three autonomous systems


Figure 2.
shows the tables for each speaker node after the system is stabilized.
According to the figure, if router Al receives a packet for nodes A3, it knows that
the path is in ASI (the packet is at home); but if it receives a packet for Dl, it knows that
the packet should go from ASl, to AS2, and then to AS3. The routing table shows the
path completely. On the other hand, if node Dl in AS4 receives a packet for node A2, it
knows it should go through AS4, AS3, and AS 1.
Initialization
At the beginning, each speaker node can know only the reachability of nodes inside its
autonomous system. Figure 22.30 shows the initial tables for each speaker node in a
system made of four ASs.
 Loop prevention. The instability of distance vector routing and the creation of
loops can be avoided in path vector routing. When a router receives a message, it
checks to see if its autonomous system is in the path list to the destination. If it is,
looping is involved and the message is ignored.
 Policy routing. Policy routing can be easily implemented through path vector
routing. When a router receives a message, it can check the path. If one of the
autonomous systems listed in the path is against its policy, it can ignore that path
and that destination. It does not update its routing table with this path, and it does
not send this message to its neighbors.
 Optimum path. What is the optimum path in path vector routing? We are looking
for a path to a destination that is the best for the organization that runs the autonomous
system. We definitely cannot include metrics in this route because each
autonomous system that is included in the path may use a different criterion for the
metric. One system may use, internally, RIP, which defines hop count as the metric;
another may use OSPF with minimum delay defined as the metric. The optimum
path is the path that fits the organization. In our previous figure, each autonomous
system may have more than one path to a destination. For example, a path from
AS4 to ASI can be AS4-AS3-AS2-AS1, or it can be AS4-AS3-ASI. For the tables,
we chose the one that had the smaller number of autonomous systems, but this is
not always the case. Other criteria, such as security, safety, and reliability, can also
be applied.
EXAMPLE
BGP
Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) used to connect autonomous systems (AS) in any
topology. Each AS must have at least one BGP-enabled router connected to another AS’s BGP router. Its primary function
is to exchange network reachability information between BGP systems. It is a path-vector routing protocol (unlike distance-
vector or link-state protocols).

Functionality of Border Gateway Protocol (BGP)


BGP peers perform 3 functions, which are given below:
 The first function consists of initial peer acquisition and authentication. Both the peers established a TCP connection
and perform message exchange that guarantees both sides have agreed to communicate.
 The second function mainly focuses on sending negative or positive reach-ability information.
 The third function verifies that the peers and the network connection between them are functioning correctly.

Difference between Static Routing and Dynamic Routing


The following table highlights the major differences between Static Routing and Dynamic Routing.
Key Static Routing Dynamic Routing

In static routing, user- In dynamic routing, routes are


Routing
defined routes are used in updated as per the changes in
pattern
the routing table. network.

No complex algorithm used Dynamic routing employs


Routing
to figure out the shortest complex algorithms to find the
Algorithm
path. shortest routes.

Static routing provides


Security Dynamic routing is less secure.
higher security.

Static routing is a manual Dynamic routing is an automatic


Automation
process. process.

Static routing is used in Dynamic routing is implemented


Applicability
smaller networks. in large networks.

Dynamic routing follows


Static routing may not
Protocols protocols like BGP, RIP and
follow any specific protocol.
EIGRP.

Static routing does not Dynamic routing requires


Additional
require any additional additional resources like
Resources
resources. memory, bandwidth etc.

You might also like