Bootstrap

华为虚拟服务器lanip地址,2018软考网络工程师《华为基础实验》十九配置路由器为DHCPServer... 转载

原标题:2018软考网络工程师《华为基础实验》十九配置路由器为DHCPServer

实验要求:

在R1上使能DHCP 功能。

创建三个全局地址池,用于为三个不同部门的PC分配IP 地址。

配置地址池的相关属性。

在R1的接口下配置基于全局地址池的服务方式,实现DHCP Server 从全局地址池中选择分配IP地址。

网络拓扑图

ee428d963dceb5e42756bf6ad85e6596.png

操作步骤:

1、配置路由器的接口 IP 地址

system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname DHCP_SERVER

[DHCP_SERVER]interface GigabitEthernet 0/0/0

[DHCP_SERVER-GigabitEthernet0/0/0]ip address 192.168.1.1 26

[DHCP_SERVER]interface GigabitEthernet 0/0/1

[DHCP_SERVER-GigabitEthernet0/0/1]ip address 192.168.1.65 26

[DHCP_SERVER-GigabitEthernet0/0/1]quit

[DHCP_SERVER]interface GigabitEthernet 0/0/2

[DHCP_SERVER-GigabitEthernet0/0/2]ip address 192.168.1.129 26

[DHCP_SERVER-GigabitEthernet0/0/2]quit

2、开启路由器的 DHCP服务功能,并配置地址池

[DHCP_SERVER]dhcp enable

Info: The operation may take a few seconds. Please wait for a moment.done.

[DHCP_SERVER]ip pool department1

[DHCP_SERVER-ip-pool-department1]network 192.168.1.0 mask 26

[DHCP_SERVER-ip-pool-department1]gateway-list 192.168.1.1

[DHCP_SERVER-ip-pool-department1]quit

[DHCP_SERVER]ip pool department2

[DHCP_SERVER-ip-pool-department2]network 192.168.1.64 mask 26

[DHCP_SERVER-ip-pool-department2]gateway-list 192.168.1.65

[DHCP_SERVER-ip-pool-department2]quit

[DHCP_SERVER]ip pool department3

[DHCP_SERVER-ip-pool-department3]network 192.168.1.128 mask 26

[DHCP_SERVER-ip-pool-department3]gateway-list 192.168.1.129

[DHCP_SERVER-ip-pool-department3]quit

3、在 LAN 接口上开启 DHCP功能

[DHCP_SERVER]interface GigabitEthernet 0/0/0

[DHCP_SERVER-GigabitEthernet0/0/0]dhcp select global

[DHCP_SERVER-GigabitEthernet0/0/0]quit

[DHCP_SERVER]interface GigabitEthernet 0/0/1

[DHCP_SERVER-GigabitEthernet0/0/1]dhcp select global

[DHCP_SERVER-GigabitEthernet0/0/1]quit

[DHCP_SERVER]interface GigabitEthernet 0/0/2

[DHCP_SERVER-GigabitEthernet0/0/2]dhcp select global

4、配置 PC,自动获取 IP 地址确认主机都能获得 IP 地址

13ab9ee248dc571d80bbc923c11f1932.png

5、检查 DHCP服务器的租约信息,看到 IP 地址的租用

[DHCP_SERVER]display ip pool

bf9ede8298b1dcf71b61683ed6173c20.png

a8a2cc756cde1e4d79a5916649fe0cae.png

cc57b8c337ddf461628f48aa54a8c4b2.png

责任编辑:

;