Vous êtes sur la page 1sur 56

IP routing

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

1 The ARP protocol family

Fig. 1 ARP protocol family

TG70114EN02GLA2
2010 Nokia Siemens Networks
3
IP routing

1.1 Address Resolution Protocol (ARP)


Each TCP/IP-based host computer on a local area network (LAN) has two
addresses:
1. A unique data link address that is built into the network interface (e.g. Ethernet
controllers are manufactured with a built-in 48-bit address.).
2. An IP address assigned by the network administrator to the particular host
computer.
The ARP protocol uses a lookup table (ARP cache) to determine the exact data link
layer address corresponding to the IP address in a packet being routed into the LAN.
When the address is not found in the ARP cache, an ARP request message is
broadcast on a particular subnet. If one of the hosts recognizes its own IP address, it
sends an ARP reply message to the requesting host. The ARP reply contains the
physical hardware address of the host and source route information (if the packet has
crossed bridges on its path). The requesting host will store the destination hosts
address and the source route information in the ARP cache. All subsequent
datagram's to this destination IP address can now be translated to a physical
address.

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

Fig. 2 ARP process

Fig. 3 ARP command

TG70114EN02GLA2
2010 Nokia Siemens Networks
5
IP routing

1.2 Gratuitous ARP


Gratuitous in this case means a request/reply that is not normally needed according
to the ARP specification (RFC 826). A gratuitous ARP request is an ARP request
packet where the source and destination IP address are both set to the switching IP
address. If the ARP request is addressed to the broadcast hardware address, then all
hosts on the LAN will receive the ARP request and refresh their ARP cache.
Some routers and switches are configured to ignore the gratuitous ARP as it can be
used to maliciously take over the IP address of a machine. Therefore the gratuitous
ARP support has to be checked.

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.

1.3 Reverse Address Resolution Protocol (RARP)


Some network hosts, such as diskless workstations, do not know their own IP
address when they are booted. To determine their own IP address, they use a
mechanism similar to ARP, but now the hardware address of the host is the known
parameter, and the IP address the queried parameter.
It differs more fundamentally from ARP in the fact that a RARP server must exist on
the network that maintains that a database of mappings from hardware address to
protocol address must be pre-configured.

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

Fig. 4 Gratuitous ARP

Fig. 5 Gratuitous ARP

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

1 Netwo rk = 1 B road cast Dom ain

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

2 Netwo rks = 2 B ro adca st Do mains

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

Fig. 6 Proxy-ARP concept

A
B

Router R

I take care, to forward


IP packets to B

Broadcast Message to all:


If your IP address matches B
then please tell me your Yes, I know the destination
Ethernet address network, let me give you my
Ethernet address

Fig. 7 Proxy-ARP concept

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

2.1 Routing principles


1. The default gateway's layer two address is determined using the ARP protocol
(see below)
2. The IP packet is embedded in an appropriate layer 2 transmission frame and
sent to the default gateway
3. The default gateway decapsulates the IP packet from the layer two frame and
makes its routing decision based on the (sub-) network part of the packet's
"destination address"
4. The router's interface towards the destination (sub-) network is determined and
the packet is forwarded through it using the next router's layer 2 address
Each router repeats this process. This principle is also referred to as hop-by-hop
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 Router Router

Router

Each router decides on which


Rout er s are used for connect ions This principle is called hop- by-
interface to forward the packet on the
across network bor ders hop r outing
next hop

Fig. 9 Rrouting

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

TG70114EN02GLA2
2010 Nokia Siemens Networks
13
IP routing

2.2 Routing tables


A routers stored knowledge is located within its routing table. An entry in a routing
table contains:
The destination (sub-) net address (this is also called a "prefix")
Next Hop Address - the IP address of the adjacent host or router to which the
packet should be sent next
The egress port
A metric attribute. It could be the number of hops (e.g. RIP) or the overall metric
(e.g. OSPF) or other.

The following commands can be used to read the contents of a routing table:

Command Operating System


netstat r[n] Windows or Unix systems.
show ip route CISCO IOS

TG70114EN02GLA2
14 2010 Nokia Siemens Networks
IP routing

