华为交换机配置dhcp命令(路由器DHCP配置举例)

一、交换机DHCP配置举例

华为交换机配置dhcp命令(路由器DHCP配置举例)(1)

[switch]dhcp enable

[switch]ip pool pool1

[switch-ip-pool-pool1]network 10.0.20.0 mask 255.255.255.0

[switch-ip-pool-pool1]dns-list 10.0.10.2

[switch-ip-pool-pool1]gateway-list 10.0.20.1

[switch-ip-pool-pool1]lease day 3

[switch-ip-pool-pool1]quit

[switch]interface vlanif 20

[switch-vlanif20]dhcp select global

[switch-vlanif20]quit

二、路由器DHCP配置

华为交换机配置dhcp命令(路由器DHCP配置举例)(2)

<Router>system-view

[Router]interface GigabitEthernet0/0/1

[Router-interface GigabitEthernet0/0/1]ip address 10.10.1.1 255.255.255.128

[Router-interface GigabitEthernet0/0/1]dhcp select global //接口工作在全局地址池模式

[Router-interface GigabitEthernet0/0/1]quit

[Router]ip pool pool1

[Router-ip-pool-pool1]network 10.10.1.0 mask 255.255.255.128

[Router-ip-pool-pool1]excluded-ip-address 10.10.1.2

[Router-ip-pool-pool1]dns-list 10.10.1.2 //设置DNS

[Router-ip-pool-pool1]gateway-list 10.10.1.1 //设置默认网关

[Router-ip-pool-pool1]lease day30 hour 0 minute 0

[Router-ip-pool-pool1]domain-name abc.com

[Router-ip-pool-pool1]

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页