本案例利用华为eNSP模拟器,由AC作DHCP服务器,三层交换机做DHCP中继代理,为网络中的AP和无线网络中的STA分配IP地址。
一、拓扑结构
二、网络规划
1、AC1做DHCP服务器,为所有AP和移动终端分配IP
2、AR1做DHCP中继服务器
3、VLAN地址规划
VLAN10地址段:192.168.10.0/24
VLAN20地址段:192.168.20.0/24
VLAN30地址段:192.168.30.0/24
VLAN110地址段:192.168.110.0/30
VLAN120地址段:192.168.120.0/30
4、IP地址规划
AC1 Vlanif30 192.168.30.254/24
AC1 Vlanif110 192.168.110.2/30
AR1 G0/0/0 192.168.110.1/30
AR1 G0/0/1 192.168.120.1/30
LSW1 VLAN10 192.168.10.254/24
LSW1 VLAN20 192.168.20.254/24
LSW1 VLAN120 192.168.120.2/30
三、配置步骤
3.1 配置AC1(DHCP服务器)
1、设备名、VLAN
<AC6605>system-view
[AC6605]sysname DHCP-Server
[DHCP-Server]vlan batch 30 110
2、端口划分
配置GigabitEthernet 0/0/1
[DHCP-Server]interface GigabitEthernet 0/0/1
[DHCP-Server-GigabitEthernet0/0/1]port link-type access
[DHCP-Server-GigabitEthernet0/0/1]port default vlan 110
[DHCP-Server-GigabitEthernet0/0/1]quit
配置GigabitEthernet 0/0/2
[DHCP-Server]interface GigabitEthernet 0/0/2
[DHCP-Server-GigabitEthernet0/0/2]port link-type access
[DHCP-Server-GigabitEthernet0/0/2]port default vlan 30
[DHCP-Server-GigabitEthernet0/0/2]quit
3、配置全局DHCP池
创建vlan10的地址池
[DHCP-Server]dhcp enable
[DHCP-Server]ip pool vlan10pool
[DHCP-Server-ip-pool-vlan10pool]network 192.168.10.0 mask 24
[DHCP-Server-ip-pool-vlan10pool]gateway-list 192.168.10.254
[DHCP-Server-ip-pool-vlan10pool]quit
创建vlan20的地址池
[DHCP-Server]ip pool vlan20pool
[DHCP-Server-ip-pool-vlan20pool]network 192.168.20.0 mask 24
[DHCP-Server-ip-pool-vlan20pool]gateway-list 192.168.20.254
[DHCP-Server-ip-pool-vlan20pool]quit
创建vlan30的地址池
[DHCP-Server]ip pool vlan30pool
[DHCP-Server-ip-pool-vlan30pool]network 192.168.30.0 mask 24
[DHCP-Server-ip-pool-vlan30pool]gateway-list 192.168.30.254
[DHCP-Server-ip-pool-vlan30pool]quit
4、G0/0/1和G0/0/2接口上启用全局地址池
[DHCP-Server]interface Vlanif 30
[DHCP-Server-Vlanif30]ip address 192.168.30.254 24
[DHCP-Server-Vlanif30]dhcp select global
[DHCP-Server-Vlanif30]quit
[DHCP-Server]interface Vlanif 110
[DHCP-Server-Vlanif110]ip address 192.168.110.2 30
[DHCP-Server-Vlanif110]dhcp select global
[DHCP-Server-Vlanif110]quit
5、配置RIP路由
[DHCP-Server]rip
[DHCP-Server-rip-1]version 2
[DHCP-Server-rip-1]network 192.168.30.0
[DHCP-Server-rip-1]network 192.168.110.0
[DHCP-Server-rip-1]quit
[DHCP-Server]quit
<DHCP-Server>save
3.2 配置路由器AR1
1、设备名、IP地址
<Huawei>system-view
[Huawei]sysname AR
[AR]interface GigabitEthernet 0/0/0
[AR-GigabitEthernet0/0/0]ip address 192.168.110.1 30
[AR-GigabitEthernet0/0/0]quit
[AR]interface GigabitEthernet 0/0/1
[AR-GigabitEthernet0/0/1]ip address 192.168.120.1 30
[AR-GigabitEthernet0/0/1]quit
2、配置RIP路由
[AR]rip
[AR-rip-1]version 2
[AR-rip-1]network 192.168.110.0
[AR-rip-1]network 192.168.120.0
[AR-rip-1]quit
[AR]quit
<AR>save
3.3 配置LSW1(中继代理)
1、设备名、VLAN
<Huawei>system-view
[Huawei]sysname DHCP-Relay
[DHCP-Relay]vlan batch 10 20 120
2、端口划分
配置GigabitEthernet 0/0/1
[DHCP-Relay]interface GigabitEthernet 0/0/1
[DHCP-Relay-GigabitEthernet0/0/1]port link-type access
[DHCP-Relay-GigabitEthernet0/0/1]port default vlan 120
[DHCP-Relay-GigabitEthernet0/0/1]quit
配置GigabitEthernet 0/0/2
[DHCP-Relay]interface GigabitEthernet 0/0/2
[DHCP-Relay-GigabitEthernet0/0/2]port link-type access
[DHCP-Relay-GigabitEthernet0/0/2]port default vlan 10
[DHCP-Relay-GigabitEthernet0/0/2]quit
配置GigabitEthernet 0/0/3
[DHCP-Relay]interface GigabitEthernet 0/0/3
[DHCP-Relay-GigabitEthernet0/0/3]port link-type access
[DHCP-Relay-GigabitEthernet0/0/3]port default vlan 20
[DHCP-Relay-GigabitEthernet0/0/3]quit
3、Vlanif10和Vlanif20配置IP、启用DHCP中继代理
在Vlanif10接口启用中继代理
[DHCP-Relay]dhcp enable
[DHCP-Relay]interface Vlanif 10
[DHCP-Relay-Vlanif10]ip address 192.168.10.254 24
[DHCP-Relay-Vlanif10]dhcp select relay
[DHCP-Relay-Vlanif10]dhcp relay server-ip 192.168.110.2
[DHCP-Relay-Vlanif10]quit
在Vlanif20接口启用中继代理
[DHCP-Relay]interface Vlanif 20
[DHCP-Relay-Vlanif20]ip address 192.168.20.254 24
[DHCP-Relay-Vlanif20]dhcp select relay
[DHCP-Relay-Vlanif20]dhcp relay server-ip 192.168.110.2
[DHCP-Relay-Vlanif20]quit
[DHCP-Relay]interface Vlanif 120
[DHCP-Relay-Vlanif120]ip address 192.168.120.2 24
[DHCP-Relay-Vlanif120]quit
4、配置RIP路由
[DHCP-Relay]rip
[DHCP-Relay-rip-1]version 2
[DHCP-Relay-rip-1]network 192.168.10.0
[DHCP-Relay-rip-1]network 192.168.20.0
[DHCP-Relay-rip-1]network 192.168.120.0
[DHCP-Relay-rip-1]quit
[DHCP-Relay]quit
<DHCP-Relay>save
四、测试
1、在AP上使用display ip interface brief查看地址
2、在AC1上使用【display ip pool name 地址池**名 used】查看地址分配情况**
标签:quit,中继,eNSP,Relay,ip,192.168,Server,DHCP From: https://blog.csdn.net/weixin_45605234/article/details/137255160