实验步骤:
1、 基本信息的配置同RIP一致。 2、 在R1上的配置。 r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#network 192.168.1.0 3、 在R2上的配置。 r2(config)#router rip
r2(config-router)#version 2
r2(config-router)#network 192.168.1.0 r2(config-router)#network 172.16.0.0 4、 在R3上的配置。 r3(config)#router rip
r3(config-router)#version 2
r3(config-router)#network 172.16.0.0 r3(config-router)#network 10.0.0.0 5、 在R4上的配置。 r4(config)#router rip
r4(config-router)#version 2
r4(config-router)#network 10.0.0.0
6、 用show ip route 查看路由表,并进行全网互ping。 r1#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
C 1.0.0.0/8 is directly connected, Loopback0
R 172.16.0.0/16 [120/1] via 192.168.1.2, 00:00:23, Serial1/1 R 10.0.0.0/8 [120/2] via 192.168.1.2, 00:00:23, Serial1/1 C 192.168.1.0/24 is directly connected, Serial1/1 r1#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: !!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 220/242/264 ms
七、 RIP V2的汇总。 172.16.1.1 255.255.255.0 172.16.2.1 255.255.255.0
实验要求:用RIP V2 进行路由汇总。
注:在Version 2下才能做RIP路由汇总。路由汇总默认是启动的auto-summary。 也可以再接口下实现汇总,格式 ip summary-address rip <网段> <标准子网掩码> 实验步骤: 1、 基本配置
Router(config)#hostname R1 R1(config)#no ip domain-lookup R1(config)#line con 0
R1(config-line)#logging syn R1(config-line)#exec-timeout 0 R1(config)#interface s1/1 R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.1.1 255.255.255. r1(config-if)#exit
r1(config)#interface loopback 0
r1(config-if)#ip address 172.16.1.1 255.255.255.0 r1(config-if)#exit
r1(config)#interface loopback 1
r1(config-if)#ip address 172.16.2.1 255.255.255.0 r1(config-if)#end
Router(config)#hostname R2 R2(config)#no ip domain-lookup R2(config)#line con 0
R2(config-line)#logging syn R2(config-line)#exec-timeout 0 R2(config)#interface s1/0 R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.1.2 255.255.255.0 2、 在R2查看路由汇总信息。 r2#show ip route
R1 R2 S1/1 A 192.168.1.1/24 S1/0 B 192.168.1.2/24 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
C 172.16.0.0/16 is directly connected, Serial1/1 C 192.168.1.0/24 is directly connected, Serial1/0 3、禁用路由汇总,在R1中的s1/1上配置接口汇总。 r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#no auto-summary r1(config-router)#exit 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
C 172.16.1.1/16 is directly connected, Serial1/1
C 172.16.2.1/16 is directly connected, Serial1/1 (取消了路由汇总) C 192.168.1.0/24 is directly connected, Serial1/0
r1(config)#interface s1/1
r1(config-if)#ip summary-address rip 172.16.0.0 255.255.0.0 r1(config-if)#end
4、在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
C 172.16.0.0/16 is directly connected, Serial1/1 C 192.168.1.0/24 is directly connected, Serial1/1
八、 R1 RIP V2的认证。 S1/1 S1/0 B 192.168.1.2 R2 1.1.1.1 A 192.168.1.1
实验要求:在R1’R2上配置认证信息,保证能互ping。
注:在RIP version 2才能做认证。认证信息中name可以不一致,但password要一致才能相
互认证。直连的两台路由即使设置了认证不一致,也能连通!认证支持明文和密文。 实验步骤:
1、 基本信息的配置
Router(config)#hostname R1 R1(config)#no ip domain-lookup R1(config)#line con 0
R1(config-line)#logging syn R1(config-line)#exec-timeout 0 r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#network 192.168.1.0 r1(config-router)#network 1.0.0.0 R1(config)#interface s1/1 R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.1.1 255.255.255 R1(config)#interface lookback 0
R1(config-if)#ip address 1.1.1.1 255.0.0.0
Router(config)#hostname R2 R2(config)#no ip domain-lookup R2(config)#line con 0
R2(config-line)#logging syn R2(config-line)#exec-timeout 0 r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#network 192.168.1.0 R2(config)#interface s1/0 R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.1.2 255.255.255.0
2、 在R1的s1/1接口上配置认证信息,检测R2能否访问。 r1(config)#key chain ccna r1(config-keychain)#key 1
r1(config-keychain-key)#key-string 123 r1(config)#interface s1/1
r1(config-if)#ip rip authentication key-chain ccna r1(config-if)#ip rip authentication mode text r1(config-if)#end r2#ping 1.1.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 0 percent (0/5)
3. 在R2的s1/0接口上配置认证信息,检测R2能否访问。 R2(config)#key chain ccnp (名称可以不同) R2(config-keychain)#key 1
R2(config-keychain-key)#key-string 123 (密码一定要相同) R2(config)#interface s1/0
R2(config-if)#ip rip authentication key-chain ccnp
R2(config-if)#ip rip authentication mode text (text明文) R2(config-if)#end R2#ping 1.1.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 = 100/152/208 ms
九、 EIGRP的配置。
10.1.1.255.0.0.0 192.168.1.1 255.255.255.0 S1/1 1 2 S1/0 172.16.1.1 255.255.0.0 S1/0 3 S1/1 172.16.1.2 255.255.0.0 S1/1 S1/0 4 192.168.1.1 255.255.255.0 10.1.1.1 255.0.0.0
实验要求:用EIGRP进行全网互ping。
注:EIGRP是思科专用的路由协议,配置EIGRP是必须配置AS号,而且各路由器的
AS号必须一致,才能互ping。 实验步骤:
1.基本信息的配置。(同RIP的基本配置一致) 2.在R1上的配置。
r1(config)#router eigrp 100
r1(config-router)#network 192.168.1.0 3.在R2上的配置。