實(shí)驗(yàn)1:配置RIPv2
溫馨提示:文中部分命令行較長(zhǎng),建議使用電腦以獲得更好的閱讀體驗(yàn)。


ipdi
實(shí)驗(yàn)要求:
內(nèi)網(wǎng)采用RIPv2,要求PC1與PC2能訪問外網(wǎng)的PC3;
R2與R3之間RIPv2采用md5驗(yàn)證;
R3與R4之間RIPv2采用明文驗(yàn)證(text);
R4為內(nèi)部網(wǎng)絡(luò)的邊界路由器,在R4的配置默認(rèn)路由指向外網(wǎng);
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)配置被動(dòng)接口
R1(config-router)# passive-interface GigabitEthernet0/0
R1(config-router)# passive-interface GigabitEthernet2/0
R1(config-router)# network 172.16.0.0
(4)關(guān)閉自動(dòng)匯總
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
接口下應(yīng)用密鑰鏈
R2(config-if)# ip rip authentication mode md5//驗(yàn)證模式為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//驗(yàn)證模式為明文
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
接口下應(yīng)用密鑰鏈
R3(config-if)# ip rip authentication mode md5//驗(yàn)證模式為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//驗(yàn)證模式為明文
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)配置默認(rèn)路由
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)配置默認(rèn)路由
R5(config)#ip route 0.0.0.0 0.0.0.0 s1/1

驗(yàn)證





在R4上執(zhí)行
R4#clear ip route *,抓包可以看到明文傳輸?shù)拿艽a


在R3上執(zhí)行
R3#clear ip route *,抓包可以看到R2與R3密碼驗(yàn)證采用加密驗(yàn)證


注意:僅供學(xué)習(xí)參考,轉(zhuǎn)載請(qǐng)注明出處。