自学内容网 自学内容网

DHCP配置(路由器,交换机)

DHCP接口地址池配置

拓扑

在这里插入图片描述

  1. 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全局地址池配置

拓扑

在这里插入图片描述

  1. 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

在这里插入图片描述

交换机配置命令

<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://blog.csdn.net/m0_61802503/article/details/135723809

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!