Routing T able of Router A

192.16.1.0 directly c onnec ted Eth0


192.16.2.0 directly c onnec ted Eth1 Routing
192.16.3.0 directly c onnec ted Eth2
Process
192.16.4.0 via 192.16.3.1 Eth2

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

Routing Table Examples


In the example there is shown the network addresses of the serial links and the
Ethernet, the port numbers and the port addresses of the relevant ports of the router.
One router is thinking about its routing table.
An entry in this routing table contains items:
1. The destination (sub-) network address (e.g. 10.2.2.0)
2. The metric (e.g. [1] or [2])
3. The IP address of the port of the next router, called next hop (e.g. 10.1.1.100)
or instead of that information
"is directly connected"
4. The age of that information (e.g. 00:00:06)
5. The egress port (e.g. Serial1/2)

TG70114EN02GLA2
16 2010 Nokia Siemens Networks
IP routing

Example with Subnetting

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

Router Router Router Router


192.168.1.34
192.168.1.64/28 192.168.2.64/28

Fig. 11 Example

Routing table of router A

#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

Fig. 12 Routing table of router A

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

3.1 Static and dynamic routing


Static Routing
Manual configuration is used to establish entries into the routing tables.

Dynamic Routing
Routing protocols are used for dynamic establishment and update of entries into a
routing table.

3.2 Static Routing

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

Routing table of Router D


D estinatio n Sub net mask Outgo ing Interface Ro ute vi a
128.10.0.0 255.255.0.0 eth0 directly connected driven by interface configuration
128.15.0.0 255.255.0.0 eth1 directly connected driven by interface configuration
129.7.0.0 255.255.0.0 eth1 128.15.1.2 manual configuration (static route)

A B Net
128.15.0.0

Eth1: 128.15.2.4 / 16 Eth0:128.15.1.2 / 16

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

Fig. 13 Network scenario

Fig. 14 route add command

TG70114EN02GLA2
2010 Nokia Siemens Networks
21
IP routing

3.3 Dynamic Routing


Dynamic creation of entries in routing tables minimizes the administrative burden of
the operator. Dynamic routing uses routing protocols to exchange network
reachability and topology state information. Based on this information, routers
determine the optimal route through a network towards the destination.
Convergence time is the time required to pass information on topology changes
throughout the network.

What is an optimal route?


A route can be optimal if it uses the smallest possible metric. How the metric is
defined depends on the used routing protocol. A metric may be:
1. The number of hops between the current router and the destination network
2. The shortest physical distance
3. The fastest or possibly the cheapest lines
4. And other things

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 ?

Fig. 15 Routing protocols

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

TG70114EN02GLA2
2010 Nokia Siemens Networks
23
IP routing

3.4 Distance Vector Routing (DVR)


Using distance vector routing, neighboring routers exchange destination network
information and the respective metric extracted from their routing tables. They use
local broadcasts for this type of information transfer.
The router compares its current routing table with the information received from its
neighbors and can thus determine whether there is a better route to the destination. If
this is the case, it can modify its routing table accordingly.

3.4.1 Slow convergence


The limited amount of information leads to a problem that is referred to as "slow
convergence". Convergence time is the time required to pass information on topology
changes throughout the network. Distance vector routing protocols show a long
convergence time. The following examples show why this is the case:

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

Distance Vector Routing (DVR)


192.16.3.0
192.16.3.0
192.16.1.0
192.16.1.0 192.16.7.0
192.16.7.0
192.16.2.0
192.16.2.0 192.16.6.0
192.16.6.0

Ro uter A R outer B Router C Router D

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

Fig. 16 Distribution of routing information with DVR

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

Fig. 17 Distribution of routing information with DVR

TG70114EN02GLA2
2010 Nokia Siemens Networks
25
IP routing

3.4.2 Approaches to reduce convergence times


There are several approaches to reduce convergence times and therefore increase
network stability:
1. Split horizon
2. Poisoned Reverse
3. Triggered updates

Split horizon reduces convergence times by preventing routers from returning


