1、 实验目的:
通过本次的使用,我们可以掌握如下技能
1) RIPv2明文认证的配置和匹配原则。
2) RIPv2 MD5认证的配置和匹配原则。
3) RIPv2的触发更新。
2、 实验拓扑图:
3、 实验步骤:
(1)根据网络拓扑图说明,配置各个接口的地址。
R!(config)#hostname R1
R1(config)#interface loopback 0
R1(config-if)#ip ad
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#no shutdown
R1(config)#interface serial 0/1
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#no shutdown
R1(config-if)#end
R1#
Router(config)#hostname R2
R2(config)#interface s
R2(config)#interface serial 0/1
R2(config-if)#cl
R2(config-if)#clock r
R2(config-if)#clock rate 128000
R2(config-if)#ip ad
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#no shutdown
R2(config-if)#end
R2(config)#interface serial 0/2
R2(config-if)#ip ad
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#no shutdown
R2(config-if)#
Router(config)#hos
Router(config)#hostname R3
R3(config)#interface serial 0/2
R3(config-if)#ip ad
R3(config-if)#ip address 192.168.2.2 255.255.255.0
R3(config-if)#clock rate 128000
R3(config-if)#no sh
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface serial 0/3
R3(config-if)#ip ad
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#
R4(config)#int
R4(config)#interface s
R4(config)#interface serial 0/3
R4(config-if)#ip ad
R4(config-if)#ip address 192.168.3.2 255.255.255.0
R4(config-if)#no s
R4(config-if)#no sh
R4(config-if)#no shutdown
R4(config-if)#exit
#p#
(2)启用RIPV2
R1(config)#router rip
R1(config-router)#ver
R1(config-router)#version 2
R1(config-router)#network 1.0.0.0
R1(config-router)#network 192.1681.0
R1(config-router)#
注:启用RIPv2,并将去网络发布出去
R2(config)#router rip
R2(config-router)#ver
R2(config-router)#version 2
R2(config-router)#no au
R2(config-router)#no auto-summary
R2(config-router)#net
R2(config-router)#network 192.168.1.0
R2(config-router)#network 192.168.2.0
R2(config-router)#
R3(config)#router rip
R3(config-router)#ve
R3(config-router)#version 2
R3(config-router)#net
R3(config-router)#network 192.168.2.0
R3(config-router)#network 192.168.3.0
R3(config-router)#
R4(config)#router rip
R4(config-router)#ve
R4(config-router)#version 2
R4(config-router)#no au
R4(config-router)#no auto-summary
R4(config-router)#network 192.168.3.0
(3)配置RIPv2的认证
R1(config)#key chain xia
R1(config-keychain)#key 1
R1(config-keychain-key)#key-string xiajiang
R1(config-keychain-key)#exit
R1(config)#interface serial 0/0
R1(config-if)#ip rip authentication ke
R1(config-if)#ip rip authentication key-chain xia
R1(config-if)#ip rip triggered
R1(config-if)#
注:启用RIPv2的认证
R2(config)#key chain xia
R2(config-keychain)#key 1
R2(config-keychain-key)#ke
R2(config-keychain-key)#key-string xiajiang
R2(config-keychain-key)#end
R2(config)#interface s0/0
R2(config-if)#ip r
R2(config-if)#ip ri
R2(config-if)#ip rip tri
R2(config-if)#ip rip triggered
R2(config-if)#ip rip authentication key-chain xia
R2(config-if)#exit
R2(config)#interface serial 0/1
R2(config-if)#ip rip authentication key-chain xia
R2(config-if)#ip rip triggered
R2(config-if)#
R3(config)#key chain xia
R3(config-keychain)#key 1
R3(config-keychain-key)#key-string xiajiang
R3(config-keychain-key)#exit
R3(config-keychain)#exit
R3(config)#interface serial 0/1
R3(config-if)#ip rip authentication key-chain xia
R3(config-if)#ip rip triggered
R3(config-if)#exit
R3(config)#interface serial 0/2
R3(config-if)#ip rip authentication key-chain xia
R3(config-if)#ip rip triggered
R3(config-if)#
R4(config)#key chain xia
R4(config-keychain)#key 1
R4(config)#interface serial 0/2
R4(config-if)#ip rip authentication key-chain xia
R4(config-if)#ip rip triggered
R4(config-if)#
#p#
(4)测试配置情况
R1#show ip pro
R1#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 1 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0 2 2 Yes xia
Loopback0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
1.0.0.0
192.168.1.0
Routing Information Sources:
Gateway Distance Last Update
192.168.1.2 120 00:00:19
Distance: (default is 120)
R1#
注:由上面的“Serial0/0 2 2 Yes xia”表明已经在上Serial0/0启用了触发更新。
R2#show ip rip dat
R2#show ip rip database
1.0.0.0/8 auto-summary
1.0.0.0/8
[1] via 192.168.1.1, 00:02:48 (permanent), Serial0/0
* Triggered Routes:
- [1] via 192.168.1.1, Serial0/0
192.168.1.0/24 auto-summary
192.168.1.0/24 directly connected, Serial0/0
192.168.2.0/24 auto-summary
192.168.2.0/24 directly connected, Serial0/1
192.168.3.0/24 auto-summary
192.168.3.0/24
[1] via 192.168.2.2, 00:01:13 (permanent), Serial0/1
* Triggered Routes:
- [1] via 192.168.2.2, Serial0/1
R2#
注:从路由器R2的rip数据值可以进一步的看出,在Serial0/0和Serial0/1启用了触发更新。
如果想启用MD5认证,只要在接口下声明模式为MD5即可,具体配置命令如下:
R1(config-keychain)#key 1
R1(config-keychain-key)#key-string xiajiang
R1(config)#interface serial 0/0
R1(config-if)#ip rip authentication mode md5
R1(config-if)#ip rip authentication key-chain xia
R1(config-if)#ip rip triggered
R1(config-if)#
具体怎样去配置MD5认证,这里就不在多说了。OK,到此实验结束!!!!!!!!
【编辑推荐】