DHCP接口地址池配置
拓扑
- PC配置DHCP点击应用。
路由器配置命令
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 10.1.1.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select interface
[Huawei-GigabitEthernet0/0/1]dhcp server dns-list 8.8.8.8
[Huawei-GigabitEthernet0/0/1]dhcp server lease day 3
查看配置
测试
DHCP全局地址池配置
拓扑
- PC配置DHCP点击应用。
路由器配置
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei] int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.1.1.1 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool pool1
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-pool1]network 10.1.1.0 m 24
[Huawei-ip-pool-pool1]gateway-list 10.1.1.1
[Huawei-ip-pool-pool1]q
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
查看配置
测试
交换机配置DHCP服务
以全局地址池为例
配置PC为DHCP
文章来源:https://www.toymoban.com/news/detail-811370.html
交换机配置命令
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 10
[Huawei-vlan10]q
[Huawei]int v 10
[Huawei-Vlanif10]ip address 100.1.1.1 24
[Huawei-Vlanif10]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]q
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool pool2
Info:It's successful to create an IP address pool.
[Huawei-ip-pool-pool2]network 100.1.1.0 m 24
[Huawei-ip-pool-pool2]gateway-list 100.1.1.1
[Huawei-ip-pool-pool2]dns-list 8.8.8.8
[Huawei-ip-pool-pool2]q
[Huawei]int v 10
[Huawei-Vlanif10]dhcp select global
测试
文章来源地址https://www.toymoban.com/news/detail-811370.html
到了这里,关于DHCP配置(路由器,交换机)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!