CCNA路由综合实验配置详解

简介:

拓扑图

 
说明
这是工大瑞普的一个CCNA路由综合实验的拓扑图,使用Dynimips模拟器。原图有一处IP地址错误,我已经修正,所以叫小五修正版。
 
要求:
1、  红色为不等价均衡负载路径
2、  最多允许配置3条静态路由(明确采用ip route命令配置的)
3、  所有网络均可以Ping
4、  串行链路上封装ppp协议,验证方式为chap
5、  仅限CCNA所学内容,不允许使用路由重发布等CCNP知识
 
所有路由器基础配置
En
Conf t
Hostname Rx
Enable password cisco
Line vty 0
Password cisco
Logg sy
Exec-t 0 0
Login
Exit
Line console 0
Password cisco
Logg sy
Exec-t 0 0
Login
Exit
No ip do lo
 
 

R1

 
R1(config)#int s1/1
R1(config-if)#ip add
R1(config-if)#ip address 10.1.1.2 255.255.255.252
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int lo1
R1(config-if)#ip address 10.2.1.1 255.255.255.0
R1(config-if)#int lo2
R1(config-if)#ip address 10.2.2.2 255.255.255.0
R1(config-if)#exit
R1(config)#username R2 password cisco
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 10.1.1.0 0.0.0.3 a 0
R1(config-router)#network 10.2.1.0 0.0.0.255 a 0
R1(config-router)#network 10.2.2.0 0.0.0.255 a 0
R1(config-router)#exit
R1(config)#int s1/1
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R1(config-if)#

 

R2

R2(config)#int s1/0
R2(config-if)#ip address 10.1.1.1 255.255.255.252
R2(config-if)#no sh
R2(config-if)#exi
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 10.1.1.0 0.0.0.3 a 0 
R2(config-router)#default-information originate always
R2(config-router)#end
R2#conf t
R2(config)#username R1 password cisco
R2(config)#username R3 password cisco
R2(config)#int s1/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#end
R2(config-router)#
R2(config-router)#
R2(config-router)#end
R2#conf t
R2(config)#int s1/1
R2(config-if)#ip address 192.168.255.2 255.255.255.252
R2(config-if)#no sh
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#end
R2#conf t
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.255.0
R2(config-router)#end
R2#

 

R3

 
R3(config)#int s1/0
R3(config-if)#ip address 192.168.255.1 255.255.255.252
R3(config-if)#no sh
R3(config-if)#encapsulation ppp
R3(config-if)#ppp authentication chap
R3(config-if)#exit
R3(config)#username R2 password cisco
R3(config)#username R4 password cisco
R3(config)#int lo1
R3(config-if)#ip address 192.168.1.1 255.255.255.0
R3(config-if)#int s1/1
R3(config-if)#ip address 151.151.1.2 255.255.255.0
R3(config-if)#encapsulation ppp
R3(config-if)#ppp authentication chap
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#network 192.168.255.0
R3(config-router)#network 192.168.1.0  
R3(config-router)#network 151.151.1.0
R3(config-router)#no auto-summary
R3(config-router)#end
R3#conf t
R3(config)#ip route 0.0.0.0 0.0.0.0 151.151.1.1
R3(config)#ip route 10.0.0.0 255.0.0.0 192.168.255.2
 

 

R4

 
R4(config)#username R3 password cisco
R4(config)#username R5 password cisco
R4(config)#int s1/0
R4(config-if)#ip address 151.151.1.1 255.255.255.0
R4(config-if)#no sh
R4(config-if)#encapsulation ppp
R4(config-if)#ppp authentication chap
R4(config-if)#int s1/1
R4(config-if)#ip address 131.131.255.13 255.255.255.252
R4(config-if)#encapsulation ppp
R4(config-if)#ppp authentication chap
R4(config-if)#no sh
R4(config-if)#clock rate 64000
R4(config-if)#int s1/1
R4(config-if)#clock rate 64000
R4(config-if)#exit
R4(config)#router eigrp 100
R4(config-router)#network 151.151.1.0 0.0.0.255
R4(config-router)#network 131.131.255.12 0.0.0.3
R4(config-router)#network 131.131.255.4 0.0.0.3
R4(config-router)#exit
R4(config)#int f0/0
R4(config-if)#ip address 131.131.255.6 255.255.255.252
R4(config-if)#no sh
R4(config-if)#end
R4#conf t
R4(config)#ip default-network 151.151.0.0
R4(config)#ip route 151.151.0.0 255.255.0.0 151.151.1.2
R4(config)#end
R4#

 

