1.1 问题
通过配置静态路由协议ospf实现全网互通,按照图-1拓扑图所示
1.2 步骤
实现此案例需要按照如下步骤进行。
步骤一:配置交换机
1)S3700交换机配置
[Huawei]vlan batch 2 3 //创建VLAN2、3
[Huawei]interface Ethernet0/0/2
[Huawei-Ethernet0/0/2]port default vlan 2
[Huawei]interface Ethernet0/0/3
[Huawei-Ethernet0/0/3]port default vlan 3
[Huawei]interface Ethernet0/0/22
[Huawei-Ethernet0/0/22]port link-type trunk
[Huawei-Ethernet0/0/22]port trunk allow-pass vlan all
2)S5700交换机配置
[Huawei]vlan batch 2 3 4 //创建VLAN2、3、4
[Huawei]interface Vlanif 1
[Huawei-Vlanif4]ip address 192.168.1.254 24
[Huawei]interface Vlanif 2
[Huawei-Vlanif4]ip address 192.168.2.254 24
[Huawei]interface Vlanif 3
[Huawei-Vlanif4]ip address 192.168.3.254 24
[Huawei]interface Vlanif 4
[Huawei-Vlanif4]ip address 192.168.4.1 24
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1] port link-type trunk
[Huawei-GigabitEthernet0/0/1] port trunk allow-pass vlan all
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2] port link-type access
[Huawei-GigabitEthernet0/0/2] port default vlan 4
[Huawei]ospf 1
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[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.3.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.4.2
步骤二:配置路由器
AR2220路由器配置如下
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0] ip address 192.168.4.2 24
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/0] ip address 192.168.5.254 24
[Huawei]ospf 1
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
————————————————
版权声明:本文为CSDN博主「Pseudo、lover」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_45843450/article/details/104551702