Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

13.2. DHCP

13.2.1. DHCP Server

S3600 SI 没有DHCP Server,只有EI版本提供,狗日的H3C(fuck h3c)

			
dhcp enable
dhcp server ip-pool 0
static-bind ip-address 172.16.0.2
static-bind mac-address 000f-e200-0002
dns-list 172.16.0.254
gateway-list 172.16.0.254
quit
			
			
			
dhcp server forbidden-ip 10.1.1.2
dhcp server forbidden-ip 10.1.1.4
dhcp server forbidden-ip 10.1.1.126
dhcp server forbidden-ip 10.1.1.254

dhcp server ip-pool 0
network 10.1.1.0 mask 255.255.255.0
domain-name aabbcc.com
dns-list 10.1.1.2
nbns-list 10.1.1.4
expired day 10 hour 12
quit
			
			
			
3. 配置步骤

(1)        配置端口属于VLAN及对应VLAN接口的IP地址(略)

(2)        配置DHCP服务

# 使能DHCP服务。

<H3C> system-view

[H3C] dhcp enable

# 配置不参与自动分配的IP地址(DNS服务器、WINS服务器和出口网关地址)。

[H3C] dhcp server forbidden-ip 10.1.1.2

[H3C] dhcp server forbidden-ip 10.1.1.4

[H3C] dhcp server forbidden-ip 10.1.1.126

[H3C] dhcp server forbidden-ip 10.1.1.254

# 配置DHCP地址池0的共有属性(地址池范围、DNS服务器地址)。

[H3C] dhcp server ip-pool 0

[H3C-dhcp-pool-0] network 10.1.1.0 mask 255.255.255.0

[H3C-dhcp-pool-0] domain-name aabbcc.com

[H3C-dhcp-pool-0] dns-list 10.1.1.2

[H3C-dhcp-pool-0] quit

# 配置DHCP地址池1的属性(地址池范围、出口网关、地址租用期限)。

[H3C] dhcp server ip-pool 1

[H3C-dhcp-pool-1] network 10.1.1.0 mask 255.255.255.128

[H3C-dhcp-pool-1] gateway-list 10.1.1.126

[H3C-dhcp-pool-1] expired day 10 hour 12

[H3C-dhcp-pool-1] quit

# 配置DHCP地址池2的属性(地址池范围、出口网关、WINS服务器地址、地址租用期限)。

[H3C] dhcp server ip-pool 2

[H3C-dhcp-pool-2] network 10.1.1.128 mask 255.255.255.128

[H3C-dhcp-pool-2] expired day 5

[H3C-dhcp-pool-2] nbns-list 10.1.1.4

[H3C-dhcp-pool-2] gateway-list 10.1.1.254
			
			

13.2.2. DHCP中继配置

			
# 进入系统视图。

<H3C> system-view

# 使能DHCP服务。

[H3C] dhcp enable

# 配置DHCP Server的组号为1,IP地址为202.38.1.2。

[H3C] dhcp-server 1 ip 202.38.1.2

# 配置VLAN接口2对应DHCP Server组1。

[H3C] interface Vlan-interface 2

[H3C-Vlan-interface2] dhcp-server 1

# 配置VLAN接口2的IP地址,需与DHCP Client属于同一网段。

[H3C-Vlan-interface2] ip address 10.110.1.1 255.255.0.0
			
			

13.2.3. DHCP Snooping

			
# 进入系统视图。

<H3C> system-view

# 开启交换机DHCP-Snooping功能。

[H3C] dhcp-snooping

# 进入Ethernet1/0/1端口视图。

[H3C] interface Ethernet1/0/1

# 设置端口为信任端口。

[H3C-Ethernet1/0/1] dhcp-snooping trust
			
			
comments powered by Disqus