R5

 
R5(config)#username R4 password cisco
R5(config)#username R6 password cisco
R5(config)#int s1/0
R5(config-if)#ip address 131.131.255.14 255.255.255.252
R5(config-if)#encapsulation ppp
R5(config-if)#ppp authentication chap
R5(config-if)#no sh
R5(config-if)#int s1/1
R5(config-if)#ip address 131.131.255.10 255.255.255.252
R5(config-if)#encapsulation ppp
R5(config-if)#ppp authentication chap
R5(config-if)#clock rate 64000
R5(config-if)#no sh
R5(config-if)#exit
R5(config)#router eigrp 100
R5(config-router)#network 131.131.0.0
R5(config-router)#end
R5#

R6
 
R6(config)#username R5 password cisco
R6(config)#username R7 password cisco
R6(config)#int f0/0
R6(config-if)#ip address 131.131.255.5 255.255.255.252
R6(config-if)#no sh
R6(config-if)#exit
R6(config)#int s1/0
R6(config-if)#ip address 131.131.255.9 255.255.255.252
R6(config-if)#encapsulation ppp
R6(config-if)#ppp authentication chap
R6(config-if)#no sh
R6(config-if)#end
R6#
R6#conf t
R6(config)#router eigrp 100
R6(config-router)#network 131.131.0.0
R6(config-router)#
R6(config-router)#end
R6#conf t
R6(config)#int s1/1
R6(config-if)#ip address 131.131.255.2 255.255.255.252
R6(config-if)#encapsulation ppp
R6(config-if)#ppp authentication chap
R6(config-if)#clock rate 64000
R6(config-if)#no sh
R6(config-if)#end
R6(config)#router eigrp 100
R6(config-router)#no network 131.131.0.0
R6(config-router)#net 131.131.0.0
R6(config-router)#end
R6#
R7
 
 
R7(config)#username R6 password cisco
R7(config)#username R8 password cisco
R7(config)#int s1/0
R7(config-if)#ip address 131.131.255.1 255.255.255.252
R7(config-if)#encapsulation ppp
R7(config-if)#ppp authentication chap
R7(config-if)#clock rate 64000
R7(config-if)#no sh
R7(config-if)#exit
R7(config)#int s1/1
R7(config-if)#ip address 172.16.255.1 255.255.255.0
R7(config-if)#encapsulation ppp
R7(config-if)#ppp authentication chap
R7(config-if)#clock rate 64000
R7(config-if)#no sh
R7(config-if)#int s1/0
R7(config-if)#ip summary-address eigrp 100 172.16.0.0 255.255.0.0 5
R7(config-if)#exit
R7(config)#router eigrp 100
R7(config-router)#network 131.131.255.0 0.0.0.3
R7(config-router)#no auto-summary
R7(config-router)#
R7(config-router)#exit
R7(config)#router igrp 100
R7(config-router)#network 172.16.0.0
R7(config-router)#exit
R7(config)#ip route 172.16.0.0 255.255.0.0 172.16.255.2
R7(config)#end
R7#
R8
 
R8(config)#username R7 password cisco
R8(config)#int lo1
R8(config-if)#ip address 172.16.1.1 255.255.255.0
R8(config-if)#int lo2
R8(config-if)#ip address 172.16.2.1 255.255.255.0
R8(config-if)#int lo3
R8(config-if)#ip ad
R8(config-if)#ip address 172.16.3.1 255.255.255.0
R8(config-if)#int lo4
R8(config-if)#ip address 172.16.4.1 255.255.255.0
R8(config-if)#int lo5
R8(config-if)#ip address 172.16.5.1 255.255.255.0
R8(config-if)#int lo6
R8(config-if)#ip address 172.16.6.1 255.255.255.0
R8(config-if)#int s1/0
R8(config-if)#ip address 172.16.255.2 255.255.255.0
R8(config-if)#encapsulation ppp
R8(config-if)#ppp authentication chap
R8(config-if)#exit
R8(config)#router igrp 100
R8(config-router)#network 172.16.0.0
R8(config-router)#end
R8#

 
全网互通以后的各个路由器的路由表
 
R1
 
R1#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, 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 10.1.1.1 to network 0.0.0.0
 
     10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
