0% found this document useful (0 votes)
12 views

Module 3

Computer Networks Notes _ Mod 3

Uploaded by

Siddharth Jha
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Module 3

Computer Networks Notes _ Mod 3

Uploaded by

Siddharth Jha
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 127

MODULE 3

NETWORK LAYER
• Network Layer Services, Packet Switching, Network Layer
Performance, IPv4 Addressing (classful and classless), Subnetting,
Super netting ,IPv4 Protocol, DHCP, Network Address Translation
(NAT).
• Routing algorithms: Distance Vector Routing, Link state routing, Path
Vector Routing. Protocols –RIP,OSPF,BGP. Next Generation IP: IPv6
Addressing,IPv6 Protocol, Transition fromIPV4 to IPV6
• Network Layer Services
• It’s main function is to transfer network packets from the source to the destination.
• It is involved both at the source host and the destination host. At the source, it accepts a packet from the
transport layer, encapsulates it in a datagram and then deliver the packet to the data link layer so that it can
further be sent to the receiver.
• At the destination, the datagram is decapsulated, the packet is extracted and delivered to the corresponding
transport layer.
• Features :
1. Main responsibility of Network layer is to carry the data packets from the source to the destination
without changing or using it.
2. If the packets are too large for delivery, they are fragmented i.e., broken down into smaller
packets.
3. It decides the route to be taken by the packets to travel from the source to the destination among
the multiple routes available in a network (also called as routing).
4. The source and destination addresses are added to the data packets inside the network layer
• The services which are offered by the network layer protocol are as follows:
1. Packetizing –
The process of encapsulating the data received from upper layers of the network(also
called as payload) in a network layer packet at the source and decapsulating the payload
from the network layer packet at the destination is known as packetizing.
2. The source host adds a header that contains the source and destination address and some
other relevant information required by the network layer protocol to the payload received
from the upper layer protocol, and delivers the packet to the data link layer.
3. The destination host receives the network layer packet from its data link layer,
decapsulates the packet, and delivers the payload to the corresponding upper layer
protocol. The routers in the path are not allowed to change either the source or the
destination address. The routers in the path are not allowed to decapsulate the packets
they receive unless they need to be fragmented.
• Routing and Forwarding –
These are two other services offered by the network layer.
• In a network, there are a number of routes available from the source to the destination. The
network layer specifies has some strategies which find out the best possible route. This process is
referred to as routing. There are a number of routing protocols which are used in this process and
they should be run to help the routers coordinate with each other and help in establishing
communication throughout the network.
• Forwarding is simply defined as the action applied by each router when a packet arrives at one of
its interfaces. When a router receives a packet from one of its attached networks, it needs to
forward the packet to another attached network
Packet switching
• Packet Switching is a technique of switching in which the message is usually divided into
smaller pieces that are known as packets.
• Every packet contains a header that contains the knowledge of the destination. With the
help of this knowledge/information, these packets find the route.
• A unique number is given to each packet in order to identify them at the receiving end.
• One of the biggest examples of the Packet-switched network is the Internet.
• The header of the Packet mainly comprises of two things: header and payload.
• where the header mainly contains the routing information.
• and the payload contains the data that is to be transferred.
• This switching is also based on the store and forward method.
• In the Packet Switched network, there is no resource reservation, and resources are
allocated on demand.
• As we know that each packet contains the information of source and destination in their
headers. Thus all packets can independently travel in the network.
• Packets related to the same file might take different paths and it mainly depends upon the
availability of the path. These packets will be then re-assembled at the destination. It is the
responsibility of the receiver node to re-arrange the received packet in order to get the
original data.
• The message of acknowledgment will be sent by the receiver if packets reach the receiver
in the correct order.
• In case of a missing packet or corrupted packet, the message will be sent by the receiver to
the sender to resend the message.
• Two different approaches used for Packet switching are as follows:
• Datagram Packet Switching
• Virtual Circuit Switching
• Datagram Packet Switching
• In Datagram Switching, the packet is commonly known as a datagram. Datagram Packet
switching is also known as Connectionless Packet Switching. In this technique, each
packet routed individually by network devices on the basis of the destination address that
is contained within each packet.
• Each packet is basically treated independently of all others.
• Datagram packet switching is done at the network layer.
• This is Connectionless packet switching because the packet switch does not keep the
information about the connection state.
• In the Datagram packet switching the path is not fixed.
• Routing decisions are taken by the intermediate nodes in order to forward the packets.
• Thus all datagrams that belong to the same message may travel through different paths in order to
reach their destination.
• On the receiving node, all the packets are reassembled to get the message in the original form.
• Due to lack of resources packets may also be lost or dropped.
• In most of the protocols, it is the responsibility of the upper-layer protocol to reorder the
datagrams or to ask for the lost datagrams before passing them on to the application.
• Virtual Circuit Switching
• Virtual Circuit Switching is also known as Connection-Oriented Switching. This switching
contains the characteristics of circuit switching as well as datagram packet switching. In this type
of packet switching the data-packets are first assembled and then sequentially numbered. Now
they are ready to travel across a predefined route, sequentially. The information about the address
is not required here, because all the data packets are sent in sequence.
• The resource allocation is done during the setup phase like it is done in the circuit-switched
network or it can be done on demand like in datagram networks.
• The data is in the form of packets like the datagram network and also each packet carries the
destination address in the header.
• Like the circuit-switched network, all packets in the Virtual network follows the same path that is
established during the connection.
• This switching is normally implemented in the data link layer.
• Advantages of Packet Switching
• Given below are some benefits of the Packet Switching:
• More efficient utilization of bandwidth.
• Latency in the transmission is minimum in packet switching.
• This technique is cheaper to implement and thus it is cost-effective.
• The same channel can be used by many users simultaneously.
• As there are improved protocols, thus packet switching is used by many applications like
Skype, WhatsApp, etc.
• The fault tolerance in this technique is more in case of any link down because packets may
follow different paths.
• This technique is more reliable than other techniques because it can easily detect missing
packets.
• Disadvantages of Packet Switching
• Some of the drawbacks of Packet Switching are as follows:
• This technique cannot be used by those applications that cannot afford more delays like
applications of high-quality voice calls.
• Protocols used in this technique are complex and thus their implementation cost is high.
• In the case of an overloaded network, the packet may get lost or there might occur delay which
causes the loss of critical information.
• On the receiver's side sorting of the packets sent by the sender is required.
• Performance of a Network
• Performance of a network pertains to the measure of service quality of a network as
perceived by the user. There are different ways to measure the performance of a network,
depending upon the nature and design of the network. The characteristics that measure the
performance of a network are :
• Bandwidth
• Throughput
• Latency (Delay)
• Bandwidth – Delay Product
• Jitter
• BANDWIDTH
• Bandwidth is characterized as the measure of data or information that can be transmitted in a fixed
measure of time. The term can be used in two different contexts with two distinctive estimating
values. In the case of digital devices, the bandwidth is measured in bits per second(bps) or bytes
per second. In the case of analogue devices, the bandwidth is measured in cycles per second, or
Hertz (Hz).
• “Bandwidth” means “Capacity” and “Speed” means “Transfer rate”.
• Bandwidth in Hertz: It is the range of frequencies contained in a composite signal or the range of
frequencies a channel can pass. For example, let us consider the bandwidth of a subscriber
telephone line as 4 kHz.
• Bandwidth in Bits per Seconds: It refers to the number of bits per second that a channel, a link, or
rather a network can transmit. For example, we can say the bandwidth of a Fast Ethernet network
is a maximum of 100 Mbps, which means that the network can send 100 Mbps of data.
• THROUGHPUT
Throughput is the number of messages successfully transmitted per unit time. It is controlled by
available bandwidth, the available signal-to-noise ratio and hardware limitations. The maximum
throughput of a network may be consequently higher than the actual throughput achieved in
everyday consumption. The terms ‘throughput’ and ‘bandwidth’ are often thought of as the same,
yet they are different. Bandwidth is the potential measurement of a link, whereas throughput is an
actual measurement of how fast we can send data.
• LATENCY
In a network, during the process of data communication, latency(also known as delay) is defined
as the total time taken for a complete message to arrive at the destination, starting with the time
when the first bit of the message is sent out from the source and ending with the time when the last
bit of the message is delivered at the destination. The network connections where small delays
occur are called “Low-Latency-Networks” and the network connections which suffer from long
delays are known as “High-Latency-Networks”.
• Latency = Propagation Time + Transmission Time + Queuing Time + Processing Delay
• Propagation Time: It is the time required for a bit to travel from the source to the
destination
• Transmission Time: Transmission time is a time based on how long it takes to send the
signal down the transmission line.
• Queuing Time: Queuing time is a time based on how long the packet has to sit around in
the router. Quite frequently the wire is busy, so we are not able to transmit a packet
immediately. The queuing time is usually not a fixed factor, hence it changes with the
load thrust in the network. In cases like these, the packet sits waiting, ready to go, in a
queue. These delays are predominantly characterized by the measure of traffic on the
system. The more the traffic, the more likely a packet is stuck in the queue, just sitting in
the memory, waiting.
• Processing Delay: Processing delay is the delay based on how long it takes the router to figure out
where to send the packet. As soon as the router finds it out, it will queue the packet for
transmission. These costs are predominantly based on the complexity of the protocol.
• JITTER
Jitter is another performance issue related to delay. In technical terms, jitter is a “packet delay
variance”. It can simply mean that jitter is considered as a problem when different packets of data
face different delays in a network
• IPv4 is responsible for packetizing, forwarding, and delivery of a
packet.
• ICMPv4 helps IPv4 to handle some errors that may occur in delivery.
• IGMP is used to help IPv4 in multicasting.
• ARP is used in network layer address to link layer mapping
IPv4
• The Internet protocol offers a best-effort service of delivering
datagrams between hosts.
• IPv4 is a connectionless internet protocol for packet switched
network
• IPv4 datagrams may be lost, arbitrarily delayed, corrupted, or
duplicated.
• Needs to be paired with TCP for reliability.
IPv4 Datagram Format
• Packets used by IP are called datagrams.
• A datagram is a variable-length packet consisting of two parts:
- Header
- payload (data)
• The header is 20 to 60 bytes in length and contains information
essential to routing and delivery.
• Version
Version of the IP protocol which determines how to interpret the header. Currently
the only permitted values are 4 (0100) or 6 (0110). The header format shown here is
valid for IPv4 only.
• HLEN
Length of header as a number of 32-bit words
• Type of service
This field is often ignored by current routers but is meant to allow traffic to be
prioritised (among other things).
• Total Length
The length of the entire datagram including header and data: maximum permitted it
65,535 bytes or 64K
• Identification, Flags and Fragment Offset
These values allow datagrams to be fragmented for transmission and reassembled at
the destination
• Time to live
An integer which is decremented at each router "hop"; supposed to be
interpreted as a number of seconds but more often treated as a "hop
count". If the value reaches zero the datagram is discarded and an
ICMP message is sent to the source host.
• Protocol
Identifies the transport-layer protocol which will interpret the Data
section. This will typically be TCP or UDP but other values are possible.
Protocols are identified by a unique number
• Multiplexing and demultiplexing using the value of the protocol field
• Protocol plays the same role as the ports play in transport layer
• Header checksum
This is used to verify the header, and is recomputed at each router hop.
This field is left out of IPv6 which relies on the transport layer for
verification.
• Addresses and Options
These are 32-bit IP addresses which identify the network and host
address. Note that IP does not have to specify addresses of any
intermediate nodes; this can be left to the router. Routing requirements
can also be specified in the Options field, along with options to do with
security and debugging.
Fragmentation
• The format and size of the sent frame depend on the protocol used by
the physical network through which the frame is going to travel.
• For example, if a router connects a LAN to a WAN, it receives a frame
in the LAN format and sends a frame in the WAN format.
• Maximum transfer unit (MTU)
• Max size of the payload that can be encapsulated
• Size of datagram < max size, else fragmented
• A datagram can be fragmented by the source host or any router in
the path.
• When a datagram is fragmented, each fragment has its own header
with most of the fields repeated, but some have been changed.
• The reassembly of the datagram, however, is done only by the
destination host, because each fragment becomes an independent
datagram.
• Example
Logical Addressing
• we need a global addressing scheme; we called this logical addressing
• term IP address to mean a logical address in the network layer
• Version popularly in use IPv4 (IP version 4)
• IPv4 Internet addresses are 32 bits in length
• this gives us a maximum of 232 addresses.
• The need for more addresses, in addition to other concerns about the
IP layer, motivated a new design of the IP layer called the new
generation of IP or IPv6 (lP version 6).
• IPv6 uses 128-bit addresses that give much greater flexibility in address
allocation.
IPv4 Addresses
• IPv4 addresses are universal.
• An IPv4 address is 32 bits long.
• IPv4 addresses are unique / dynamic also possible
• IP is the address of the connection and not the host or router
• Every host would have an Unique address for every connection
• Address Space
• total number of addresses used by the protocol
• If a protocol uses N bits to define an address, the address space is 2N
• IPv4 uses 32-bit addresses, which means that the address space is 2 32 or
4,294,967,296 (minus few)
Notations
• There are two prevalent notations to show an IPv4 address:
✔ binary notation ( base 2)
✔ Dotted decimal notation. ( base 256)
✔ Hexadecimal notation ( base 16)
❖Binary Notation
• is displayed as 32 bits.
• Each octet is often referred to as a byte. So it is common to
hear an IPv4 address referred to as a 32-bit address or a 4-byte
address.
• The following is an example of an IPv4 address in binary
notation:
01110101 10010101 00011101 00000010
❖Dotted-Decimal Notation
• To make the IPv4 address more compact and easier to read
• Internet addresses are usually written in decimal form with a
decimal point (dot) separating the bytes.
• The following is the dotted-decimal notation of the above address:
117.149.29.2
❖Hexadecimal Notation
• 4 bit
Identify valid IP address?

