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

Lecture - Network Layer Protocols

ARP is used to map IP addresses to physical addresses. Routers use routing protocols to learn network topology and select the best path. Static routes are manually configured while dynamic routes are adjusted automatically. Popular routing protocols include RIP, OSPF, EIGRP. RIP uses hop count as its metric and periodically shares full routing tables, while OSPF is a link-state protocol that shares only topology changes.

Uploaded by

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

Lecture - Network Layer Protocols

ARP is used to map IP addresses to physical addresses. Routers use routing protocols to learn network topology and select the best path. Static routes are manually configured while dynamic routes are adjusted automatically. Popular routing protocols include RIP, OSPF, EIGRP. RIP uses hop count as its metric and periodically shares full routing tables, while OSPF is a link-state protocol that shares only topology changes.

Uploaded by

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

Data Communication & Computer

Networks
Network Layer Protocols
Routing Protocols
ARP
• Address Resolution Protocol (ARP) is a
protocol used to map IP address to
physical machine address
• ARP (RFC 826) provides dynamic IP to
Ethernet address mapping
o source broadcasts ARP request
o destination replies with ARP
response
ARP Operation
Encapsulation of ARP Packet

SFD: Starting Frame


Delimiter
ARP Operation
What Is Routing?
To route, a router needs to do the following:
◦ Know the destination address
◦ Identify the sources it can learn from
◦ Discover possible routes
◦ Maintain and verify routing information
◦ Select the best route
What Is Routing? (Cont.)

• Routers must learn destinations that are


not directly connected.
Identifying Static and Dynamic Routes

Dynamic Route
Static Route
• Uses a route that a
• Uses a route that a
network routing
network
protocol adjusts
administrator enters
automatically for
into the router
manually
topology or traffic
changes
Static Route Example

• This is a unidirectional route. You must have a route


configured in the opposite direction.
Routing protocols
 routers receive and forward packets
 make decisions based on knowledge of

topology and traffic/delay conditions


 use dynamic routing algorithm
 distinguish between:

◦ routing information - about topology & delays


◦ routing algorithm - that makes routing decisions
based on information

Dr. Manzoor Hashmani 10


Metric
 A metric is a cost assigned for passing
through a network
 Router chooses the route with smallest

metric
 Metric assignment depends on the routing

protocol
◦ RIP: cost of all networks is same (1 hop)
◦ OSPF: Admin can assign costs

Dr. Manzoor Hashmani 11


Autonomous Systems: Interior or
Exterior Routing Protocols

• An autonomous system is a collection of networks


under a common administrative domain.
• IGPs operate within an autonomous system.
• EGPs connect different autonomous systems.
Popular routing protocols
 Interior routing = Intra-domain routing
 Exterior routing = Inter-domain routing

Dr. Manzoor Hashmani 13


Distance vector routing
 Each router periodically shares it knowledge
with its neighbours
◦ Shares knowledge about entire AS
◦ Shares only with neighbours
◦ Shares at regular intervals

Dr. Manzoor Hashmani 14


Distance vector routing
 Examples of Distance Vector routing
protocols:
◦ Routing Information Protocol (RIP)
◦ Interior Gateway Routing Protocol (IGRP)
◦ Enhanced Interior Gateway Routing Protocol (EIGRP)

Dr. Manzoor Hashmani 15


Distance vector routing
 Distance Vector Technology - the Meaning of
Distance Vector
◦ A router using distance vector routing protocols
knows 2 things:
 Distance to final destination
 Vector, or direction, traffic should be directed

Dr. Manzoor Hashmani 16


RIP
 Routing Information Protocol

 Interior routing protocol

 Uses distance vector routing


◦ Uses Bellman-Ford algorithm for calculating the
routing table

Dr. Manzoor Hashmani 17


RIP updating algorithm
Receive: a response RIP message
1. Add one hop to the hop count for each advertised
destination.
2. Repeat the following steps for each advertised destination:
1. If (destination not in the routing table)
Add the advertised information to the table.
2. Else
1. If (next-hop field is the same)
Replace entry in the table with the advertised one.
2. Else
1. If (advertised hop count smaller than one in the table)
Replace entry in the routing table.
3. Return.

