实验一
LSW1配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-t
[SW1-GigabitEthernet0/0/1]port link-type a
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port def
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-t
[SW1-GigabitEthernet0/0/2]port link-type t
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port t
[SW1-GigabitEthernet0/0/2]port trunka
[SW1-GigabitEthernet0/0/2]port trunk a
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
LSW2配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname SW2
[SW2]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]int g0/0/1
[SW2-GigabitEthernet0/0/1]port link-t
[SW2-GigabitEthernet0/0/1]port link-type a
[SW2-GigabitEthernet0/0/1]port link-type access
[SW2-GigabitEthernet0/0/1]port def
[SW2-GigabitEthernet0/0/1]port default vlan 20
[SW2-GigabitEthernet0/0/1]int g0/0/2
[SW2-GigabitEthernet0/0/2]port link-t
[SW2-GigabitEthernet0/0/2]port link-type t
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port t
[SW2-GigabitEthernet0/0/2]port trunk a
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
LSW3配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[LSW3]sysname SW3
[SW3]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW3]int g0/0/1
[SW3-GigabitEthernet0/0/1]port link-type access
[SW3-GigabitEthernet0/0/1]port default vlan 30
[SW3-GigabitEthernet0/0/1]int g0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
LSW5配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW5-hx
[SW5-hx]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW5-hx]port-group group-member g0/0/1 to g0/0/3
[SW5-hx-port-group]port link-t
[SW5-hx-port-group]port link-type t
[SW5-hx-port-group]port link-type trunk
[SW5-hx-GigabitEthernet0/0/1]port link-type trunk
[SW5-hx-GigabitEthernet0/0/2]port link-type trunk
[SW5-hx-GigabitEthernet0/0/3]port link-type trunk
[SW5-hx-port-group]port t
[SW5-hx-port-group]port trunk all
[SW5-hx-port-group]port trunk allow-pass vlan all
[SW5-hx-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW5-hx-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW5-hx-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW5-hx-port-group]q
[SW5-hx]int vlan 10
[SW5-hx-Vlanif10]ip ad 192.168.10.251 24
[SW5-hx-Vlanif10]int vlan 20
[SW5-hx-Vlanif20]ip ad 192.168.20.251 24
[SW5-hx-Vlanif20]int vlan 30
[SW5-hx-Vlanif30]ip ad 192.168.30.251 24
[SW5-hx-Vlanif30]int vlan 50
[SW5-hx-Vlanif50]ip ad 192.168.50.251 24
[SW5-hx-Vlanif50]q
[SW5-hx]int g0/0/5
[SW5-hx-GigabitEthernet0/0/5]port link-type access
[SW5-hx-GigabitEthernet0/0/5]port default vlan 50
[SW5-hx]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[SW5-hx]int vlan 10
[SW5-hx-Vlanif10]dhcp select relay
[SW5-hx-Vlanif10]dhcp relay server-ip 192.168.50.1
[SW5-hx-Vlanif10]int vlan 20
[SW5-hx-Vlanif20]dhcp select relay
[SW5-hx-Vlanif20]dhcp relay server-ip 192.168.50.1
[SW5-hx-Vlanif20]int vlan 30
[SW5-hx-Vlanif30]dhcp select relay
[SW5-hx-Vlanif30]dhcp relay server-ip 192.168.50.1
AR1配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname DHCP
[DHCP]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCP]ip pool vlan10
Info: It's successful to create an IP address pool.
[DHCP-ip-pool-vlan10]network 192.168.10.0 mask 24
[DHCP-ip-pool-vlan10]gateway-list 192.168.10.254
[DHCP-ip-pool-vlan10]dns-list 8.8.8.8
[DHCP-ip-pool-vlan10]ip pool vlan20
Info: It's successful to create an IP address pool.
[DHCP-ip-pool-vlan20]network 192.168.20.0 mask 24
[DHCP-ip-pool-vlan20]gateway-list 192.168.20.254
[DHCP-ip-pool-vlan20]dns-list 8.8.8.8
[DHCP-ip-pool-vlan20]ip pool vlan30
Info: It's successful to create an IP address pool.
[DHCP-ip-pool-vlan30]network 192.168.30.0 mask 24
[DHCP-ip-pool-vlan30]gateway-list 192.168.30.254
[DHCP-ip-pool-vlan30]dns-list 8.8.8.8
[DHCP]int g0/0/0
[DHCP-GigabitEthernet0/0/0]ip ad 192.168.50.1 24
[DHCP-GigabitEthernet0/0/0]dhcp select global
[DHCP-GigabitEthernet0/0/0]q
[DHCP]ip route-static 0.0.0.0 0.0.0.0 192.168.50.251
实验二
LSW1配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW1]int g0/0/3
[SW1-GigabitEthernet0/0/3]port link-type trunk
[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW1]stp region-configuration
[SW1-mst-region]region-name ntd2305
[SW1-mst-region]instance 10 vlan 10
[SW1-mst-region]instance 20 vlan 20
[SW1-mst-region]instance 30 vlan 30
[SW1-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
LSW2配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]int g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type access
[SW2-GigabitEthernet0/0/1]port default vlan 20
[SW2-GigabitEthernet0/0/1]int g0/0/2
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW2]int g0/0/3
[SW2-GigabitEthernet0/0/3]port link-type trunk
[SW2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW2]stp region-configuration
[SW2-mst-region]region-name ntd2305
[SW2-mst-region]instance 10 vlan 10
[SW2-mst-region]instance 20 vlan 20
[SW2-mst-region]instance 30 vlan 30
[SW2-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
LSW3配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[LSW3]sysname SW3
[SW3]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW3]int g0/0/1
[SW3-GigabitEthernet0/0/1]port link-type access
[SW3-GigabitEthernet0/0/1]port default vlan 30
[SW3-GigabitEthernet0/0/1]int g0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW3]int g0/0/3
[SW3-GigabitEthernet0/0/3]port link-type trunk
[SW3-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW3]stp region-configuration
[SW3-mst-region]region-name ntd2305
[SW3-mst-region]instance 10 vlan 10
[SW3-mst-region]instance 20 vlan 20
[SW3-mst-region]instance 30 vlan 30
[SW3-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
LSW5配置
<SW5-hx>sys
Enter system view, return user view with Ctrl+Z.
[SW5-hx]sysname SW5-hx1
[SW5-hx1]
[SW5-hx1]int g0/0/6
[SW5-hx1-GigabitEthernet0/0/6]port link-type trunk
[SW5-hx1-GigabitEthernet0/0/6]port trunk allow-pass vlan all
[SW5-hx1-GigabitEthernet0/0/6]q
[SW5-hx1]int vlan 10
[SW5-hx1-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[SW5-hx1-Vlanif10]vrrp vrid 10 priority 130
[SW5-hx1-Vlanif10]int vlan 20
[SW5-hx1-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[SW5-hx1-Vlanif20]vrrp vrid 20 priority 130
[SW5-hx1-Vlanif20]int vlan 30
[SW5-hx1-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
[SW5-hx1-Vlanif30]q
[SW5-hx1]dis vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
10 Master Vlanif10 Normal 192.168.10.254
20 Master Vlanif20 Normal 192.168.20.254
30 Backup Vlanif30 Normal 192.168.30.254
----------------------------------------------------------------
Total:3 Master:2 Backup:1 Non-active:0
[SW5-hx1]stp region-configuration
[SW5-hx1-mst-region]region-name ntd2305
[SW5-hx1-mst-region]instance 10 vlan 10
[SW5-hx1-mst-region]instance 20 vlan 20
[SW5-hx1-mst-region]instance 30 vlan 30
[SW5-hx1-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW5-hx1]stp instance 10 priority 4096
[SW5-hx1]stp instance 20 priority 4096
[SW5-hx1]stp instance 30 priority 8192
[SW5-hx1]stp instance 0 priority 4096
LSW6配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname SW6
[SW6]vlan batch 10 20 30 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW6]int vlan 10
[SW6-Vlanif10]q
[SW6]sys
[SW6]sysname SW6-hx2
[SW6-hx2]port-g
[SW6-hx2]port-group g
[SW6-hx2]port-group group-member g0/0/1 to g0/0/3 g0/0/6
[SW6-hx2-port-group]port link-t
[SW6-hx2-port-group]port link-type t
[SW6-hx2-port-group]port link-type trunk
[SW6-hx2-GigabitEthernet0/0/1]port link-type trunk
[SW6-hx2-GigabitEthernet0/0/2]port link-type trunk
[SW6-hx2-GigabitEthernet0/0/3]port link-type trunk
[SW6-hx2-GigabitEthernet0/0/6]port link-type trunk
[SW6-hx2-port-group]port t
[SW6-hx2-port-group]port trunk all
[SW6-hx2-port-group]port trunk allow-pass vlan all\
^
Error: Wrong parameter found at '^' position.
[SW6-hx2-port-group]port trunk allow-pass vlan all
[SW6-hx2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW6-hx2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW6-hx2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW6-hx2-GigabitEthernet0/0/6]port trunk allow-pass vlan all
[SW6-hx2-port-group]q
[SW6-hx2]int vlan 10
[SW6-hx2-Vlanif10]ip ad 192.168.10.252 24
[SW6-hx2-Vlanif10]int vlan 20
[SW6-hx2-Vlanif20]ip ad 192.168.20.252 24
[SW6-hx2-Vlanif20]int vlan 30
[SW6-hx2-Vlanif30]ip ad 192.168.30.252 24
[SW6-hx2-Vlanif30]int vlan 50
[SW6-hx2-Vlanif50]ip ad 192.168.50.252 24
[SW6-hx2-Vlanif50]
[SW6-hx2-Vlanif50]q
[SW6-hx2]int vlan 10
[SW6-hx2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[SW6-hx2-Vlanif10]int vlan 20
[SW6-hx2-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[SW6-hx2-Vlanif20]int vlan 30
[SW6-hx2-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
[SW6-hx2-Vlanif30]vrrp vrid 30 pr
[SW6-hx2-Vlanif30]vrrp vrid 30 priority 130
[SW6-hx2-Vlanif30]q
[SW6-hx2]dis vrrp b
[SW6-hx2]dis vrrp binding
^
Error:Incomplete command found at '^' position.
[SW6-hx2]dis vrrp br
[SW6-hx2]dis vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
10 Backup Vlanif10 Normal 192.168.10.254
20 Backup Vlanif20 Normal 192.168.20.254
30 Master Vlanif30 Normal 192.168.30.254
----------------------------------------------------------------
Total:3 Master:1 Backup:2 Non-active:0
[SW6-hx2] User interface con0 is available
Please Press ENTER.
<SW6-hx2>u t m
Info: Current terminal monitor is off.
<SW6-hx2>sys
Enter system view, return user view with Ctrl+Z.
[SW6-hx2]stp region-configuration
[SW6-hx2-mst-region]region-name ntd2305
[SW6-hx2-mst-region]instance 10 vlan 10
[SW6-hx2-mst-region]instance 20 vlan 20
[SW6-hx2-mst-region]instance 30 vlan 30
[SW6-hx2-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW6-hx2-mst-region] User interface con0 is available
Please Press ENTER.
<SW6-hx2>u t m
Info: Current terminal monitor is off.
<SW6-hx2>sys
Enter system view, return user view with Ctrl+Z.
[SW6-hx2]stp in
[SW6-hx2]stp instance 10 p
[SW6-hx2]stp instance 10 priority 8192
[SW6-hx2]stp ins
[SW6-hx2]stp instance 20 p
[SW6-hx2]stp instance 20 priority 8192
[SW6-hx2]stp in
[SW6-hx2]stp instance 30 p
[SW6-hx2]stp instance 30 priority 4096
[SW6-hx2] User interface con0 is available
Please Press ENTER.
<SW6-hx2>u t m
Info: Current terminal monitor is off.
<SW6-hx2>int vlan 10
^
Error: Unrecognized command found at '^' position.
<SW6-hx2>sys
Enter system view, return user view with Ctrl+Z.
[SW6-hx2]int vlan 10
[SW6-hx2-Vlanif10]dehcp se
[SW6-hx2-Vlanif10]dhcp se
[SW6-hx2-Vlanif10]q
[SW6-hx2]dhcp en
[SW6-hx2]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[SW6-hx2]int vlan 10
[SW6-hx2-Vlanif10]dhcp se
[SW6-hx2-Vlanif10]dhcp select re
[SW6-hx2-Vlanif10]dhcp select relay
[SW6-hx2-Vlanif10]dhcp re
[SW6-hx2-Vlanif10]dhcp relay se
[SW6-hx2-Vlanif10]dhcp relay server-ip 192.168.50.1
[SW6-hx2-Vlanif10]int vlan 20
[SW6-hx2-Vlanif20]dhcp select relay
[SW6-hx2-Vlanif20]dhcp relay server-ip 192.168.50.1
[SW6-hx2-Vlanif20]int vlan 30
[SW6-hx2-Vlanif30]dhcp select relay
[SW6-hx2-Vlanif30]dhcp relay server-ip 192.168.50.1
实验三
LSW5配置
<SW5-hx1>sys
Enter system view, return user view with Ctrl+Z.
[SW5-hx1]vlan 15
[SW5-hx1-vlan15]q
[SW5-hx1]int g0/0/7
[SW5-hx1-GigabitEthernet0/0/7]port link-t
[SW5-hx1-GigabitEthernet0/0/7]port link-type a
[SW5-hx1-GigabitEthernet0/0/7]port link-type access
[SW5-hx1-GigabitEthernet0/0/7]port def
[SW5-hx1-GigabitEthernet0/0/7]port default vlan 15
[SW5-hx1-GigabitEthernet0/0/7]q
[SW5-hx1]int vlan 15
[SW5-hx1-Vlanif15]ip ad 192.168.15.5 24
[SW5-hx1-Vlanif15]q
[SW5-hx1]ip route-s
[SW5-hx1]ip route-static 0.0.0.0 0.0.0.0 192.168.15.1
LSW6配置
<SW6-hx2>sy
Enter system view, return user view with Ctrl+Z.
[SW6-hx2]vlan 16
[SW6-hx2-vlan16]q
[SW6-hx2]int g0/0/7
[SW6-hx2-GigabitEthernet0/0/7]port link-type access
[SW6-hx2-GigabitEthernet0/0/7]port default vlan 16
[SW6-hx2]int vlan 16
[SW6-hx2-Vlanif16]ip ad 192.168.16.6 24
[SW6-hx2-Vlanif16]q
[SW6-hx2]ip route-static 0.0.0.0 0.0.0.0 192.168.16.1
AR1配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip ad 192.168.15.1 24
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip ad 192.168.16.1 24
[R1-GigabitEthernet0/0/1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip ad 100.1.1.1 29
[R1-GigabitEthernet0/0/2]q
[R1]ip route-s
[R1]ip route-static 0.0.0.0 0.0.0.0 100.1.1.2
[R1]nat a
[R1]nat address-group 1 100.1.1.3 100.1.1.5
[R1]acl 2000
[R1-acl-basic-2000]rule 10 permit source 192.168.10.0 0.0.0.255
[R1-acl-basic-2000]rule 20 permit source 192.168.20.0 0.0.0.255
[R1-acl-basic-2000]rule 30 permit source 192.168.30.0 0.0.0.255
[R1-acl-basic-2000]q
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]nat outbound 2000 address-group 1
[R1]ip route-static 192.168.0.0 16 192.168.15.5
[R1]ip route-static 192.168.0.0 16 192.168.16.6
AR2配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname ISP-dx
[ISP-dx]int g0/0/0
[ISP-dx-GigabitEthernet0/0/0]ip ad 100.1.1.2 29
[ISP-dx-GigabitEthernet0/0/0]int g0/0/1
[ISP-dx-GigabitEthernet0/0/1]ip ad 200.1.1.254 24
测试