自学内容网 自学内容网

ENSP 路由重选

在一个大型网络中有时使用不同动态路由协议,由于不同的路由协议生成路由表的算法不一样(例如:RIP根据下一条数决定路由表,OSPF根据数据链路库生成路由表),故需要引入其他的路由信息。

LSW1配置

<Huawei>sy

[Huawei]undo in en
[Huawei]vlan batch 10 20 100
[Huawei]int vlanif 10        //配置虚拟接口,用来路由通信
[Huawei-Vlanif10]ip address 192.168.10.254 24
[Huawei-Vlanif10]int vlanif 20
[Huawei-Vlanif20]ip address 192.168.20.254 24
[Huawei-Vlanif20]int vlanif 100
[Huawei-Vlanif100]ip address 192.168.1.1 24
[Huawei-Vlanif100]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 100
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 10
[Huawei-GigabitEthernet0/0/2]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 20
[Huawei-GigabitEthernet0/0/3]q
[Huawei]rip
[Huawei-rip-1]network 192.168.1.0        //宣告直连网段
[Huawei-rip-1]network 192.168.10.0
[Huawei-rip-1]network 192.168.20.0

AR1配置

 <Huawei>sy
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.2 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.2 24

[Huawei-GigabitEthernet0/0/1]q

[Huawei]rip 
[Huawei-rip-1]network 192.168.1.0
[Huawei-rip-1]q
[Huawei]ospf
[Huawei-ospf-1]area 0        //主干区域
[Huawei-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255      //宣告直连网段,使用反掩码
[Huawei-ospf-1]import-route rip 1        //在ospf 1中引入rip 1路由信息
[Huawei-ospf-1]q
[Huawei]rip 1
[Huawei-rip-1]import-route ospf 1        //在rip 1中引入ospf 1路由信息

AR2配置

<Huawei>sy
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.30.254 24 

[Huawei-GigabitEthernet0/0/1]q
[Huawei]ospf
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255

测试联通性


原文地址:https://blog.csdn.net/m0_61367139/article/details/143571159

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!