DHCP接口地址池配置

[DHCP-SERVEr]dhcp en
[DHCP-SERVEr]dhcp enable 
[DHCP-SERVEr]int
[DHCP-SERVEr]interface g0/0/0
[DHCP-SERVEr-GigabitEthernet0/0/0]dhcp select interface
[DHCP-SERVEr-GigabitEthernet0/0/0]dhcp server excluded-ip-address 192.168.1.200 192.168.1.210
[DHCP-SERVEr-GigabitEthernet0/0/0]dhcp server dns-list 192.168.1.254 
[DHCP-SERVEr-GigabitEthernet0/0/0]dhcp server domain-name test.com 
[DHCP-SERVEr-GigabitEthernet0/0/0]dhcp server lease day 3 hour 0 minute 0

 DHCP全局地址池配置


[DHCP-SERVEr]ip pool pool2
Info: It's successful to create an IP address pool.
[DHCP-SERVEr-ip-pool-pool2]network 192.168.2.0 mask 24
[DHCP-SERVEr-ip-pool-pool2]gateway-list 192.168.2.254
[DHCP-SERVEr-ip-pool-pool2]dns-list 192.168.1.254
[DHCP-SERVEr-ip-pool-pool2]lease day 10
[DHCP-SERVEr]int g0/0/1
[DHCP-SERVEr-GigabitEthernet0/0/1]ip add 192.168.2.254 24
[DHCP-SERVEr-GigabitEthernet0/0/1]dhcp select global 

显示所有 ip地址池情况

[DHCP-SERVEr]dis ip pool           
  -----------------------------------------------------------------------
  Pool-name      : GigabitEthernet0/0/0
  Pool-No        : 0
  Position       : Interface       Status           : Unlocked
  Gateway-0      : 192.168.1.254   
  Mask           : 255.255.255.0
  VPN instance   : --


  IP address Statistic
    Total       :253   
    Used        :1          Idle        :241   
    Expired     :0          Conflict    :0          Disable   :11  

显示接口dhcp配置情况 

[DHCP-SERVEr]dis ip pool interface GigabitEthernet0/0/0 all 
  Pool-name      : GigabitEthernet0/0/0
  Pool-No        : 0
  Lease          : 1 Days 0 Hours 0 Minutes
  Domain-name    : test.com
  DNS-server0    : 192.168.1.254   
  NBNS-server0   : -               
  Netbios-type   : -               
  Position       : Interface       Status           : Unlocked
  Gateway-0      : 192.168.1.254   
  Mask           : 255.255.255.0
  VPN instance   : --
 -----------------------------------------------------------------------------
         Start           End     Total  Used  Idle(Expired)  Conflict  Disable
 -----------------------------------------------------------------------------
     192.168.1.1   192.168.1.254   253     1        241(0)         0       11
 -----------------------------------------------------------------------------

  Network section : 
  --------------------------------------------------------------------------
  Index              IP               MAC      Lease   Status  
  --------------------------------------------------------------------------
      0     192.168.1.1                 -          -   Idle       
      1     192.168.1.2                 -          -   Idle       
      2     192.168.1.3                 -          -   Idle       
      3     192.168.1.4                 -          -   Idle       
      4     192.168.1.5                 -          -   Idle       
      5     192.168.1.6                 -          -   Idle       
      6     192.168.1.7                 -          -   Idle       
      7     192.168.1.8                 -          -   Idle       
      8     192.168.1.9                 -          -   Idle       
      9    192.168.1.10                 -          -   Idle       
     10    192.168.1.11                 -          -   Idle       
     11    192.168.1.12                 -          -   Idle       
     12    192.168.1.13                 -          -   Idle       
     13    192.168.1.14                 -          -   Idle       
     14    192.168.1.15                 -          -   Idle       
     15    192.168.1.16                 -          -   Idle 

ip地址池显示所有信息 

[DHCP-SERVEr]display ip pool name pool2 all 
  Pool-name      : pool2
  Pool-No        : 1
  Lease          : 10 Days 0 Hours 0 Minutes
  Domain-name    : -
  DNS-server0    : 192.168.1.254   
  NBNS-server0   : -               
  Netbios-type   : -               
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.2.254   
  Mask           : 255.255.255.0
  VPN instance   : --
 -----------------------------------------------------------------------------
         Start           End     Total  Used  Idle(Expired)  Conflict  Disable
 -----------------------------------------------------------------------------
     192.168.2.1   192.168.2.254   253     1        252(0)         0        0
 -----------------------------------------------------------------------------

  Network section : 
  -----------------------------------------------------------

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