C       10.2.1.0/24 is directly connected, Loopback1
C       10.1.1.0/30 is directly connected, Serial1/1
C       10.2.2.0/24 is directly connected, Loopback2
C       10.1.1.1/32 is directly connected, Serial1/1
O*E2 0.0.0.0/0 [110/1] via 10.1.1.1, 01:22:45, Serial1/1
R1#
 
R2
R2#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, 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 192.168.255.1 to network 0.0.0.0
 
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O       10.2.2.2/32 [110/65] via 10.1.1.2, 02:15:19, Serial1/0
O       10.2.1.1/32 [110/65] via 10.1.1.2, 02:15:19, Serial1/0
C       10.1.1.2/32 is directly connected, Serial1/0
C       10.1.1.0/30 is directly connected, Serial1/0
     192.168.255.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.255.1/32 is directly connected, Serial1/1
C       192.168.255.0/30 is directly connected, Serial1/1
R    192.168.1.0/24 [120/1] via 192.168.255.1, 00:00:10, Serial1/1
     151.151.0.0/16 is variably subnetted, 2 subnets, 2 masks
R       151.151.1.1/32 [120/1] via 192.168.255.1, 00:00:10, Serial1/1
R       151.151.1.0/24 [120/1] via 192.168.255.1, 00:00:10, Serial1/1
R*   0.0.0.0/0 [120/1] via 192.168.255.1, 00:00:10, Serial1/1
R2
 
 
R3
R3#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, 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 151.151.1.1 to network 0.0.0.0
 
S    10.0.0.0/8 [1/0] via 192.168.255.2
     192.168.255.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.255.2/32 is directly connected, Serial1/0
C       192.168.255.0/30 is directly connected, Serial1/0
C    192.168.1.0/24 is directly connected, Loopback1
     151.151.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       151.151.1.1/32 is directly connected, Serial1/1
C       151.151.1.0/24 is directly connected, Serial1/1
S*   0.0.0.0/0 [1/0] via 151.151.1.1
R3#
 
R4
R4#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, 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 151.151.1.2 to network 151.151.0.0
 
D    172.16.0.0/16 [90/3705856] via 131.131.255.14, 00:10:15, Serial1/1
     131.131.0.0/16 is variably subnetted, 8 subnets, 3 masks
D       131.131.0.0/16 is a summary, 01:06:43, Null0
C       131.131.255.14/32 is directly connected, Serial1/1
C       131.131.255.12/30 is directly connected, Serial1/1
D       131.131.255.9/32 [90/2681856] via 131.131.255.14, 00:46:32, Serial1/1
D       131.131.255.8/30 [90/2681856] via 131.131.255.14, 00:46:32, Serial1/1
C       131.131.255.4/30 is directly connected, FastEthernet0/0
D       131.131.255.1/32 [90/3193856] via 131.131.255.14, 00:35:30, Serial1/1
D       131.131.255.0/30 [90/3193856] via 131.131.255.14, 00:35:30, Serial1/1
 *   151.151.0.0/16 is variably subnetted, 3 subnets, 3 masks
S*      151.151.0.0/16 [1/0] via 151.151.1.2
C       151.151.1.0/24 is directly connected, Serial1/0
C       151.151.1.2/32 is directly connected, Serial1/0
R4#
 
 
R5
R5#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, 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 131.131.255.13 to network 151.151.0.0
 
D    172.16.0.0/16 [90/3193856] via 131.131.255.9, 00:10:32, Serial1/1
     131.131.0.0/16 is variably subnetted, 7 subnets, 2 masks
C       131.131.255.13/32 is directly connected, Serial1/0
C       131.131.255.12/30 is directly connected, Serial1/0
C       131.131.255.9/32 is directly connected, Serial1/1
C       131.131.255.8/30 is directly connected, Serial1/1
D       131.131.255.4/30 [90/2172416] via 131.131.255.13, 00:42:50, Serial1/0
                         [90/2172416] via 131.131.255.9, 00:42:50, Serial1/1
D       131.131.255.1/32 [90/2681856] via 131.131.255.9, 00:35:48, Serial1/1
D       131.131.255.0/30 [90/2681856] via 131.131.255.9, 00:35:48, Serial1/1
D*   151.151.0.0/16 [90/2681856] via 131.131.255.13, 00:50:53, Serial1/0
R5#
 
 
R6
R6#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, 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 131.131.255.10 to network 151.151.0.0
 
