Cover | Table of Contents | Colophon
1.0.0.0, 10.1.1.0, and
10.1.2.0 are directly connected to the router:
hostname R ! interface Ethernet0 ip address 1.1.1.1 255.0.0.0 ! interface Ethernet1 ip address 10.1.1.4 255.255.255.0 ! interface Ethernet2 ip address 10.1.2.4 255.255.255.0 ...
R#show 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 NSSA 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
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
C 1.0.0.0/8 is directly connected, Ethernet0
10.0.0.0/8 is subnetted, 2 subnets
C 10.1.1.0/24 is directly connected, Ethernet1
C 10.1.2.0/24 is directly connected, Ethernet2146.1.0.0, we may add the
command:
ip route 146.1.0.0 255.255.0.0 1.1.1.2
146.1.0.0/16, go to
the next hop of 1.1.1.2. This specifies a fixed
path to 146.1.0.0/16, as shown here, where the
contents of the routing table are displayed using the
EXEC command show ip
route:
R#sh ip route
...
1 S 146.1.0.0/16 [1/0] via 1.1.1.2
1.1.1.2 goes down, an alternate
path -- shown via R2 in Figure 1-3 -- cannot be used until a second static
route is specified:
ip route 146.1.0.0 255.255.0.0 1.1.1.3
ip route network [mask] {address | interface} [distance]
ip route 146.1.0.0 255.255.0.0 interface Ethernet0
Router>show 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 NSSA 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
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
2 177.130.0.0/30 is subnetted, 2 subnets
C 177.130.17.152 is directly connected, Serial1
C 177.130.17.148 is directly connected, Serial0
3 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
4 S 10.0.0.0/8 [1/0] via 160.4.115.74
5 S 10.254.101.0/24 [1/0] via 160.4.101.4
6 162.162.0.0/24 is subnetted, 2 subnets
O IA 162.162.101.0 [110/3137] via 11.175.238.4, 02:16:02, Ethernet0
[110/3137] via 11.175.238.3, 02:16:02, Ethernet0
O IA 162.162.253.0 [110/3127] via 11.175.238.4, 02:25:43, Ethernet0
[110/3127] via 11.175.238.3, 02:25:43, Ethernet0
7 O E2 192.188.106.0/24 [110/20] via 11.175.238.33, 20:49:59, Ethernet0
...
hostname NewYork ... interface Ethernet0 ip address 172.16.1.1 255.255.255.0 ! interface Ethernet1 ip address 192.168.1.1 255.255.255.0 ! interface Serial0 ip address 172.16.250.1 255.255.255.0 ! interface Serial1 ip address 172.16.251.1 255.255.255.0 ... router rip network 172.16.0.0 hostname Chicago ... interface Ethernet0 ip address 172.16.50.1 255.255.255.0 ! interface Serial0 ip address 172.16.250.2 255.255.255.0 ! interface Serial1 ip address 172.16.252.1 255.255.255.0 ... router rip network 172.16.0.0 hostname Ames ... interface Ethernet0 ip address 172.16.100.1 255.255.255.0 ! interface Serial0 ip address 172.16.252.2 255.255.255.0 ! interface Serial1 ip address 172.16.251.2 255.255.255.0 ... router rip network 172.16.0.0
hostname NewYork ... interface Ethernet0 ip address 172.16.1.1 255.255.255.0 ! interface Ethernet1 ip address 192.168.1.1 255.255.255.0 ! interface Serial0 ip address 172.16.250.1 255.255.255.0 ! interface Serial1 ip address 172.16.251.1 255.255.255.0 ... router rip network 172.16.0.0 hostname Chicago ... interface Ethernet0 ip address 172.16.50.1 255.255.255.0 ! interface Serial0 ip address 172.16.250.2 255.255.255.0 ! interface Serial1 ip address 172.16.252.1 255.255.255.0 ... router rip network 172.16.0.0 hostname Ames ... interface Ethernet0 ip address 172.16.100.1 255.255.255.0 ! interface Serial0 ip address 172.16.252.2 255.255.255.0 ! interface Serial1 ip address 172.16.251.2 255.255.255.0 ... router rip network 172.16.0.0
router rip
network 172.16.0.0
172.16.0.0 subnets in its updates to neighboring
routers. For example, 172.16.1.0 will now be
included in updates to the routers Chicago and
Ames.
172.16.0.0 interfaces from other routers
running RIP. For example, NewYork will receive
RIP updates from Chicago and
Ames.
192.168.1.0, connected to
NewYork, will not be advertised to
Chicago or Ames, and
NewYork will not process any RIP updates
received on Ethernet0 (if there is another
router on that segment).
NewYork>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 NSSA 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
Gateway of last resort is not set
C 171.16.1.0 is directly connected, Ethernet0
C 171.16.250.0 is directly connected, Serial0
C 171.16.251.0 is directly connected, Serial1
Chicago>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 NSSA 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
Gateway of last resort is not set
C 171.16.50.0 is directly connected, Ethernet0
C 171.16.250.0 is directly connected, Serial0
C 171.16.252.0 is directly connected, Serial1
Ames>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 NSSA 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
Gateway of last resort is not set
C 171.16.100.0 is directly connected, Ethernet0
C 171.16.250.0 is directly connected, Serial0
C 171.16.252.0 is directly connected, Serial1192.100.1.48 192.100.1.64 192.100.2.0 10.0.0.0
hostname SantaFe ! interface Ethernet 0 ip address 192.100.1.17 255.255.255.240 ! interface Ethernet 1 ip address 192.100.1.33 255.255.255.240 ! router rip network 192.100.1.0 network 192.100.2.0
SantaFe>sh ip route
...
Gateway of last resort is not set
R 10.0.0.0 [120/1] via 192.100.1.18, 0:00:11, Ethernet0
R 192.100.2.0 [120/1] via 192.100.1.18, 0:00:11, Ethernet0
192.100.1.0/16 is subnetted, 4 subnets
C 192.100.1.16 is directly connected, Ethernet0
C 192.100.1.32 is directly connected, Ethernet1
R 192.100.1.48 [120/1] via 192.100.1.18, 0:00:11, Ethernet0
R 192.100.1.64 [120/1] via 192.100.1.18, 0:00:11, Ethernet0192.100.1.48 and 192.100.1.64
with a 28-bit mask even though the subnet mask was not conveyed in
the RIP update. SantaFe was able to deduce the
28-bit mask because it has direct interfaces on
192.100.1.0 networks. This assumption is key to
why RIP does not support VLSM.
192.100.2.0 and 10.0.0.0 with
their natural 24-bit and 8-bit masks, respectively, because it has no
interfaces on those networks. Chapter 5 covers
RIP-2, an extension of RIP that supports VLSM.
192.100.1.48 192.100.1.64 192.100.2.0 10.0.0.0
hostname Phoenix ip subnet-zero ! interface Ethernet 0 ip address 192.100.1.18 255.255.255.240 ! interface Ethernet 1 ip address 192.100.1.49 255.255.255.240 ! interface Ethernet 2 ip address 192.100.1.65 255.255.255.240 ! interface Ethernet 3 ip address 192.100.2.1 255.255.255.240 ! interface Ethernet 4 ip address 192.100.2.17 255.255.255.240 ! interface Ethernet 5 ip address 10.1.0.1 255.255.0.0 ! interface Ethernet 6 ip address 10.2.0.1 255.255.0.0 ! router rip network 192.100.1.0 network 192.100.2.0 network 10.0.0.0
192.100.2.0 or 10.0.0.0 when
advertising to SantaFe because
Phoenix summarized those routes. As I stated
earlier, since Phoenix did not have interfaces
on those networks, it couldn't have made sense of
those routes anyway.
0.0.0.0. This is convenient because
0.0.0.0 cannot be confused with any Class A, B, or
C IP address.
hostname Portland ... interface Ethernet 0 ip address 192.100.1.17 255.255.255.240 ! interface Serial 0 ip address 192.100.1.33 255.255.255.240 ! router rip network 192.100.1.0
Portland>sh ip route
...
Gateway of last resort is not set
192.100.1.0/28 is subnetted, 2 subnets
C 192.100.1.16 is directly connected, Ethernet0
C 192.100.1.32 is directly connected, Serial0
R 0.0.0.0 [120/1] via 192.199.1.34, 0:00:21, Serial0hostname core1 ... interface Serial 0 ip address 192.100.1.34 255.255.255.240 ! router rip network 192.100.1.0 ! ip route 0.0.0.0 0.0.0.0 null0
0.0.0.0 is
automatically carried by RIP -- it is not listed in a network
number statement under router rip.
hostname NewYork ... router rip network 172.16.0.0 offset-list 10 in 2 serial1 ... access-list 10 permit 172.16.100.0 0.0.0.0 hostname Chicago ... router rip network 172.16.0.0 Ames#config terminal router rip network 172.16.0.0 offset-list 20 in 2 serial1 ... access-list 20 permit 172.16.1.0 0.0.0.0
NewYork>sh ip route
...
Gateway of last resort is not set
C 192.168.1.0 is directly connected, Ethernet1
172.16.0.0/16 is subnetted, 6 subnets
C 172.16.1.0 is directly connected, Ethernet0
C 172.16.250.0 is directly connected, Serial0
C 172.16.251.0 is directly connected, Serial1
R 172.16.50.0 [120/1] via 172.16.250.2, 0:00:11, Serial0
R 172.16.100.0 [120/2] via 172.16.250.2, 0:00:19, Serial0
R 172.16.252.0 [120/1] via 172.16.250.2, 0:00:11, Serial0
[120/1] via 172.16.251.2, 0:00:19, Serial1
Ames>sh ip route
...
Gateway of last resort is not set
172.16.0.0/16 is subnetted, 6 subnets
C 172.16.100.0 is directly connected, Ethernet0
C 172.16.252.0 is directly connected, Serial0
C 172.16.251.0 is directly connected, Serial1
R 172.16.50.0 [120/1] via 172.16.252.1, 0:00:21, Serial0
R 172.16.1.0 [120/2] via 172.16.251.1, 0:00:09, Serial1
R 172.16.250.0 [120/1] via 172.16.252.1, 0:00:21, Serial0
[120/1] via 172.16.251.1, 0:00:09, Serial1offset-list {access-list} {in | out}
hostname NewYork
...
interface Ethernet0
ip address 172.16.1.1 255.255.255.0
!
interface Ethernet1
ip address 192.168.1.1 255.255.255.0
!
interface Serial0
description New York to Chicago link
ip address 172.16.250.1 255.255.255.0
!
interface Serial1
description New York to Ames link
ip address 172.16.251.1 255.255.255.0
...
router igrp 10
network 172.16.0.0
hostname Chicago
...
interface Ethernet0
ip address 172.16.50.1 255.255.255.0
!
interface Serial0
ip address 172.16.250.2 255.255.255.0
!
interface Serial1
ip address 172.16.252.1 255.255.255.0
...
hostname NewYork ... interface Ethernet0 ip address 172.16.1.1 255.255.255.0 ! interface Ethernet1 ip address 192.168.1.1 255.255.255.0 ! interface Serial0 description New York to Chicago link ip address 172.16.250.1 255.255.255.0 ! interface Serial1 description New York to Ames link ip address 172.16.251.1 255.255.255.0 ... router igrp 10 network 172.16.0.0 hostname Chicago ... interface Ethernet0 ip address 172.16.50.1 255.255.255.0 ! interface Serial0 ip address 172.16.250.2 255.255.255.0 ! interface Serial1 ip address 172.16.252.1 255.255.255.0 ... router igrp 10 network 172.16.0.0 hostname Ames ... interface Ethernet0 ip address 172.16.100.1 255.255.255.0 ! interface Serial0 ip address 172.16.252.2 255.255.255.0 ! interface Serial1 ip address 172.16.251.2 255.255.255.0 ... router igrp 10 network 172.16.0.0
router igrp {process-id | autonomous-system-number}network 172.16.0.0
172.16.0.0 subnets in its updates to neighboring
routers. For example, 172.16.1.0 will now be
included in updates to the routers Chicago
and Ames.
172.16.0.0 interfaces from other routers
running IGRP 10. For example, NewYork will
receive IGRP updates from Chicago and
Ames.
192.168.1.0, connected to
NewYork, will not be advertised to
Chicago or Ames, and
NewYork will not process any IGRP updates
received on Ethernet0 (if there is another
router on that segment).
172.16.0.0 subnets. Here is
NewYorkrouter igrp autonomous-system-number
172.16.50.0 on
Casablanca (172.16.50.0
already exists on Chicago). The U.S. network
would not be disrupted because of this duplicate address. In another
situation, an IGRP bug in IOS on Chicago could
disrupt routing in the U.S., but Nairobi and
Casablanca would not be affected by this problem
in the AS 10.
router igrp 10 timers basic 30 90 90 180
10.0.0.0 from both routers
A and B. If
X sent packets with the destination
10.1.1.1 to B, the packet
would be lost -- B would have to drop the
packet because it would not have a route for
10.1.1.1 in its table. Likewise, if
X sent packets with the destination
10.2.1.1 to A, the packet
would be lost -- A would have to drop the
packet because it would not have a route for
10.2.1.1.
10.0.0.0 in the exterior section
of a routing update would mark 10.0.0.0 as a
default route and install its next hop to 10.0.0.0
as the gateway of last
resort
. Consider the network in Figure 3-6 as an example in which a core router connects
to several branch routers in remote sites.
hostname core1
!
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
...
interface Serial0
ip address 172.16.245.1 255.255.255.0
...
router igrp 10
3 redistribute static
network 172.16.0.0
4 default-metric 10000 100 255 1 1500
!
no ip classless
5 ip default-network 10.0.0.0
6 ip route 10.0.0.0 255.0.0.0 Null0
hostname branch1 ... interface Serial0 ip address 172.16.245.2 255.255.255.0 ... router igrp 10 redistribute static network 172.16.0.0 ! no ip classless
branch1#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 NSSA 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
Gateway of last resort is 172.16.245.1 to network 10.0.0.0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.245.0 is directly connected, Serial0
I* 10.0.0.0/8 [100/8576] via 172.16.245.1, 00:00:26, Serial0
branch1#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 40/50/80 ms
172.16.1.1, the major network number is
172.16.0.0. If the destination IP address is
192.168.1.1, the major network number is
192.168.1.0.
172.16.0.0 does), the router checks for the
destination's subnet. In our example,
branch1 would look for the subnet
172.16.1.0. If this subnet exists in the table,
the packet will be forwarded to the next hop specified in the table.
If the subnet does not exist in the table, the packet will be
dropped.
192.168.1.1 as a consequence of rule 3:
branch1#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 40/50/80 ms
172.16.0.0 on core1 (and then
block the advertisement of this subnet with an access list on lines 8
and 9) and see if branch1 can reach it using a
default route:
hostname core1
!
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
!
interface Ethernet1
ip address 172.16.10.1 255.255.255.0
...
interface Serial0
ip address 172.16.245.1 255.255.255.0
...
router igrp 10
redistribute static
network 172.16.0.0
default-metric 10000 100 255 1 1500
distribute-list 1 out serial0
!
no ip classless
ip default-network 10.0.0.0
ip route 10.0.0.0 255.0.0.0 Null0
!
8
hostname NewYork ... interface Ethernet0 ip address 172.16.1.1 255.255.255.0 ! interface Ethernet1 ip address 192.168.1.1 255.255.255.0 ! interface Serial0 description New York to Chicago link ip address 172.16.250.1 255.255.255.0 ! interface Serial1 description New York to Ames link bandwidth 56 ip address 172.16.251.1 255.255.255.0 ... router eigrp 10 network 172.16.0.0 hostname Chicago ... interface Ethernet0 ip address 172.16.50.1 255.255.255.0 ! interface Serial0 description Chicago to New York link ip address 172.16.250.2 255.255.255.0 ! interface Serial1 description Chicago to Ames link ip address 172.16.252.1 255.255.255.0 ... router eigrp 10 network 172.16.0.0 hostname Ames ... interface Ethernet0 ip address 172.16.100.1 255.255.255.0 ! interface Serial0 description Ames to Chicago link ip address 172.16.252.2 255.255.255.0 ! interface Serial1 description Ames to New York link bandwidth 56 ip address 172.16.251.2 255.255.255.0 ... router eigrp 10 network 172.16.0.0
router eigrp autonomous-system-number
network 172.16.0.0
172.16.0.0 subnets in its updates to neighboring
routers. For example, 172.16.1.0 will now be
included in updates to the routers Chicago
and Ames.
172.16.0.0 interfaces from other routers
running EIGRP 10. For example, NewYork will
receive EIGRP updates from Chicago and
Ames.
192.168.1.0, connected to
NewYork, will not be advertised to
Chicago or Ames, and
NewYork will not process any EIGRP updates
received on NewYork#sh ip route 172.16.50.0
Routing entry for 172.16.50.0 255.255.255.0
Known via "eigrp 10", distance 90, metric 2195456, type internal
Redistributing via eigrp 10
Last update from 172.16.250.2 on Serial0, 00:00:21 ago