NETWORK DAY03(01):路由的基础配置实现全网互通。

喜欢而已 提交于 2020-02-28 12:41:05

1.1 问题
通过配置静态路由协议ospf实现全网互通,按照图-1拓扑图所示

在这里插入图片描述
图-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
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!