Module 3 - Network Layer

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Module 3:

Network Layer

Switching:

o When a user accesses the internet or another computer network outside their immediate location,
messages are sent through the network of transmission media. This technique of transferring the
information from one computer network to another network is known as switching.
o Switching in a computer network is achieved by using switches. A switch is a small hardware device
which is used to join multiple computers together with one local area network (LAN).
o Network switches operate at layer 2 (Data link layer) in the OSI model.
o Switching is transparent to the user and does not require any configuration in the home network.
o Switches are used to forward the packets based on MAC addresses.
o A Switch is used to transfer the data only to the device that has been addressed. It verifies the
destination address to route the packet appropriately.
o It is operated in full duplex mode.
o Packet collision is minimum as it directly communicates between source and destination.
o It does not broadcast the message as it works with limited bandwidth.

Why is Switching Concept required?

Switching concept is developed because of the following reasons:

o Bandwidth: It is defined as the maximum transfer rate of a cable. It is a very critical and expensive
resource. Therefore, switching techniques are used for the effective utilization of the bandwidth of a
network.
o Collision: Collision is the effect that occurs when more than one device transmits the message over
the same physical media, and they collide with each other. To overcome this problem, switching
technology is implemented so that packets do not collide with each other.

Advantages of Switching:
o Switch increases the bandwidth of the network.
o It reduces the workload on individual PCs as it sends the information to only that device which has
been addressed.
o It increases the overall performance of the network by reducing the traffic on the network.
o There will be less frame collision as switch creates the collision domain for each connection.

Disadvantages of Switching:
o A Switch is more expensive than network bridges.
o A Switch cannot determine the network connectivity issues easily.
o Proper designing and configuration of the switch are required to handle multicast packets.
Switching techniques

In large networks, there can be multiple paths from sender to receiver. The switching technique will decide
the best route for data transmission.

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.

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.

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.

Advantages Of Message Switching


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 travel Congestion can occur when the node is busy, and it does not
in different directions. allow other packets to pass through.

It is more flexible as all the packets are treated It is not very flexible.
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.
Differentiate between Circuit Switching, Message Switching, and Packet Switching

Basics Circuit Switching Message Switching Packet Switching

Connection Connection is created Links are created Links are created


Creation between the source and independently one by one independently one by
destination by between the nodes on the one between the
establishing a dedicated way. nodes on the way.
path between source
and destination.

Queuing No queue is formed. Queue is formed. Queue is formed.

Message and There is one big entire There is one big entire The big message is
Packets data stream called a data stream called a divided into a small
message. message. number of packets.

Routing One single dedicated Messages follow the Packets follow the
path exists between the independent route to reach independent path to
source and destination. a destination. hold the destination.

Addressing and Messages need not be Messages are addressed as Packets are addressed,
sequencing addressed as there is independent routes are and sequencing is
one dedicated path. established. done as all the packets
follow the
independent route.

Propagation No Yes Yes


Delay

Transmission Low Maximum Maximum


Capacity

Sequence Order Message arrives in Message arrives in Packets do not appear


Sequence. Sequence. in sequence at the
destination.

Use Bandwidth Wastage Bandwidth is used to its Bandwidth is used to


maximum extent. its maximum extent.

NETWORK ADDRESSING

o Network Addressing is one of the major responsibilities of the network layer.


o Network addresses are always logical, i.e., software-based addresses.
o A host is also known as end system that has one link to the network. The boundary between the host
and link is known as an interface. Therefore, the host can have only one interface.
o A router is different from the host in that it has two or more links that connect to it. When a router
forwards the datagram, then it forwards the packet to one of the links. The boundary between the router
and link is known as an interface, and the router can have multiple interfaces, one for each of its links.
Each interface is capable of sending and receiving the IP packets, so IP requires each interface to have
an address.
o Each IP address is 32 bits long, and they are represented in the form of "dot-decimal notation" where
each byte is written in the decimal form, and they are separated by the period. An IP address would
look like 193.32.216.9 where 193 represents the decimal notation of first 8 bits of an address, 32
represents the decimal notation of second 8 bits of an address.

Let's understand through a simple example.

o In the above figure, a router has three interfaces labeled as 1, 2 & 3 and each router interface contains
its own IP address.
o Each host contains its own interface and IP address.
o All the interfaces attached to the LAN 1 is having an IP address in the form of 223.1.1.xxx, and the
interfaces attached to the LAN 2 and LAN 3 have an IP address in the form of 223.1.2.xxx and
223.1.3.xxx respectively.
o Each IP address consists of two parts. The first part (first three bytes in IP address) specifies the
network and second part (last byte of an IP address) specifies the host in the network.

Classful Addressing

An IP address is 32-bit long. An IP address is divided into sub-classes:

o Class A
o Class B
o Class C
o Class D
o Class E

An ip address is divided into two parts:

o Network ID: It represents the number of networks.


o Host ID: It represents the number of hosts.

In the above diagram, we observe that each class have a specific range of IP addresses. The class of IP address
is used to determine the number of bits used in a class and number of networks and hosts available in the class.

Class A

In Class A, an IP address is assigned to those networks that contain a large number of hosts.

o The network ID is 8 bits long.


o The host ID is 24 bits long.

In Class A, the first bit in higher order bits of the first octet is always set to 0 and the remaining 7 bits determine
the network ID. The 24 bits determine the host ID in any network.

The total number of networks in Class A = 27 = 128 network address

The total number of hosts in Class A = 224 - 2 = 16,777,214 host address


Class B

In Class B, an IP address is assigned to those networks that range from small-sized to large-sized networks.

o The Network ID is 16 bits long.


o The Host ID is 16 bits long.

In Class B, the higher order bits of the first octet is always set to 10, and the remaining14 bits determine the
network ID. The other 16 bits determine the Host ID.

The total number of networks in Class B = 214 = 16384 network address

The total number of hosts in Class B = 216 - 2 = 65534 host address

Class C

In Class C, an IP address is assigned to only small-sized networks.

o The Network ID is 24 bits long.


o The host ID is 8 bits long.

In Class C, the higher order bits of the first octet is always set to 110, and the remaining 21 bits determine the
network ID. The 8 bits of the host ID determine the host in a network.

The total number of networks = 221 = 2097152 network address

The total number of hosts = 28 - 2 = 254 host address

Class D

In Class D, an IP address is reserved for multicast addresses. It does not possess subnetting. The higher order
bits of the first octet is always set to 1110, and the remaining bits determines the host ID in any network.

Class E
In Class E, an IP address is used for the future use or for the research and development purposes. It does not
possess any subnetting. The higher order bits of the first octet is always set to 1111, and the remaining bits
determines the host ID in any network.

Rules for assigning Host ID:

The Host ID is used to determine the host within any network. The Host ID is assigned based on the following
rules:

o The Host ID must be unique within any network.


o The Host ID in which all the bits are set to 0 cannot be assigned as it is used to represent the network
ID of the IP address.
o The Host ID in which all the bits are set to 1 cannot be assigned as it is reserved for the multicast
address.

Rules for assigning Network ID:

If the hosts are located within the same local network, then they are assigned with the same network ID. The
following are the rules for assigning Network ID:

o The network ID cannot start with 127 as 127 is used by Class A.


o The Network ID in which all the bits are set to 0 cannot be assigned as it is used to specify a particular
host on the local network.
o The Network ID in which all the bits are set to 1 cannot be assigned as it is reserved for the multicast
address.

