Professional Documents
Culture Documents
Chapter 5
Chapter 5
IP routing
IP routing IP routing
router Cisco router
routing protocol routed
protocol routing protocol router network
internetwork router routing table routing
protocol internetwork routing protocol RIP,
IGRP, EIGRP OSPF
router network router protocol
router protocol interface
router protocol IP IPX
IP
routing Cisco router
IP routing Cisco
router
Static routing
Default routing
Dynamic routing
6 Enhanced IGRP (EIGRP) and Open Shortest Path First (OSPF)
dynamic routing EIGRP OSPF routing basics
Routing Basics
internetwork Wan Lan router
network address IP address host
internerwork internetwork
routing network
network router hosts nerwork
network network address destination host ()
network host
destination host
network router routing router
internetwork
Destination address
Neighbor routers from which it can learn about remote networks
Possible routes to all remote networks
The best route to each remote network
How to maintain and verify routing information
IP routing
section IP routing process Figure
IP Routing
Figure 5.3 LAN connect Router A Router A WAN
Router B Router B LAN HTTP sever
IP Routing occur
1. destination address Host A MAC address F0/0 interface Router A
2. destination address packet IP address network interface card (NIC)
HTTP sever
3. destination port number segment header 80
Figure 5.4 network router 2 switches
IP routing process Host A data
HTTP sever
1. destination address Host A MAC address F0/0 interface Router A
2. destination address packet IP address network interface card (NIC)
HTTP sever
3. destination port number segment header 443
switches default gateway destination
switches routing switches
default gateway (destination) MAC address Host A fact
MAC address routers interface packet LAN 2
Lab_A Configuration
configure router Lab_A IP address interface
FastEthernet0/0,serial 0/0 configuration hostname router
Router>en
Router#config t
Router(config)#hostname Lab_A
Lab_A(config)#enable secret todd
Lab_A(config)#interface fa0/0
Lab_A(config-if)#ip address 192.168.10.1 255.255.255.0
Lab_A(config-if)#description Lab_A LAN Connection
Lab_A(config-if)#no shut
Lab_A(config-if)#interface serial 0/0
Lab_A(config-if)#ip address 192.168.20.1 255.255.255.0
Lab_A(config-if)#description WAN Connection to Lab_B
Lab_A(config-if)#no shut
Lab_A(config-if)#exit
Lab_A(config)#line console 0
Lab_A(config-line)#password todd
Lab_A(config-line)#login
Lab_A(config-line)#line aux 0
Lab_A(config-line)#password todd
Lab_A(config-line)#login
Lab_A(config-line)#line vty 0 4
Lab_A(config-line)#password todd
Lab_A(config-line)#login
Lab_A(config-line)#exit
Lab_A(config)#banner motd #
This is the Lab_A router
#
Lab_A(config)#^z
Lab_A#copy running-config startup-config
Destination filename [startup-config]? [Enter]
Lab_A#
IP routing table Cisco router ip output
Lab_A#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP,
M - mobile, B BGP D - EIGRP, EX - EIGRP external, O OSPF, IA - OSPF inter area N1 - OSPF NSS external type
1, N2 - OSPF NSSA external type 2 E1 - OSPF external
type 1, E2 - OSPF external type 2, E EGP i - IS-IS,
L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate
default, U - per-user static route, o - ODR, P periodic downloaded static route, T - traffic
engineered route
Gateway of last resort is not set
C 192.168.10.0/24 is directly connected, FastEthernet0/0
C 192.168.20.0/24 is directly connected, Serial 0/0
Lab_A#
routing table network directly router
192.168.10.0 192.168.20.0
directly code type
connection ip route command their abbreviations
add our password,interface description banner router
configuration
configuration :
Router>en
Router#config t
234 Chapter 5 _ IP Routing
Router(config)#hostname Lab_B
Lab_B(config)#enable secret todd
Lab_B(config)#interface fa0/0
Lab_B(config-if)#ip address 192.168.30.1 255.255.255.0
Lab_B(config-if)#description Lab_B LAN Connection
Lab_B(config-if)#no shut
Lab_B(config-if)#interface serial 0/0
Lab_B(config-if)#ip address 192.168.20.2 255.255.255.0
Lab_B(config-if)#description WAN Connection to Lab_A
Lab_B(config-if)#clock rate 64000
Lab_B(config-if)#no shut
Lab_B(config-if)#interface serial 0/1
Lab_B(config-if)#ip address 192.168.40.1 255.255.255.0
Lab_B(config-if)#description WAN Connection to Lab_C
Lab_B(config-if)#clock rate 64000
Lab_B(config-if)#no shut
Lab_B(config-if)#exit
Lab_B(config)#line console 0
Lab_B(config-line)#password todd
Lab_B(config-line)#login
Lab_B(config-line)#line aux 0
Lab_B(config-line)#password todd
Lab_B(config-line)#login
Lab_B(config-line)#line vty 0 4
Lab_B(config-line)#password todd
Lab_B(config-line)#login
Lab_B(config-line)#exit
Lab_B(config)#banner motd #
This is the Lab_B router
#
Lab_B(config)#^z
Lab_B#copy running-config startup-config
Destination filename [startup-config]? [Enter]
Lab_B#
Command configuration serial 0/0 into 192.168.20.0,serial 0/1 into network
192.168.40.0 fast Ethernet 0/0 into network 192.168.30.0 command ip route
display
Lab_B#sh ip route
[output cut]
Gateway of last resort is not set
C 192.168.20.0/24 is directly connected, Serial0/0
The IP Routing Process 235
C 192.168.40.0/24 is directly connected, Serial0/1
C 192.168.30.0 is directly connected FastEthernet 0/0
Lab_B#
Router Lab_B 192.168.20.0,192.168.30.0 172.16.40.0 router
Lab_A Lab_C now comuncate router connect WAN
Lab_C Configuration
Configuration Lab_C similan router 2
add passwors,interface descrition banner to the router
Out put ip route command display 192.168.50.0 192.168.40.0
Lab_C#sh ip route
[output cut]
Gateway of last resort is not set
C 192.168.50.0/24 is directly connected, FastEthernet0/0
C 192.168.40.0/24 is directly connected, Serial0/0
Lab_C#
192-168.10.0
192.168.50.0
configuration Lab_B router
Lab_B(config)#ip route 192.168.10.0 255.255.255.0
192.168.20.1
Lab_B(config)#ip route 192.168.50.0 255.255.255.0
192.168.40.2
routeing table Lab_B router network
Lab_B#sh ip route
[output cut]
S 192.168.50.0 [1/0] via 192.168.40.2
C 192.168.40.0 is directly connected, Serial0/1
C 192.168.30.0 is directly connected, FastEthernet 0/0
C 192.168.20.0 is directly connected, Serial0/0
S 192.168.10.0 [1/0] via 192.168.20.1
Lab_B#
Lab_B complete routing table router
internetwork network routing Lab_B communicate remote network
Lab_C
Lab_C router direct connect 192.168.40.0 192.168.50.0 router 3
add
- 192.168.30.0
- 192.168.20.0
- 192.168.10.0
configuration Lab_C router
Lab_C(config)#ip route 192.168.30.0 255.255.255.0
192.168.40.1
Lab_C(config)#ip route 192.168.20.0 255.255.255.0
192.16.40.1
Lab_C(config)#ip route 192.168.10.0 255.255.255.0
192.168.40.1
output routing table Lab_C router
Lab_C#sh ip route
[output cut]
C 192.168.50.0 is directly connected, FastEthernet0/0
C 192.168.40.0 is directly connected, Serial0/0
S 192.168.30.0 [1/0] via 192.168.40.1
S 192.168.20.0 [1/0] via 192.168.40.1
S 192.168.10.0 [1/0] via 192.168.40.1
Lab_C#
Lab_C network internetwork comunication router
network router connect routing table router host
comunication network router
internetwork update routing table router
small network
Verifying Your Configuration
show ip route ping program Lab_A
Lab_C internetwork end to end
Output 192.168.50.0 Lab_A router :
Lab_A#ping 192.168.50.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:
!!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 64/66/68 ms
Lab_A#
router Lab_C ping 192.168.10.0 Good IP connectivity
router output
Lab_C#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max
= 64/67/72 ms
Default routing
default routing packet remote destination network routing
table next-hop router default routing stub network
internetwork router considered sub
network Lab_A Lab_C default route Lab_B packet connect
network interface routing Lab_C connection
192.168.50.0 network packet Lab_C packet 192.168.40.1
serial 0/0 interface Lab_B router Lab_A packet 192.168.20.2
configured default route wildcard network address mask location
static route fact default router static route wildcard
instead network maskinfomation section default route Lab_C
router
Router Lab_C directly connect 192.168.40.0 192.168.50.0 routing table
192.168.10.0,192.168.20.0 192.168.30.0
configure router route 3 network static route 3 routing table
defaule route static route 1 instead first delete
static route router add default coute
Lab_C(config)#no ip route 192.168.10.0 255.255.255.0
192.168.40.1
Lab_C(config)#no ip route 192.168.20.0 255.255.255.0
192.168.40.1
Lab_C(config)#no ip route 192.168.30.0 255.255.255.0
192.168.40.1
Lab_C(config)#ip route 0.0.0.0 0.0.0.0 192.168.40.1
routing table 2directly connected network s
Lab_C#sh ip route
[output cut]
Gateway of last resort is 192.168.40.1 to network 0.0.0.0
C 192.168.50.0 is directly connected, FastEthernet0/0
C 192.168.40.0 is directly connected, Serial0/0
S* 0.0.0.0/0 [1/0] via 192.168.40.1
Lab_C#
compleate default route :
Lab_C(config)#ip route 0.0.0.0 0.0.0.0 s0/0
entry network routing table serial 0/0
IP address next-hop router exit interface
routing table gateway last resort default
route ip classless
Cisco router classful router subnet mask interface
router router receives packet destination subnet router table drop
packet default routing ip classless remote subnet
routing table
version12.x IOS router ip classless default
default configuration add subneted network
router
Lab_C(config)#ip classless
global configuration ip classless
default routing ip
classless command defaulting
configured gateway last resort ip default network
command Fig 5.4 network gateway last resort statement configured
3 add gateway of last resort gateway router ISP
Gateway(config)#ip route 0.0.0.0 0.0.0.0 217.124.6.1
Gateway(config)#ip route 0.0.0.0 0.0.0.0 s0/0
Gateway(config)#ip default-network 217.124.6.0
[output cut]
Gateway of last resort is 10.1.5.5 to network 0.0.0.0
R 10.1.3.0 [120/1] via 101.2.2, 00:00:00, Serial 0/0
C 10.1.2.0 is directly connected, Serial0/0
C 10.1.5.0 is directly connected, Serial0/1
C 10.1.6.0 is directly connected, Fastethernet0/0
R* 0.0.0.0/0 [120/0] via 10.1.5.5, 00:00:00 Serial 0/1
show up default route R RIP
injucted route ip default-network command remote router
configuring RIP RIP route internetwork default route
destination address 10.1.8.5 route 10.1.8.0 router default route
packet serial 0/1
Dynamic Routing
Dynamic routing protocol network update routing
static default routing router CPU process bandtidth
network routing protocol rules router
communicate routing information neighbor router
Routing protocol 2 routing information protocol (RIP)
interrior gateway routing protocol (IGRP)
internetwork interion gateway protocol (IGPS) exterlor
gateway protocol (EGPs)
IGPs routing information router atoromus system (AS) AS
collection network common administrative domain router
routing table information AS
EGPs Ases
Routing protocol Basic
routing protocol RIP
administrarive distance tree different kind routing protocol
routin loop
Administrative Distance
5.9
5.10
5.11 routing
routing (Routing Loops)
track routing
routing CPU
network outage
routing
routing router
interface 5 ( 5.12) router
5 router E router A
5 interface router B
(Split Horizon)
routing split horizon
interface
router A B
B
(Route Poisoning)
Hold downs
Hold downs
flapping
interface
hold downs
route router
routing interface
router
hold downs
router hold downs
router
hold downs
1. Hold downs
2.
3.
routing
RIP : Routing Information Protocol
RIP
routing interface 30 RIP hop count
hop count
15 16 RIP
(WAN)
router
RIP 1 classful routing
RIP 1
RIP 2 prefix routing
(subnet mask) classless routing)
RIP RIP
RIP
RIP 3
Router update timer
(180 ) router
router router
Hold downs timer
hold down
hold downs timer
180
Route flush timer
routing
(240 ) router
flush timer router
router routing
RIP Routing
Router RIP RIP
internetwork 3 router ( 5.13) RIP routing
Lab_A
RIP administrative distance 120 administrative distance 1
(default) route routing
RIP router
IP route
Lab_A (config) #no ip route 192.168.30.0 255.255.255.0
192.168.20.2
Lab_A (config) #no ip route 192.168.40.0 255.255.255.0
192.168.20.2
Lab_A (config) #no ip route 192.168.50.0 255.255.255.0
192.168.20.2
RIP
RIP
30, 40 50 routing
2-3
route ?
router CPU
RIP IGRP classful address (address)
( class routing)
class B 172.16.0/24 172.16.10.0
172.16.20.0 172.16.30.0 classful network 172.16.0.0 RIP
routing
Lab_B
RIP router Lab_B 2 route
routing
120 RIP router Lab_B
RIP
3
route RIP routing
CPU
RIP Lab_B
Lab_B#config t
Enter configuration commands, one per line. End with CNTL/Z.
Lab_B(config)#no ip route 192.168.10.0 255.255.255.0
192.168.20.1
Lab_B(config)#no ip route 192.168.50.0 255.255.255.0
192.168.40.1
Lab_B(config)#router rip
Lab_B(config-router)#network 192.168.20.0
Lab_B(config-router)#network 192.168.30.0
Lab_B(config-router)#network 192.168.40.0
Lab_B(config-router)#^Z
Lab_B#
Lab_C
route Lab_C routed (default
route) router Lab_C default route RIP
routing 2
Lab_C#config t
Enter configuration commands , one per line. End with CNTL/Z.
Lab_C(config)#no ip router 0.0.0.0.0.0.0.0 192.168.40.1
Lab_C(config)#router rip
Lab_C(config-router)#network 192.168.40.0
Lab_C(config-router)#network 192.168.50.0
Lab_C(config-router)#^Z
Lab_C#
routing router
R RIP routing [120/1]
administrative distance route 120 hop count 1
routing Lab_B
Lab_B#sh ip route
[output cut]
R
192.168.50.0
C
192.168.40.0
C
192.168.30.0
C
192.168.20.0
R
192.168.10.0
Lab_B#
routing
routing Lab_C
Lab_C#sh ip route
[output cut]
gateway of last resort is not set
C
192.168.50.0 is directly connected , FastEthernet0/0
C
192.168.40.0 is directly connected , Serial0/0
R
192.168.30.0 [120/1] via 192.168.40.1 , 00:00:04 , Serial0/0
R
192.168.20.0 [120/1] via 192.168.40.1 , 00:00:26 , Serial0/0
R
192.168.10.0 [120/2] via 192.168.40.1 , 00:00:04 , Serial0/0
Lab_C#
RIP internetwork
hop count 15 (16 )
routing 30 2
internetwork
routing RIP
routing
[120/5] 192.168.10.0 administrative distance
120 (default) RIP hop count 15 router
router hop count 1 route
Lab_C#sh ip route
[output cut]
gateway of last resort is not set
C
192.168.50.0 is directly connected , FastEthernet0/0
C
192.168.40.0 is directly connected , Serial0/0
R
192.168.30.0 [120/1] via 192.168.40.1 , 00:00:04 , Serial0/0
R
192.168.20.0 [120/1] via 192.168.40.1 , 00:00:26 , Serial0/0
R
192.168.10.0 [120/15] via 192.168.40.1 , 00:00:04 , Serial0/0
Lab_C#
[120/15] router Lab_C
route 192.168.10.0 hop count 16
router Lab_C
router
routing
Holding Down RIP (Holding down )
RIP LAN
WAN RIP Internet
RIP
LAN WAN passive-interface
interface interface
RIP
passive-interface router
Lab_A#config t
Lab_A(config)#router rip
Lab_A(config-router)#network 192.168.10.0
Lab_A(config-router)#passive-interface serial0/0
RIP internetwork ?
Cisco router
Unix router router
routing RIP RIP
RIP router
internetwork
redistribution
routing RIP
router IGRP
RIPv1
-
- hop count 15
- class
- VLSM
-
RIPv2
-
- hop count 15
- class
- VLSM
-
RIPv2 Cisco
CCNA
4
Class C address VLSMed
OSPF Cisco
RIPv2 RIPv2 class
VLSM
Interior Gateway Routing Protocol (IGRP)
IGRP IGRP
router Cisco Cisco routing
RIP
IGRP hop count 255 default 100
15 hop RIP
IGRP RIP
route internetwork composite
metric MTU ()
default
IGRP IGRP
router
routing
5.4 IGRP RIP
IGRP
- Internetwork
-
- route 90
- administrative distance (administrative distance) 100
-
( lowest composit metric hop count 225)
RIP
-
-
- route 30
- administrative distance (administrative distance) 120
- hop count
hop count 15
IGRP IGRP
IGRP Timers
IGRP (default)
routing
default 90
(Invalid Timers) router
route
default 3
(Holddown timers)
default 3 10
(Flush Timers)
routing (default) 7 route
90 default 7 X 90 = 630
route routing
IGRP routing
IGRP RIP
(AS) route AS
routing AS
IGRP
Lab_A#config t
Lab_A(config)#router igrp 10
Lab_A(config-router)#network 192.168.10.0
RIP IGRP
AS router
class
IGRP
IGRP Load_balance 6 RIP hop
count load_balance IGRP
Load_balance
load-balance
Load-balance
Sybexs CCNP
Building scalable Cisco Internetwork Study Guide Carl Timm
Wade Edwards (Sybex, 2004)
IGRP RIP
AS router router
internetwork AS
routing
internetwork AS 10 router
IGRP : Interior Gateway Routing Protocol
Lab_A
AS router 1
65,535 router AS
Lab_A #config t
Enter configuration commands , one per line. End with CNTL/Z
Lab_A (config)#router igrp?
< 1-65535 > Autonomous system number
Lab_A (config)#router igrp 10
Lab_A (config-router)#netw 192.168.10.0
Lab_A (config-router)#netw 192.168.20.0
Lab_B (config-router)#^Z
Lab_A#
router igrp IGRP RIP
IGRP classful
routing
172.16.0.0/24
172.16.10.0 router classful 172.16.0.0
(subnet)
classful
Lab_B
router Lab_B AS 10
IGRP
Lab_B config t
Enter configuration commands , one per line. End with CNTL/Z.
Lab_B(config)#router igrp 10
Lab_B(config-router)#netw 192.126.20.0
Lab_B(config-router)#netw 192.168.30.0
Lab_B(config-router)#netw 192.168.40.0
Lab_B(config-router)#^Z
Lab_B#
Lab_C#
routing Lab_C AS 10 IGRP
routing IGRP
router
ip route
router route IGRP route
RIP router CPU
routing RIP
administrative distance IGRP RIP
routing
RIP IGRP internetwork
Cisco-router IGRP
option IGRP RIP EIGRP
IGRP (Troubleshooting IGRP)
2 router IGRP
routing ? 2
Lab_B#config t
Lab_B(config) igrp 10
Lab_B(config-router)#netw 192.168.20.0
Lab_B(config-router)#netw 192.168.30.0
Lab_C(config)#router igrp 20
Lab_C(config-router)#netw 192.168.40.0
Lab_C(config-router)#netw 192.168.50.0
router Lab_B
router Lab_C 20
RIP IGRP
RIP (1 2) IGRP
CPU processing
router 1
Cisco router
- ip route
-
- ip
- debug ip igrp events
- debug transaction ip igrp
interface
ip address FastEthernet0/0 0/0
0/1 [o interface router Lab_B
Lab_B#sh protocol
Global values:
Internet Protocol routing is enabled
FastEthernet0 is up , line protocol is up
Internet address is 192.1668.30.1/24
Serial0/0 is up , line protocol is up
Internet address is 192.1668.20.2/24
ip protocol routing
router#sh ip protocols
Routing Protocol is rip
Sending updates every 30 seconds , next due 6 seconds
Invalid after 180 seconds , hold down 180 , flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing : rip
Default version control : send version 1 , receive any version
Interface
send
Recv
key-chain
FastEthernet0
1
12
Serial0/0
1
12
Serial0/1
1
12
Routing for networks :
10.0.0.0
Routing Information Sources :
Gateway
Distance
Last Update
10.168.11.14
120
00:00:21
Distance : (default is 120)
ip interface router
Router#sh ip interface brief
Interface
IP-Address
OK? Method Status
FastEthernet0/0
192.168.18.1 YES manual up
Serial0/0
10.168.11.17 YES manual up
FastEthernet0/0
unassigned
YES NRAM Administratively down
Serial0/1
192.168.11.21 YES manual up
IP
RIP 30 default
RIP router 2
192.168.40.2 192.168.20.1 AD RIP(120)
ip protocol RIP routing
10.0.0.0
Router(config)#router rip
Router(config-router)#network 10.0.0.0
0kd:ugiup] 0/0 0/1 RIP router
10.168.11.14
interface ip 0/0
192.168.0.0 interface
debug ip rip
debug ip rip routing router
console session telnet router terminal monitor
debug
RIP interface 0/1 (
hop count)
Lab_B#debug ip rip
RIP protocal debugging is on
Lab_B#
07:12:56:RIP: received v1 update from 192.168.40.2 on
Serial0/1
07:12:56:
192.168.50.0 in 1 hops
07:12:56: RIP: received v1 update from 192.168.20.1 on
Serail0/0
07:12:56:
192.168.10.0 in 1 hops
debug route Lab_B
interface 0/0 0/1 router Lab_A Lab_C
07:12:58:
network 10.0.0.0 , metric 1
07:12:58:
network 192.168.1.0 , metric 2
07:12:58: RIP : sending v1 update to 255.255.255.255 via
Serial0/0 (10.0.8.1)
07:12:58:
network 172.16.0.0 , metric 1
07:12:58: RIP: received v1 update from 10.0.15.2 n Serial0/0
07:12:58:
192.168.1.0 in one hop
07:12:58:
192.168.168.0 in 16 hops (inaccessible)
10.0.0.0
192.168.1.0 172.16.0.0 10.0.0.0 172.16.0.0
hop count () 192.168.1.0
2
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#network 172.16.0.0
2 router RIP
2 interface RIP 1 interface
192.168.168.0 hop 16 hop count RIP
15 16
ping host 192.168.168.0
ping 10.0.0.0
1 debug ip route
show ip router
07:12:56: RIP: received v1 update from 172.16.100.2 on Serial0/0
07:12:56:
172.16.20.0 in 1 hops
07:12:58:
172.16.20.0 in 1 hops
Lab_C#sh ip route
[output cut]
Gateway of last resort is not set
C
C
R
R
R
S
R
R
172.16.0.0/24
172.16.150.0
172.16.220.0
172.16.210.0
172.16.200.0
172.16.30.0
172.16.20.0
172.16.10.0
172.16.100.0
is subnetted , 8 subnets
is directly connected , FastEthernet0/0
is directly connected , Loopback2
is directly connected , Loopback1
is directly connected , Loopback0
[120/2] via 172.16.100.2 00:00:04 , Serial0/0
[120/2] via 172.16.150.15
[120/2] via 172.16.100.2 , 00:00:04 , Serial0/0
[120/2] is directly connected connected , Serial0/0
Lab_B#un all
debug
debug ip igrp transaction
debug ip igrp transaction router
router router
router interface IP
address 192.168.40.2 0/1 router Lab_B
IP routing
Cisco router
IP routing
routing router AD IP
router
default routing gateway router
routing dynamic routing
loop RIP IGRP
IP routing process
hop