华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)

华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第1张图片
要求:
华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第2张图片

R1:
<Huawei>u t m 
Info: Current terminal monitor is off.
<Huawei>sys 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 
[Huawei]sysname R1
[R1]us 
[R1]user-int 
[R1]user-interface co 
[R1]user-interface console 0
[R1-ui-console0]id 
[R1-ui-console0]idle-timeout 0 0
[R1-ui-console0]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.0.0.1 24
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 11.0.0.1 24
[R1-GigabitEthernet0/0/1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip add 12.0.0.1 24
[R1-GigabitEthernet0/0/2]ospf 
[R1-GigabitEthernet0/0/2]q
[R1]ospf 1
R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]net 
[R1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 12.0.0.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 11.0.0.0 0.0.0.255
ospf-1-area-0.0.0.0]q
[R1-ospf-1]q
[R1]acl 3000
1-acl-adv-3000]rule permit ip source 192.168.10.0 0.0.0.255
[R1-acl-adv-3000]int g0/0/1
[R1-GigabitEthernet0/0/1]int g0/0/2
[R1-GigabitEthernet0/0/2]nat outbound 3000

华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第3张图片

**R2:**
<Huawei>u t m 
Info: Current terminal monitor is off.
<Huawei>sys 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 
[Huawei]sysname R2
[R2]user-interface co 
[R2]user-interface console 0
[R2-ui-console0]idle-timeout 0 0
[R2-ui-console0]q
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[R2-GigabitEthernet0/0/0]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 24.0.0.2 24
[R2-GigabitEthernet0/0/2]int g0/0/1
R2-GigabitEthernet0/0/1]ip add 23.0.0.2 24
[R2]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R2]ip pool 1
Info: It's successful to create an IP address pool.
[R2-ip-pool-1]gateway-list 192.168.40.1
[R2-ip-pool-1]network 192.168.40.0 mask 24
[R2-ip-pool-1]dns-list 8.8.8.8
R2-ip-pool-1]lease day 7
[R2-ip-pool-1]int g0/0/1
R2-GigabitEthernet0/0/1]dhcp select global 
[R2-GigabitEthernet0/0/1]q
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 12.0.0.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]q
[R2-ospf-1]rip 1
[R2-rip-1]version 2
[R2-rip-1]undo summary 
[R2-rip-1]network 23.0.0.0
[R2-rip-1]q
[R2]ip route-static 192.168.30.0 24 24.0.0.4
[R2]rip 
R2-rip-1]import-route ospf 1 cost 3
[R2]ospf 1
[R2-ospf-1]import-route rip 1 type 1 cost 1
[R2-ospf-1]import-route static 
[R2-ospf-1]import-route direct 
**R3:**
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>ys 
<Huawei>sys 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 
[Huawei]sysname R3
[R3]us 
[R3]user-int 
[R3]user-interface co 
[R3]user-interface console 0
[R3-ui-console0]id 
[R3-ui-console0]idle-timeout 0 0
[R3-ui-console0]q
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 23.0.0.1 24
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.40.1 24
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 192.168.50.1 24
[R3]dhcp  
[R3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]int g0/0/1
R3-GigabitEthernet0/0/1]dhcp select relay 
R3-GigabitEthernet0/0/1]dhcp relay server-ip 23.0.0.2
[R3-GigabitEthernet0/0/1]q
[R3]rip 1
[R3-rip-1]vers 
[R3-rip-1]version 2
[R3-rip-1]undo sum 
[R3-rip-1]undo summary 
[R3-rip-1]network 23.0.0.0 
[R3-rip-1]network 192.168.40.0
[R3-rip-1]network 192.168.50.1
[R3-rip-1]network 192.168.50.0
-rip-1]q
[R3-GigabitEthernet0/0/2]int g0/0/0
[R3-GigabitEthernet0/0/0]nat server protocol tcp global 23.0.0.3 8080 inside 192
.168.50.100 www
**R4:**
<Huawei>u t m 
Info: Current terminal monitor is off.
<Huawei>sys 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 
[Huawei]sysname R4
[R4]us 
[R4]user-int 
[R4]user-interface co 
[R4]user-interface console 0
[R4-ui-console0]id 
[R4-ui-console0]idle-timeout 0 0
[R4-ui-console0]q
[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]us 
[R4-GigabitEthernet0/0/2]ip add 24.0.0.4 24
[R4-GigabitEthernet0/0/2]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.30.1 24
[R4-GigabitEthernet0/0/0]ip rou 
[R4-GigabitEthernet0/0/0]ip rou
[R4-GigabitEthernet0/0/0]q
[R4]ip rou 
[R4]ip route
[R4]ip route-static 0.0.0.0 0.0.0.0 24.0.0.2
[R4]os 
[R4]ospf 1
[R4-ospf-1]default-route-advertise always 
**SW1:**
<Huawei>u t m 
Info: Current terminal monitor is off.
<Huawei>sys 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 
[Huawei]sysname sw1
[sw1]us 
[sw1]user-int 
[sw1]user-interface co 
sw1]user-interface console 0
[sw1-ui-console0]us 
[sw1-ui-console0]id 
[sw1-ui-console0]idle-timeout 0 0
[sw1-ui-console0]q
[sw1]vlan bat 10 20 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1]lacp priority 1000
[sw1]interface Eth-Trunk 1
[sw1-Eth-Trunk1]bpd 
[sw1-Eth-Trunk1]bpdu en 
[sw1-Eth-Trunk1]bpdu enable 
[sw1-Eth-Trunk1]mod 
[sw1-Eth-Trunk1]mode la 
[sw1-Eth-Trunk1]mode lacp-static 
[sw1-Eth-Trunk1]int g0/0/2
[sw1-GigabitEthernet0/0/2]eth 
[sw1-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-GigabitEthernet0/0/2]int g0/0/3
[sw1-GigabitEthernet0/0/3]eth 
[sw1-GigabitEthernet0/0/3]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-GigabitEthernet0/0/3]int g0/0/4
[sw1-GigabitEthernet0/0/4]eth 
[sw1-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-GigabitEthernet0/0/4]int eth 
[sw1-GigabitEthernet0/0/4]int eth-trunk 1
[sw1-Eth-Trunk1]max 
[sw1-Eth-Trunk1]max act 
[sw1-Eth-Trunk1]max active-linknumber 2
[sw1-Eth-Trunk1]q
[sw1]int g0/0/1
sw1-GigabitEthernet0/0/1]port link-type trunk 
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[sw1-GigabitEthernet0/0/1]int eth 
[sw1-GigabitEthernet0/0/1]int eth-trunk 1
[sw1-Eth-Trunk1]port link-type trunk 
[sw1-Eth-Trunk1]port trunk allow-pass vlan all 
[sw1-Eth-Trunk1]int g0/0/5
sw1-GigabitEthernet0/0/5]port link-type access 
[sw1-GigabitEthernet0/0/5]port default vlan 100
[sw1-GigabitEthernet0/0/5]q
[sw1]stp 
[sw1]stp mode mstp 
[sw1]stp region-configuration  
[sw1-mst-region]region-name huawei
[sw1-mst-region]revision-level 1
[sw1-mst-region]instance 1 vlan 10
[sw1-mst-region]instance 2 vlan 20
[sw1-mst-region]active region-configuration 
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-mst-region]stp 
[sw1-mst-region]q
[sw1]stp 
sw1]stp instance 1 root primary 
[sw1]stp 
sw1]stp instance 2 root secondary 
[sw1]int vlanif 10
[sw1-Vlanif10]ip add 192.168.10.10 24
[sw1-Vlanif10]int vlanif 20
[sw1-Vlanif20]ip add 192.168.20.10 24
[sw1-Vlanif20]int vlanif 10
[sw1-Vlanif10]int vlanif 100
[sw1-Vlanif100]ip add 10.0.0.10 24
[sw1-Vlanif100]int vlanif 10
sw1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
[sw1-Vlanif10]int vlanif 20
[sw1-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[sw1-Vlanif20]vrrp vrid 2 priority 120
w1-Vlanif20]vrrp vrid 2 preempt-mode timer delay 6
w1-Vlanif20]vrrp vrid 2 track interface g0/0/5 reduced 30
[sw1-Vlanif20]q
[sw1]ospf 1
[sw1-ospf-1]area 0
[sw1-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[sw1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.0.0.255
[sw1-ospf-1-area-0.0.0.0]q
[sw1-ospf-1]q
**SW2:**
<Huawei>u t m 
Info: Current terminal monitor is off.
<Huawei>sys 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 
[Huawei]sysname sw2
sw2]user-interface console 0
[sw2-ui-console0]id 
[sw2-ui-console0]idle-timeout 0 0
[sw2-ui-console0]q
[sw2]vlan bat 10 20 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2]int 
[sw2]interface eth 
[sw2]interface Eth-Trunk 1
sw2-Eth-Trunk1]bpdu enable 
[sw2-Eth-Trunk1]mode lacp-static 
[sw2-Eth-Trunk1]int g0/0/2
[sw2-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2-GigabitEthernet0/0/2]int g0/0/3
[sw2-GigabitEthernet0/0/3]eth 
[sw2-GigabitEthernet0/0/3]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2-GigabitEthernet0/0/3]int g0/0/4
[sw2-GigabitEthernet0/0/4]eth 
[sw2-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2-GigabitEthernet0/0/4]int eth-trunk 1
[sw2-Eth-Trunk1]max 
[sw2-Eth-Trunk1]max ac 
[sw2-Eth-Trunk1]max active-linknumber 2
[sw2-Eth-Trunk1]q
[sw2]int g0/0/1
w2-GigabitEthernet0/0/1]port link-type trunk 
[sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[sw2-GigabitEthernet0/0/1]int eth-trunk 1
[sw2-Eth-Trunk1]port link-type trunk 
[sw2-Eth-Trunk1]port trunk allow-pass vlan all 
[sw2-Eth-Trunk1]int g0/0/5
sw2-GigabitEthernet0/0/5]port link-type access 
[sw2-GigabitEthernet0/0/5]port default vlan 100
[sw2-GigabitEthernet0/0/5]q
sw2]stp mode mstp 
[sw2]stp region-configuration 
[sw2-mst-region]region-name huawei
[sw2-mst-region]revision-level 1
[sw2-mst-region]instance 1 vlan 10
[sw2-mst-region]instance 2 vlan 20
[sw2-mst-region]active region-configuration 
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2-mst-region]q
[sw2]stp instance 2 root primary 
[sw2]stp instance 1 root secondary 
[sw2]int vlanif 10
[sw2-Vlanif10]ip add 192.168.10.20 24
[sw2-Vlanif10]int vlanif 20
[sw2-Vlanif20]ip add 192.168.20.20 24
[sw2-Vlanif20]int vlanif 100
[sw2-Vlanif100]ip add 11.0.0.20 24
[sw2-Vlanif100]int vlanif 10
[sw2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
[sw2-Vlanif10]vrrp vrid 1 priority 120
Vlanif10]vrrp vrid 1 preempt-mode timer delay 6
-Vlanif10]vrrp vrid 1 track interface g0/0/5 reduced 30
[sw2-Vlanif10]int vlanif 20
sw2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[sw2-Vlanif20]ospf 1
[sw2-ospf-1]area 0
[sw2-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
[sw2-ospf-1-area-0.0.0.0]network 11.0.0.0 0.0.0.255
**sw3**
<Huawei>sys 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 
[Huawei]sysname sw3
w3]user-interface console 0
[sw3-ui-console0]id 
[sw3-ui-console0]idle-timeout 0 0
[sw3-ui-console0]q
[sw3]vlan bat 10 20 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3]int e0/0/1
sw3-Ethernet0/0/1]port link-type access 
[sw3-Ethernet0/0/1]port default vlan 10
[sw3-Ethernet0/0/1]int e0/0/2
sw3-Ethernet0/0/2]port link-type access 
[sw3-Ethernet0/0/2]port de 
[sw3-Ethernet0/0/2]port default vlan 20
[sw3-Ethernet0/0/2]int e0/0/3
sw3-Ethernet0/0/3]port link-type access 
sw3-Ethernet0/0/3]port default vlan 10
[sw3-Ethernet0/0/3]int g0/0/1
w3-GigabitEthernet0/0/1]port link-type trunk 
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[sw3-GigabitEthernet0/0/1]int g0/0/2
w3-GigabitEthernet0/0/2]port link-type trunk 
[sw3-GigabitEthernet0/0/2]port trunk allow-pass vlan all 
[sw3-GigabitEthernet0/0/2]q
[sw3]stp mode mstp 
[sw3]stp region-configuration 
[sw3-mst-region]region-name huawei
[sw3-mst-region]revision-level 1
[sw3-mst-region]instance 1 vlan 10
[sw3-mst-region]instance 2 vlan 20
[sw3-mst-region]active region-configuration 

ping:
华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第4张图片
华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第5张图片
华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第6张图片
华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第7张图片
华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第8张图片
华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会)_第9张图片

你可能感兴趣的:(华为ensp_MSTP、LACP、VRRP、DHCP、DHCP中继、NAT、OSPF、RIP技术实验(超详细,看必会))