ENSP桥接一台 Windows Server,当DHCP服务器
1、拓扑图
2、汇聚交换机设置
<Huawei>sys
# 关闭消息提示
[Huawei]undo in en
[Huawei]sys SW1
# 批量创建 VLAN
[SW1]vlan batch 10 20 30 100
# 设置 VLAN 为 Trunk
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l t
[SW1-GigabitEthernet0/0/1]p t a v a
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]p l t
[SW1-GigabitEthernet0/0/2]p t a v a
[SW1-GigabitEthernet0/0/2]int g0/0/10
[SW1-GigabitEthernet0/0/10]p l t
[SW1-GigabitEthernet0/0/10]p t a v a
# 设置 VLAN 为 Access
[SW1-GigabitEthernet0/0/10]int g0/0/3
[SW1-GigabitEthernet0/0/3]p l a
[SW1-GigabitEthernet0/0/3]p d v 30
# 开启 DHCP
[SW1-GigabitEthernet0/0/3]dhcp enable
# 设置 VLANIF
[SW1]int vlanif 10
[SW1-Vlanif10]ip addr 192.168.10.1 24
# 设置中继服务器
[SW1-Vlanif10]dhcp select relay
[SW1-Vlanif10]dhcp relay server-ip 192.168.100.254
[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip addr 192.168.20.1 24
[SW1-Vlanif20]dhcp select relay
[SW1-Vlanif20]dhcp relay server-ip 192.168.100.254
[SW1-Vlanif20]int vlanif 100
[SW1-Vlanif100]ip addr 192.168.100.1 24
[SW1-Vlanif100]dhcp select relay
[SW1-Vlanif100]dhcp relay server-ip 192.168.100.254
[SW1-Vlanif100]int vlanif 30
[SW1-Vlanif30]ip addr 192.168.30.1 24
3、SW2 交换机设置
<Huawei>sys
[Huawei]undo in en
[Huawei]sys SW2
[SW2]vlan 10
[SW2-vlan10]int e0/0/1
[SW2-Ethernet0/0/1]p l a
[SW2-Ethernet0/0/1]p d v 10
[SW2-Ethernet0/0/1]int e0/0/2
[SW2-Ethernet0/0/2]p l t
[SW2-Ethernet0/0/2]p t a v a
4、SW3 交换机设置
<Huawei>sys
[Huawei]undo in en
[Huawei]sys SW3
[SW3]vlan 20
[SW3-vlan20]int e0/0/1
[SW3-Ethernet0/0/1]p l a
[SW3-Ethernet0/0/1]p d v 20
[SW3-Ethernet0/0/1]int e0/0/2
[SW3-Ethernet0/0/2]p l t
[SW3-Ethernet0/0/2]p t a v a
5、SW10 交换机设置
<Huawei>sys
[Huawei]undo in en
[Huawei]sys SW10
[SW10]vlan 100
[SW10-vlan100]int e0/0/2
[SW10-Ethernet0/0/2]p l a
[SW10-Ethernet0/0/2]p d v 100
[SW10-Ethernet0/0/2]int e0/0/3
[SW10-Ethernet0/0/3]p l a
[SW10-Ethernet0/0/3]p d v 100
[SW10-Ethernet0/0/3]int e0/0/1
[SW10-Ethernet0/0/1]p l t
[SW10-Ethernet0/0/1]p t a v a
6、R1 路由器设置
<Huawei>sys
[Huawei]undo in en
[Huawei]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip addr 192.168.30.2 24
# 设置静态路由
[R1-GigabitEthernet0/0/0]ip route-static 192.168.0.0 255.255.0.0 192.168.30.1
Cloud1 桥接设置
7、DHCP 服务器设置
(1)创建一台虚拟机,网络选择 "仅主机模式",并关闭DHCP
(2)宿主机网卡
(3)DHCP服务器IP设置
IP:192.168.100.254/24,网关192.168.100.1
(3)DHCP服务器 测试网络连通
(5) DHCP服务器创建3个作用域
先添加 192.168.10.0/24 网段
添加地址范围,因为 192.168.10.1 已经被网关占用了,所以从 2 开始
一直下一步至,添加网关
后面一直到完成,在依次添加其它2个网段,如下图
8、查看
PC1>ipconfig
Link local IPv6 address...........: fe80::5689:98ff:fe75:e24
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.100.4
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.100.1
Physical address..................: 54-89-98-75-0E-24
DNS server........................:
PC2>ipconfig
Link local IPv6 address...........: fe80::5689:98ff:fe9d:6610
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.100.5
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.100.1
Physical address..................: 54-89-98-9D-66-10
DNS server........................:
PC3>ipconfig
Link local IPv6 address...........: fe80::5689:98ff:fe07:2446
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.100.3
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.100.1
Physical address..................: 54-89-98-07-24-46
DNS server........................: