1.       静态路由
1.1静态路由基本配置
1.1.1实验目的:
为路由器配置静态路由,从而了解路由发上的过程。
1.1.2实验拓扑:
静态路由_静态路由
1.1.3实验配置:
R2的配置:
 interface Loopback0
 ip address 2.2.2.2 255.255.255.0
interface Serial0/2
 ip address 26.26.26.2 255.255.255.0
ip route 3.3.3.0 255.255.255.0 26.26.26.6
ip route 6.6.6.0 255.255.255.0 26.26.26.6
ip route 36.36.36.0 255.255.255.0 26.26.26.6
R6的配置:
 interface Loopback0
 ip address 6.6.6.6 255.255.255.0
 interface Serial0/2
 ip address 26.26.26.6 255.255.255.0
 interface Serial0/3
 ip address 36.36.36.6 255.255.255.0
ip route 2.2.2.0 255.255.255.0 26.26.26.2
ip route 3.3.3.0 255.255.255.0 36.36.36.3
R3的配置:
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
interface Serial0/3
 ip address 36.36.36.3 255.255.255.0
ip route 2.2.2.0 255.255.255.0 36.36.36.6
ip route 6.6.6.0 255.255.255.0 36.36.36.6
ip route 26.26.26.0 255.255.255.0 36.36.36.6
1.1.4验证:
查看路由表,并PING每个路由器的回环接口。
R2
R2#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
   2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/24 is subnetted, 1 subnets
S       3.3.3.0 [1/0] via 26.26.26.6
     36.0.0.0/24 is subnetted, 1 subnets
S       36.36.36.0 [1/0] via 26.26.26.6
     6.0.0.0/24 is subnetted, 1 subnets
S       6.6.6.0 [1/0] via 26.26.26.6
     26.0.0.0/24 is subnetted, 1 subnets
C       26.26.26.0 is directly connected, Serial0/2
R2#ping 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/53/132 ms
R2#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/92/144 ms
R6
R6#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
 
     2.0.0.0/24 is subnetted, 1 subnets
S       2.2.2.0 [1/0] via 26.26.26.2
     3.0.0.0/24 is subnetted, 1 subnets
S       3.3.3.0 [1/0] via 36.36.36.3
     36.0.0.0/24 is subnetted, 1 subnets
C       36.36.36.0 is directly connected, Serial0/3
     6.0.0.0/24 is subnetted, 1 subnets
C       6.6.6.0 is directly connected, Loopback0
     26.0.0.0/24 is subnetted, 1 subnets
C       26.26.26.0 is directly connected, Serial0/2
R6#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/46/92 ms
R6#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/61/116 ms
R3
R3#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
 
     2.0.0.0/24 is subnetted, 1 subnets
S       2.2.2.0 [1/0] via 36.36.36.0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     36.0.0.0/24 is subnetted, 1 subnets
C       36.36.36.0 is directly connected, Serial0/3
     6.0.0.0/24 is subnetted, 1 subnets
S       6.6.6.0 [1/0] via 36.36.36.6
     26.0.0.0/24 is subnetted, 1 subnets
S       26.26.26.0 [1/0] via 36.36.36.0
R3#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/78/136 ms
R3#ping 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/57/140 ms
1.2静态路由(2)
1.2.1实验目的:
在全网互访的基础上,实现R2的2.2.2.2可以访问R3的3.3.3.3。但R2的26.26.26.2不可以访问R3的3.3.3.3。
1.2.2实验拓扑:
1.2.3实验配置:
R2的配置:
 interface Loopback0
 ip address 2.2.2.2 255.255.255.0
interface Serial0/2
 ip address 26.26.26.2 255.255.255.0