• 172.16.254.1
• 256.5.254.2
Hierarchy in Addressing
• 32 bit IPv4 is hierarchical
• Divided into 2 parts :
• prefix - defines the network
- length is n bits
- fixed ( classfull) or variable
length ( classless)
• Suffix – defines the node
- length is 32-n bits
Classful Addressing
•Devices examines the first octet of the address and determines the
address range.
• The high order bits never change for each class.
• For instance in Classful Addressing:
• 192.168.23.2 is in the Class C range
• Therefore – 24 network bits and 8 hosts bits.
• The subnet mask allows networks to be subdivided or subnetted.
• Each class is assigned a default subnet mask.
• Fixed length prefix ( 3 fixed length prefixes are designed n=8,16,24)
• Address space is divided into 5 classes ( A,B,C,D,E)
• occupation address space in classful addressing
Class A
• contained all addresses in which the most significant bit is zero.
• The network number for this class is given by the next 7 bits, therefore accommodating
128 networks in total, including the zero network, and including the IP networks already
allocated.
Class B
• network was a network in which all addresses had the two most-significant bits set to 10
• For these networks, the network address was given by the next 14 bits of the address
• leaving 16 bits for numbering host on the network
• total of 65536 addresses per network.
Class C
• 3 high-order bits/ most-significant bits are set to 110
• designating the next 21 bits to number the networks
• leaving each network with 256 local addresses.
• In order to function properly with network devices, every IP network
must contain three types of addresses:
• Network Address:
• All HOST BITS are set to 0.
• Host Address:
• HOST BITS will vary.
• Broadcast Address:
• All HOST BITS are set to 1.
• For a host to communicate directly with another host on the same
network, they must have the same network portion.
• Addresses per class
• For every IP address range that we assign to a network segment, we
automatically lose two addresses….
• One for the network address (sometimes called the wire address or
subnetwork address)
• One for the broadcast address for that network.
• Problems
Ip address: 134.35.78.2
Class: B
Netid bits:2 Byte Netid : 134.35
Network address: 134.35.0.0
Default Subnet mask : 255.255.0.0
• TRY
1.The network address: 17.0.0.0.
Find i) the Block ( net id) ii) the range of addresses.
2. The network address : 132.21.0.0.
Find i) the Block ii) the range of addresses.
3. Given the network address 220.34.76.0
Find i) the Block ii) the range of addresses.
4. The given IP address is 23.56.7.91. find the network address.
• Solution
1. The class is A because the first byte is between 0 and 127. The block has a
netid of 17. The addresses range from 17.0.0.0 to 17.255.255.255.
2. The class is B because the first byte is between 128 and 191. The block has a
netid of 132.21. The addresses range from 132.21.0.0 to 132.21.255.255.
3. The class is C because the first byte is between 192 and 223. The block has a
netid of 220.34.76. The addresses range from 220.34.76.0 to 220.34.76.255.
4. The default mask is 255.0.0.0, which means that only the first byte is
preserved and the other 3 bytes are set to 0s. The network address is
23.0.0.0.
• Ip address shows who u r
• Subnet mask shows who r ur neighbour
Subnetting
Number of subnets and valid host
Super netting
Why Super-netting
• Suppose an organization is started with 250 hosts now they need to increase the No. of hosts to 500 then
they can use 2 class C blocks ie., super-netting.