advertisements in the same direction in which they received information about the
networks.
Poisoned Reverse does return advertisements in the same direction in which they
were received, but sets the metric to its maximum value in these responses. This
indicates that the path is unusable. In more recent distance vector routing protocol
implementations, reverse poison is used in standard operation.
Triggered updates considerably improve distance vector routing protocol
convergence. A router can send advertisements as soon as a problem occurs or the
metric is changed. It need not therefore wait for the next advertising interval. This
way, convergence can be established quickly. However, it also means that as soon
as a fault occurs, a large number of broadcast messages have to be transmitted
within the network. In large distance vector routing protocol networks, this volume of
data can lead to certain problems.

TG70114EN02GLA2
26 2010 Nokia Siemens Networks
IP routing

Split Horizon Poisoned Reverse

Net 1 Net 2 Net 3

Router A Router B Router C

Route to .. Metric
Net 2 1
Net 3 2

Simple Split Horizon


R oute to .. Me tric
N et 1 1

Route to .. M etr ic Poisoned Reverse


Ne t 1 1
Ne t 2 16
Ne t 3 16

Fig. 18 Simple Split Horizon & Poisoned Reverse

Triggered Updates

Link between Router A and Router B goes down


Router B immediately inform all neighbors with Triggered Update
Router C accepts the topology change and generates triggered updates itself
Router E doesnt accept the topology change, because its route to network 1
doesnt go through Router B

Net 1
F

A E D

B C

Fig. 19 Triggered Updates

TG70114EN02GLA2
2010 Nokia Siemens Networks
27
IP routing

3.5 Routing Information Protocol (RIP)


3.5.1 RIPv1
RIP is now a somewhat old distance vector protocol. It was developed at a time when
networks were still rather small and trunks with different speeds were rather rare.
Bearing these facts in mind, it is easier to understand some of RIPs peculiarities.

Forwarding of routing tables via broadcasts


With RIP, each router sends its routing table to its adjacent routers (i.e. the ones it is
directly linked to). The tables are fully updated every 30 seconds. These updates are
often forwarded as broadcast messages (e.g. in Ethernet broadcast frames). The
transmission of routing information can result in a considerable network load, which is
one of the reasons why RIP should not be used in larger networks.

Hop count metric


RIP uses a very simple metric to create routing tables, namely the number of routers
up to a certain destination (hop count). An entry in the routing table generally consists
of the IP address of a certain destination network and the number of routing hops to
this destination. Only the first router involved along this route is known.
The use of the hop count metric is particularly disadvantageous if connections within
a network have different throughputs. A fast connection via two routers, for example,
would never be used if there were a slow one via one router.

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

Routing Information Protocol (RIP)


RIPv1
Interior Gateway Protocol
Distance Vector Routing Protocol, classful
Routing Tables contain distances to destinations
? Only one kind of metric: Number of Hops
? Connections with different bandwidth can not be weighted
Distribution of Routing Tables via broadcast to adjacent routers
Counting to infinity (infinity = 16)
Multiple link fails -> temporary routing loops
bad convergence in case of a failure
Maximum value of hop count = 16 ( limits size )
RIP messages sent every 30 seconds. Causes high overheads
RIP messages are not secure
RIP messages encapsulated in UDP datagrams (unreliable delivery)
Uses well-known port number 520
Defined in RFC 1058

Fig. 20 RIPv1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

TG70114EN02GLA2
2010 Nokia Siemens Networks
29
IP routing

3.5.2 RIP-1 Permits Only a Single Subnet Mask


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. In the absence of this information, RIP-1 is forced to make
very simple assumptions about the mask that should be applied to any of its learned
routes.

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

RIP-1 permits only a Single Subnet Mask

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

RIP-1: 130. 24.36.0 RIP-1: 130.24.36. 0


Ro uter A

RIP-1: 130. 24.0.0

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

Fig. 21 RIP-1 permits only a single subnet mask

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

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.

RFC 1388, 1723, 1724, 2453, 4822

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

3.7 Link-State Routing