D    172.16.0.0/16 [90/2681856] via 131.131.255.1, 00:10:47, Serial1/1
     131.131.0.0/16 is variably subnetted, 7 subnets, 2 masks
D       131.131.255.13/32 [90/2681856] via 131.131.255.10, 00:43:06, Serial1/0
D       131.131.255.12/30 [90/2681856] via 131.131.255.10, 00:43:06, Serial1/0
C       131.131.255.10/32 is directly connected, Serial1/0
C       131.131.255.8/30 is directly connected, Serial1/0
C       131.131.255.4/30 is directly connected, FastEthernet0/0
C       131.131.255.1/32 is directly connected, Serial1/1
C       131.131.255.0/30 is directly connected, Serial1/1
D*   151.151.0.0/16 [90/3193856] via 131.131.255.10, 00:43:06, Serial1/0
R6#
 
R7
R7#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, 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 131.131.255.2 to network 151.151.0.0
 
     172.16.0.0/16 is variably subnetted, 9 subnets, 3 masks
C       172.16.255.2/32 is directly connected, Serial1/1
C       172.16.255.0/24 is directly connected, Serial1/1
I       172.16.4.0/24 [100/8976] via 172.16.255.2, 00:00:18, Serial1/1
I       172.16.5.0/24 [100/8976] via 172.16.255.2, 00:00:18, Serial1/1
I       172.16.6.0/24 [100/8976] via 172.16.255.2, 00:00:18, Serial1/1
S       172.16.0.0/16 [1/0] via 172.16.255.2
I       172.16.1.0/24 [100/8976] via 172.16.255.2, 00:00:18, Serial1/1
I       172.16.2.0/24 [100/8976] via 172.16.255.2, 00:00:18, Serial1/1
I       172.16.3.0/24 [100/8976] via 172.16.255.2, 00:00:18, Serial1/1
     131.131.0.0/16 is variably subnetted, 7 subnets, 2 masks
D       131.131.255.13/32 [90/3193856] via 131.131.255.2, 00:33:02, Serial1/0
D       131.131.255.12/30 [90/3193856] via 131.131.255.2, 00:33:02, Serial1/0
D       131.131.255.10/32 [90/2681856] via 131.131.255.2, 00:33:03, Serial1/0
D       131.131.255.8/30 [90/2681856] via 131.131.255.2, 00:33:03, Serial1/0
D       131.131.255.4/30 [90/2172416] via 131.131.255.2, 00:33:03, Serial1/0
C       131.131.255.2/32 is directly connected, Serial1/0
C       131.131.255.0/30 is directly connected, Serial1/0
D*   151.151.0.0/16 [90/3705856] via 131.131.255.2, 00:33:03, Serial1/0
R7#
 
R8
R8#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, 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 172.16.255.1 to network 151.151.0.0
 
     172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
C       172.16.255.1/32 is directly connected, Serial1/0
C       172.16.255.0/24 is directly connected, Serial1/0
C       172.16.4.0/24 is directly connected, Loopback4
C       172.16.5.0/24 is directly connected, Loopback5
C       172.16.6.0/24 is directly connected, Loopback6
C       172.16.1.0/24 is directly connected, Loopback1
C       172.16.2.0/24 is directly connected, Loopback2
C       172.16.3.0/24 is directly connected, Loopback3
I    131.131.0.0/16 [100/10476] via 172.16.255.1, 00:00:14, Serial1/0
I*   151.151.0.0/16 [100/16476] via 172.16.255.1, 00:00:14, Serial1/0
R8#


本文转自 Jhuster 51CTO博客,原文链接:http://blog.51cto.com/xwnet/169814,如需转载请自行联系原作者
相关文章
|
8月前
|
网络虚拟化
Vlan和Trunk实验(保姆级实验教程)
Vlan和Trunk实验(保姆级实验教程)
123 0
|
网络协议 网络虚拟化 数据安全/隐私保护
华为—DHCP(中继)、路由引入,ACL综合实验
华为—DHCP(中继)、路由引入,ACL综合实验
268 1
华为—DHCP(中继)、路由引入,ACL综合实验
|
数据安全/隐私保护 网络虚拟化 网络架构
|
Shell 网络虚拟化 网络架构
|
网络架构 算法 网络协议

相关实验场景

更多