Conditions for super-netting:


1. The No. of blocks must be a power of 2.
2. The blocks must be contiguous in the address space
3. The 3rd byte of the 1st address in the super block must be evenly divisible by the number of blocks.
Class less addressing
• Classless Addressing is also called the slash notation or CIDR notation (Classless Inter-Domain Routing)
• In IPv4 Classless addressing, a block of addresses can be defined as
• x.y.z.t /n in which x.y.z.t defines one of the addresses and the /n defines the mask.
• Mask is a 32-bit number in which the n leftmost bits are 1s and the 32 - n rightmost bits are 0s

• Example 1:
• What is the network address if one of the addresses is 167.199.170.82/27?
• The prefix length is 27
• We must keep the first 27 bits as it is and change the remaining bits (5) to 0s.
• The 5 bits affect only the last byte.
• The last byte is 01010010.
• Changing the last 5 bits to 0s, we get 01000000 or 64.
• The network address is 167.199.170.64/27
• Example 2:
• A block of addresses is granted to a small organization. We know that one of the addresses is
205.16.37.39/28. What is the first address in the block?

Solution
• The binary representation of the given address is
• 11001101 00010000 00100101 00100111
• If we set 32−29 rightmost bits to 0, we get
• 11001101 00010000 00100101 00100000
• or
205.16.37.32.
• Example 3:
• Find the last address for the block 205.16.37.39/28
• Solution
• The binary representation of the given address is
• 11001101 00010000 00100101 00100111
• If we set 32 − 29 rightmost bits to 1, we get
• 11001101 00010000 00100101 00101111
• or
• 205.16.37.47
DHCP protocol
• DHCP is an application layer program, client/server model helping TCP/IP in network layer
• DHCP uses UDP well know ports 67 on server and 68 on client
• Need a way to simply connect a computer to a new network – No manual configuration
• DHCP provides dynamic configuration – Client can get a temporary address, and move from network to
network
• DHCP can do static and dynamic address allocation that can be manual or automatic.
• Static Address Allocation
• DHCP server has a database that statically binds physical addresses to IP addresses.
• Dynamic Address Allocation
• dynamically assigns IP addresses to hosts from a pool of available IP addresses.
• When a DHCP client sends a request to a DHCP server, the server first checks its static database. If
an entry with the requested physical address exists in the static database, the permanent IP address
of the client is returned.
On the other hand, if the entry does not exist in the static database, the server selects an IP
address from the available pool, assigns the address to the client, and adds the entry to the
dynamic database.
• DHCP provides temporary IP addresses for a limited period of time.
• The dynamic aspect of DHCP is needed when a host moves from network to network or is
connected and disconnected from a network frequently
Network Address translation ( NAT)
• number of users increasing, there is shortage of addresses
• A quick solution to this problem is called network address translation (NAT).
• NAT enables a user to have a large set of addresses internally and one address, or a smallset of addresses,
externally.
• reserved three sets of addresses as private addresses
• Everyone knows that these reserved addresses are for private networks.
• They are unique inside the organization, but they are not unique globally.
• No router will forward a packet that has one of these addresses
• The router that connects the network to the global address uses one private address and one global address.
Routing algorithm
• find reachable destinations
• find best paths towards destinations
• best in the sense of some metric - shortest path,number of hops, delay, congestion
• Routing methods can be classified as
• Static/ Dynamic Routing
• Intra/ Inter domain Routing
• Static Routing
• Also referred as Non-Adaptive Routing
• Manual: follows user defined routing and routing table is not changed until network administrator
changes it.
• simple routing algorithms
• more security than dynamic routing.
• implemented in smaller networks.
• Dynamic Routing
• Also referred as Adaptive Routing
• routing table changes once changes occur in network nor network topology changes
• During network change, dynamic routing sends a signal to router, recalculates the routes and
send the updated routing information.
• less secure
• Automatic
• implemented in large networks
• Intra Domain Routing
• works only within domains,need to know only about other routers within their domain/
Autonomous System (AS).
• Also called as Interior-gateway protocols (IGP).
• Inter Domain Routing
• Routing algorithm works within and between domains, needs to know only about other
routers within and between their domain
• Also called as Exterior-gateway protocols (EGP).
Distance Vector Algorithm