Link-state routing protocols generate their routing tables with a topology database.
This database contains link-state packets that are exchanged between the individual
routers and describe the status of a link or a network within the autonomous system.
Link-state updates are sent at the start and then only if there are changes. This leads
to an initially higher network load, but to a minute load in the converged state.
The shortest path first (SPF) algorithm uses data from the topology database to
determine a topology tree with the current router at the roots. From this network
plan it is relatively easy to derive a routing table. In the converged state, all routers
have an identical database. Individual information is first generated by the SPF
algorithm. The fact that all databases must have identical contents facilitates
synchronization. Since changes in topology are flooded through the network in the
form of link-state packets, they are available at every place in the network practically
simultaneously. At the same time and independently of each other, each router
begins the SPF algorithm, which transmits the change in the tree topology, and the
change is finally registered in the routing tables. It is clear, then, that the convergence
time in link-state algorithms is considerably less than that in distance-vector
protocols.

TG70114EN02GLA2
34 2010 Nokia Siemens Networks
IP routing

Link State Routing

Rou ter

Ro uter R outer

Rou ter

Routing
SPF
Table
Algo rith m

To po log y
Database

S PF S hortes t P ath Fi rst

Fig. 23 Link State Routing

Link-State Network Discovery

Link State Packets (LSP)

Router Router Router

Link State Packets Link State Packets

SPF SPF SPF

Routing Routing Routing


Tab le Table Table

Fig. 24 Link-State Network Discovery

TG70114EN02GLA2
2010 Nokia Siemens Networks
35
IP routing

3.8 Open Shortest Path First - OSPF


The OSPF link-state protocol is described in RFC 2328. It consists of many
characteristics which makes it a protocol that is suitable for large networks:
Fast convergence time because routing updates flood the network simultaneously
and can be processed there at the same time.
Supports variable length subnet masks (VLSM). VLSM allows efficient use of the
IP address area.
The metric is often bandwidth-oriented. Limitations, such as around 15 hops in
RIP, are irrelevant in OSPF.
Routing updates are only sent initially and if there are changes, there is no periodic
distribution of the entire table. The bandwidth in a link is therefore used more
efficiently.
Several equally good routes to the destination network are supported in order to
distribute the load.
OSPF runs directly via IP without using a transport protocol such as UDP or TCP.
Any overheads relating to this are also inapplicable.
Because of its clear specifications, OSPF is available on many manufacturer
platforms and is a quasi-standard for interior IP routing.

TG70114EN02GLA2
36 2010 Nokia Siemens Networks
IP routing

OSPF - Open Shortest Path First

Fast convergence time

Supports VLSM

Bandwidth determines the metric

Efficient use of the bandwidth for updates

Supports several routes to the destination

Raw IP mechanism to minimise overhead

RFC 2328 defines OSPF

OSPF allows hierarchical networks

Fig. 25 What is OSPF?

OSPF Operation within a Single Area

Router Router

Router Router
SPF

Router Routing
Tabelle Router

Router

Fig. 26 OSPF Operation within a Single Area

TG70114EN02GLA2
2010 Nokia Siemens Networks
37
IP routing

3.9 Route Calculation Process


The following figure gives out a process of route calculating by OSPF protocol.
1. In the network composed of four routers, the number beside the connecting line
indicates the cost of packet transmission from one router to another. To simplify
the matter, we suppose that the cost from one router to the other and vice versa
is the same.
2. Each router creates a LSA (Link State Advertisement) in accordance with the
topological structure of its peripheral networks and, through the mutual
transmission of protocol packets, sends this LSA to all the other routers of the
networks. In this way, each router receives the LSA of other routers. And all the
LSAs put together are called LSDB (Link Status DataBase). Evidently, the LSDB
of each of the four routers is the same with each other.
3. An LSA is a description of the topological structure of a router's peripheral
networks, then the LSDB is a description of the topological structure of the entire
networks. It is very easy for a router to convert the LSDB into a weighted
directional figure, which is a real reflection of the entire network's topological
structure. Evidently, again, the four routers will receive a completely same figure.
4. Next, each router, taking itself as the root point in the figure, works out a shortest
path tree by using the SPF algorithm. With this tree, a table of routes leading to
each root point of the network will be obtained. Evidently, the routing tables
obtained from the four routers will be different from each other.
In this way, each router works out its routes to other routers.
From the above analysis, it is known that the route calculating by OSPF involves the
following three procedures:
Describing the topological structure of the router's peripheral networks, and
creating the LSA.
Disseminating the LSAs created by itself throughout the autonomous system, and
collecting the LSAs created by all the other routers.
Calculating the routes by using the LSAs collected.