Classful Network Architecture

Class Higher NET ID HOST No.of No.of hosts Range


bits bits ID bits networks per network

A 0 8 24 27 224 0.0.0.0 to
127.255.255.255

B 10 16 16 214 216 128.0.0.0 to


191.255.255.255
C 110 24 8 221 28 192.0.0.0 to
223.255.255.255

D 1110 Not Not Not Defined Not Defined 224.0.0.0 to


Defined Defined 239.255.255.255

E 1111 Not Not Not Defined Not Defined 240.0.0.0 to


Defined Defined 255.255.255.255

MAC ADDRESS

Media Access Control (MAC) address is a physical address that works at the data link layer of the OSI model.
 A MAC address is a 48 or 64-bit address associated with a network adapter.
 MAC addresses are linked to the hardware of the network adapters, hence they are also known
as the "hardware address" or "physical address."
 MAC addresses uniquely identify the adapter on the LAN.
 MAC addresses are expressed in hexadecimal notation. For example, "01-23-45-67-89-AB" in
a 48-bit address or "01-23-45-67-89-AB-CD-EF" in a 64-bit address. Sometimes, colons (:) are
used instead of dashes (-).
 MAC addresses are often considered permanent, but in some conditions, they can be changed.
There are three types of MAC addresses −

Unicast MAC Address

Multicast MAC address

Broadcast MAC address
MAC Address Format
A 48-bit MAC address is represented as a string of six octets, "MM:MM:MM:SS:SS:SS".
 The first half (24 bits) of the MAC address contains the ID number of the adapter manufacturer.
These IDs are regulated by an Internet standards organization.
 The second half (24 more bits) of the MAC address represents the serial number assigned to
