Routing
Protocols
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Router Operations
To route packets, a router needs to do the following :
Know the destination address
Identify the sources from which the router can learn
Discover possible routes to the intended destination
Select the best route
Maintain and verify routing information
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2
Router Operations (Cont.)
The
e Router
ou e knows
o so only
y the
e networks
e o s it is
sddirectly
ec y co
connected
ec ed to.
o
It must learn all other destinations.
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
Static Routes vs. Dynamic Routes
Two different ways of learning routes to
remote networks:
Static Routes Dynamic Routes
• A network administrator • Learned by Routing protocols
enters them into the router and added to the routing
manually. table. Dynamic routes are
adjusted automatically for
topology or traffic changes.
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4
Static Route Configuration
Router(config)#ip route network [mask]
{address | interface}[distance] [permanent]
Defines a path to an IP destination network or subnet or host by
specifying the next hop router interface IP address.
Address
Add = IP address
dd off the
th nextt hop
h router
t
Interface = outbound interface of the local router
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 5
Static Route Example
RouterX(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1
or
Router(config)#ip route 172.16.1.0 255.255.255.0 s0/0/0
This is a unidirectional route
route. You must have a route configured in the
opposite direction.
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6
Verifying the Static route Configuration
RouterA(config)#ip route 172.16.1.0 255.255.255.0 Serial0/0 172.16.2.1
RouterA#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
S 172 16 1 0 [1/0] via
172.16.1.0 i 172.16.2.1,
172 16 2 1 Serial0/0
S i l0/0
C 172.16.2.0 is directly connected, Serial0/0
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 7
A special case: Default Routes
This route allows the stub network to reach all known
networks beyond router A.
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
Static Routes: Benefits and Disadvantages
Benefits:
- No overhead on the router CPU
- No bandwidth usage between routers
- Securityy and control
Disadvantages:
g
- Administrative burden.
- Not practical in large networks.
- By default it is not conveyed to other routers
as part of an update process.
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9
Dynamic Routing Configuration
Router(config)#router protocol [keyword]
Defines an IP routing protocol
Router(config-router)#network network-number
• Mandatory configuration command for each IP routing
process
• Identifies the physically connected network to which routing
updates are forwarded
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10
RIP Overview
19.2 kbps
T1 T1
T1
Hop-count metric selects the path.
Routes update every 30 seconds.
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11
RIP Configuration
Router(config)#router rip
• Starts the RIP routing
gpprocess.
Router(config-router)#network
g network-number
• Selects p
participating
p g attached networks.
• Requires a major classful network number.
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 12
RIP Configuration Example
e0 s2 s2 s3 s3 e1
172.16.1.0 A 192.168.1.0
B C
172 16 1 1 10.1.1.1
172.16.1.1 10 1 1 1 10 1 1 2
10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
2.3.0.0
router rip 2.3.0.0
router rip
network 172.16.0.0 network 192.168.1.0
network 10.0.0.0 network 10.0.0.0
router rip
network 10.0.0.0
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 13
R2(config) router rip
R2(config-router)# network 192.168.0.0
R2(config-router)# network 192.168.2.0
R2(config-router)# network 192.168.3.0
Host Name : R1 Host Name : R2 Host Name : R3
192.168.0.0/24 192.168.3.0/24
.1 .1
.2 .2
Serial Serial Serial Serial
0/0/0 0/0/0 0/1/0 0/0/0
.1 .1 .1
192.168.1.0/24 192.168.2.0/24 192.168.4.0/24
.2 .2 .2
R1(config) router rip version 2 R3(config) router rip
R1(config-router)# network 192.168.1.0 R3(config-router)# network 192.168.3.0
R1(config-router)# network 192.168.0.0 R3(config-router)# network 192.168.4.0
Dynamic Route [RIP]
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 14
Configuring Single-Area OSPF
RouterX(config)#
router ospf process-id
Defines OSPF as the IP routing protocol
RouterX(config-router)#
network address wildcard-mask area area-id
Assigns
A i networks
k to a specific
ifi OSPF area
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 15
Verifying the OSPF Configuration
RouterX# show ip protocols
Verifies that OSPF is configured
RouterX# show ip route
Displays all the routes learned by the router
RouterX# show ip route
Codes: I - IGRP derived, R - RIP derived, O - OSPF derived,
C - connected,
connected S - static,
static E - EGP derived
derived, B - BGP derived,
derived
E2 - OSPF external type 2 route, N1 - OSPF NSSA external type 1 route,
N2 - OSPF NSSA external type 2 route
Gateway
y of last resort is 10.119.254.240 to network 10.140.0.0
O 10.110.0.0 [110/5] via 10.119.254.6, 0:01:00, Ethernet2
O IA 10.67.10.0 [110/10] via 10.119.254.244, 0:02:22, Ethernet2
O 10.68.132.0 [110/5] via 10.119.254.6, 0:00:59, Ethernet2
O 10.130.0.0 [110/5] via 10.119.254.6, 0:00:59, Ethernet2
O E2 10.128.0.0 [170/10] via 10.119.254.244, 0:02:22, Ethernet2
. . .
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 16
Verifying the OSPF Configuration (Cont.)
RouterX# show ip ospf
Displays the OSPF router ID, timers, and statistics
RouterX# show ip ospf
Routing Process "ospf
ospf 50
50" with ID 10.64.0.2
<output omitted>
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Number of areas transit capable
p is 0
External flood list length 0
Area BACKBONE(0)
Area BACKBONE(0)
Area has no authentication
SPF algorithm last executed 00:01:25.028 ago
SPF algorithm executed 7 times
<output omitted>
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17
Verifying the OSPF Configuration (Cont.)
RouterX# show ip ospf interface
Displays the area ID and adjacency information
RouterX# show ip ospf interface ethernet 0
Ethernet 0 is up
up, line protocol is up
Internet Address 192.168.254.202, Mask 255.255.255.0, Area 0.0.0.0
AS 201, Router ID 192.168.99.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State OTHER, Priority 1
Designated
g Router id 192.168.254.10,
, Interface address 192.168.254.10
Backup Designated router id 192.168.254.28, Interface addr 192.168.254.28
Timer intervals configured, Hello 10, Dead 60, Wait 40, Retransmit 5
Hello due in 0:00:05
Neighbor Count is 8, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.254.28 (Backup Designated Router)
Adjacent with neighbor 192.168.254.10 (Designated Router)
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 18
Verifying the OSPF Configuration (Cont.)
RouterX# show ip ospf neighbor
Displays the OSPF neighbor information on a per-interface basis
RouterX# show ip ospf neighbor
ID Pri State Dead Time Address Interface
10.199.199.137 1 FULL/DR 0:00:31 192.168.80.37 FastEthernet0/0
172.16.48.1 1 FULL/DROTHER 0:00:33 172.16.48.1 FastEthernet0/1
172.16.48.200 1 FULL/DROTHER 0:00:33 172.16.48.200 FastEthernet0/1
10.199.199.137 5 FULL/DR
/ 0:00:33 172.16.48.189 FastEthernet0/1
/
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 19
Routing Protocol Comparison Chart
Presentation_ID © 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential 20