TG70114EN02GLA2
38 2010 Nokia Siemens Networks
IP routing

Route Calculation by OSPF


RTA RTB
1 LSDB 1
Router A B
Router
LSA of RTA
2 5 2 5
C
LSA of RTB
RTC
Router
3
3 LSA of RTC
D
LSA of RTD
RTD
Router
(3) Weighted directional figure
(1) Network Topology (2) LSDB of each router originated from the LSDB

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

Fig. 27 Route Calculation by OSPF

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

TG70114EN02GLA2
2010 Nokia Siemens Networks
39
IP routing

3.9.1 Open Shortest Path First (OSPF)

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.

Autonomous systems and areas


OSPF is a link state routing protocol for autonomous systems. The network operator
can define any structure for his network by introducing areas. One area comprises
one or more IP network addresses that can in turn be divided into subnets. One
particular area is the so-called backbone area, which links all the areas of an
autonomous system. If an autonomous system consists of one area only, this must
be the backbone area.

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.

Topology and routing information


Each router within a particular area knows the areas topology in detail and
administers a topological database, which records the networks and other routers
within the particular area. A router that is linked to several areas has a separate
topological database for each one.
Routing information from other areas (in particular from the backbone area) can be
incorporated in an area in summarized form. Moreover, OSPF can import external
routes from other routing protocols, convert them into OSPF representations and
advertise them within the autonomous system.

TG70114EN02GLA2
40 2010 Nokia Siemens Networks
IP routing

OSPF Multi-Area Concept

Each area maintains its own Link-


State database
Area 0
SPF Algorithm is not invoked so often
Smaller routing tables
Less overhead
Area 0 serves as backbone area and Area 1 Area 3
interconnects other areas Area 2

Autonomous System
AS

Fig. 28 OSPF area

OSPF Area Border Router - ABR

T his router knows ABR informs other


the topology of back bone routers
area 1 and of about des tinations
the backbone in Area 1
area in detail
Backbone Area

AB R

ABR inform s Area 1


about aggregate routing
information of other
Router A areas and about router
to destinations outside
of the autonom ous s ystem.
T his router knows
the topology
of area 1 in detail. Area 1

Fig. 29 OSPF ABR

TG70114EN02GLA2
2010 Nokia Siemens Networks
41
IP routing

Communication inside and outside an autonomous system


Different types of routers are required for stations within an autonomous system to be
able to communicate with each other and with stations outside the autonomous
system. These different types of routers are
1. Internal routers: routers located within one area.
2. Area border routers: routers located at the borders of an area.
3. Backbone routers: routers that are connected by at least one interface with the
backbone area.
4. AS boundary routers: routers that are located at the border of the autonomous
system and are linked to other autonomous systems.

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.

Identification of autonomous systems


Autonomous systems are uniquely identified by their registered numbers. Similar to
the DNS zones, which will be discussed at a later stage, these registered numbers
allow conclusions to be drawn as to the operator of an autonomous system
(educational institute, commercial companies, government agencies, military, etc.).
This information can be used for policy based routing, for example.

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. 30 Routers and routes in an AS

Open Shortest Path First (OSPF)


OSPFv2
Interior Gateway Protocol
Link State Routing
Each router monitors the links c onnected.
Status of links exchanged within AS.
Maintain a link state table and routing table.
Link state table dis tributed to every router on network.
Routing Table computed from the Link State information.
Requires more processing than distance v ector routing
Link state updates sent when needed
OSPF has support for multiple metrics (e.g. bandwidth)
OSPF Autonomous Systems is divided into Areas
Routing within areas and between areas handled separately
Uses IP directly (not UDP)
IP header: protocol field = 89
OSPFv2, RFC 2328
OSPFv3 for IPv6, RFC 5340

Fig. 31 OSPF

TG70114EN02GLA2
2010 Nokia Siemens Networks
43
IP routing

