拓扑图如下
client6:
client4:
client5:
###LSW9配置
[Huawei]vlan 40
[Huawei]vlan 50
[Huawei]vlan 60
[Huawei]vlan 70
[Huawei]in g0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]port default vlan 40
[Huawei]in g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 50
[Huawei]in g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 60
[Huawei]in g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 70
[Huawei]in v 40
[Huawei-Vlanif40]ip address 192.168.40.1 24
[Huawei]in v 50
[Huawei-Vlanif50]ip address 192.168.50.1 24
[Huawei]in v 60
[Huawei-Vlanif60]ip address 192.168.60.1 24
[Huawei]in v 70
[Huawei-Vlanif70]ip address 192.168.70.2 24
开启ospf
[Huawei]ospf
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.40.0 255.255.255.0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.50.0 255.255.255.0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.60.0 255.255.255.0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.70.0 255.255.255.0
[Huawei-ospf-1-area-0.0.0.0]dis th
area 0.0.0.0
network 192.168.40.0 0.0.0.255
network 192.168.50.0 0.0.0.255
network 192.168.60.0 0.0.0.255
network 192.168.70.0 0.0.0.255
return
###AR3配置
[Huawei]in g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.70.1 24
[Huawei]in g0/0/2
[Huawei-GigabitEthernet0/0/2]ip address 121.200.76.66 28
开启ospf
[Huawei]ospf
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.70.0 255.255.255.0
[Huawei-ospf-1-area-0.0.0.0]network 121.200.76.66 255.255.255.240
[Huawei-ospf-1-area-0.0.0.0]dis th
[V200R003C00]
area 0.0.0.0
network 121.200.76.64 0.0.0.15
network 192.168.70.0 0.0.0.255
return
###AR4配置
[Huawei]in g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 121.200.76.65 28
###AR3做PAT
[Huawei]acl number 2000
[Huawei-acl-basic-2000]rule 5 permit source 192.168.40.0 0.0.0.255
[Huawei-acl-basic-2000]rule 6 permit source 192.168.50.0 0.0.0.255
[Huawei-acl-basic-2000]rule 7 permit source 192.168.60.0 0.0.0.255
[Huawei-acl-basic-2000]dis th
[V200R003C00]
acl number 2000
rule 5 permit source 192.168.40.0 0.0.0.255
rule 6 permit source 192.168.50.0 0.0.0.255
rule 7 permit source 192.168.60.0 0.0.0.255
return
[Huawei-acl-basic-2000]in g0/0/2
[Huawei-GigabitEthernet0/0/2]nat outbound 2000
[Huawei-GigabitEthernet0/0/2]dis th
[V200R003C00]
interface GigabitEthernet0/0/2
ip address 121.200.76.66 255.255.255.240
nat outbound 2000
return
###验证
client4
client5
client6