华为综合实验(交换机配置)

华为综合实验(交换机配置)_第1张图片综合实验代码:
S1:
[sw1]vlan batch 10 20
[sw1]interface Eth-Trunk 1
[sw1-Eth-Trunk1]mode lacp-static
[sw1-Eth-Trunk1]trunkport g 0/0/1 0/0/2
[sw1-Eth-Trunk1]port link-type trunk
[sw1-Eth-Trunk1]port trunk allow-pass vlan 10 20
[sw1-Eth-Trunk1]int e0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 10
S2:
[sw2]vlan batch 10 20
[sw2]
[sw2]interface Eth-Trunk 1
[sw2-Eth-Trunk1]mode lacp-static
[sw2-Eth-Trunk1]trunkport g 0/0/1 0/0/2
[sw2-Eth-Trunk1]port link-type trunk
[sw2-Eth-Trunk1]port trunk allow-pass vlan 10 20
[sw2]int e0/0/1
[sw2-Ethernet0/0/1]port link-type access
[sw2-Ethernet0/0/1]port default vlan 20
[sw2-Ethernet0/0/1]qu
[sw2] int e0/0/2
[sw2-Ethernet0/0/2]port link-type trunk
[sw2-Ethernet0/0/2]port trunk allow-pass vlan 10 20
R1:
[r1]int g0/0/0.10
[r1-GigabitEthernet0/0/0.10]ip add 192.168.1.254 24
[r1-GigabitEthernet0/0/0.10]dot1q termination vid 10
[r1-GigabitEthernet0/0/0.10]arp broadcast enable
[r1-GigabitEthernet0/0/0.10]int g0/0/0.20
[r1-GigabitEthernet0/0/0.20]ip add 192.168.2.254 24
[r1-GigabitEthernet0/0/0.20]dot1q termination vid 20
[r1-GigabitEthernet0/0/0.20]arp broadcast enable
[r1-GigabitEthernet0/0/0.20]qu
[r1]dhcp enable
[r1]ip pool HCIA10
[r1-ip-pool-HCIA10]gateway-list 192.168.1.254
[r1-ip-pool-HCIA10]network 192.168.1.0 m 255.255.255.0
[r1-ip-pool-HCIA10]qu
[r1]ip pool HCIA20
[r1-ip-pool-HCIA20]gateway-list 192.168.2.254
[r1-ip-pool-HCIA20]network 192.168.2.0 m 255.255.255.0
[r1-ip-pool-HCIA20]qu
[r1]int g0/0/0.10
[r1-GigabitEthernet0/0/0.10]dhcp select global
[r1-GigabitEthernet0/0/0.10]int g0/0/0.20
[r1-GigabitEthernet0/0/0.20]dhcp select global
[r1-GigabitEthernet0/0/0.20]qu
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 200.1.1.1 24
[r1-GigabitEthernet0/0/1]qu
[r1]route-static 0.0.0.0 0.0.0.0 200.1.1.2
R2:
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 200.1.1.2 24
[Huawei-GigabitEthernet0/0/1]qu
[Huawei]ip route-static 0.0.0.0 0.0.0.0 200.1.1.1
[Huawei]ip add 100.1.1.1 24
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 100.1.1.1 24
[Huawei-GigabitEthernet0/0/0]
Dhcp-server IP地址:100.1.1.100 24
子网掩码:255.255.255.0
网关:100.1.1.254
注:如果有什么不清楚的地方,评论到下面,我一定会改进!

你可能感兴趣的:(一级分类)