• Iterative, distributive and Dynamic Routing technique


• Used in internet as RIP ( Routing Information Protocol)
• based on Bellman-Ford equation
• Initially,
• given nodes know the distance to all it’s neighbours
• Finally,
• Distance to all other nodes is know, with the next hop
• Each router maintains Routing Table (Distance Vector) which contains
• Destination
• Cost to destination
• Next hop to reach destination
• Each node exchanges with all its neighbours (ONLY) “Routing Table”
info
• Destination and Estimated cost to the destination
• No hop info is not shared
• Each node exchanges with its neighbours (ONLY) DV
• destination and current distance
• Not next hop
• The neighbour on receiving the Routing table, it updates its own DV
using B-F equation:

the estimate Dx(y) converge to the actual least cost dx(y)


Link state routing
• Link state routing is a technique in which each router shares the knowledge of its
neighborhood with every other router in the internetwork.
• The three keys to understand the Link State Routing algorithm:
• Knowledge about the neighborhood: Instead of sending its routing table, a router
sends the information about its neighborhood only. A router broadcast its identities
and cost of the directly attached links to other routers.
• Flooding: Each router sends the information to every other router on the
internetwork except its neighbors. This process is known as Flooding. Every router
that receives the packet sends the copies to all its neighbors. Finally, each and every
router receives a copy of the same information.
• Information sharing: A router sends the information to every other router only
when the change occurs in the information.
• Link State Routing has two phases:
• Reliable Flooding
• Initial state: Each node knows the cost of its neighbors.
• Final state: Each node knows the entire graph.
• Route Calculation
• Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to
all nodes.
• The Link state routing algorithm is also known as Dijkstra's algorithm which is
used to find the shortest path from one node to every other node in the network.
• The Dijkstra's algorithm is an iterative, and it has the property that after kth iteration
of the algorithm, the least cost paths are well known for k destination nodes.
Link state routing
The Dijkstra's algorithm
• Distance Vector routing protocol
• It is a dynamic routing algorithm in which each router computes a distance between itself
and each possible destination i.e. its immediate neighbors.
• The router shares its knowledge about the whole network to its neighbors and accordingly
updates the table based on its neighbors.
• The sharing of information with the neighbors takes place at regular intervals.
• It makes use of Bellman-Ford Algorithm for making routing tables.
• Link state routing protocol
• It is a dynamic routing algorithm in which each router shares knowledge of its neighbors with
every other router in the network.
• A router sends its information about its neighbors only to all the routers through flooding.
• Information sharing takes place only whenever there is a change.
• It makes use of Dijkstra’s Algorithm for making routing tables.
Path Vector Routing
Updating path vectors
Protocols –RIP,OSPF,BGP
RIP protocol

