Huawei assigned DHCP IP configuration, global mode, interface mode

Huawei assigned DHCP IP configuration: that the function of the PC IP network automatically following eligible, as

Huawei assigned DHCP IP configuration, global mode, interface mode

  1. Assign IP addresses to clients based on the global address pool of DHCP server
    [R1] dhcp enable DHCP service open
    to enable the global address pool ip pool vlan1 name is vlan1
    set up distribution network 192.160.1.0 mask 255.255.255.0 the network segment
    gateway-list 192.160.1.1 setting the assigned gateway
    lease day 8 hour 8 minute 8 IP address pool the lease
    excluded-ip-address 192.160.1.2 are not automatically allocated addresses
    dns-list 114.114.114.114 8.8.8.8 primary DNS and alternate DNS
    Q exit
    ip pool vlan2 enable global address pool name vlan1
    set allocation of network 192.160.2.0 mask 255.255.255.0 subnet
    gateway-list 192.160.2.1 set assigned gateway
    lease day 8 hour 8 minute 8 IP address pool the lease
    excluded-ip-address 192.160. 2.2 not automatically allocated addresses
    dns-list 114.114.114.114 8.8.8.8 primary DNS and alternate DNS
    Q exit
    interface et 0/0/0 enter interface
    interface et 0/0 / 0.1 is turned on and the subinterface
    dot1q termination vid 3 dot1q encapsulation protocol, corresponding to the sub-interface VLAN3
    (can not use the VLAN1 default, otherwise invalid.)
    IP address provided the IP address 192.160.1.1 24
    arp broadcast enable ARP broadcast opener interface

Enable globally allocated address at the interface dhcp select global
q exit
interface et 0/0/0 Enter interface
interface et 0/0 / 0.2 is turned on and the subinterface
dot1q termination vid 2 dot1q encapsulation protocol, corresponding to the sub-interface VLAN2
IP address 192.160 .2.1 24 to set the IP address
arp broadcast enable open ARP broadcast sub-interface

the globally enabled dhcp select global address assigned to the interface
q exit
Huawei assigned DHCP IP configuration, global mode, interface mode
configuration LSW1 switch
[SW1] vlan batch 1 2 3 divided vlan
interface GI 0/0/2 Enter interface
port link-type access is provided Interfaces shaped
port default vlan 3 disposed vlan

interface gi 0/0/3 Enter interface
port link-type access is provided Interfaces shaped
port default vlan 2 disposed vlan

interface gi 0/0/1
port link-type trunk 设置接口类形
port trunk allow-pass vlan all 设置所有vlan通过

2台PC能自动获得IP地址了。
Huawei assigned DHCP IP configuration, global mode, interface mode

2.基于接口的DCHP服务器给客户端分配IP地址
[R1]interface et 0/0/1 进入接口
interface et 0/0/1.1 进入子接口
ip address 192.160.3.1 24 配置IP
dhcp select interface 使用接口分配地址方式且关联接口地址池
dhcp server dns-list 8.8.8.8 设置DNS
dncp server lease day 8 hour 8 minute 8 设置地址池IP租用有效期
dhcp server excluded-ip-address 192.160.3.100 192.160.3.254
不参与自动分配的地址范围100-254
dot1q termination vid 4 封装dot1q协议,该子接口对应vlan4
arp broadcast enable 开启子接口的ARP广播
q
]interface et 0/0/1 进入接口
interface et 0/0/1.2 进入子接口
ip address 192.160.4.1 24 配置IP
dhcp select interface 使用接口分配地址方式且关联接口地址池
dhcp server dns-list 8.8.8.8 设置DNS
dncp server lease day 8 hour 8 minute 8 设置地址池IP租用有效期
dhcp server excluded-ip-address 192.160.4.100 192.160.4.254
not automatically allocated address range 100-254
dot1q Termination VID dot1q encapsulation protocol. 5, corresponding to the sub-interface VLAN5
ARP broadcast the ARP broadcast enable opener interface
Huawei assigned DHCP IP configuration, global mode, interface mode

Switch configuration LSW2
[SW1] vlan batch 1 to 5 divided vlan1-5
interface GI 0/0/2 Enter interface
port link-type access is provided Interfaces shaped
port default vlan 4 disposed vlan

interface gi 0/0/3 Enter interface
port link-type access is provided Interfaces shaped
port default vlan 5 disposed vlan

GI 0/0/1 interface
Port Link Trunk-type shaped set Interfaces
port trunk allow-pass vlan all provided by all vlan

2 PC can automatically obtain the IP address.

Huawei assigned DHCP IP configuration, global mode, interface mode

Guess you like

Origin blog.51cto.com/14148388/2455563