华为交换机dhcp server配置

华为交换机型号:s5720-36C-EI-AC
配置dhcp server功能:
配置vlan 10 通过DHCP下发IP地址,
其中排除 1 - 20 的IP地址段,作为固定IP地址设定;
网关为172.30.10.1;
DNS为114.114.114.114 202.96.134.133;
IP地址租期为23小时;

核心交换极端:
[SW_CORE_5.1]dhcp enable
[SW_CORE_5.1]ip pool 10
[SW_CORE_5.1-ip-pool-10]network 172.30.10.0 24
[SW_CORE_5.1-ip-pool-10]gateway-list 172.30.10.1
[SW_CORE_5.1-ip-pool-10]excluded-ip-address 172.16.10.1 172.16.10.20
[SW_CORE_5.1-ip-pool-10]lease day 0 hour 23 minute 0
[SW_CORE_5.1-ip-pool-10]dns-list 114.114.114.114 202.96.134.133
[SW_CORE_5.1-ip-pool-10]quit

[SW_CORE_5.1]int vlanif 10
[SW_CORE_5.1-vlanif10]ip add 172.30.10.1 24
[SW_CORE_5.1-vlanif10]dhcp select global

客户端配置:
[SW_ACC_5.10]dhcp enable
[SW_ACC_5.10]vlan 10
[SW_ACC_5.10-vlan10]quit

[SW_ACC_5.10]int rang g0/0/1 to g0/0/46
[SW_ACC_5.10-Group]port link-type access
[SW_ACC_5.10-Group]port default vlan 10

//设置路由,指向核心交换机,假定核心交换机IP地址为172.30.5.1
[SW_ACC_5.10]ip route-static 0.0.0.0 0.0.0.0 172.30.5.1

猜你喜欢

转载自blog.51cto.com/2221384/2530505