目的:PC1 PC2 PC3三个网段通过 DHCP获取自己对应网段的IP地址
LSW1配置
[Huawei]vlan batch 10 20 30
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei]dhcp enable
[Huawei]ip pool dhcp10
[Huawei-ip-pool-dhcp10]network 192.168.10.0 mask 24
[Huawei-ip-pool-dhcp10]gateway-list 192.168.10.1
[Huawei-ip-pool-dhcp10]dns-list 8.8.8.8
[Huawei-ip-pool-dhcp10]q
[Huawei]ip pool dhcp20
[Huawei-ip-pool-dhcp20]network 192.168.20.0 mask 24
[Huawei-ip-pool-dhcp20]gateway-list 192.168.20.1
[Huawei-ip-pool-dhcp20]dns-list 8.8.8.8
[Huawei-ip-pool-dhcp20]q
[Huawei]ip pool dhcp30
[Huawei-ip-pool-dhcp30]network 192.168.30.0 mask 24
[Huawei-ip-pool-dhcp30]gateway-list 192.168.30.1
[Huawei-ip-pool-dhcp30]dns-list 8.8.8.8
[Huawei-ip-pool-dhcp30]q
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 192.168.10.1 24
[Huawei-Vlanif10]dhcp select global
[Huawei]int Vlanif 20
[Huawei-Vlanif20]ip address 192.168.20.1 24
[Huawei-Vlanif20]dhcp select global
[Huawei]int Vlanif 30
[Huawei-Vlanif30]ip address 192.168.30.1 24
[Huawei-Vlanif30]dhcp select globa
LSW2配置
[Huawei]vlan batch 10 20 30
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 30
PC1使用DHCP获取IP地址
PC2使用DHCP获取IP地址
PC3使用DHCP获取IP地址
本站资源均来自互联网,仅供研究学习,禁止违法使用和商用,产生法律纠纷本站概不负责!如果侵犯了您的权益请与我们联系!
转载请注明出处: 免费源码网-免费的源码资源网站 » 4.华为三层交换机 配置VLAN 基于全局开启DHCP
发表评论 取消回复