实验1:配置RIPv2
温馨提示:文中部分命令行较长,建议使用电脑以获得更好的阅读体验。


ipdi
实验要求:
内网采用RIPv2,要求PC1与PC2能访问外网的PC3;
R2与R3之间RIPv2采用md5验证;
R3与R4之间RIPv2采用明文验证(text);
R4为内部网络的边界路由器,在R4的配置默认路由指向外网;
IP地址分配
PC1:172.16.0.100/24
PC2:172.16.1.100/24
PC3:192.168.1.100/24
R1:
g0/0:172.16.0.254/24
g2/0:172.16.1.254/24
s1/0:172.16.12.1/24
R2:
s1/0:172.16.12.2/24
s1/1:172.16.23.2/24
R3:
s1/0:172.16.34.3/24
s1/1:172.16.23.3/24
R4:
s1/1:192.16.0.1/24
s1/0:172.16.34.4/24
R5:
s1/1:192.16.0.2/24
g0/0:192.168.1.254/24
R1
(1)IP配置
R1#configure terminal
R1(config)#interface GigabitEthernet2/0
R1(config-if)# ip address 172.16.1.254 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)#interface GigabitEthernet0/0
R1(config-if)# ip address 172.16.0.254 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)#interface s1/0
R1(config-if)# ip address 172.16.12.1 255.255.255.0
R1(config-if)# no shutdown
(2)配置RIP
R1(config-if)#router rip
R1(config-router)# version 2
(3)配置被动接口
R1(config-router)# passive-interface GigabitEthernet0/0
R1(config-router)# passive-interface GigabitEthernet2/0
R1(config-router)# network 172.16.0.0
(4)关闭自动汇总
R1(config-router)# no auto-summary
R2
(1)配置密钥链
R2(config)#key chain ccna
R2(config-keychain)# key 1
R2(config-keychain-key)# key-string cisco
(2)配置IP
R2(config-keychain-key)#interface Serial1/0
R2(config-if)# ip address 172.16.12.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)#interface Serial1/1
R2(config-if)# ip address 172.16.23.2 255.255.255.0
接口下应用密钥链
R2(config-if)# ip rip authentication mode md5//验证模式为MD5
R2(config-if)# ip rip authentication key-chain ccna
R2(config-if)# no shutdown
(3)配置RIP
R2(config-if)#router rip
R2(config-router)# version 2
R2(config-router)# network 172.16.0.0
R2(config-router)# no auto-summary
R3
(1)配置密钥链
R3#conf t
R3(config)#key chain ccna
R3(config-keychain)# key 1
R3(config-keychain-key)# key-string cisco
R3(config-keychain-key)#key chain ccnp
R3(config-keychain)# key 2
R3(config-keychain-key)# key-string cisco
(2)配置IP
R3(config-keychain-key)#interface Serial1/0
R3(config-if)# ip address 172.16.34.3 255.255.255.0
R3(config-if)# ip rip authentication mode text//验证模式为明文
R3(config-if)# ip rip authentication key-chain ccnp
R3(config-if)# no shutdown
R3(config-if)#interface Serial1/1
R3(config-if)# ip address 172.16.23.3 255.255.255.0
接口下应用密钥链
R3(config-if)# ip rip authentication mode md5//验证模式为MD5
R3(config-if)# ip rip authentication key-chain ccna
R3(config-if)# no shutdown
(3)配置RIP
R3(config-if)#router rip
R3(config-router)# version 2
R3(config-router)# network 172.16.0.0
R3(config-router)# no auto-summary
R4
(1)配置密钥链
R4#conf t
R4(config)#key chain ccnp
R4(config-keychain)# key 2
R4(config-keychain-key)# key-string cisco
(2)配置IP
R4(config-keychain-key)#interface Serial1/0
R4(config-if)# ip address 172.16.34.4 255.255.255.0
R4(config-if)# ip rip authentication mode text//验证模式为明文
R4(config-if)# ip rip authentication key-chain ccnp
R4(config-if)# no shutdown
R4(config-if)#interface Serial1/1
R4(config-if)# ip address 192.16.0.1 255.255.255.0
R4(config-if)# no shutdown
(3)配置RIP
R4(config-if)#router rip
R4(config-router)# version 2
R4(config-router)# network 172.16.0.0
R4(config-router)# default-information originate
R4(config-router)# no auto-summary
(4)配置默认路由
R4(config)#ip route 0.0.0.0 0.0.0.0 Serial1/1
R5
(1)配置IP
R5#conf t
R5(config)#interface GigabitEthernet0/0
R5(config-if)# ip address 192.168.1.254 255.255.255.0
R5(config-if)# no shutdown
R5(config-if)#interface Serial1/1
R5(config-if)# ip address 192.16.0.2 255.255.255.0
R5(config-if)# no shutdown
(2)配置默认路由
R5(config)#ip route 0.0.0.0 0.0.0.0 s1/1

验证





在R4上执行
R4#clear ip route *,抓包可以看到明文传输的密码


在R3上执行
R3#clear ip route *,抓包可以看到R2与R3密码验证采用加密验证


注意:仅供学习参考,转载请注明出处。