最后更新:2022-07-18 16:38:16 手机定位技术交流文章

内部网络使用RIPv2,要求PC1和PC2访问PC3的外部网络;
RIPv2在R2和R3之间采用md5验证;
RIPv2在R3和R4之间使用明确的认证(文本);
R4是内部网络的边界路由器,在R4的配置中是指向外部网络的默认路由器;
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
( 1 ) IP 配置
R1#conf t
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
R1(config-router)# passive-interface GigabitEthernet0/0
R1(config-router)# passive-interface GigabitEthernet2/0
R1(config-router)# network 172.16.0.0
R1(config-router)# no auto-summary
( 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
( 3 )接口下应用密钥链
R2(config-if)# ip rip authentication mode md5// 验证模式为 MD5
R2(config-if)# ip rip authentication key-chain ccna
R2(config-if)# no shutdown
( 4 )配置 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
( 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
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
( 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
( 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 使用加密验证的密码验证



本文由 在线网速测试 整理编辑,转载请注明出处。