3.9.2 Interior Gateway Protocols (IGPs) and Exterior Gateway


Protocols (EGPs)
The dynamic routing protocols can be divided into two groups:
1. Interior Gateway Protocols (IGPs): Examples of these protocols are Open Short
Path First (OSPF) and Routing Information Protocol (RIP).
2. Exterior Gateway Protocols (EGPs): An example of these routing protocols is
Border Gateway Protocol Version 4 (BGP-4).
Gateway protocols are referred to as interior or exterior depending on whether they
are used within or between autonomous systems (ASs).

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

Autonomous System An Autonomous System (AS) is a group of IP networks, which


has a single and clearly defined external routing policy.

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.

Fig. 32 IGP and EGP

Interior Gateway Protocol Exterior Gateway Interior Gateway Protocol


(IGP) Protocol (EGP) (IGP)

AS 1000
AS 3000
EGP

EGP IGP
EGP

AS 2000

Fig. 33 Use of IGP and EGP protocols

TG70114EN02GLA2
2010 Nokia Siemens Networks
45
IP routing

3.10 Border Gateway Protocol Version 4 (BGPv4)


In contrast to the protocols we have seen so far, BGP is an exterior gateway protocol,
i.e. intended for routing between autonomous systems. BGP is encapsulated in TCP.

When to use BGP?


BGP is most appropriate when at least one of the following conditions exist:
1. An AS allows packets to transit through it to reach other AS
2. An AS has multiple connections to other AS with different policies.
3. The flow of traffic entering and leaving your AS must be manipulated (policy
based routing)

When not to use BGP?


BGP is not always appropriate. Don't use BGP if you have one of the following terms.
1. Single connection to the Internet or another AS
2. Routing policy and route selection are not a concern for your AS
3. Not enough resources to handle the BGP processing & bandwidth requirements
TIP
Use static routing instead.
RFC 4271

BGP Routing Process and Policy Routing


BGP receives routes from external and internal peers. All these information are
stored in the so-called Adj-RIB-In. There is one Adj-RIB-In per neighbor. Depending
on the configured routing policies some of these routes are entered into the routing
table (Loc-RIB). Finally, the Adj-RIB-Out is used to store prefixes to be advertised to
a particular neighbor. As with the Adj-RIB-In, there is one Adj-RIB-Out per peer.
The policy process handles route filtering and attributes manipulation. Filtering can
be performed based on different values, like IP prefixes and other information. BGP
uses an input-policy to manipulate the path attributes in order to influence its own
routing decisions. For example, if BGP chooses to filter a certain network number
coming from a peer, it is an indication that BGP does not want to reach that network
via that peer. Or, if BGP gives a certain route a better LOCAL_PREF, it is an indication
that BGP would like to prefer this route over other routes.
The same applies to routes on the output side. Routes from the routing table (Loc-
RIB) in addition to routes that the router generates locally are given to the output
policy process. It might apply filters and might change some of the attributes before
actually sending the update. The output policy process also differentiates between
internal and external peers; for example, routes learned from an internal peer cannot
be passed on to another internal peer.

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

Fig. 34 The environment of BGP

BGP Routing Process and Policy Routing

AS 17 Adj_RIB_In Adj_RIB_Out AS 17
Routing Policies

Routing Policies

Routing
Output
Input

AS 100 Adj_RIB_In Table Adj_RIB_Out AS 56


(Loc_RIB)
AS 23 Adj_RIB_In Adj_RIB_Out AS 200

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

3.11 Routing Protocol Summary


As we have seen routing protocols can be subdivided into different groups.
Whether the routing protocol is used inside of an autonomous system or between
they are called Interior Gateway Protocols (IGP) or Exterior Gateway Protocols
(EGP).
Having the look to the kind of working they are differed into Link State Routing (LSR)
Protocols and Distance Vector Routing (DVR) Protocols. BGP is a kind of a distance
vector protocol. It can be called a path vector protocol, because it has a whole path
description instead of a hop count.
The last point to divide routing protocols is the possibility to use subnet masks. In
each case when the protocol offers a parameter subnet mask, more than only a
classful IP address can be advertised. Then it offers the whole possibilities a CIDR or
VLSM system will need.

