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

DHCP接口地址池配置

拓扑

DHCP配置(路由器,交换机)_第1张图片

  1. PC配置DHCP点击应用。
    DHCP配置(路由器,交换机)_第2张图片

路由器配置命令

<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配置(路由器,交换机)_第3张图片

查看配置DHCP配置(路由器,交换机)_第4张图片

测试

DHCP配置(路由器,交换机)_第5张图片

DHCP全局地址池配置

拓扑

DHCP配置(路由器,交换机)_第6张图片

  1. PC配置DHCP点击应用。
    DHCP配置(路由器,交换机)_第7张图片

路由器配置

<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配置(路由器,交换机)_第8张图片

查看配置DHCP配置(路由器,交换机)_第9张图片

测试

DHCP配置(路由器,交换机)_第10张图片

交换机配置DHCP服务

以全局地址池为例

DHCP配置(路由器,交换机)_第11张图片

配置PC为DHCP

DHCP配置(路由器,交换机)_第12张图片

交换机配置命令

<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 

测试

DHCP配置(路由器,交换机)_第13张图片

你可能感兴趣的:(HCIA,智能路由器,网络,交换机,DHCP,huawei)