Next, let's configure our overall network topology, (the prototype of the network topology diagram, and a lot will be added later)
In the first step, we configure the DHCP relay of the general network topology:
Let's take a look at my prototype network design topology:
This is the prototype of my network design
The following directly configures the DHCP relay of the network:
First configure the vlan and IP of SW1 to set the gateway of the server:
The device is running!
Configure the basic configuration first:
Sw1: Configure the configuration of sw2: Configure the configuration of sw2:
<Huawei>sys(进入配置模式)
[Huawei]sys sw1(改名)
[sw1]un in en(关闭提示)
[sw1]vlan batch 2 3 4(创建vlna 2 3 4)
[sw1]display this (显示配置)
#
sysname sw1
#
undo info-center enable
#
vlan batch 2 to 4
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
return
[sw1]dhcp enable (开启DHCP配置)
[sw1]int GigabitEthernet 0/0/3(进入端口3)
[sw1-GigabitEthernet0/0/3]port link-type trunk(配置端口为主干模式)
[sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan all (允许所有vlan通过)
[sw1-GigabitEthernet0/0/3]q
[sw1]int g
[sw1]int GigabitEthernet 0/0/7
[sw1-GigabitEthernet0/0/7]port link-type trunk
[sw1-GigabitEthernet0/0/7]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/7]q
[sw1]int g
[sw1]int GigabitEthernet 0/0/2
[sw1-GigabitEthernet0/0/2]port link-type trunk [sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/2]q
[sw1]int g
[sw1]
Configure the configuration of sw2:
<sw2>sys
[Huawei]sys sw 2
[sw2]vlan batch 2 3 4
[sw2]dhcp enable
[sw2]un in en
[sw2]int GigabitEthernet 0/0/7
[sw2-GigabitEthernet0/0/7]port link-type trunk
[sw2-GigabitEthernet0/0/7]port trunk allow-pass vlan al
[sw2-GigabitEthernet0/0/7]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/7]q
[sw2]int g
[sw2]int GigabitEthernet 0/0/2
[sw2-GigabitEthernet0/0/2]port link-type trunk
[sw2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/2]q
[sw2]
[sw2]int g
[sw2]int GigabitEthernet 0/0/3
[sw2-GigabitEthernet0/0/3]port link-type trunk
[sw2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/3]q
Let's configure sw3:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys sw3
[sw3]un in en
Info: Information center is disabled.
[sw3]int g
[sw3]int GigabitEthernet 0/0/1
[sw3-GigabitEthernet0/0/1]port link-type trunk
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw3-GigabitEthernet0/0/1]q
[sw3]int e
[sw3]int Eth
[sw3]int Ethernet0/0/1
[sw3-Ethernet0/0/1]port link-type access
[sw3-Ethernet0/0/1]q
[sw3]int e
[sw3]int Eth
[sw3]int Ethernet0/0/2
[sw3-Ethernet0/0/2]port link-type access
[sw3-Ethernet0/0/2]q
[sw3]int e
[sw3]int Eth
[sw3]int Ethernet0/0/3
[sw3-Ethernet0/0/3]port link-type access
[sw3-Ethernet0/0/3]q
[sw3]vlan b
[sw3]vlan batch 2 3 4
[sw3]
Configure the following sw4 below:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys sw4
[sw4]int g
[sw4]int GigabitEthernet 0/0/1
[sw4-GigabitEthernet0/0/1]port link-type trunk
[sw4-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw4-GigabitEthernet0/0/1]
[sw4-GigabitEthernet0/0/1]q
[sw4]int Ethernet0/0/3
[sw4-Ethernet0/0/3]port link-type trunk
[sw4-Ethernet0/0/3]port trunk allow-pass vlan all
[sw4-Ethernet0/0/3]q
[sw4]vlan batch 2 3 4(创建vlan)
[sw4]int Ethernet0/0/1 (进入端口1)
[sw4-Ethernet0/0/1]port link-type access (配置接口为连接模式)
[sw4-Ethernet0/0/1]port default vlan 2(允许通过vlan2)
[sw4-Ethernet0/0/1]q
[sw4]int Ethernet0/0/2
[sw4-Ethernet0/0/2]port link-type access
[sw4-Ethernet0/0/2]
[sw4]
Configure sw5 below:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys sw5
[sw5]vlan batch 2 3 4
[sw5]un in en
[sw5]int Eth
[sw5]int Ethernet0/0/3
[sw5-Ethernet0/0/3]port link-type trunk
[sw5-Ethernet0/0/3]port trunk allow-pass vlan all
[sw5-Ethernet0/0/3]q
[sw5]int g
[sw5]int GigabitEthernet 0/0/1
[sw5-GigabitEthernet0/0/1]port link-type trunk
[sw5-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw5-GigabitEthernet0/0/1]q
[sw5]int Eth
[sw5]int Ethernet0/0/1
[sw5-Ethernet0/0/1]port link-type access
[sw5-Ethernet0/0/1]port default vlan 3
[sw5-Ethernet0/0/1]q
[sw5]
[sw5]int Ethernet0/0/2
[sw5-Ethernet0/0/2]port link-type access
[sw5-Ethernet0/0/2]
Let's configure sw6:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys sw6
[sw6]un in en
[sw6]interface
[sw6]interface g
[sw6]interface GigabitEthernet 0/0/1
[sw6-GigabitEthernet0/0/1]port link-type trunk
[sw6-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw6-GigabitEthernet0/0/1]q
[sw6]int Eth
[sw6]int Ethernet0/0/1
[sw6-Ethernet0/0/1]port link-type access
[sw6-Ethernet0/0/1]port default vlan 3
[sw6-Ethernet0/0/1]q
[sw6]int Eth
[sw6]int Ethernet0/0/2
[sw6-Ethernet0/0/2]port link-type access
[sw6-Ethernet0/0/2]q
[sw6]
The above is the basis for us to configure DHCP and even all network configurations
Let's configure the IP of our vlan as the gateway of the server:
Configure sw1:
<sw1>sys
Enter system view, return user view with Ctrl+Z.
[sw1]int g
[sw1]int GigabitEthernet 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/1]q
[sw1]int Vlanif 2
[sw1-Vlanif2]ip ad 192.168.2.254 24
[sw1-Vlanif2]q
[sw1]int v
[sw1]int Vlanif 3
[sw1-Vlanif3]ip address 192.168.3.254 24
[sw1-Vlanif3]q
[sw1]int Vlanif 4
[sw1-Vlanif4]ip address 192.168.4.254 24
[sw1-Vlanif4]q
[sw1]
Let's configure sw2:
<sw2>sys
[sw2]int g
[sw2]int GigabitEthernet 0/0/1
[sw2-GigabitEthernet0/0/1]port link-type trunk
[sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw2]int Vlanif 2
[sw2-Vlanif2]ip ad 192.168.2.254 24
[sw2-Vlanif2]q
[sw2]int Vlanif 3
[sw2-Vlanif3]ip ad 192.168.3.254 24
[sw2-Vlanif3]q
[sw2]int Vlanif 4
[sw2-Vlanif4]ip ad 192.168.4.254 24
[sw2-Vlanif4]q
[sw2]
If not, you can leave a message to exchange: