华为交换机配置DHCP

system-view

[Huawei]vlan 10
[Huawei-vlan10]quit
[Huawei]port-group group-member Ethernet 0/0/1 to Ethernet 0/0/2
[Huawei-port-group]port link-type access
[Huawei-port-group]port default vlan 10

[Huawei]vlan 20
[Huawei-vlan20]quit
[Huawei]port-group group-member Ethernet 0/0/3 to Ethernet 0/0/4
[Huawei-port-group]port link-type access
[Huawei-port-group]port default vlan 20

[Huawei]interface Vlanif 10
[Huawei-Vlanif10]undo shutdown
[Huawei-Vlanif10]ip add 192.168.1.254 24
[Huawei-Vlanif10]quit

[Huawei]interface vlanif 20
[Huawei-Vlanif20]undo shutdown
[Huawei-Vlanif20]ip address 192.168.2.254 24
[Huawei-Vlanif20]quit

[Huawei]ip pool vlan10
[Huawei-ip-pool-vlan10]network 192.168.1.0 mask 255.255.255.0
[Huawei-ip-pool-vlan10]gateway-list 192.168.1.254
[Huawei-ip-pool-vlan10]dns-list 8.8.8.8
[Huawei-ip-pool-vlan10]lease day 3
[Huawei-ip-pool-vlan10]excluded-ip-address 192.168.1.253 //去除不想分配的地址
[Huawei-ip-pool-vlan10]quit

[Huawei]ip pool vlan20
[Huawei-ip-pool-vlan20]network 192.168.2.0 mask 255.255.255.0
[Huawei-ip-pool-vlan20]gateway-list 192.168.2.254
[Huawei-ip-pool-vlan20]dns-list 8.8.8.8
[Huawei-ip-pool-vlan20]lease day 3
[Huawei-ip-pool-vlan20]excluded-ip-address 192.168.2.253
[Huawei-ip-pool-vlan20]quit

[Huawei]dhcp enable --开启DHCP服务

[Huawei]interface Vlanif 10
[Huawei-Vlanif10]dhcp select global
[Huawei-Vlanif10]quit

[Huawei]interface Vlanif 20
[Huawei-Vlanif20]dhcp select global
[Huawei-Vlanif20]quit

相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页