Академический Документы
Профессиональный Документы
Культура Документы
RIP
1
Routing and Forwarding
2
Control plane: run
routing protocols:
(RIP, OSPF, BGP)
3
Routing
5
Routing functions include:
– route calculation
– maintenance of the routing table
– execution of routing protocols
• On commercial routers handled by a single general
purpose processor, called route processor
6
Routing
7
IP Routing
ro u tin g ro u te n e ts ta t
U D P TC P
daem on com m an d com m an d
YES
IC M P For m e ?
NO:
ct
eR dire e nabled P ro c e s s IP
ICMP arding
fi forw Source O p tio n s
ro u tin g IP O u tp u t: C a lc u la te Routing
ta b le N e x t H o p R o u te r
IP In p u t
Q ueue
N e tw o rk In te r fa c e s
IP L a y e r 8
Autonomous Systems
9
Autonomous Systems (AS)
E th e r n e t E th e r n e t A u to n o m o u s
S y s te m 1
R o u te r E th e rn e t R o u te r
R o u te r
R o u te r E th e rn e t
A u to n o m o u s
E th e rn e t
R o u te r S y s te m 2 R o Eu tt eh re r n e t
10
Interdomain and Intradomain Routing
11
Components of a Routing Algorithm
12
Approaches to Shortest Path Routing
13
Routing Algorithms in the Internet
14
Dynamic IP Routing Protocols
15
A network as a graph
16
Distance Vector Algorithm: Routing Table
17
Distance Vector Algorithm: Messages
R o u tin g T a b le o f n o d e v
D est v ia cost
(n e x t h o p )
N et n D (v ,N e t)
[Net , D(v,Net)]
vv nn
R o u tin g T a b le o f n o d e v
D est v ia cost
(n e x t h o p )
N e t1 m D ( v ,N e t1 )
Periodically, each node v
N e t2 n D ( v ,N e t2 ) sends the content of its routing
table to its neighbors:
N e tN w D (v ,N e tN )
[ N e t1 ,D ( v ,N e t1 ) ] [N e t1 ,D (v ,N e t1 )]
[N e tN ,D (v ,N e tN )] [ N e tN ,D (v ,N e tN ) ]
m v w
[N e t1 ,D (v ,N e t1 )]
[N e tN ,D (v ,N e tN )]
n
19
Initiating Routing Table I
20
Initiating Routing Table II
R o u tin g T a b le
D est v ia cost
(n e x t h o p )
N e t( v ,m ) m 0
N e t(v ,w ) w 0
N e t(v ,n ) n 0
• New node v sends the routing table entry to all its neighbors:
[n ,0 ]
[Net(v,n),0] [n ,0 ]
[Net(v,n),0]
[ w , 0 ),0]
[Net(v,w ] [m ,0 ]
[Net(v,m),0]
m
m v
v w
w
[ m[Net(v,m
,0 ] ),0]
[ w[Net(v,w
,0 ] ),0]
n
n
21
Initiating Routing Table III
[N e t1 ,D (m ,N e t1 )] [N e t1,D (w ,N e t1)]
[N e tN ,D (m ,N e tN )] [N e tN ,D (w ,N e tN )]
m v w
[N e t1 ,D (n ,N e t1 )]
[N e tN ,D (n ,N e tN )]
n
22
Updating Routing Tables I
N et m v w
c ( v ,m )
N e t( v ,m )
N et m v w
N et m D new
( v ,N e t)
c (v ,m )
N e t( v ,m ) [N e t,D new
(v ,N e t)]
n
24
Assume: - link cost is 1, i.e., c(v,w) = 1
- all updates, updates occur simultaneously
Example - Initially, each router only knows the cost of
connected interfaces
.2 .1 .2 .1 .2 .1 .2 .1
Router A Router B Router C Router D
cost
cost
cost
cost
Net via Net via Net via Net via
.2 .1 .2 .1 .2 .1 .2 .1
Router A Router B Router C Router D
cost
cost
cost
cost
Net via Net via Net via Net via
t=3: t=3:
t=3: t=3:
10.0.1.0 - 0 10.0.1.0 10.0.2.1 1
10.0.1.0 10.0.3.1 2 10.0.1.0 10.0.4.1 3
10.0.2.0 - 0 10.0.2.0 - 0
10.0.2.0 10.0.3.1 1 10.0.2.0 10.0.4.1 2
10.0.3.0 10.0.2.2 1 10.0.3.0 - 0
10.0.3.0 - 0 10.0.3.0 10.0.4.1 1
10.0.4.0 10.0.2.2 2 10.0.4.0 10.0.3.2 1 10.0.4.0 - 0
10.0.5.0 10.0.2.2 3 10.0.5.0 10.0.3.2 2 10.0.4.0 - 0
10.0.5.0 10.0.4.2 1 10.0.5.0 - 0
27
The Count-to-Infinity Problem
AA 1 BB 1 CC
A 's R o u t in g T a b le B 's R o u t in g T a b le
to v ia cost to v ia cost
(n e x t h o p ) (n e x t h o p )
C B 2 C C 1
n o w lin k B - C g o e s d o w n
C B 2 C - oo
C 2 C oo
C - oo C A 3
C oo C 3
C B 4 C - oo
C 4 C oo
28
Count-to-Infinity
29
Count-to-Infinity
30
Count-to-Infinity
31
RIP - Routing Information Protocol
32
RIP - History
IP h e a d e r U D P h e a d e r R IP M e s s a g e 1: RIPv1
1: request
2: response
C o m m a n d V e rs io n S e t to 0 0 ...0
2: for IP
a d d r e s s fa m ily S e t to 0 0 .0 0
0…0: request full rou-
ting table 3 2 -b it a d d r e s s
U n u s e d (S e t to 0 0 ...0 )
(20 bytes)
one route entry
Address of destination
U n u s e d (S e t to 0 0 ...0 )
U p to 2 4 m o re ro u te s (e a c h 2 0 b y te s )
One RIP message can
have up to 25 route entries
3 2 b its 34
RIPv2
35
RIPv2 Packet Format
IP h e a d e r U D P h e a d e r R IP M e s s a g e 2: RIPv2
1: request
2: response
C o m m a n d V e rs io n S e t to 0 0 ...0
2: for IP
a d d r e s s fa m ily S e t to 0 0 .0 0
0…0: request full rou-
ting table 3 2 -b it a d d r e s s
U n u s e d (S e t to 0 0 ...0 )
(20 bytes)
one route entry
Address of destination
U n u s e d (S e t to 0 0 ...0 )
U p to 2 4 m o re ro u te s (e a c h 2 0 b y te s )
One RIP message can
have up to 25 route entries
3 2 b its 36
RIPv2 Packet Format
IP h e a d e r U D P h e a d e r R IP v 2 M e s s a g e 2: RIPv2
(20 bytes)
one route entry
N e x t-H o p IP a d d r e s s
Identifies a better next-hop
m e tric (1 -1 6 )
address on the same
subnet than the advertising
U p to 2 4 m o re ro u te s (e a c h 2 0 b y te s )
router, if one exists
(otherwise 0….0)
3 2 b its 37
RIP Messages
38
Routing with RIP
39
RIP Security
P a s s w o rd (B y te s 0 - 3 )
P a s s w o rd (B y te s 4 - 7 )
Authetication
P a s s w o rd (B y te s 8 - 1 1 )
P a s s w o rd (B y te s 1 2 - 1 5 )
U p to 2 4 m o re ro u te s (e a c h 2 0 b y te s )
3 2 b its
40
RIP Problems
41