Beruflich Dokumente
Kultur Dokumente
Computer Networks
Routing Protocols
SLIP
A .13.65 .13.66 B C D
.13.35 .13.33 .13.34
Ethernet 140.252.13
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Routing Protocols 7.3
Routing table structure (on
a host)
• Flags
– U: route is up
– G: route is to a gateway. If flag is
not set, the destination is directly
connected
– H: route is to a host (complete host
address). If flag is not set, route is
to a network
• G flag differentiates between an
indirect route and a direct route
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Routing Protocols 7.4
IP Forwarding table at a
router (with subnetting)
Subnet Subnet Next hop
number mask
128.96.34 255.255.2 Intf 0
.0 55.128
128.96.34 255.255.2 Intf 1
.128 55.128
128.96.33 255.255.2 R2
.0 55.0
datagram directly to B
inside link-layer frame
– B and A areFromdirectly
Jim Kurose’s slides
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Routing Protocols 7.10
connected
Getting a datagram from
source to forwarding
dest. table
misc Dest. Net. next router Nhops
fields 223.1.1.1 223.1.2.2
data in A
223.1.1 1
223.1.2 223.1.1.4 2
Starting at A, dest. E: 223.1.3 223.1.1.4 2
• look up network
address of E in A 223.1.1.1
forwarding table 223.1.2.1
223.1.1.2
• E on different network 223.1.1.4 223.1.2.9
– A, E not directly B
223.1.2.2
attached 223.1.1.3 223.1.3.27 E
router to E is 223.1.1.4
• link layer sends
datagram to router From Jim Kurose’s slides
Prof .223.1.1.4
Aniruddha sahoo, inside
KReSIT, IIT link-
Bombay Routing Protocols 7.11
layer frame
Getting a datagram from
misc
source to dest.
data Dest. Net router Nhops interface
fields 223.1.1.1 223.1.2.2
223.1.1 - 1 223.1.1.4
223.1.2 - 1 223.1.2.9
Arriving at 223.1.4, 223.1.3 - 1 223.1.3.27
destined for
223.1.2.2 A 223.1.1.1
–
Design Choices
• Centralized versus Distributed routing
– Centralized: one node collects information
and then installs the routing information in
all nodes
– Distributed: all nodes co operate to form
the rooting table
• Source based versus hop by hop
– Source routing: data packet contains the
hop list
• Dynamic Source Routing ( DSR in ad hoc
networks)
– Hop by hop: Each hop takes decision based
on its routing table about the next hop
( Distance vector routing
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Routing Protocols 7.15
z
w x y
A D B
C
Destination Network Next Router Num. of hops to dest.
w A 2
y B 2
z B 7
x -- 1
…. …. ....
Routing table in D
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Routing Protocols 7.31
RIP: Link Failure and
Recovery
If no advertisement heard after 180 sec -->
neighbor/link declared dead
– routes via neighbor invalidated
– new advertisements sent to
neighbors
– neighbors in turn send out new
advertisements (if tables changed)
– link failure info propagates to entire
net
– poison reverse used
Prof . Aniruddha sahoo, KReSIT, IIT Bombay
to prevent ping-7.32
Routing Protocols
pong loops (infinite distance = 16
RIP Table processing - 1
• RIP routing tables managed by
application-level process called routed
(daemon)
• advertisements sent in UDP packets (port
no 520) , periodically repeated