class- class-
IGP EGP LSR DVR
ful less

RIP v 1

RIP v 2

OSPF

BGP4

Fig. 36 Routing protocols summary

TG70114EN02GLA2
2010 Nokia Siemens Networks
49
IP routing

3.12 Virtual Router Redundancy Protocol (VRRP)


The use of a statically configured default route is quite popular; it minimizes
configuration and processing overhead on the end-host. Using the Dynamic host
configuration protocol (DHCP) for an end-host typically IP address and default
gateway is provided. This creates a single point of failure. Loss of the default router
results in a catastrophic event, isolating all end-hosts that are unable to detect any
alternate path that may be available.
The Virtual Router Redundancy Protocol (VRRP) is designed to eliminate the single
point of failure inherent in the static default routed environment. VRRP specifies an
election protocol that dynamically assigns responsibility for a virtual router to one of
the VRRP routers on a LAN.
The VRRP router controlling the IP address(es) associated with a virtual router is
called the Master, and forwards packets sent to these IP addresses. The election
process provides dynamic fail-over in the forwarding responsibility should the Master
become unavailable. Any of the virtual router's IP addresses on a LAN can then be
used as the default first hop router by end-hosts. The advantage gained from using
VRRP is a higher availability default path without requiring configuration of dynamic
routing or router discovery protocols on every end-host.

Important IP header fields for VRRP


Destination Address: IP multicast address for VRRP is: 224.0.0.18
Protocol: IP protocol number for VRRP is 112 (decimal).

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

Virtual Router Redundancy Protocol (VRRP)

MR VR ID =1

Router 1
a ctive

Vir tu al VRRP
IP ad dress

sta nd by

Router 2

BR VRID=1

VRID Virt ual Rout er Ident if ier


MR Mast er Rout er
BR Bac kup Router

Fig. 37 VRRP

VRRP - Load Balancing

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

RFC Author Title Date, other information


778 Mills, D., "DCNET Internet Clock Service," April 1981
791 Information INTERNET PROTOCOL September 1981
Sciences
(Updated by: RFC 1349)
Institute
University
of Southern
California
792 J. Postel INTERNET CONTROL MESSAGE September 1981
PROTOCOL (Updates: RFCs 777,
760)
950 J. Mogul, J. "Internet standard subnetting 08/01/1985. (Pages=18)
Postel, procedure"
985 National "Requirements for Internet gateways - 05/01/1986. (Pages=23)
Science draft" (Obsoleted by
Foundation, RFC1009)
Network
Technical
Advisory
Group
1009 R. Braden, "Requirements for Internet gateways" 06/01/1987 (Pages=55)
J. Postel (Obsoletes RFC985)
(Obsoleted by
RFC1716)
1245 J. Moy "OSPF Protocol Analysis" 08/08/1991. (Pages=12)
1246 J. Moy "Experience with the OSPF Protocol" 08/08/1991. (Pages=31)
1247 J. Moy "OSPF Version 2" 08/08/1991.
(Pages=189) (Obsoletes
RFC1131) (Obsoleted
by RFC1583)
1338 V. Fuller, T. "Supernetting: an Address Assignment 06/26/1992. (Pages=20)
Li, K. and Aggregation Strategy" (Obsoleted by
Varadhan, RFC1519)
J. Yu

TG70114EN02GLA2
2010 Nokia Siemens Networks
53
IP routing

RFC Author Title Date, other information


