1、配置PC IP地址及网关
2、配置各路由器的地址,并启用rip服务和ospf服务
3、rip和ospf协议相互注入的配置
4、测试连通性
5、对路由器R1与R2所在的区域做密文验证
6、对路由器R4与R5间的链路做接口明文验证
一、配置PC机IP地址及网关
二、配置各路由接口地址及启用Rip和ospf服务
1、配置各路由接口地址
AR5
int Serial4/0/01
IP add 10.81.70.64 24 //进入serial接口并设置接口地址
剩下的接口设置同上
(display ip int brief用于查看各接口)
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.81.30.55/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial4/0/0 unassigned down down
Serial4/0/1 10.81.70.64/24 up up
AR2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned down down
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial3/0/0 192.81.50.72/24 up up
Serial3/0/1 unassigned down down
Serial4/0/0 192.81.20.24/24 up up
Serial4/0/1 10.81.70.65/24 up up
AR1
int loopBack 1
ip add 172.81.40.3 29 //创建环回接口(loopback)并设置其IP地址
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned down down
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack1 172.81.40.3/29 up up(s)
NULL0 unassigned up up(s)
Serial4/0/0 192.81.20.23/24 up up
Serial4/0/1 unassigned down down
AR3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned down down
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial4/0/0 192.81.50.73/24 up up
Serial4/0/1 192.81.120.16/24 up up
AR4
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.81.60.34/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial4/0/0 192.81.120.17/24 up up
Serial4/0/1 unassigned down down
2、启用Rip和ospf服务
(1)、启用ospf服务
AR5
[Huawei]ospf //启用ospf服务
[Huawei-ospf-1]area 3 //启用进程3
[Huawei-ospf-1-area-0.0.0.3]network 10.81.70.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.3]network 192.81.30.0 0.0.0.255 //公布路由相邻的网段及反掩码
AR1
[Huawei]ospf
[Huawei-ospf-1]area 3
[Huawei-ospf-1-area-0.0.0.3]network 171.81.40.3 0.0.0.7 //将环回接口公布,并用于后面的测试
[Huawei-ospf-1-area-0.0.0.3]network 192.81.20.0 0.0.0.255
(2)、启用rip服务
AR3
[Huawei]rip
[Huawei-rip-1]undo summary //关闭自动聚合
[Huawei-rip-1]version 2 //路由信息协议 版本2
[Huawei-rip-1]network 192.81.50.0
[Huawei-rip-1]network 192.81.120.0
AR4
[Huawei]rip
[Huawei-rip-1]undo summary
[Huawei-rip-1]version 2
[Huawei-rip-1]network 192.81.120.0
[Huawei-rip-1]network 192.81.60.0
三、rip和ospf协议相互注入的配置
[Huawei]rip
[Huawei-rip-1]undo summary
[Huawei-rip-1]version 2
[Huawei-rip-1]network 192.81.50.0
[Huawei-rip-1]quit
[Huawei]ospf
[Huawei-ospf-1]area 3
[Huawei-ospf-1-area-0.0.0.3]network 192.81.20.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.3]network 10.81.70.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.3]quit
[Huawei-ospf-1]quit
互相注入
[Huawei]rip
[Huawei-rip-1]import-route ospf //用来引入其他路由协议的路由信息
[Huawei-rip-1]qu
[Huawei]ospf
[Huawei-ospf-1]import-route rip
四、测试互通性
PC与环回接口间测试
PC>ping 172.81.40.3
Ping 172.81.40.3: 32 data bytes, Press Ctrl_C to break
From 172.81.40.3: bytes=32 seq=1 ttl=253 time=31 ms
From 172.81.40.3: bytes=32 seq=2 ttl=253 time=32 ms
From 172.81.40.3: bytes=32 seq=3 ttl=253 time=31 ms
From 172.81.40.3: bytes=32 seq=4 ttl=253 time=15 ms
From 172.81.40.3: bytes=32 seq=5 ttl=253 time=31 ms
--- 172.81.40.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/28/32 ms
PC间通信
PC>ping 192.81.60.35
Ping 192.81.60.35: 32 data bytes, Press Ctrl_C to break
From 192.81.60.35: bytes=32 seq=1 ttl=124 time=31 ms
From 192.81.60.35: bytes=32 seq=2 ttl=124 time=15 ms
From 192.81.60.35: bytes=32 seq=3 ttl=124 time=32 ms
From 192.81.60.35: bytes=32 seq=4 ttl=124 time=16 ms
From 192.81.60.35: bytes=32 seq=5 ttl=124 time=47 ms
--- 192.81.60.35 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/28/47 ms
五、添加区域密文验证
AR5
[Huawei]ospf
[Huawei-ospf-1]area 3
[Huawei-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 2031381 //密文为"2031381"
AR1与AR2做相同设置
六、对路由器R4与R5间的链路做接口明文验证
AR3
[Huawei]int Serial 4/0/1
[Huawei-Serial4/0/1]rip authentication-mode simple plain 2031381
AR4做相同设置
七、测试互通性
PC与环回接口间测试
PC>ping 172.81.40.3
Ping 172.81.40.3: 32 data bytes, Press Ctrl_C to break
From 172.81.40.3: bytes=32 seq=1 ttl=253 time=31 ms
From 172.81.40.3: bytes=32 seq=2 ttl=253 time=32 ms
From 172.81.40.3: bytes=32 seq=3 ttl=253 time=31 ms
From 172.81.40.3: bytes=32 seq=4 ttl=253 time=15 ms
From 172.81.40.3: bytes=32 seq=5 ttl=253 time=31 ms
--- 172.81.40.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/28/32 ms
PC间通信
PC>ping 192.81.60.35
Ping 192.81.60.35: 32 data bytes, Press Ctrl_C to break
From 192.81.60.35: bytes=32 seq=1 ttl=124 time=31 ms
From 192.81.60.35: bytes=32 seq=2 ttl=124 time=15 ms
From 192.81.60.35: bytes=32 seq=3 ttl=124 time=32 ms
From 192.81.60.35: bytes=32 seq=4 ttl=124 time=16 ms
From 192.81.60.35: bytes=32 seq=5 ttl=124 time=47 ms
--- 192.81.60.35 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/28/47 ms
依然互通!