华为交换机不同vlan通过DHCP中继方式获取IP的配置方法

不同vlan通过DHCP中继方式获取IP的配置方法

1. 规划拓扑及VLAN,IP

华为交换机不同vlan通过DHCP中继方式获取IP的配置方法

2. Windows server 2016 DHCP服务器配链接描述

https://blog.51cto.com/lumay0526/2046957
注意:如果在域环境下部署DHCP,在安装完成后需要使用活动目录服务器授权DHCP服务

3. 接入交换机配置(2个配置相同)

system-view
vlan batch 10 20  #新建VLAN

interface GigabitEthernet0/0/1   #进入接口GigabitEthernet0/0/1  
port link-type access  #设置端口模式Access,vlan10
port default vlan 10

interface GigabitEthernet0/0/2   #进入接口GigabitEthernet0/0/2
port link-type access  #设置端口模式Access,vlan20
port default vlan 20

interface GigabitEthernet0/0/3  #进入接口GigabitEthernet0/0/3(上行端口)
port link-type trunk  #设置端口模式Trunk,所有vlan均可通过
port trunk allow-pass vlan all

4. 核心交换机配置

system-view
vlan batch 10 20 30 40  #新建vlan10 20 30 40

#配置虚拟端口地址(网关地址)
interface vlan 10
ip address 192.168.10.1 24
interface vlan 20
ip address 192.168.20.1 24
interface vlan 30
ip address 192.168.90.1 24

interface GigabitEthernet0/0/1  #配置下行端口trunk
port link-type trunk 
port trunk allow-pass vlan all 

interface GigabitEthernet0/0/2  #配置下行端口trunk
port link-type trunk 
port trunk allow-pass vlan all 

interface GigabitEthernet0/0/3  #配置连接dhcp端口vlan30
port link-type access
port default vlan 30

#配置中继:
system-view
dhcp enable
interface vlan 10
dhcp select relay
dhcp relay server-ip 192.168.90.9

interface vlan 20
dhcp select relay
dhcp relay server-ip 192.168.90.9

 

上一篇:博科SAN交换机配置Trunk


下一篇:hybrid,access和trunk的区别