1349 P. Almquist Type of Service in the Internet Protocol July 1992
Suite (Obsoleted by: 2474)
1366 E. Gerich "Guidelines for Management of IP 10/22/1992 (Pages=8)
Address Space" (Obsoleted by
RFC1466)
1466 E. Gerich "Guidelines for Management of IP 05/26/1993 (Pages=10)
Address Space" (Obsoletes RFC1366)
1517 R. Hinden "Applicability Statement for the 09/24/1993. (Pages=4)
Implementation of Classless Inter-
Domain Routing (CIDR)"
1518 Y. Rekhter, "An Architecture for IP Address 09/24/1993. (Pages=27)
T. Li Allocation with CIDR"
1519 V. Fuller, T. "Classless Inter-Domain Routing 09/24/1993. (Pages=24)
Li, J. Yu, K. (CIDR): an Address Assignment and (Obsoletes RFC1338)
Varadhan Aggregation Strategy"
1520 Y. Rekhter, "Exchanging Routing Information 09/24/1993. (Pages=9)
C. Topolcic Across Provider Boundaries in the
CIDR Environment"
1583 Moy "OSPF Version 2" 03/23/1994.
(Pages=212) (Obsoletes
RFC1247)
1700 J. Reynolds ASSIGNED NUMBERS October 1994
J. Postel
1716 P. "Towards Requirements for IP 11/04/1994.
Almquist, F. Routers" (Pages=186) (Obsoletes
Kastenholz RFC1009) (Obsoleted
by RFC1812)
1721 G. Malkin "RIP Version 2 Protocol Analysis" 11/15/1994. (Pages=4)
(Obsoletes RFC1387)
1722 G. Malkin "RIP Version 2 Protocol Applicability 11/15/1994. (Pages=5)
Statement"
1723 G. Malkin "RIP Version 2 Carrying Additional 11/15/1994 (Pages=9)
Information" (Updates RFC1058)
(Obsoletes RFC1388)

TG70114EN02GLA2
54 2010 Nokia Siemens Networks
IP routing

RFC Author Title Date, other information


1724 G. Malkin, "RIP Version 2 MIB Extension" 11/15/1994 (Pages=18)
F. Baker (Obsoletes RFC1389)
1812 F. Baker "Requirements for IP Version 4 06/22/1995. (Pages=175)
Routers" (Obsoletes RFC1716,
RFC1009)
1900 B. "Renumbering Needs Work" 02/28/1996. (Pages=4)
Carpenter,
Y. Rekhter
H. "Enterprise Renumbering: 02/28/1996. (Pages=8)
Berkowitz, Experience and Information
1916
P. Solicitation"
Ferguson,
W. Leland,
P. Nesser
1917 P. Nesser "An Appeal to the Internet 02/29/1996. (Pages=10)
Community to Return Unused IP
Network (Prefixes) to the IANA"
1918 Y. Rekhter, "Address Allocation for Private 02/29/1996. (Pages=9)
R. Internets" (Obsoletes RFC1627)
Moskowitz,
D.
Karrenberg,
G. de
Groot, E.
Lear
2338 S. Knight, Virtual Router Redundancy Protocol April 1998
D. Weaver, (Obsoleted by: 3768)
D. Whipple,
R. Hinden,
D. Mitzel,
P. Hunt, P.
Higginson,
M. Shand,
A. Lindem
2474 K. Nichols, Definition of the Differentiated December 1998
S. Blake, F. Services Field (DS Field) in the (Updated by: 3168, 3260)
Baker, D. IPv4 and IPv6 Headers
Black

TG70114EN02GLA2
2010 Nokia Siemens Networks
55
IP routing

4.2 Glossary

ARP Address Resolution Protocol


AS Autonomous System
BGP Border Gateway Protocol
BOOTP Bootstrap Protocol
DA Destination Address
DF Don't Fragment
DHCP Dynamic Host Configuration Protocol
DVR Distance Vector Routing
CIDR Classless Inter-Domain Routing
EGP Exterior Gateway Protocol
IANA Internet Assigned Numbers Authority
ICMP Internet Control Message Protocol
IGP Interior Gateway Protocol
IP Internet Protocol
LSP Link State Packet
LSR Link State Routing
MAC Media Access Control
MF more fragments (in IPv4 a flag that indicates that more IP
fragments with higher fragment offset values should follow)
MTU Maximum Transmission Unit
OSPF t Open Shortest Path First
PMTU Path MTU Discovery Process (RFC 1981)
proxy server the device which will answer a request instead of the real server
(e.g. a DNS proxy server, HTTP proxy server or a proxy ARP)
RIP Routing Information Protocol
SPF Shortest Path First
TTL Time To Life, a field inside of the IP header
VLSM Variable Length Subnet Masks

TG70114EN02GLA2
56 2010 Nokia Siemens Networks

Vous aimerez peut-être aussi