基于ensp - DHCP服务配置

  • 时间:
  • 浏览:
  • 来源:互联网

基于ensp - DHCP服务配置

#进入系统视图

<Huawei>sys
Enter system view, return user view with Ctrl+Z.

#查看接口摘要

[Huawei]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 1
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              unassigned           up         down      
GigabitEthernet0/0/1              unassigned           up         down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     

#进入接口视图

[Huawei]interface GigabitEthernet 0/0/0

#配置接口地址

[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.254 255.255.255.0
Nov 19 2020 13:33:32-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 

#查看接口配置

[Huawei-GigabitEthernet0/0/0]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.1.254 255.255.255.0 
#
return

#退出接口视图

[Huawei-GigabitEthernet0/0/0]q

#进入另一个接口视图

[Huawei]interface GigabitEthernet 0/0/1

#配置接口ip

[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.254 255.255.255.0
Nov 19 2020 13:34:49-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 

#查看接口配置

[Huawei-GigabitEthernet0/0/1]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/1
 ip address 192.168.2.254 255.255.255.0 
#
return

#退出接口视图

[Huawei-GigabitEthernet0/0/1]q

#查看接口配置摘要

[Huawei]dis ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.254/24     up         up        
GigabitEthernet0/0/1              192.168.2.254/24     up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)  

#启用dhcp服务

[Huawei]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.

#创建hehe地址池并进入该视图

[Huawei]ip pool hehe
Info: It's successful to create an IP address pool.

#配置该地址池的地址范围

[Huawei-ip-pool-hehe]network 192.168.1.0 mask 255.255.255.0

#配置该地址池的网关

[Huawei-ip-pool-hehe]gateway-list 192.168.1.254

#配置该地址池的DNS服务器

[Huawei-ip-pool-hehe]dns-list 192.168.2.253

#退出地址池视图

[Huawei-ip-pool-hehe]q

#创建haha地址池

[Huawei]ip pool haha
Info: It's successful to create an IP address pool.

#配置该地址池范围

[Huawei-ip-pool-haha]network 192.168.2.0 mask 255.255.255.0

#配置该地址池网关

[Huawei-ip-pool-haha]gateway-list 192.168.2.254

#配置该地址池DNS

[Huawei-ip-pool-haha]dns-list 192.168.2.253

#退出该地址池

[Huawei-ip-pool-haha]q

#进入该接口视图

[Huawei]interface GigabitEthernet 0/0/0

#启用dhcp服务

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

#退出该接口视图

[Huawei-GigabitEthernet0/0/0]q

#进入另一个接口视图

[Huawei]interface GigabitEthernet 0/0/1

#启用dhcp服务

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

#退出该接口视图

[Huawei-GigabitEthernet0/0/1]q

#查看当前路由器配置

[Huawei]display current-configuration 
[V200R003C00]
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
dhcp enable
#
ip pool hehe
 gateway-list 192.168.1.254 
 network 192.168.1.0 mask 255.255.255.0 
 dns-list 192.168.2.253 
#
ip pool haha
 gateway-list 192.168.2.254 
 network 192.168.2.0 mask 255.255.255.0 
 dns-list 192.168.2.253 
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 192.168.1.254 255.255.255.0 
 dhcp select global
#
interface GigabitEthernet0/0/1
 ip address 192.168.2.254 255.255.255.0 
 dhcp select global
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Huawei] 

本文链接http://www.dzjqx.cn/news/show-617169.html