目的:实验ospf动态路由协议连通A与B部门
AR1配置
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 1.1.1.1 24
[Huawei]vlan batch 10
[Huawei]int Vlanif 10
[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]port link-type access
[Huawei-Ethernet0/0/0]port default vlan 10
[Huawei-Vlanif10]ip address 192.168.1.1 24
[Huawei]os
[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 1.1.1.0 0.0.0.255
AR2配置
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 1.1.1.2 24
[Huawei]vlan batch 20
[Huawei]int Vlanif 20
[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]port link-type access
[Huawei-Ethernet0/0/0]port default vlan 20
[Huawei-Vlanif10]ip address 192.168.2.1 24
[Huawei]ospf 1
[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 1.1.1.0 0.0.0.255
PC1配置192.168.1.10
PC2配置192.168.2.10
两台主机可以互通