Dr. Manzoor Hashmani 18


When to share routing tables?
 Periodic update
◦ A node sends its routing table, normally every 30s.
(depends on protocol)
 Triggered update
◦ A node sends its routing table to its neighbors
anytime there is a change in its routing table.

Dr. Manzoor Hashmani 19


Routing Information Protocol

Link 1

 Routing table before configuring DV protocol


R1 R2 R3
Net ID Cost NH Net ID Cost NH Net ID Cost NH
10.1.1.0/24 1 DC 10.1.2.0/24 1 DC 10.3.0.0/24 1 DC
10.1.2.0/24 1 DC 10.1.3.0/24 1 DC 10.1.4.0/24 1 DC

Routing table after configuring RIP


R1 R2 R3
Net ID Cost NH Net ID Cost NH Net ID Cost NH
10.1.1.0/24 1 DC 10.1.2.0/24 1 DC 10.3.0.0/24 1 DC
10.1.2.0/24 1 DC 10.1.3.0/24 1 DC 10.1.4.0/24 1 DC
10.1.3.0 2 10.1.2.1 10.1.1.0/24 2 10.1.2.1 10.1.2.0/24 2 10.1.3.1
10.1.4.0 3 10.1.2.1 10.1.4.0/24 2 10.1.3.1 10.1.1.0/24 3 10.1.3.1
Routing Loop

 Count to infinity
2. Link fails

Net 1
1. [Net 1, 1]
3. [Net 1, 2]
4. [Net 1, 3]
5. [Net 1, 4]

[Net 1, 16]

Distance -Vector Routing


CN8813 - IP Protocols Protocols 21
Solutions
1. Defining Infinity

2. Split Horizon

3. Split Horizon and Poison Reverse

Dr. Manzoor Hashmani 22


Defining Infinity
 Redefine infinity to a smaller number
◦ system will become stable in fewer updates
◦ Most distance-vector protocols define the distance
between each node to be 1 and define 16 as
infinity.
 Smaller infinity value limits the size of the
network as well

Dr. Manzoor Hashmani 23


Split Horizon
If a router acquires a route over
an interface, the router will not
advertise the route back to that
interface
Split Horizon with Poison Reverse
 E.g. If Net1 goes down
 R1 initiates route poisoning by advertising Net1
to be unreachable
 R2 receives route poisoning from router Net1,
it sends an update, called a poison reverse,
back to router R1
 Both Poison reverse with split horizon create a
much more resilient and dependable distance-
vector network

Dr. Manzoor Hashmani 25


Routing Protocols Today
 Factors used to determine whether to use
RIP or EIGRP include
– Network size
– Compatibility between models of routers
– Administrative knowledge
Difference between RIPv1 and RIPv2
• RIPv1
– A classful distance vector routing protocol
– Does not support dis-contiguous subnets
– Does not support VLSM

• RIPv2
– A classless distance vector routing protocol that is an
enhancement of RIPv1’s features
– Support dis-contiguous networks
– Support VLSM
Similarities
– Use of split horizon or split horizon with poison
reverse
– Use of triggered updates
– Maximum hop count of 15
Configuring RIPv2
 Router(config)#router rip
 Router(config-router)#version 2
 Router(config-router)#network IP address
Dis-contiguous Network

 If from one subnet to another subnet of the same


classful network, you have to pass through a
different classful network then the network is
called dis-contiguous network
Link-State Routing
 Link state routing protocols
– Also known as shortest path first algorithms
– These protocols built around Dijkstra’s SPF
Link-State Routing
 Dikjstra’s algorithm also known as the
shortest path first (SPF) algorithm
Link-State Routing
 The shortest path to a destination is not
necessarily the path with the least number of
hops

 OSPF Cost =
Reference Bandwidth/Interface Bandwidth

Reference Bandwidth = 100MB


RIP vs OSPF

RIP OSPF
Distance Vector Protocol Link State Protocol
Metric Used is Hop Count Metric used is Bandwidth
and delay
Bandwidth intensive as it It only sends the change
sends the whole routing in network topology
table
Max 15 Hop Count. 16 is Unlimited number of
considered as routers
unreachable
Good for small networks Good for large networks

You might also like