新建VLAN并启用该VLAN的DHCP功能

新建VLAN并启用该VLANDHCP功能

本示例用于在VMwareView中虚拟桌面需要DHCP自动获得IP地址,做如下规划:

1、 Connection Server 指定IP地址 192.168.30.2,所以该IPDHCP池中排除,如果还有其他IP地址需要保留,可以继续排除。

2、 DHCP的网关为192.168.30.1DNS192.168.0.120192.168.0.121

3、 DHCP池的名称为VM_DT,和VLANname相同(当然也可以不同)。

core4506e#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

core4506e(config)#vlan 30

core4506e(config-vlan)#name VM_DT

core4506e(config-vlan)#exit

core4506e(config)#int vlan 30

core4506e(config-if)#ip address 192.168.30.1 255.255.255.0

core4506e(config-if)#ip dhcp pool VM_DT

core4506e(dhcp-config)#network 192.168.30.0 255.255.255.0

core4506e(dhcp-config)#default-router 192.168.30.1

core4506e(dhcp-config)#dns-server 192.168.0.120 192.168.0.121

core4506e(dhcp-config)#exit

core4506e(config)#ip dhcp excluded-address 192.168.30.2

core4506e(config)#exit

core4506e#wr

Building configuration...

Compressed configuration from 7240 bytes to 2458 bytes[OK]

core4506e#

原文地址:https://www.cnblogs.com/flaaash/p/2461453.html