ip route 3.3.3.0 255.255.255.0 26.26.26.6
ip route 6.6.6.0 255.255.255.0 26.26.26.6
ip route 36.36.36.0 255.255.255.0 26.26.26.6
R6的配置:
 interface Loopback0
 ip address 6.6.6.6 255.255.255.0
 interface Serial0/2
 ip address 26.26.26.6 255.255.255.0
 interface Serial0/3
 ip address 36.36.36.6 255.255.255.0
ip route 2.2.2.0 255.255.255.0 26.26.26.2
ip route 3.3.3.0 255.255.255.0 36.36.36.3
R3的配置:
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
interface Serial0/3
 ip address 36.36.36.3 255.255.255.0
ip route 2.2.2.0 255.255.255.0 36.36.36.6
ip route 6.6.6.0 255.255.255.0 36.36.36.6
ip route2 6.26.26.6 255.255.255.255 36.36.36.6
 
 
1.2.4验证:
R2#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2#ping 3.3.3.3 sou
R2#ping 3.3.3.3 source 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/81/124 ms
1.3浮动静态路由
1.3.1实验目的:
使用浮动静态路由,实现路由备份。
观察动态路由EIGRP与静态路由之间的转换。
1.3.2实验拓扑:
 
1.3.3实验配置:
R2的配置:
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
interface Serial0/2
 ip address 26.26.26.2 255.255.255.0
interface Ethernet1/1
 ip address 62.62.62.2 255.255.255.0
router eigrp 90
 network 2.0.0.0
 network 26.0.0.0
 no auto-summary
ip route 6.6.6.0 255.255.255.0 62.62.62.6 100
R6的配置:
interface Loopback0
 ip address 6.6.6.6 255.255.255.0
interface Serial0/2
 ip address 26.26.26.6 255.255.255.0
interface Ethernet1/1
 ip address 62.62.62.6 255.255.255.0
router eigrp 90
 network 6.0.0.0
 network 26.0.0.0
 no auto-summary
ip route 2.2.2.0 255.255.255.0 62.62.62.2 100
 
1.3.4实验验证:
R6#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
 
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/2297856] via 26.26.26.2, 00:00:20, Serial0/2
     6.0.0.0/24 is subnetted, 1 subnets
C       6.6.6.0 is directly connected, Loopback0
     26.0.0.0/24 is subnetted, 1 subnets
C       26.26.26.0 is directly connected, Serial0/2
     62.0.0.0/24 is subnetted, 1 subnets
C       62.62.62.0 is directly connected, Ethernet1/1
R2#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
 
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     6.0.0.0/24 is subnetted, 1 subnets
D       6.6.6.0 [90/2297856] via 26.26.26.6, 00:00:32, Serial0/2
     26.0.0.0/24 is subnetted, 1 subnets
C       26.26.26.0 is directly connected, Serial0/2
     62.0.0.0/24 is subnetted, 1 subnets
C       62.62.62.0 is directly connected, Ethernet1/1
R6#traceroute 2.2.2.2
Type escape sequence to abort.
Tracing the route to 2.2.2.2
 1 26.26.26.2 88 msec 76 msec *
当把S0/2接口shutdown
R6#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
 
     2.0.0.0/24 is subnetted, 1 subnets
S       2.2.2.0 [100/0] via 62.62.62.2
     6.0.0.0/24 is subnetted, 1 subnets
C       6.6.6.0 is directly connected, Loopback0
     62.0.0.0/24 is subnetted, 1 subnets
C       62.62.62.0 is directly connected, Ethernet1/1
R6#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/74/164 ms
当接口S0/2 no shutdown:
路由表中重新又有了EIGRP学到的路由
R6#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
 
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/2297856] via 26.26.26.2, 00:00:08, Serial0/2
     6.0.0.0/24 is subnetted, 1 subnets
C       6.6.6.0 is directly connected, Loopback0
     26.0.0.0/24 is subnetted, 1 subnets
C       26.26.26.0 is directly connected, Serial0/2
     62.0.0.0/24 is subnetted, 1 subnets
C       62.62.62.0 is directly connected, Ethernet1/1