ospf协议实例,准备2个路由器,2个客户端。如以下拓扑图:
按以上标注的IP相应配置,接着我们配置路由器,命令如下:
AR1路由器配置:
<Huawei>
<Huawei>sys
[Huawei]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 202.196.1.1 24
[R1]router id 192.168.1.254
[R1]ospf
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.254 255.255.255.0
[R1-ospf-1-area-0.0.0.0]network 202.196.1.0 255.255.255.0
<R1>sa
AR2路由器配置:
<Huawei>
<Huawei>sys
[Huawei]sys R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.254 24
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 202.196.1.2 24
[R2]router id 192.168.2.254
[R2]ospf
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.2.254 255.255.255.0
[R2-ospf-1-area-0.0.0.0]network 202.196.1.0 255.255.255.0
<R2>sa
配置完了我们来测试下:
PC1 ping PC2
PC2 ping PC1
经测试两台客户端互ping成功。
上一篇:华为eNSP模拟器 rip协议
讨论数量:0