the adapter by the manufacturer.
As shown in the above diagram, MAC addresses are 12-digit hexadecimal numbers (48 bits in length or 6-
byte binary number). For example, let's take a network adapter with the MAC address "00-A0-C9-14-C8-29."
The OUI (Organizational Unique Identifier) for the manufacture of this router is the first three octets ("00-
A0-C9") is Intel corporation and the rightmost six digits represent the Network Interface Controller.
OUIs of some well-known manufacturers −
 "00-14-22" – Dell
 "00-04-DC" – Nortel
 "3C:5A: B4" – Google, Inc.

IP Address

A network address always points to host / node / server or it can represent a whole network. Network address
is always configured on network interface card and is generally mapped by system with the MAC address
(hardware address or layer-2 address) of the machine for Layer-2 communication.
There are different kinds of network addresses in existence:
 IP
 IPX
 AppleTalk
IP addressing provides mechanism to differentiate between hosts and network. Because IP addresses are
assigned in hierarchical manner, a host always resides under a specific network.The host which needs to
communicate outside its subnet, needs to know destination network address, where the packet/data is to be
sent.
Hosts in different subnet need a mechanism to locate each other. This task can be done by DNS. DNS is a
server which provides Layer-3 address of remote host mapped with its domain name or FQDN. When a host
acquires the Layer-3 Address (IP Address) of the remote host, it forwards all its packet to its gateway. A
gateway is a router equipped with all the information which leads to route packets to the destination host.
Routers take help of routing tables, which has the following information:
 Method to reach the network
Routers upon receiving a forwarding request, forwards packet to its next hop (adjacent router) towards the
destination.
The next router on the path follows the same thing and eventually the data packet reaches its destination.
Network address can be of one of the following:
 Unicast (destined to one host)
 Multicast (destined to group)
 Broadcast (destined to all)
 Anycast (destined to nearest one)
A router never forwards broadcast traffic by default. Multicast traffic uses special treatment as it is most a
video stream or audio with highest priority. Anycast is just similar to unicast, except that the packets are
delivered to the nearest destination when multiple destinations are available.
Difference between MAC Address and IP Address Following are the important differences between MAC
Address and IP Address.

Sr.No. Key MAC Address IP Address

1 Definition MAC Address stands for IP Address stands for Internet Protocol
Media Access Control Address.
Address.
2 Usage MAC Address ensure that IP Address is a logical address of the
physical address of the computer and is used to uniquely locate
computer is unique. computer connected via a network.

3 Format MAC Address is of six byte IP Address is of 4 bytes or of 16 bytes.


hexadecimal address.

4 Access MAC Address can be IP Address can be retrieved using


Protocol retrieved using ARP protocol. RARP protocol.

5 Provider Chip maker manufacturer Internet Service Provider, ISP provides


provides the MAC Address. the IP Address.

Difference between Static and Dynamic IP Address

The following table highlights the major differences between a static IP address and a dynamic IP address −

Key Static IP Address Dynamic IP Address

Internet Service Provider, ISP DHCP (Dynamic Host Configuration Protocol) is


Provider
provides the static IP Address. used to generate dynamic IP Address.

Static IP address does not get Dynamic IP address can be changed any time.
Changes
changed with time.

Static IP Address is less secured. Dynamic IP address being volatile in nature is


Security
less risky.

Loopback Concept :

A loopback address is a distinct reserved IP address range that starts from 127.0.0.0 ends at 127.255.255.255
though 127.255.255.255 is the broadcast address for 127.0.0.0/8. The loopback addresses are built into the
IP domain system, enabling devices to transmit and receive the data packets. The loopback address 127.0.0.1
is generally known as localhost.

TCP/IP protocol manages all the loopback addresses in the operating system. It mocks the TCP/IP server or
TCP/IP client on the same system. These loopback addresses are always accessible so that the user can use
them anytime for troubleshooting TCP/IP.
Whenever a protocol or program sends any data from a computer with any loopback IP address, that traffic
is processed by a TCP/IP protocol stack within itself, i.e., without transmitting it to the network. That is, if a
user is pinging a loopback address, they’ll get the reply from the same TCP/IP stack running on their
computer. So, all the data transmitted to any of the loopback addresses as the destination address will not
pop up on the network.
127.0.0.1 is the most commonly used loopback address; generally, 127.0.0.1 and localhost are functionally
similar, i.e., the loopback address 127.0.0.1 and the hostname localhost; are internally mapped. Though,
other loopback addresses are also accessible and can be used.
IPv4 and IPv6 Loopback Addresses:
 The IPv4 loopback address is 127.0.0.0/8 and the most commonly used loopback address is
127.0.0.1.
 The IPv6 loopback address is ::1
How to use the “ping” Command:
 To use the “ping” command go to the windows start menu.
 Search for “Command prompt”.
 Type in “ping” followed by the loopback address. and,
 Hit enter.
For example, as can be seen below, the outputs of four different IPv4 loopback addresses (127.0.0.0,
127.0.0.1, 127.15.90.69, and 127.255.255.255) the network and broadcast addresses are unreachable
loopback addresses and IPv6 loopback address ::1.
ping output for 127.0.0.0 (Network address).
C:\Users\bklad>ping 127.0.0.0

Pinging 127.0.0.0 with 32 bytes of data:


General failure.
General failure.
General failure.
General failure.

Ping statistics for 127.0.0.0:


Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
ping output for 127.0.0.1
C:\Users\bklad>ping 127.0.0.1

Pinging 127.0.0.1 with 32 bytes of data:


Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

Advantages of loopback address:


 It is an efficient method to find a device on the network.
 It can be configured as the router ID for protocols such as BGP and OSPF.
 It is used as a source and destination address for testing network connectivity.
 It can also be used for testing IP software.
Disadvantages:
 Just like physical interfaces, it needs a unique address.
IPv6
Internet Protocol version 6 (IPv6) is the latest revision of the Internet Protocol (IP) and the first version of the
protocol to be widely deployed. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal
with the long-anticipated problem of IPv4 address exhaustion. This tutorial will help you in understanding
IPv6 and its associated terminologies along with appropriate references and examples. Internet Protocol
version 6 is a new addressing protocol designed to incorporate all the possible requirements of future Internet
known to us as Internet version 2. This protocol as its predecessor IPv4, works on the Network Layer (Layer-
3). Along with its offering of an enormous amount of logical address space, this protocol has ample features
to which address the shortcoming of IPv4.

Why New IP Version?

So far, IPv4 has proven itself as a robust routable addressing protocol and has served us for decades on its
best-effort-delivery mechanism. It was designed in the early 80’s and did not get any major change afterward.
At the time of its birth, Internet was limited only to a few universities for their research and to the Department
of Defense. IPv4 is 32 bits long and offers around 4,294,967,296 (232) addresses. This address space was
considered more than enough that time. Given below are the major points that played a key role in the birth
of IPv6:
 Internet has grown exponentially and the address space allowed by IPv4 is saturating. There is
a requirement to have a protocol that can satisfy the needs of future Internet addresses that is
expected to grow in an unexpected manner.
 IPv4 on its own does not provide any security feature. Data has to be encrypted with some other
security application before being sent on the Internet.
 Data prioritization in IPv4 is not up to date. Though IPv4 has a few bits reserved for Type of
Service or Quality of Service, but they do not provide much functionality.
 IPv4 enabled clients can be configured manually or they need some address configuration
mechanism. It does not have a mechanism to configure a device to have globally unique IP
address.

Why Not IPv5?

Till date, Internet Protocol has been recognized has IPv4 only. Version 0 to 3 were used while the protocol
was itself under development and experimental process. So, we can assume lots of background activities
remain active before putting a protocol into production. Similarly, protocol version 5 was used while
experimenting with the stream protocol for Internet. It is known to us as Internet Stream Protocol which used
Internet Protocol number 5 to encapsulate its datagram. It was never brought into public use, but it was already
used.
Here is a table of IP versions and how they are used:
Brief History

After IPv4’s development in the early 80s, the available IPv4 address pool begun to shrink rapidly as the
demand of addresses exponentially increased with Internet. Taking pre-cognizance of the situation that might
arise, IETF, in 1994, initiated the development of an addressing protocol to replace IPv4. The progress of IPv6
can be tracked by means of the RFC published:
 1998 – RFC 2460 – Basic Protocol
 2003 – RFC 2553 – Basic Socket API
 2003 – RFC 3315 – DHCPv6
 2004 – RFC 3775 – Mobile IPv6
 2004 – RFC 3697 – Flow Label Specification
 2006 – RFC 4291 – Address architecture (revision)
 2006 – RFC 4294 – Node requirement
On June 06, 2012, some of the Internet giants chose to put their Servers on IPv6. Presently they are using Dual
Stack mechanism to implement IPv6 parallel in with IPv4.

IPv6 - Features
The successor of IPv4 is not designed to be backward compatible. Trying to keep the basic functionalities of
IP addressing, IPv6 is redesigned entirely. It offers the following features:
 Larger Address Space
In contrast to IPv4, IPv6 uses 4 times more bits to address a device on the Internet. This much
of extra bits can provide approximately 3.4×1038 different combinations of addresses. This
address can accumulate the aggressive requirement of address allotment for almost everything
in this world. According to an estimate, 1564 addresses can be allocated to every square meter
of this earth.
 Simplified Header
IPv6’s header has been simplified by moving all unnecessary information and options (which
are present in IPv4 header) to the end of the IPv6 header. IPv6 header is only twice as bigger
than IPv4 provided the fact that IPv6 address is four times longer.
 End-to-end Connectivity
Every system now has unique IP address and can traverse through the Internet without using
NAT or other translating components. After IPv6 is fully implemented, every host can directly
reach other hosts on the Internet, with some limitations involved like Firewall, organization
policies, etc.
 Auto-configuration
IPv6 supports both stateful and stateless auto configuration mode of its host devices. This way,
absence of a DHCP server does not put a halt on inter segment communication.
 Faster Forwarding/Routing
Simplified header puts all unnecessary information at the end of the header. The information
contained in the first part of the header is adequate for a Router to take routing decisions, thus
making routing decision as quickly as looking at the mandatory header.
 IPSec
Initially it was decided that IPv6 must have IPSec security, making it more secure than IPv4.
This feature has now been made optional.
 No Broadcast
Though Ethernet/Token Ring are considered as broadcast network because they support
Broadcasting, IPv6 does not have any broadcast support any more. It uses multicast to
communicate with multiple hosts.
 Anycast Support
This is another characteristic of IPv6. IPv6 has introduced Anycast mode of packet routing. In
this mode, multiple interfaces over the Internet are assigned same Anycast IP address. Routers,
while routing, send the packet to the nearest destination.
 Mobility
IPv6 was designed keeping mobility in mind. This feature enables hosts (such as mobile phone)
to roam around in different geographical area and remain connected with the same IP address.
The mobility feature of IPv6 takes advantage of auto IP configuration and Extension headers.
 Enhanced Priority Support
IPv4 used 6 bits DSCP (Differential Service Code Point) and 2 bits ECN (Explicit Congestion
Notification) to provide Quality of Service but it could only be used if the end-to-end devices
support it, that is, the source and destination device and underlying network must support it.
In IPv6, Traffic class and Flow label are used to tell the underlying routers how to efficiently
process the packet and route it.
 Smooth Transition
Large IP address scheme in IPv6 enables to allocate devices with globally unique IP addresses.
This mechanism saves IP addresses and NAT is not required. So devices can send/receive data
among each other, for example, VoIP and/or any streaming media can be used much efficiently.
Other fact is, the header is less loaded, so routers can take forwarding decisions and forward
them as quickly as they arrive.
 Extensibility
One of the major advantages of IPv6 header is that it is extensible to add more information in
the option part. IPv4 provides only 40-bytes for options, whereas options in IPv6 can be as
much as the size of IPv6 packet itself.

IPv6 - Addressing Modes


In computer networking, addressing mode refers to the mechanism of hosting an address on the network. IPv6
offers several types of modes by which a single host can be addressed. More than one host can be addressed
at once or the host at the closest distance can be addressed.

Unicast

In unicast mode of addressing, an IPv6 interface (host) is uniquely identified in a network segment. The IPv6
packet contains both source and destination IP addresses. A host interface is equipped with an IP address
which is unique in that network segment.When a network switch or a router receives a unicast IP packet,
destined to a single host, it sends out one of its outgoing interface which connects to that particular host.
Multicast

The IPv6 multicast mode is same as that of IPv4. The packet destined to multiple hosts is sent on a special
multicast address. All the hosts interested in that multicast information, need to join that multicast group first.
All the interfaces that joined the group receive the multicast packet and process it, while other hosts not
interested in multicast packets ignore the multicast information.

Anycast

IPv6 has introduced a new type of addressing, which is called Anycast addressing. In this addressing mode,
multiple interfaces (hosts) are assigned same Anycast IP address. When a host wishes to communicate with a
host equipped with an Anycast IP address, it sends a Unicast message. With the help of complex routing
mechanism, that Unicast message is delivered to the host closest to the Sender in terms of Routing cost.

Let’s take an example of TutorialPoints.com Web Servers, located in all continents. Assume that all the Web
Servers are assigned a single IPv6 Anycast IP Address. Now when a user from Europe wants to reach
TutorialsPoint.com the DNS points to the server that is physically located in Europe itself. If a user from India
tries to reach Tutorialspoint.com, the DNS will then point to the Web Server physically located in Asia.
Nearest or Closest terms are used in terms of Routing Cost.
In the above picture, when a client computer tries to reach a server, the request is forwarded to the server with
the lowest Routing Cost.
IPv6 - Address Types & Formats

Hexadecimal Number System

Before introducing IPv6 Address format, we shall look into Hexadecimal Number System. Hexadecimal is a
positional number system that uses radix (base) of 16. To represent the values in readable format, this system
uses 0-9 symbols to represent values from zero to nine and A-F to represent values from ten to fifteen. Every
digit in Hexadecimal can represent values from 0 to 15.

[Image: Conversion Table]

Address Structure

An IPv6 address is made of 128 bits divided into eight 16-bits blocks. Each block is then converted into 4-
digit Hexadecimal numbers separated by colon symbols.
For example, given below is a 128 bit IPv6 address represented in binary format and divided into eight 16-
bits blocks:
0010000000000001 0000000000000000 0011001000111000 1101111111100001 0000000001100011
0000000000000000 0000000000000000 1111111011111011
Each block is then converted into Hexadecimal and separated by ‘:’ symbol:
2001:0000:3238:DFE1:0063:0000:0000:FEFB
Even after converting into Hexadecimal format, IPv6 address remains long. IPv6 provides some rules to
shorten the address. The rules are as follows:
Rule.1: Discard leading Zero(es):
In Block 5, 0063, the leading two 0s can be omitted, such as (5th block):
2001:0000:3238:DFE1:63:0000:0000:FEFB
Rule.2: If two of more blocks contain consecutive zeroes, omit them all and replace with double colon sign
::, such as (6th and 7th block):
2001:0000:3238:DFE1:63::FEFB
Consecutive blocks of zeroes can be replaced only once by :: so if there are still blocks of zeroes in the address,
they can be shrunk down to a single zero, such as (2nd block):
2001:0:3238:DFE1:63::FEFB

Interface ID

IPv6 has three different types of Unicast Address scheme. The second half of the address (last 64 bits) is
always used for Interface ID. The MAC address of a system is composed of 48-bits and represented in
Hexadecimal. MAC addresses are considered to be uniquely assigned worldwide. Interface ID takes advantage
of this uniqueness of MAC addresses. A host can auto-configure its Interface ID by using IEEE’s Extended
Unique Identifier (EUI-64) format. First, a host divides its own MAC address into two 24-bits halves. Then
16-bit Hex value 0xFFFE is sandwiched into those two halves of MAC address, resulting in EUI-64 Interface
ID.

[Image: EUI-64 Interface ID]


Conversion of EUI-64 ID into IPv6 Interface Identifier
To convert EUI-64 ID into IPv6 Interface Identifier, the most significant 7th bit of EUI-64 ID is
complemented. For example:

[Image: IPV6 Interface ID]

Global Unicast Address


This address type is equivalent to IPv4’s public address. Global Unicast addresses in IPv6 are globally
identifiable and uniquely addressable.

[Image: Global Unicast Address]


Global Routing Prefix: The most significant 48-bits are designated as Global Routing Prefix which is assigned
to specific autonomous system. The three most significant bits of Global Routing Prefix is always set to 001.

Link-Local Address

Auto-configured IPv6 address is known as Link-Local address. This address always starts with FE80. The
first 16 bits of link-local address is always set to 1111 1110 1000 0000 (FE80). The next 48-bits are set to 0,
thus:

[Image: Link-Local
Address]
Link-local addresses are used for communication among IPv6 hosts on a link (broadcast segment) only. These
addresses are not routable, so a Router never forwards these addresses outside the link.

Unique-Local Address

This type of IPv6 address is globally unique, but it should be used in local communication. The second half
of this address contain Interface ID and the first half is divided among Prefix, Local Bit, Global ID and Subnet
ID.

[Image: Unique-
Local Address]
Prefix is always set to 1111 110. L bit, is set to 1 if the address is locally assigned. So far, the meaning of L
bit to 0 is not defined. Therefore, Unique Local IPv6 address always starts with ‘FD’.
Scope of IPv6 Unicast Addresses:

[
The scope of Link-local address is limited to the segment. Unique Local Address are locally global, but are
not routed over the Internet, limiting their scope to an organization’s boundary. Global Unicast addresses are
globally unique and recognizable. They shall make the essence of Internet v2 addressing.
IPv6 - Headers
The wonder of IPv6 lies in its header. An IPv6 address is 4 times larger than IPv4, but surprisingly, the header
of an IPv6 address is only 2 times larger than that of IPv4. IPv6 headers have one Fixed Header and zero or
more Optional (Extension) Headers. All the necessary information that is essential for a router is kept in the
Fixed Header. The Extension Header contains optional information that helps routers to understand how to
handle a packet/flow.

Fixed Header

IPv6 fixed header is 40 bytes long and contains the following information.

S.N. Field & Description

1 Version (4-bits): It represents the version of Internet Protocol, i.e. 0110.

2 Traffic Class (8-bits): These 8 bits are divided into two parts. The most significant 6 bits are used
for Type of Service to let the Router Known what services should be provided to this packet. The
least significant 2 bits are used for Explicit Congestion Notification (ECN).

3 Flow Label (20-bits): This label is used to maintain the sequential flow of the packets belonging
to a communication. The source labels the sequence to help the router identify that a particular
packet belongs to a specific flow of information. This field helps avoid re-ordering of data packets.
It is designed for streaming/real-time media.

4 Payload Length (16-bits): This field is used to tell the routers how much information a particular
packet contains in its payload. Payload is composed of Extension Headers and Upper Layer data.
With 16 bits, up to 65535 bytes can be indicated; but if the Extension Headers contain Hop-by-
Hop Extension Header, then the payload may exceed 65535 bytes and this field is set to 0.

5 Next Header (8-bits): This field is used to indicate either the type of Extension Header, or if the
Extension Header is not present then it indicates the Upper Layer PDU. The values for the type
of Upper Layer PDU are same as IPv4’s.
6 Hop Limit (8-bits): This field is used to stop packet to loop in the network infinitely. This is same
as TTL in IPv4. The value of Hop Limit field is decremented by 1 as it passes a link (router/hop).
When the field reaches 0 the packet is discarded.

7 Source Address (128-bits): This field indicates the address of originator of the packet.

8 Destination Address (128-bits): This field provides the address of intended recipient of the
packet.
Extension Headers

In IPv6, the Fixed Header contains only that much information which is necessary, avoiding those information
which is either not required or is rarely used. All such information is put between the Fixed Header and the
Upper layer header in the form of Extension Headers. Each Extension Header is identified by a distinct value.
When Extension Headers are used, IPv6 Fixed Header’s Next Header field points to the first Extension Header.
If there is one more Extension Header, then the first Extension Header’s ‘Next-Header’ field points to the
second one, and so on. The last Extension Header’s ‘Next-Header’ field points to the Upper Layer Header.
Thus, all the headers points to the next one in a linked list manner.
If the Next Header field contains the value 59, it indicates that there are no headers after this header, not even
Upper Layer Header.
The following Extension Headers must be supported as per RFC 2460:

The sequence of Extension Headers should be:

These headers:
 1. should be processed by First and subsequent destinations.
 2. should be processed by Final Destination.
Extension Headers are arranged one after another in a linked list manner, as depicted in the following diagram:
Introduction To Subnetting
When the IP system was first introduced, finding a network and sending data to it was easier because the
number of users on the internet was limited. As the number of users on the internet is increasing, sending a
data packet to the computer you want in a network is becoming quite difficult these days. When a network is
large enough to support an organization, network performance becomes a significant concern.

An organization can use IP subnets to split more extensive networks for logical (firewalls, etc.) or physical
reasons (smaller broadcast domains, etc.). In other words, routers make routing decisions based on subnets.
In this article, we will learn these concepts more briefly.

Scope

 This article discusses what subnetting is along with its importance.


 This article briefly describes step by step working of subnetting.
 This article describes the various uses of subnetting.
 This article also covers the advantages and disadvantages of subnetting.

What is Subnetting?

Subnetting is a method of dividing a single physical network into logical sub-networks (subnets). Subnetting
allows a business to expand its network without requiring a new network number from its Internet service
provider. Subnetting helps to reduce the network traffic and also conceals network complexity. Subnetting is
necessary when a single network number must be assigned to several portions of a local area
network (LAN).

We know subnetting splits networks into small subnets, and do you think what these subnets are. A subnet,
sometimes known as a subnetwork, is a part of a larger network. Subnets are the logical division of
an IP network into many smaller network parts. To reduce traffic, a subnet's purpose is to divide a huge
network into a collection of smaller, interconnected networks. Subnets eliminate the need for traffic to pass
through extraneous routs, resulting in faster network speeds. Subnets were created to alleviate the shortage
of IP addresses on the internet.

The purpose of subnetting is to establish a computer network that is quick, efficient, and robust. As networks
grow in size and complexity, traffic must find more efficient pathways. Bottlenecks and congestion would
arise if all network traffic travelled across the system at the same time, utilizing the same path, resulting in
slow and wasteful backlogs. By creating a subnet, you can limit the number of routers that network traffic
must pass through. An engineer will effectively establish smaller mini-routes within a larger network to
allow traffic to go the shortest distance possible.

What is the use of Subnetting?

Large enterprises looking to expand technologically need to know how to organize a network
efficiently. IP addresses can be kept geographically confined, allowing a subnet to be used to preserve
efficiency and order. Let’s look at some of the major motivations to use subnetting.

1. Reallocating IP Addresses:- A limited number of host allocations are available for each class; for
example, networks with more than 254 devices require a Class B allocation. Suppose a network
administrator works with a Class B or C network and needs to allocate 150 hosts across three
physical networks in three different cities. In that case, they must either request more address blocks
for each network or divide the network into subnets that allow administrators to use one block of
addresses across multiple physical networks.
2. Improves Network Speed:- Subnetting divides the large network into small subnets, and the
purpose of these subnets is to divide a huge network into a collection of smaller, interconnected
networks to reduce traffic. Subnets eliminate the need for traffic to pass through extraneous routs,
resulting in faster network speeds.
3. Improving Network Security:- Subnetting helps network administrators to reduce network-
wide threats by quarantining compromised areas of the network and making it more complex for
trespassers to travel throughout an organization's network.
4. Reliving Network Congestion:- If a large portion of an organization's traffic is intended to be
shared regularly across a group of computers, putting them all on the same subnet can help reduce
network traffic. Without a subnet, data packets from every other computer on the network would be
visible to all computers and servers.
5. Efficiency:- Subnetting is used to simplify network traffic by eliminating the need for additional
routers. This ensures that the data being sent can move as quickly as possible to its destination,
avoiding any potential detours that can slow it down.

When a bigger network is divided into smaller networks, to maintain security, then that is known as
Subnetting. So, maintenance is easier for smaller networks. For example, if we consider a class A ad dress,
the possible number of hosts is 2 24 for each network, it is obvious that it is difficult to maintain such a
huge number of hosts, but it would be quite easier to maintain if we divide the network into small
parts. Now, let’s talk about dividing a network into two parts: To divide a network into two parts, you
need to choose one bit for each Subnet from the host ID part.

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.
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:
193.1.2.0 to 193.1.2.127
Subnet id of Subnet-1 is : 193.1.2.0
Direct Broadcast id of Subnet-1 is : 193.1.2.127
Total number of host possible is : 126 (Out of 128, 2 id’s are used for Subnet id & Direct
Broadcast id)
Subnet mask of Subnet- 1 is : 255.255.255.128
 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:
193.1.2.128 to 193.1.2.255
Subnet id of Subnet-2 is : 193.1.2.128
Direct Broadcast id of Subnet-2 is : 193.1.2.255
Total number of host possible is : 126 (Out of 128, 2 id’s are used for Subnet id & Direct Broadcast
id)
Subnet mask of Subnet- 2 is : 255.255.255.192
Finally, after using the subnetting the total number of usable hosts are 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.
Along with the advantage there is a small disadvantage for subnetting that is, before subnetting to find the
IP address first network id is found then host id followed by process id, but after subnetting first network
id is found then subnet id then host id and finally process id by this the computation increases.

Advantages of Subnetting

 Subnetting divides broadcast domains, allowing data to be routed more efficiently, boosting network
performance and speed.
 We can subnet a single large network into smaller networks via subnetting. It is simple to handle
small networks.
 Subnetting enhances the network's overall performance by removing redundant traffic.
 Subnetting reduces the requirement of an IP range.
 Subnets prevent devices from accessing the whole network, allowing businesses to control which
gear and users have access to more sensitive data. It is possible to improve network security.

Disadvantages of Subnetting

 Subnetting increases the network's complexity. An experienced network administrator must manage
the subnetted network.
 More subnets mean more IP addresses are wasted because each subnet has its own network address
and broadcast address.
 As we increase more subnets in the network, we require more routers which increases the overall
cost and makes the maintenance process challenging.
 Subnetting necessitates the purchase of expensive internal routers, switches, hubs, and bridges,
among other items, which increases the overall network cost.

Conclusion

 We use subnetting because it now becomes challenging to send a data packet to the machine you
want on that network.
 Subnetting is a method of dividing a single physical network into logical sub-networks (subnets).
 Subnetting is aimed to achieve the following targets in the network.
o Reallocating IP Addresses
o Improving Network Security
o Reliving Network Congestion
o Improves Network Speed
o Efficiency
 A subnet, sometimes known as a subnetwork, is a part of a larger network and its purpose is to divide
a huge network into a collection of smaller, interconnected networks to reduce traffic.
 The subnet mask aims to route the data packet from the internet to its desired subnet network.
Example1. An organization is assigned a class C network address of 201.35.2.0. It uses a netmask of
255.255.255.192 to divide this into sub-networks. Which of the following is/are valid host IP addresses?
A. 201.35.2.129
B. 201.35.2.191
C. 201.35.2.255
D. Both (A) and (C)
Solution:
Converting the last octet of the netmask into the binary form: 255.255.255.11000000
Converting the last octet of option A into the binary form: 201.35.2.10000001
Converting the last octet of option B into the binary form: 201.35.2.10111111
Converting the last octet of option C into the binary form: 201.35.2.11111111
From the above, we see that Option B and C is not a valid host IP address (as they are broadcast address
of a subnetwork)
and OPTION A is not a broadcast address and it can be assigned to a host IP.
Example 2. An organization has a class C network address of 201.32.64.0. It uses a subnet mask of
255.255.255.248. Which of the following is NOT a valid broadcast address for any subnetworks?
A. 201.32.64.135
B. 201.32.64.240
C. 201.32.64.207
D. 201.32.64.231
Solution:
Converting the last octet of the netmask into the binary form: 255.255.255.11111000
Converting the last octet of option A into the binary form: 201.32.64.10000111
Converting the last octet of option B into the binary form: 201.32.64.11110000
Converting the last octet of option C into the binary form: 201.32.64.11001111
Converting the last octet of option D into the binary form: 201.32.64.11100111
From the above, we can see that, in OPTION A, C, and D all the host bits are 1 and give the valid
broadcast address of subnetworks.
and OPTION B the last three bits of the Host address are not 1 therefore it’s not a valid broadcast address.

Address mapping

Address Resolution Protocol (ARP)


Most of the computer programs/applications use logical address (IP address) to send/receive messages,
however, the actual communication happens over the physical address (MAC address) i.e from layer 2
of the OSI model. So our mission is to get the destination MAC address which helps in communicating
with other devices. This is where ARP comes into the picture, its functionality is to translate IP address to
physical addresses.
The acronym ARP stands for Address Resolution Protocol which is one of the most important protocols
of the Network layer in the OSI model.
Note: ARP finds the hardware address, also known as Media Access Control (MAC) address, of a host
from its known IP address.

Address Resolution Protocol (ARP) is a communication protocol used to find the MAC (Media Access
Control) address of a device from its IP address. This protocol is used when a device wants to communicate
with another device on a Local Area Network or Ethernet.

Types of ARP

There are four types of Address Resolution Protocol, which is given below:

o Proxy ARP
o Gratuitous ARP
o Reverse ARP (RARP)
o Inverse ARP
Proxy ARP - Proxy ARP is a method through which a Layer 3 devices may respond to ARP requests for a
target that is in a different network from the sender. The Proxy ARP configured router responds to the ARP
and map the MAC address of the router with the target IP address and fool the sender that it is reached at its
destination.

At the backend, the proxy router sends its packets to the appropriate destination because the packets contain
the necessary information.

Example - If Host A wants to transmit data to Host B, which is on the different network, then Host A sends
an ARP request message to receive a MAC address for Host B. The router responds to Host A with its own
MAC address pretend itself as a destination. When the data is transmitted to the destination by Host A, it will
send to the gateway so that it sends to Host B. This is known as proxy ARP.

Gratuitous ARP - Gratuitous ARP is an ARP request of the host that helps to identify the duplicate IP
address. It is a broadcast request for the IP address of the router. If an ARP request is sent by a switch or router
to get its IP address and no ARP responses are received, so all other nodes cannot use the IP address allocated
to that switch or router. Yet if a router or switch sends an ARP request for its IP address and receives an ARP
response, another node uses the IP address allocated to the switch or router.

There are some primary use cases of gratuitous ARP that are given below:

o The gratuitous ARP is used to update the ARP table of other devices.
o It also checks whether the host is using the original IP address or a duplicate one.

Reverse ARP (RARP) - It is a networking protocol used by the client system in a local area network (LAN)
to request its IPv4 address from the ARP gateway router table. A table is created by the network administrator
in the gateway-router that is used to find out the MAC address to the corresponding IP address.

When a new system is set up or any machine that has no memory to store the IP address, then the user has to
find the IP address of the device. The device sends a RARP broadcast packet, including its own MAC address
in the address field of both the sender and the receiver hardware. A host installed inside of the local network
called the RARP-server is prepared to respond to such type of broadcast packet. The RARP server is then
trying to locate a mapping table entry in the IP to MAC address. If any entry matches the item in the table,
then the RARP server sends the response packet along with the IP address to the requesting computer.

Inverse ARP (InARP) - Inverse ARP is inverse of the ARP, and it is used to find the IP addresses of the
nodes from the data link layer addresses. These are mainly used for the frame relays, and ATM networks,
where Layer 2 virtual circuit addressing are often acquired from Layer 2 signaling. When using these virtual
circuits, the relevant Layer 3 addresses are available.

ARP conversions Layer 3 addresses to Layer 2 addresses. However, its opposite address can be defined by
InARP. The InARP has a similar packet format as ARP, but operational codes are different.

RARP
RARP is abbreviation of Reverse Address Resolution Protocol which is a protocol based on computer
networking which is employed by a client computer to request its IP address from a gateway server’s
Address Resolution Protocol table or cache. The network administrator creates a table in gateway-router,
which is used to map the MAC address to corresponding IP address.
This protocol is used to communicate data between two points in a server. The client doesn’t necessarily
need prior knowledge the server identities capable of serving its request. Medium Access Control (MAC)
addresses requires individual configuration on the servers done by an administrator. RARP limits to the
serving of IP addresses only.
When a replacement machine is set up, the machine may or might not have an attached disk that may
permanently store the IP Address so the RARP client program requests IP Address from the RARP server
on the router. The RARP server will return the IP address to the machine under the belief that an entry has
been setup within the router table.

History of RARP :
RARP was proposed in 1984 by the university Network group. This protocol provided the IP Address to
the workstation. These diskless workstations were also the platform for the primary workstations from
Sun Microsystems.
Working of RARP :
The RARP is on the Network Access Layer and is employed to send data between two points in a very
network.
Each network participant has two unique addresses:- IP address (a logical address) and MAC address (the
physical address).
The IP address gets assigned by software and after that the MAC address is constructed into the hardware.
The RARP server that responds to RARP requests, can even be any normal computer within the network.
However, it must hold the data of all the MAC addresses with their assigned IP addresses. If a RARP
request is received by the network, only these RARP servers can reply to it. The info packet needs to be
sent on very cheap layers of the network. This implies that the packet is transferred to all the participants
at the identical time.
The client broadcasts a RARP request with an Ethernet broadcast address and with its own physical
address. The server responds by informing the client its IP address.
How is RARP different from ARP ?

RARP ARP

RARP stands for Reverse Address


Resolution Protocol ARP stands for Address Resolution Protocol

In ARP, we find the IP address of a remote


In RARP, we find our own IP address machine

The MAC address is known and the IP The IP address is known, and the MAC
address is requested address is being requested

It uses the value 3 for requests and 4 for It uses the value 1 for requests and 2 for
responses responses

Uses of RARP :
RARP is used to convert the Ethernet address to an IP address.
It is available for the LAN technologies like FDDI, token ring LANs, etc.

Disadvantages of RARP :
The Reverse Address Resolution Protocol had few disadvantages which eventually led to its replacement
by BOOTP and DHCP. Some of the disadvantages are listed below:
 The RARP server must be located within the same physical network.
 The computer sends the RARP request on very cheap layer of the network. Thus, it’s
unattainable for a router to forward the packet because the computer sends the RARP request
on very cheap layer of the network.
 The RARP cannot handle the subnetting process because no subnet masks are sent. If the
network is split into multiple subnets, a RARP server must be available with each of them.
 It isn’t possible to configure the PC in a very modern network.
 It doesn’t fully utilize the potential of a network like Ethernet.
RARP has now become an obsolete protocol since it operates at low level. Due to this, it requires direct
address to the network which makes it difficult to build a server.
Bootstrap Protocol (BOOTP)
Bootstrap Protocol (BOOTP) is a networking protocol which is used by networking administration to give
IP addresses to each member of that network for participating with other networking devices by the main
server.

Important Features of Bootstrap Protocol :

Here, we will discuss the features of Bootstrap Protocol as follows.


 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.
 This shortens the connection time between the server and the client. It starts the process of
downloading and updating the source code even with very little information.
 BOOTP uses a combination of DHCP (Dynamic Host Configuration 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. Also, a BOOTP connection has a stable static database of IP addresses which serves the client
immediately with the required IP address.

Working of Bootstrap Protocol :


Here, we will discuss the Working steps of Bootstrap Protocol as follows.
 At the very beginning, each network participant does not have an IP address. The network
administrator then provides each host on the network with a unique IP address using the IPv4
protocol.
 The client installs the BOOTP network protocol using TCP / IP Intervention on its computer
system to ensure compatibility with all network protocols when connected to this network.
 The BOOTP network administrator then sends a message that contains a valid unicast address.
This unicast address is then forwarded to the BOOTP client by the master server.

Uses of Bootstrap Protocol :


Here, we will discuss the uses of Bootstrap Protocol as follows.
1. Bootstrap (BOOTP) is primarily required to check the system on a network the first time you
start your computer. Records the BIOS cycle of each computer on the network to allow the
computer’s motherboard and network manager to efficiently organize the data transfer on the
computer as soon as it boots up.
2. BOOTP is mainly used in a diskless environment and requires no media as all data is stored in
the network cloud for efficient use.
3. BOOTP is the transfer of a data between a client and a server to send and receive requests and
corresponding responses by the networking server.
4. BOOTP supports the use of motherboards and network managers, so no external storage
outside of the cloud network is required.

Dynamic Host Configuration Protocol

Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to dynamically assign
an IP address to nay device, or node, on a network so they can communicate using IP (Internet Protocol).
DHCP automates and centrally manages these configurations. There is no need to manually assign IP
addresses to new devices. Therefore, there is no requirement for any user configuration to connect to a DHCP
based network.

DHCP can be implemented on local networks as well as large enterprise networks. DHCP is the default
protocol used by the most routers and networking equipment. DHCP is also called RFC (Request for
comments) 2131.

DHCP does the following:


o DHCP manages the provision of all the nodes or devices added or dropped from the network.
o DHCP maintains the unique IP address of the host using a DHCP server.
o It sends a request to the DHCP server whenever a client/node/device, which is configured to work with
DHCP, connects to a network. The server acknowledges by providing an IP address to the
client/node/device.

DHCP is also used to configure the proper subnet mask, default gateway and DNS server information on the
node or device.

There are many versions of DCHP are available for use in IPV4 (Internet Protocol Version 4) and IPV6
(Internet Protocol Version 6).

How DHCP works

DHCP runs at the application layer of the TCP/IP protocol stack to dynamically assign IP addresses to DHCP
clients/nodes and to allocate TCP/IP configuration information to the DHCP clients. Information includes
subnet mask information, default gateway, IP addresses and domain name system addresses.

DHCP is based on client-server protocol in which servers manage a pool of unique IP addresses, as well as
information about client configuration parameters, and assign addresses out of those address pools.

The DHCP lease process works as follows:


o First of all, a client (network device) must be connected to the internet.
o DHCP clients request an IP address. Typically, client broadcasts a query for this information.
o DHCP server responds to the client request by providing IP server address and other configuration
information. This configuration information also includes time period, called a lease, for which the
allocation is valid.
o When refreshing an assignment, a DHCP clients request the same parameters, but the DHCP server
may assign a new IP address. This is based on the policies set by the administrator.
Components of DHCP

When working with DHCP, it is important to understand all of the components. Following are the list of
components:

o DHCP Server: DHCP server is a networked device running the DCHP service that holds IP addresses
and related configuration information. This is typically a server or a router but could be anything that
acts as a host, such as an SD-WAN appliance.
o DHCP client: DHCP client is the endpoint that receives configuration information from a DHCP
server. This can be any device like computer, laptop, IoT endpoint or anything else that requires
connectivity to the network. Most of the devices are configured to receive DHCP information by
default.
o IP address pool: IP address pool is the range of addresses that are available to DHCP clients. IP
addresses are typically handed out sequentially from lowest to the highest.
o Subnet: Subnet is the partitioned segments of the IP networks. Subnet is used to keep networks
manageable.
o Lease: Lease is the length of time for which a DHCP client holds the IP address information. When a
lease expires, the client has to renew it.
o DHCP relay: A host or router that listens for client messages being broadcast on that network and
then forwards them to a configured server. The server then sends responses back to the relay agent that
passes them along to the client. DHCP relay can be used to centralize DHCP servers instead of having
a server on each subnet.

Benefits of DHCP

There are following benefits of DHCP:

Centralized administration of IP configuration: DHCP IP configuration information can be stored in a


single location and enables that administrator to centrally manage all IP address configuration information.

Dynamic host configuration: DHCP automates the host configuration process and eliminates the need to
manually configure individual host. When TCP/IP (Transmission control protocol/Internet protocol) is first
deployed or when IP infrastructure changes are required.

Seamless IP host configuration: The use of DHCP ensures that DHCP clients get accurate and timely IP
configuration IP configuration parameter such as IP address, subnet mask, default gateway, IP address of DND
server and so on without user intervention.

Flexibility and scalability: Using DHCP gives the administrator increased flexibility, allowing the
administrator to move easily change IP configuration when the infrastructure changes.

Difference between BOOTP and DHCP

The following table highlights the major differences between BOOTP and DHCP.
Key BOOTP DHCP

Full Form BOOTP stands for Bootstrap DHCP stands for Dynamic Host
Protocol. Configuration Protocol.

Temporary IP BOOTP has no support for DHCP Server supports temporary IP


Address temporary IP Addressing. Addressing but for limited period of time.

Client Support BOOTP does not support DHCP server supports BOOTP Clients.
DHCP Clients.

Configuration In BOOTP, configuration has In DHCP, configuration is automatic.


Type to be done manually.

Mobile Device Mobile devices are not DHCP supports mobile devices.
Support supported.

Error Probability Configuration being manual, it Automatic configuration prevents the


often leads to errors. chances of errors.

UNICAST ROUTING
Unicast – Unicast means the transmission from a single sender to a single receiver. It is a point-to-point
communication between sender and receiver. There are various unicast protocols such as TCP, HTTP,
etc.
 TCP is the most commonly used unicast protocol. It is a connection-oriented protocol that
relies on acknowledgement from the receiver side.
 HTTP stands for HyperText Transfer Protocol. It is an object-oriented protocol for
communication.

There are three major protocols for unicast routing:


1. Distance Vector Routing
2. Link State Routing
3. Path-Vector Routing

1) Distance Vector Routing: A distance-vector routing (DVR) protocol requires that a router inform its
neighbors of topology changes periodically. Historically known as the old ARPANET routing algorithm
(or known as Bellman-Ford algorithm).
Bellman Ford Basics – Each router maintains a Distance Vector table containing the distance between
itself and ALL possible destination nodes. Distances,based on a chosen metric, are computed using
information from the neighbors’ distance vectors.
Information kept by DV router -
 Each router has an ID
 Associated with each link connected to a router,
 there is a link cost (static or dynamic).
 Intermediate hops

Distance Vector Table Initialization -


 Distance to itself = 0
 Distance to ALL other routers = infinity number.

Distance Vector Algorithm –


1. A router transmits its distance vector to each of its neighbors in a routing packet.
2. Each router receives and saves the most recently received distance vector from each of its
neighbors.
3. A router recalculates its distance vector when:
 It receives a distance vector from a neighbor containing different information than
before.
 It discovers that a link to a neighbor has gone down.
The DV calculation is based on minimizing the cost to each destination
Dx(y) = Estimate of least cost from x to y
C(x,v) = Node x knows cost to each neighbor v
Dx = [Dx(y): y ∈ N ] = Node x maintains distance vector
Node x also maintains its neighbors' distance vectors
– For each neighbor v, x maintains Dv = [Dv(y): y ∈ N ]
Note –
 From time-to-time, each node sends its own distance vector estimate to neighbors.
 When a node x receives new DV estimate from any neighbor v, it saves v’s distance vector and
it updates its own DV using B-F equation:
 Dx(y) = min { C(x,v) + Dv(y), Dx(y) } for each node y ∈ N

Example – Consider 3-routers X, Y and Z as shown in figure. Each router have their routing table. Every
routing table will contain distance to the destination nodes.

Consider router X , X will share it routing table to neighbors and neighbors will share it routing table to it
to X and distance from node X to destination will be calculated using bellmen- ford equation.
Dx(y) = min { C(x,v) + Dv(y)} for each node y ∈ N
As we can see that distance will be less going from X to Z when Y is intermediate node(hop) so it will be
update in routing table X.
Similarly for Z also –
Finally the routing table for all –

Advantages of Distance Vector routing –


 It is simpler to configure and maintain than link state routing.
Disadvantages of Distance Vector routing –
 It is slower to converge than link state.
 It is at risk from the count-to-infinity problem.
 It creates more traffic than link state since a hop count change must be propagated to all
routers and processed on each router. Hop count updates take place on a periodic basis,
even if there are no changes in the network topology, so bandwidth-wasting broadcasts
still occur.
 For larger networks, distance vector routing results in larger routing tables than link
state since each router must know about all other routers. This can also lead to
congestion on WAN links.
Note – Distance Vector routing uses UDP (User datagram protocol) for transportation.

2) Link State Routing –


Link state routing is the second family of routing protocols. While distance-vector routers use a
distributed algorithm to compute their routing tables, link-state routing uses link-state routers to exchange
messages that allow each router to learn the entire network topology. Based on this learned topology, each
router is then able to compute its routing table by using the shortest path computation.
Features of link state routing protocols –
 Link state packet – A small packet that contains routing information.

 Link state database – A collection of information gathered from the link-state packet.

 Shortest path first algorithm (Dijkstra algorithm) – A calculation performed on the


database results in the shortest path

 Routing table – A list of known paths and interfaces.


Calculation of shortest path –
To find the shortest path, each node needs to run the famous Dijkstra algorithm. This famous algorithm
uses the following steps:
 Step-1: The node is taken and chosen as a root node of the tree, this creates the tree with a
single node, and now set the total cost of each node to some value based on the information in
Link State Database
 Step-2: Now the node selects one node, among all the nodes not in the tree-like structure,
which is nearest to the root, and adds this to the tree. The shape of the tree gets changed.
 Step-3: After this node is added to the tree, the cost of all the nodes not in the tree needs to be
updated because the paths may have been changed.
 Step-4: The node repeats Step 2. and Step 3. until all the nodes are added to the tree
Link State protocols in comparison to Distance Vector protocols have:
1. It requires a large amount of memory.

2. Shortest path computations require many CPU circles.

3. If a network uses little bandwidth; it quickly reacts to topology changes

4. All items in the database must be sent to neighbors to form link-state packets.

5. All neighbors must be trusted in the topology.

6. Authentication mechanisms can be used to avoid undesired adjacency and problems.

7. No split horizon techniques are possible in the link-state routing.


 Open Shortest Path First (OSPF) is a unicast routing protocol developed by a
working group of the Internet Engineering Task Force (IETF).
 It is an intradomain routing protocol.
 It is an open-source protocol.
 It is similar to Routing Information Protocol (RIP)
 OSPF is a classless routing protocol, which means that in its updates, it includes the
subnet of each route it knows about, thus, enabling variable-length subnet masks.
With variable-length subnet masks, an IP network can be broken into many subnets
of various sizes. This provides network administrators with extra network
configuration flexibility. These updates are multicasts at specific addresses
(224.0.0.5 and 224.0.0.6).
 OSPF is implemented as a program in the network layer using the services provided
by the Internet Protocol
 IP datagram that carries the messages from OSPF sets the value of the protocol field
to 89
 OSPF is based on the SPF algorithm, which sometimes is referred to as the Dijkstra
algorithm
 OSPF has two versions – version 1 and version 2. Version 2 is used mostly
OSPF Messages – OSPF is a very complex protocol. It uses five different types of messages. These are as
follows:
1. Hello message (Type 1) – It is used by the routers to introduce themselves to the other routers.

2. Database description message (Type 2) – It is normally sent in response to the Hello


message.

3. Link-state request message (Type 3) – It is used by the routers that need information about
specific Link-State packets.
4. Link-state update message (Type 4) – It is the main OSPF message for building Link-State
Database.

5. Link-state acknowledgement message (Type 5) – It is used to create reliability in the OSPF


protocol.

3) path-vector routing
A path-vector routing protocol is a network routing protocol which maintains the path information that
gets updated dynamically. Updates that have looped through the network and returned to the same node are
easily detected and discarded. This algorithm is sometimes used in Bellman–Ford routing algorithms to
avoid "Count to Infinity" problems.
It is different from the distance vector routing and link state routing. Each entry in the routing table contains
the destination network, the next router and the path to reach the destination.
Border Gateway Protocol (BGP) is an example of a path vector protocol. In BGP, the autonomous system
boundary routers (ASBR) send path-vector messages to advertise the reachability of networks. Each router
that receives a path vector message must verify the advertised path according to its policy. If the message
complies with its policy, the router modifies its routing table and the message before sending the message to
the next neighbor. It modifies the routing table to maintain the autonomous systems that are traversed in
order to reach the destination system. It modifies the message to add its AS number and to replace the next
router entry with its identification.
Exterior Gateway Protocol (EGP) does not use path vectors.
It has three phases:

1. Initiation
2. Sharing
3. Updating
Of note, BGP is commonly referred to as an External Gateway Protocol (EGP) given its role in connecting
Autonomous Systems (AS).
Communication protocols within AS are therefore referred to as Internal Gateway Protocols (IGP) which
contain OSPF and IS-IS among others.
This being said, BGP can be used within an AS, which typically occurs within very large organizations such
as Facebook or Microsoft.

Difference Between Distance Vector Routing and Link State Routing:

Distance Vector Routing Link State Routing

No flooding, small packets and local sharing More bandwidth required to facilitate flooding and
require less bandwidth. sending large link state packets.

Uses Bellman-Ford algorithm. Uses Dijkstra’s algorithm.

More network traffic when compared to Distance


Less traffic.
Vector Routing.
Updates table based on information from It has knowledge about the entire network, thus it
neighbours, thus uses local knowledge. uses global knowledge.

Persistent looping problem exists. Only transient loop problems.

Based on least hops. Based on least cost.

Updation of full routing tables. Updation of only link states.

Less CPU utilisation. High CPU utilisation.

Uses broadcast for updates. Uses multicast for updates.

Moderate convergence time. Low convergence time.

You might also like