• RIP stands for Routing Information Protocol. RIP is an intra-domain routing protocol
used within an autonomous system. Here, intra-domain means routing the packets in
a defined domain, for example, web browsing within an institutional area.
• RIP is based on the distance vector-based strategy, so we consider the entire structure
as a graph where nodes are the routers, and the links are the networks.
• The cost metric is the number of hops to reach the destination. The number of hops
available in a network would be the cost. The hop count is the number of networks
required to reach the destination.
• In RIP, infinity is defined as 16, which means that the RIP is useful for smaller
networks or small autonomous systems. The maximum number of hops that RIP can
contain is 15 hops, i.e., it should not have more than 15 hops as 16 is infinity.
How is hop count determined?
• When the router sends the packet to the network segment, then it is
counted as a single hop.
• RIP Message Format
• Command: It is an 8-bit field that is used for request or reply. The value of the
request is 1, and the value of the reply is 2.
• Version: Here, version means that which version of the protocol we are using.
Suppose we are using the protocol of version1, then we put the 1 in this field.
• Reserved: This is a reserved field, so it is filled with zeroes.
• Family: It is a 16-bit field. As we are using the TCP/IP family, so we put 2
value in this field.
• Network Address: It is defined as 14 bytes field. If we use the IPv4 version,
then we use 4 bytes, and the other 10 bytes are all zeroes.
• Distance: The distance field specifies the hop count, i.e., the number of hops
used to reach the destination.
• How does the RIP work?
• The following are the disadvantages of RIP:
• The RIP is a classful routing protocol, so it does not support the VLSM (Variable Length
Subnet Mask). The classful routing protocol is a protocol that does not include the subnet
mask information in the routing updates.
• It broadcasts the routing updates to the entire network that creates a lot of traffic. In RIP, the
routing table updates every 30 seconds. Whenever the updates occur, it sends the copy of
the update to all the neighbors except the one that has caused the update. The sending of
updates to all the neighbors creates a lot of traffic. This rule is known as a split-horizon rule.
• It faces a problem of Slow convergence. Whenever the router or link fails, then it often
takes minutes to stabilize or take an alternative route; This problem is known as Slow
convergence.
• RIP supports maximum 15 hops which means that the maximum 16 hops can be configured
in a RIP
How RIP updates its Routing table
• The following timers are used to update the routing table:
• RIP update timer : 30 sec
• The routers configured with RIP send their updates to all the neighboring routers every 30 seconds.
• RIP Invalid timer : 180 sec
• The RIP invalid timer is 180 seconds, which means that if the router is disconnected from the
network or some link goes down, then the neighbor router will wait for 180 seconds to take the
update. If it does not receive the update within 180 seconds, then it will mark the particular route as
not reachable.
• RIP Flush timer : 240 sec
• The RIP flush timer is 240 second which is almost equal to 4 min means that if the router does not
receive the update within 240 seconds then the neighbor route will remove that particular route
from the routing table which is a very slow process as 4 minutes is a long time to wait.
• The following are the advantages of a RIP protocol:
• It is easy to configure
• It has less complexity
• The CPU utilization is less.
OSPF
• The OSPF stands for Open Shortest Path First.
• It is a widely used and supported routing protocol. It is an intradomain protocol, which
means that it is used within an area or a network.
• It is an interior gateway protocol that has been designed within a single autonomous
system.
• It is based on a link-state routing algorithm in which each router contains the information
of every domain, and based on this information, it determines the shortest path.
• The goal of routing is to learn routes. The OSPF achieves by learning about every router
and subnet within the entire network. Every router contains the same information about
the network.
• The way the router learns this information by sending LSA (Link State Advertisements).
These LSAs contain information about every router, subnet, and other networking
information
• OSPF divides the autonomous systems into areas where the area is a collection of networks, hosts,
and routers. Like internet service providers divide the internet into a different autonomous system
for easy management and OSPF further divides the autonomous systems into Areas.
• Routers that exist inside the area flood the area with routing information
• In Area, the special router also exists. The special routers are those that are present at the border of
an area, and these special routers are known as Area Border Routers. This router summarizes the
information about an area and shares the information with other areas.
• How does OSPF work?
• There are three steps that can explain the working of OSPF:
• Step 1: The first step is to become OSPF neighbors. The two connecting
routers running OSPF on the same link creates a neighbor relationship.
• Step 2: The second step is to exchange database information. After
becoming the neighbors, the two routers exchange the LSDB
information with each other.
• Step 3: The third step is to choose the best route. Once the LSDB
information has been exchanged with each other, the router chooses the
best route to be added to a routing table based on the calculation of SPF.
• OSPF Message Format
• Version: It is an 8-bit field that specifies the OSPF protocol version.
• Type: It is an 8-bit field. It specifies the type of the OSPF packet.
• Message: It is a 16-bit field that defines the total length of the message, including the header.
Therefore, the total length is equal to the sum of the length of the message and header.
• Source IP address: It defines the address from which the packets are sent. It is a sending
routing IP address.
• Area identification: It defines the area within which the routing takes place.
• Checksum: It is used for error correction and error detection.
• Authentication type: There are two types of authentication, i.e., 0 and 1. Here, 0 means for
none that specifies no authentication is available and 1 means for pwd that specifies the
password-based authentication.
• Authentication: It is a 32-bit field that contains the actual value of the authentication data.
BGP
Border Gateway Protocol
• It is an interdomain routing protocol, and it uses the path-vector routing. It is a gateway
protocol that is used to exchange routing information among the autonomous system on
the internet.
There are many versions of BGP, such as:
• BGP version 1: This version was released in 1989 and is defined in RFC 1105.
• BGP version 2: It was defined in RFC 1163.
• BGP version 3: It was defined in RFC 1267.
• BGP version 4: It is the current version of BGP defined in RFC 1771.
• The BGP is the only protocol that is running on the internet backbone or used to
exchange the routes between two different autonomous number systems. Internet service
providers use the BGP protocol to control all the routing information.
BGP Features
• Open standard
It is a standard protocol which can run on any window device.
• Exterior Gateway Protocol
It is an exterior gateway protocol that is used to exchange the routing information between two
or more autonomous system numbers.
• InterAS-domain routing
It is specially designed for inter-domain routing, where interAS-domain routing means exchanging
the routing information between two or more autonomous number system.
• Supports internet
It is the only protocol that operates on the internet backbone.
• Classless
It is a classless protocol.
• Path vector protocol
The BGP is a path vector protocol. Here, path vector is a method of sending the routes
along with routing information.
• Configure neighborhood relationship
It sends updates to configure the neighborhood relationship manually. Suppose there are two routers
R1 and R2. Then, R1 has to send the configure command saying that you are my neighbor On the other
side, R2 also has to send the configure command to R1, saying that R1 is a neighbor of R1. If both the
configure commands match, then the neighborhood relationship will get developed between two routers.
• Application layer protocol
It is an application layer protocol and uses TCP protocol for reliability.
• Metric
It has lots of attributes like weight attribute, origin, etc. BGP supports a very rich number of attributes
that can affect the path manipulation process.
IPv6 Protocol
• IPv4 produces 4 billion addresses, and the developers think that these addresses are enough, but
they were wrong.
• 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.
• It provides transition strategies that convert IPv4 into IPv6, and these strategies are as follows:
Dual stacking: It allows us to have both the versions, i.e., IPv4 and IPv6, on the same device.
Tunneling: In this approach, all the users have IPv6 communicates with an IPv4 network to reach
IPv6.
Network Address Translation: The translation allows the communication between the hosts
having a different version of IP.
THE END

You might also like