Académique Documents
Professionnel Documents
Culture Documents
IP routing
Contents
1 The ARP protocol family 3
1.1 Address Resolution Protocol (ARP) 4
1.2 Gratuitous ARP 6
1.3 Reverse Address Resolution Protocol (RARP) 6
1.4 Proxy-ARP 8
2 IP Routing 11
2.1 Routing principles 12
2.2 Routing tables 14
3 Routing protocols 19
3.1 Static and dynamic routing 20
3.2 Static Routing 20
3.3 Dynamic Routing 22
3.4 Distance Vector Routing (DVR) 24
3.5 Routing Information Protocol (RIP) 28
3.6 RIPv2 32
3.7 Link-State Routing 34
3.8 Open Shortest Path First - OSPF 36
3.9 Route Calculation Process 38
3.10 Border Gateway Protocol Version 4 (BGPv4) 46
3.11 Routing Protocol Summary 49
3.12 Virtual Router Redundancy Protocol (VRRP) 50
4 Appendix 53
4.1 Requests for Comments 53
4.2 Glossary 56
TG70114EN02GLA2
2010 Nokia Siemens Networks
1
IP routing
TG70114EN02GLA2
2 2010 Nokia Siemens Networks
IP routing
TG70114EN02GLA2
2010 Nokia Siemens Networks
3
IP routing
Try it
With the command:
arp -a
You will get the ARP cache table, which contains the relation between MAC
addresses and IP addresses.
TG70114EN02GLA2
4 2010 Nokia Siemens Networks
IP routing
Host A
ARP Request - Broadcast to all hosts
S IE
ME
N IX
DO
S
N
F
R
What is the hardware address for IP address 128.0.10.4?
ARP Reply
S IE
MES
N
N IX
DOF
R
I IX
S
N M
D
EOS
N
F
R
E
Host B
IP Address: 128.0.10.4
HW Address: 080020021545
TG70114EN02GLA2
2010 Nokia Siemens Networks
5
IP routing
Gratuitous ARP
Causes other nodes to update an entry in their ARP cache.
Can help to detect IP conflicts. When a host receives an ARP request containing a
source IP that matches its own, then it knows there is an IP conflict.
TIP
Today RARP is seldom used. It has been replaced by other protocols like DHCP and
BOOTP.
TG70114EN02GLA2
6 2010 Nokia Siemens Networks
IP routing
Gratuitous ARP
1. Failure at NIC 0
2. move IP from NIC 0 to NIC 1
3. NIC 1 sends out Gratuitous ARP, containing IP address and his MAC address
4. All hosts will update their ARP-table (in this Broadcast Domain)
Host
NIC 0
activ MAC=A L2-Switch
IP
Gratuitous ARP
s tandby
MF
E
S
O
D
IX
N S
N
E
R
NIC 1
MAC=B L2-Switch
TG70114EN02GLA2
2010 Nokia Siemens Networks
7
IP routing
1.4 Proxy-ARP
This is not a protocol, but a process on a router. If an existing network is split up into
several subnets Proxy ARP is method to avoid a modification to the existing IP
routing algorithm in the existing hosts, but with modifications to the routers that
interconnect the subnets.
Proxy-ARP Concept
Consider one IP network that is divided into subnets and interconnected by routers.
We use the existing IP routing algorithm, which means that no host knows about the
existence of multiple physical networks.
Consider hosts A and B, which are on different physical networks within the same IP
network, and a router R between the two subnets:
When host A wants to send an IP datagram to host B, it first has to determine the
physical network address of host B through the use of the ARP protocol. As host A
cannot differentiate between the physical networks, its IP routing algorithm thinks that
host B is on the local physical network and sends out a broadcast ARP request. Host
B doesn't receive this broadcast, but router R does.
Router R understands subnets, that is, it runs the subnet version of the IP routing
algorithm and it will be able to see that the destination of the ARP request (from the
target protocol address field) is on another physical network. If router R's routing
tables specify that the next hop to that other network is through a different physical
device, it will reply to the ARP as if it were host B, saying that the network address of
host B is that of the router R itself.
Host A receives this ARP reply, puts it in its cache and will send future IP packets for
host B to the router R. The router will forward such packets to the correct subnet.
The result is transparent subnetting:
1. Normal hosts (such as A and B) don't know about subnetting, so they use the
old IP routing algorithm.
2. The routers between subnets have to:
3. Use the subnet IP routing algorithm.
4. Use a modified ARP module, which can reply on behalf of other hosts.
TG70114EN02GLA2
8 2010 Nokia Siemens Networks
IP routing
A B
host B would re pl y
Bro a dc
B roa asst:
d ca t: AR P re
A RP reqq uues
e stt
A Rout er B
no o ne wo uld re pl y
Bro a ddca
B roa cast:
st : A
ARRP
P req u es
re qu e stt
A
B
Router R
TG70114EN02GLA2
2010 Nokia Siemens Networks
9
IP routing
TG70114EN02GLA2
10 2010 Nokia Siemens Networks
IP routing
2 IP Routing
R oute r
Sw itch
Router R oute r
Router
R outer
S w itch
Which
Which way
to
to go ??
Fig. 8 IP Routing
TG70114EN02GLA2
2010 Nokia Siemens Networks
11
IP routing
TG70114EN02GLA2
12 2010 Nokia Siemens Networks
IP routing
Indirect routing
This host only needs to
know the destinations The destination host is identified
and the default gateways by its IP and its MAC address
IP addresses
Router
Router
Router
Fig. 9 Rrouting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TG70114EN02GLA2
2010 Nokia Siemens Networks
13
IP routing
The following commands can be used to read the contents of a routing table:
TG70114EN02GLA2
14 2010 Nokia Siemens Networks
IP routing
SA DA
IP Packets
IP Packet
SA DA SA DA
SA DA
192.16.3.0
192.16.3.0
192.16.3.1
Router A
Router B
192.16.4.0
192.16.4.0
192.16.1.0
192.16.1.0
192.16.2.0
192.16.2.0
Fig. 10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TG70114EN02GLA2
2010 Nokia Siemens Networks
15
IP routing
TG70114EN02GLA2
16 2010 Nokia Siemens Networks
IP routing
10.1.1.100
10.4.4.0/24
Router
24
Routing table .0/ 10
.1 .2 10.3.3.0/24
??? 0.1 .2
1 .0
/2
S1/3 4
S1/0 Router
Router AS1/2
19
/28
/28
S1/1
2 .1
192
/28
6
6
/2 8
1.1
2.1
68
32
.16
.2.
32
.
.
68
68
8.2
8.1
192.168.1.18
48
.
8.1
2 .1
2 .1
6
192.168.1.50
.
/28
2.1
48
19
19
6
2.1
/28
19
19
Fig. 11 Example
#showipiproute
#show route
10.0.0.0/24 isissubnetted,
10.0.0.0/24 subnetted,66subnets
subnets
10.2.2.0 [1] via 10.1.1.100, 00:00:03,Serial1/3
10.2.2.0 [1] via 10.1.1.100, 00:00:03, Serial1/3
10.3.3.0 [1] via 10.1.1.100, 00:00:03, Serial1/3
10.3.3.0 [1] via 10.1.1.100, 00:00:03, Serial1/3
10.4.4.0[1]
10.4.4.0 [1]via
via10.1.1.100,
10.1.1.100,00:00:03,
00:00:03,Serial1/3
Serial1/3
10.5.5.0 [1] via 10.1.1.100, 00:00:03, Serial1/3
10.5.5.0 [1] via 10.1.1.100, 00:00:03, Serial1/3
10.6.6.0 [1] via 10.1.1.100, 00:00:04, Serial1/3
10.6.6.0 [1] via 10.1.1.100, 00:00:04, Serial1/3
10.1.1.0 is directly connected, Serial1/3
10.1.1.0 is directly connected, Serial1/3
192.168.1.0/28isissubnetted,
192.168.1.0/28 subnetted,44subnets
subnets
192.168.1.64[1]
192.168.1.64 [1]via
via192.168.1.50,
192.168.1.50,00:00:03,
00:00:03,Serial1/2
Serial1/2
[1] via 192.168.1.18, 00:00:06, Serial1/0
[1] via 192.168.1.18, 00:00:06, Serial1/0
[1]via
[1] via192.168.1.34,
192.168.1.34,00:00:10,
00:00:10,Serial1/1
Serial1/1
192.168.1.32 is directly connected, Serial1/1
192.168.1.32 is directly connected, Serial1/1
192.168.1.48isisdirectly
192.168.1.48 directlyconnected,
connected,Serial1/2
Serial1/2
192.168.1.16 is directly connected, Serial1/0
192.168.1.16 is directly connected, Serial1/0
192.168.2.0/24 [2] via 10.1.1.100, 00:00:10, Serial1/3
192.168.2.0/24 [2] via 10.1.1.100, 00:00:10, Serial1/3
TG70114EN02GLA2
2010 Nokia Siemens Networks
17
IP routing
TG70114EN02GLA2
18 2010 Nokia Siemens Networks
IP routing
3 Routing protocols
A router has two or more interfaces. Each has an IP address with a different Net ID.
When a router starts up it knows only the IP address of its own interfaces and their
address masks. Once running, the router acquires a Route Table, either from
information stored in a local file as configuration information or via a routing protocol.
TG70114EN02GLA2
2010 Nokia Siemens Networks
19
IP routing
Dynamic Routing
Routing protocols are used for dynamic establishment and update of entries into a
routing table.
TIP
It is quite obvious that manually maintained routing tables can only be used for small
networks, and even then the burden that may result from reconfiguring a network is
considerable.
Configuration examples:
Command Operating System
route add 129.7.0.0 mask 255.255.0.0 128.15.1.2 Windows
metric 1
ip route 129.7.0.0 255.255.0.0 128.15.1.2 CISCO IOS
TG70114EN02GLA2
20 2010 Nokia Siemens Networks
IP routing
A B Net
128.15.0.0
Router D Router F
Net
Eth0:128.10.1.1 / 16 Eth1: 129.7.1.80 / 16 129.7.0.0
E C Net
128.10.0.0
G H
TG70114EN02GLA2
2010 Nokia Siemens Networks
21
IP routing
For each physical link between routers an individual metric is implicitly or explicitly
assigned. The lower the overall metric of a route, the better.
TG70114EN02GLA2
22 2010 Nokia Siemens Networks
IP routing
R o u ti ng P ro to c o l
R o u te r
S w it c h
R o u ter R o u te r
R o u ter
R ou t e r
S w it c h
W
Whha a tt i s
a nn op
o ptitim
m aall
ro
ro u te ?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TG70114EN02GLA2
2010 Nokia Siemens Networks
23
IP routing
Example 1:
Assume a network scenario as shown in the diagram below:
1. When the network is turned on, each router only knows the directly connected
networks
2. Routing updates are sent periodically (e.g. RIP every 30 seconds)
3. After the first update each router is also informed about networks which are
reachable via the next hop
4. After the second update each router is additionally informed about networks
which are reachable via 2 hops
5. After the third update router A and router D finally know about the distant
networks which are reachable via 3 hops
6. Therefore several cycles are required until the presence of all networks is known
throughout the entire network.
TG70114EN02GLA2
24 2010 Nokia Siemens Networks
IP routing
192.16.4.0
192.16.4.0
192.16.5.0
192.16.5.0
192.16.1.0
192.16.1.0 00 LL 192.16.2.0
192.16.2.0 00 LL 192.16.4.0
192.16.4.0 00 LL 192.16.6.0
192.16.6.0 00 LL
192.16.2.0
192.16.2.0 00 LL 192.16.3.0
192.16.3.0 00 LL 192.16.5.0
192.16.5.0 00 LL 192.16.7.0
192.16.7.0 00 LL
192.16.4.0
192.16.4.0 00 LL 192.16.6.0
192.16.6.0 00 LL
192.16.1.0
192.16.1.0 00 LL 192.16.2.0
192.16.2.0 00 LL 192.16.4.0
192.16.4.0 00 LL 192.16.6.0
192.16.6.0 00 LL
192.16.2.0
192.16.2.0 00 LL 192.16.3.0
192.16.3.0 00 LL 192.16.5.0
192.16.5.0 00 LL 192.16.7.0
192.16.7.0 00 LL
192.16.3.0
192.16.3.0 11 B
B 192.16.4.0
192.16.4.0 00 LL 192.16.6.0
192.16.6.0 00 LL 192.16.5.0
192.16.5.0 11 C
C
192.16.4.0
192.16.4.0 11 B
B 192.16.1.0
192.16.1.0 11 AA 192.16.3.0
192.16.3.0 11 BB 192.16.4.0
192.16.4.0 11 C
C
192.16.5.0
192.16.5.0 11 CC 192.16.2.0
192.16.2.0 11 BB
LL LLocally
ocally connected 192.16.6.0
192.16.6.0 11 CC 192.16.7.0
192.16.7.0 11 DD
co nnected
192.16.1.0
192.16.1.0 00 LL 192.16.2.0
192.16.2.0 00 LL 192.16.4.0
192.16. 4.0 00 LL 192.16.6.0
192.16.6.0 00 LL
192.16.2.0
192.16.2.0 00 LL 192.16.3.0
192.16.3.0 00 LL 192.16.5.0
192.16. 5.0 00 LL 192.16.7.0
192.16.7.0 00 LL
192.16.3.0
192.16.3.0 11 BB 192.16.4.0
192.16.4.0 00 LL 192.16.6.0
192.16. 6.0 00 LL 192.16.5.0
192.16.5.0 11 C
C
192.16.4.0
192.16.4.0 11 BB 192.16.1.0
192.16.1.0 11 AA 192.16.3.0
192.16. 3.0 11 B
B 192.16.4.0
192.16.4.0 11 C
C
192.16.5.0
192.16.5.0 22 BB 192.16.5.0
192.16.5.0 11 CC 192.16.2.0
192.16. 2.0 11 B
B 192.16.3.0
192.16.3.0 22 C
C
192.16.6.0
192.16.6.0 22 BB 192.16.6.0
192.16.6.0 11 CC 192.16.7.0
192.16. 7.0 11 D
D 192.16.2.0
192.16.2.0 22 C
C
192.16.7.0
192.16.7.0 22 CC 192.16.1.0
192.16. 1.0 22 B
B
192.16.1.0
192.16.1.0 00 LL 192.16.2.0
192.16.2.0 00 LL 192.16.4.0
192.16. 4.0 00 LL 192.16.6.0
192.16.6.0 00 LL
192.16.2.0
192.16.2.0 00 LL 192.16.3.0
192.16.3.0 00 LL 192.16.5.0
192.16. 5.0 00 LL 192.16.7.0
192.16.7.0 00 LL
192.16.3.0
192.16.3.0 11 BB 192.16.4.0
192.16.4.0 00 LL 192.16.6.0
192.16. 6.0 00 LL 192.16.5.0
192.16.5.0 11 C
C
192.16.4.0
192.16.4.0 11 BB 192.16.1.0
192.16.1.0 11 AA 192.16.3.0
192.16. 3.0 11 B
B 192.16.4.0
192.16.4.0 11 C
C
192.16.5.0
192.16.5.0 22 BB 192.16.5.0
192.16.5.0 11 CC 192.16.2.0
192.16. 2.0 11 B
B 192.16.3.0
192.16.3.0 22 C
C
192.16.6.0
192.16.6.0 22 BB 192.16.6.0
192.16.6.0 11 CC 192.16.7.0
192.16. 7.0 11 D
D 192.16.2.0
192.16.2.0 22 C
C
192.16.7.0
192.16.7.0 33 BB 192.16.7.0
192.16.7.0 22 CC 192.16.1.0
192.16. 1.0 22 B
B 192.16.1.0
192.16.1.0 33 C
C
TG70114EN02GLA2
2010 Nokia Siemens Networks
25
IP routing
TG70114EN02GLA2
26 2010 Nokia Siemens Networks
IP routing
Route to .. Metric
Net 2 1
Net 3 2
Triggered Updates
Net 1
F
A E D
B C
TG70114EN02GLA2
2010 Nokia Siemens Networks
27
IP routing
Slow convergence
The fact that the receiving router does not know which stations is part of the route to
a certain destination can lead to so-called routing loops and very slow convergence
in the event of faults. This manifests itself in the fact that a fault within a route only
becomes known with considerable delay in the network.
RIP is a distance vector protocol, which means that the count to infinity problem may
occur. As already discussed in the section dealing with slow convergence, affected
routers increment the metric entries in their routing tables until a certain threshold
value is reached. This value is 16. Since updates are only sent every 30 seconds, up
to 15*30 seconds may pass until the affected routers realize that a certain physical
connection is no longer available.
The infinity threshold value does however also determine the maximum extent of a
network. For networks with connections of more than 15 hops, RIP is not suitable.
TIP
When using RIP-1, subnet masks have to be uniform across the entire network-
prefix. RIP-1 allows only a single subnet mask to be used within each network
number because it does not provide subnet mask information as part of its routing
table update messages.
TG70114EN02GLA2
28 2010 Nokia Siemens Networks
IP routing
Fig. 20 RIPv1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TG70114EN02GLA2
2010 Nokia Siemens Networks
29
IP routing
How does a RIP-1 based router know what mask to apply to a route when it
learns a new route from a neighbor?
If the router has a subnet of the same network number assigned to a local interface, it
assumes that the learned subnet was defined using the same mask as the locally
configured interface. However, if the router does not have a subnet of the learned
network number assigned to a local interface, the router has to assume that the
network is not subnetted and applies the route's natural classful mask.
Example, assuming that Port 1 of a router has been assigned the IP address
130.24.13.1/24 and that Port 2 has been assigned the IP address 200.14.13.2/24. If
the router learns about network 130.24.36.0 from a neighbor, it applies a /24 mask
since Port 1 is configured with another subnet of the 130.24.0.0 network. However,
when the router learns about network 131.25.0.0 from a neighbor, it assumes a
"natural" /16 mask since it has no other masking information available.
How does a RIP-1 based router know if it should include the subnet-number
bits in a routing table update to a RIP-1 neighbor?
A router executing RIP-1 will only advertise the subnet-number bits on another port if
the update port is configured with a subnet of the same network number. If the
update port is configured with a different subnet or network number, the router will
only advertise the network portion of the subnet route and "zero-out" the subnet-
number field.
For example, assume that Port 1 of a router has been assigned the IP address
130.24.13.1/24 and that Port 2 has been assigned the IP address 200.14.13.2/24.
Also, assume that the router has learned about network 130.24.36.0 from a neighbor.
Since Port 1 is configured with another subnet of the 130.24.0.0 network, the router
assumes that network 130.24.36.0 has a /24 subnet mask. When it comes to
advertise this route, it advertises 130.24.36.0 on Port 1, but it only advertises
130.24.0.0 on Port 2.
TG70114EN02GLA2
30 2010 Nokia Siemens Networks
IP routing
Port
Port 11
130.24.13. 1/ 24
130. 24.13.1/24
130.24.13.
130.24.13.0/
0/24
24
130.24.25.0/24
130. 24.25.0/24
Port
Port 22
130.24.36.0/24
130.24.36. 0/ 24 200.14.13.2/24
200.14.13. 2/ 24
200.14. 13.0/24
200.14.13.0/24
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TG70114EN02GLA2
2010 Nokia Siemens Networks
31
IP routing
3.6 RIPv2
RIP Version 2 was defined to overcome some of the limitations of RIP Version 1
without impacting on the advantages of RIP, i.e. its simplicity and easy
administration. RIP Version 2 has the following new features:
1. Transmission subnet masks
2. Authentication
3. Route Tag
4. Use of multicast addresses.
Subnet masks
RIPv2 allows the transmission of subnet masks and thus supports improved network
structuring.
Authentication
Authentication offers protection from unauthorized routing advertising that could
impair the security of a network. The original specification only envisages the use of a
plain text password, but for future specifications, other more complex mechanisms
could be considered.
Route Tag
It is a field, which is intended for communicating additional information about the
origin of the route information. It is intended for interoperation between RIP and other
routing protocols. RIP-2 implementations must preserve this tag, but RIP-2 does not
further specify how it is to be used.
Multicast addresses
RIP Version 1 uses broadcast messages to forward routing information. RIP Version
2 can optionally use multicast messages to update tables so those devices that do
not implement RIP are also not subject to a load.
RIP is encapsulated in UDP using port number 520.
TG70114EN02GLA2
32 2010 Nokia Siemens Networks
IP routing
RIPv2
Extension of RIPv1
Uses Multicast messages instead of broadcast as in RIP
IP multicast address is 224.0.0.9
Allows co-existence of RIP and RIPv2.
Addresses RIP shortcomings
Simple Authentication Mechanism
Support for subnetting
? Transmission of subnet mask (classless)
Route tag is used to flag external routes
Defined in RFC 2453, 4822
RIPng for IPv6, RFC 2080
Fig. 22 RIPv2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TG70114EN02GLA2
2010 Nokia Siemens Networks
33
IP routing
TG70114EN02GLA2
34 2010 Nokia Siemens Networks
IP routing
Rou ter
Ro uter R outer
Rou ter
Routing
SPF
Table
Algo rith m
To po log y
Database
TG70114EN02GLA2
2010 Nokia Siemens Networks
35
IP routing
TG70114EN02GLA2
36 2010 Nokia Siemens Networks
IP routing
Supports VLSM
Router Router
Router Router
SPF
Router Routing
Tabelle Router
Router
TG70114EN02GLA2
2010 Nokia Siemens Networks
37
IP routing
TG70114EN02GLA2
38 2010 Nokia Siemens Networks
IP routing
1 1 1 1
A B A B A B A B
2 2 2 2
C C C C
3 3 3 3
D D D D
(4) Each router calculates the Shortest Path Tree
by taking itself as the root node
LSA Link State Advertisement
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TG70114EN02GLA2
2010 Nokia Siemens Networks
39
IP routing
Hierarchies in OSPF
In addition to the weaknesses already mentioned, a further drawback of RIP is that it
does not permit simple network structuring. This situation can be improved
considerably with the OSPF protocol, which we will discuss now.
OSPF properties
OSPF is based on a link state algorithm. All routers of a particular area inform each
other about which connected routers or networks they can access. In OSPF these
messages are referred to as LSAs (link state advertisements). Link state
advertisements contain information on known network addresses as well as the
subnet mask used in conjunction with the relevant address. OSPF supports
subnets and subnet masks of different lengths. Various metrics can be used to
evaluate the connections. OSPF is encapsulated in raw IP.
OSPF supports three types of connections and networks:
1. Point-to-point connections between two routers,
2. Multiconnected networks that allow broadcasts (usually LANs),
3. Multiconnected networks that do not allow broadcasts (e.g. packet-switched
WANs).
Link status-oriented protocols take into consideration the status of the connections
and report the failure of a connection in the area. The convergence of OSPF is
therefore much quicker than that of RIP.
TG70114EN02GLA2
40 2010 Nokia Siemens Networks
IP routing
Autonomous System
AS
AB R
TG70114EN02GLA2
2010 Nokia Siemens Networks
41
IP routing
Routing levels
There are also conceptual differences within the scope of the so-called routing levels.
OSPF knows three routing levels:
1. Routes within one area (intra-area). If two stations within one area want to
communicate with each other they can use internal routers.
2. Routes between areas (inter-area). If two stations within different areas want to
communicate with each other they choose a route that leads via an area border
router (which is also the backbone router) via the backbone area to the
destination area and its border area router.
3. Autonomous system external routes. If a station within one area wants to
communicate with the station of another autonomous system it selects a route via
an area border router to an AS boundary router that knows the route to the
destination autonomous target system.
TG70114EN02GLA2
42 2010 Nokia Siemens Networks
IP routing
AS Boundary
Router
Autonomous
Autonomous System
AS
AS
AS
External
External Route
Route
Backbone
Backbone Area
Area = Router
Area 0
Area 0
Backbone
Backbone Router Router
Router
Router
Inter
Inter Area
Area
Area Route
Route
Area Border
Border
Router
Router Router Router
Internal
Internal Router
Router
Router Router Router
Router Area 22
Area 11
Intra
Intra Area
Area
Route
Route
Fig. 31 OSPF
TG70114EN02GLA2
2010 Nokia Siemens Networks
43
IP routing
Item Meaning
Autonomous System An Autonomous System (AS) is a group of IP networks
operated by one or more network operator/s, which has a
single and clearly defined external routing policy. Exterior
routing protocols are used to exchange routing information
between ASes. An AS needs to be created if a network
connects to more than one AS with different routing policies.
Autonomous System A public AS has a globally unique number, an Autonomous
Number System number (ASN), associated with it; this number is used
in both the exchange of exterior routing information (between
neighboring ASes), and as an identifier of the AS itself. There
are two types of Autonomous System numbers; Public AS
numbers and Private AS numbers.
Public Autonomous A Public AS number is required only when an AS is
System Number exchanging routing information with other ASes on the public
Internet. That is, all routes originating from an AS is visible on
the Internet.
Private Autonomous A Private AS number should be used if an AS requires doing
System Number BGP with a single provider. As the routing policy between the
AS and the provider will not be visible in the Internet, a
Private AS Number can be used for this purpose. The AS
numbers 64512 through to 65535 are reserved to be used as
private ASes.
TG70114EN02GLA2
44 2010 Nokia Siemens Networks
IP routing
EGP
Exterior Gateway
Protocols are used
for routing between
Autonomous Systems
AS 1000 AS 3000
IGP
Interior Gateway Protocols are
used for routing decisions
AS 2000 within an Autonomous System.
AS 1000
AS 3000
EGP
EGP IGP
EGP
AS 2000
TG70114EN02GLA2
2010 Nokia Siemens Networks
45
IP routing
TG70114EN02GLA2
46 2010 Nokia Siemens Networks
IP routing
AS:50
AS:10 Router Router Router No
No policy
policy based
based
routing
routing used
used here
here
Static
Static route
route
used
used here
here
Router Router Router Router
Default
Default route
route
used
used here
here AS: 40
AS: 20 AS: 30
Router Router
Router
Router Router Router Router
Router
Router
Router Router
Stub network Stub network
Multi-connected
network
The
The AS
AS numbers
numbers (1-65535
(1-65535 ) are
are used
used to
to Between
Between networks,
networks,
detect
detect routing
routing loops.
loops. The
The AS
AS number
numbers s policy
policy based
based routing
routing
64512
64512 to
to 65535
65535 are
are reserved
reserved for
for private
private ASes
ASes can
can be
be used
used
AS 17 Adj_RIB_In Adj_RIB_Out AS 17
Routing Policies
Routing Policies
Routing
Output
Input
Adj = Adjacent
RIB = Routing Information Base
Fig. 35 BGPv4
TG70114EN02GLA2
2010 Nokia Siemens Networks
47
IP routing
TG70114EN02GLA2
48 2010 Nokia Siemens Networks
IP routing
class- class-
IGP EGP LSR DVR
ful less
RIP v 1
RIP v 2
OSPF
BGP4
TG70114EN02GLA2
2010 Nokia Siemens Networks
49
IP routing
SUMMARY
To avoid single points of failure in networks, multiple routers can be configured using
VRRP to act as a single virtual router. This has two major benefits: load balancing
and redundancy. If one of the routers fails, VRRP acts to re-assign the IP address of
the defunct router to the remaining operational routers. That is, each router acts as a
backup router to the others within its virtual router group.
TIP
For more detail on the VRRP, see RFC-3768 (Obsoletes: RFC 2338)
VRRP provides a function similar to the proprietary protocols "Hot Standby Router
Protocol (HSRP)" and "IP Standby Protocol" (IPSTB).
TG70114EN02GLA2
50 2010 Nokia Siemens Networks
IP routing
MR VR ID =1
Router 1
a ctive
Vir tu al VRRP
IP ad dress
sta nd by
Router 2
BR VRID=1
Fig. 37 VRRP
MR VRID=1
Vir tu al BR VRID=2
IP ad dres s
VRID = 1
Router 1
VR RP
Router 2
Vir tu al
IP ad dres s
BR VR ID =1
VRID = 2 MR VR ID =2
Fig. 38 VRRP
TG70114EN02GLA2
2010 Nokia Siemens Networks
51
IP routing
TG70114EN02GLA2
52 2010 Nokia Siemens Networks
IP routing
4 Appendix
4.1 Requests for Comments
TG70114EN02GLA2
2010 Nokia Siemens Networks
53
IP routing
TG70114EN02GLA2
54 2010 Nokia Siemens Networks
IP routing
TG70114EN02GLA2
2010 Nokia Siemens Networks
55
IP routing
4.2 Glossary
TG70114EN02GLA2
56 2010 Nokia Siemens Networks