龙空技术网

如何在DHCP服务器上实现不同VLAN进来分配给不同地址段的IP

我有我彩 266

前言:

而今姐妹们对“服务器配两个地址”大概比较讲究,兄弟们都需要剖析一些“服务器配两个地址”的相关文章。那么小编同时在网上收集了一些有关“服务器配两个地址””的相关文章,希望大家能喜欢,我们快快来学习一下吧!

场景描述:

A公司的DHCP搭建在win server服务器上,目前公司内部有不同的部门,现在想实现不同的部门使用不同的网段。

具体要求:

Windows server2008搭建DHCP服务器;地址:10.76.0.1

设备管理地址:vlan80:10.76.80.X

地址池:

vlan10:10.76.10.100-200

vlan20:10.76.20.100-200

vlan30:10.76.30.100-200

vlan40:10.76.40.100-200

vlan80:10.76.80.100-200

DHCP中继,地址10.76.80.1

LSW10,地址:10.76.80.10

LSW20,地址:10.76.80.20

配置步骤:

1.新建DHCP服务器,新建四个作用域并激活(省略);

2.DHCP中继配置

配置vlan地址:

int vlan 1

ip add 10.76.0.2 255.255.255.0

配置管理地址:

int vlan 80

ip add 10.76.80.1 255.255.255.0

创建DHCP服务器组:

[Huawei]dhcp server group dhcpgroup1

Info:It's successful to create a DHCP server group

[Huawei-dhcp-server-group-dhcpgroup1]dhcp-server 10.76.0.1

创建vlan:

dhcp enable

vlan 10

[Huawei]int vlan 10

[Huawei-Vlanif10]dhcp select relay

[Huawei-Vlanif10]ip address 10.76.10.254 24

[Huawei]int vlan 20

[Huawei-Vlanif10]dhcp select relay

[Huawei-Vlanif10]ip address 10.76.20.254 24

[Huawei]int vlan 30

[Huawei-Vlanif10]dhcp select relay

[Huawei-Vlanif10]ip address 10.76.30.254 24

[Huawei]int vlan 40

[Huawei-Vlanif10]dhcp select relay

[Huawei-Vlanif10]ip address 10.76.40.254 24

[Huawei]int vlan 80

[Huawei-Vlanif10]dhcp select relay

[Huawei-Vlanif10]ip address 10.76.80.254 24

为vlanIF接口指定DHCP服务器:

[Huawei-Vlanif10]dhcp relay server-select dhcpgroup1

[Huawei-Vlanif20]dhcp relay server-select dhcpgroup1

[Huawei-Vlanif30]dhcp relay server-select dhcpgroup1

[Huawei-Vlanif40]dhcp relay server-select dhcpgroup1

[Huawei-Vlanif80]dhcp relay server-select dhcpgroup1

配置接口信息:

int g 0/0/1

port link-t tru

port trunk all vlan all

int g 0/0/2

port link-t acc

port de vlan 10

测试不同部门可以获取到不同vlan的IP地址。

标签: #服务器配两个地址