1. 程式人生 > 其它 >三層組網AP上線外接DHCP

三層組網AP上線外接DHCP

一、實驗目的

在3-1的基礎上增加DHCP的配置方法

二、實驗儀器裝置及軟體

儀器裝置:一臺AC,四臺AP,一臺路由充當DHCP伺服器

軟體:ENSP

三、實驗原理

四、 實驗內容與步驟

1.三層交換機

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname coreSwitch

[coreSwitch]undo info-center enable

Info: Information center is disabled.

[coreSwitch]vlan batch 100 to 102

Info: This operation may take a few seconds. Please wait for a moment...done.

[coreSwitch]dhcp en

Info: The operation may take a few seconds. Please wait for a moment.done.

[coreSwitch]interface vlanif1

[coreSwitch-Vlanif1]ip add 10.0.0.1 255.255.255.0

[coreSwitch-Vlanif1]interface vlanif100

[coreSwitch-Vlanif100]ip add 10.0.100.254 255.255.255.0

[coreSwitch-Vlanif100]interface vlanif101

[coreSwitch-Vlanif101]ip add 10.0.101.254 255.255.255.0

[coreSwitch-Vlanif101]dhcp select relay

[coreSwitch-Vlanif101]dhcp relay server-ip 10.0.0.254

[coreSwitch-Vlanif101]interface vlanif102

[coreSwitch-Vlanif102]ip add 10.0.102.254 255.255.255.0

[coreSwitch-Vlanif102]dhcp select relay

[coreSwitch-Vlanif102]dhcp relay server-ip 10.0.0.254

[coreSwitch-Vlanif102]interface g0/0/1

[coreSwitch-GigabitEthernet0/0/1]port link-type access

[coreSwitch-GigabitEthernet0/0/1]port default vlan 101

[coreSwitch-GigabitEthernet0/0/1]interface g0/0/2

[coreSwitch-GigabitEthernet0/0/2]port link-type access

[coreSwitch-GigabitEthernet0/0/2]port default vlan 101

[coreSwitch-GigabitEthernet0/0/2]interface g0/0/3

[coreSwitch-GigabitEthernet0/0/3]port link-type access

[coreSwitch-GigabitEthernet0/0/3]port default vlan 102

[coreSwitch-GigabitEthernet0/0/3]interface g0/0/4

[coreSwitch-GigabitEthernet0/0/4]port link-type access

[coreSwitch-GigabitEthernet0/0/4]port default vlan 102

[coreSwitch-GigabitEthernet0/0/4]interface g0/0/24

[coreSwitch-GigabitEthernet0/0/24]port link-type access

[coreSwitch-GigabitEthernet0/0/24]port default vlan 100

2.無線控制AC

<AC6005>sys

Enter system view, return user view with Ctrl+Z.

[AC6005]interface vlanif1

[AC6005-Vlanif1]ip add 10.0.100.1 255.255.255.0

[AC6005-Vlanif1]ip route-static 0.0.0.0 0.0.0.0 10.0.100.254

[AC6005]wlan

[AC6005-wlan-view]wlan ac source interface vlanif1

3.DHCP伺服器

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]dhcp en

Info: The operation may take a few seconds. Please wait for a moment.done.

[Huawei]ip pool for101

Info: It's successful to create an IP address pool.

[Huawei-ip-pool-for101]gateway-list 10.0.101.254

[Huawei-ip-pool-for101]network 10.0.101.0 mask 255.255.255.0

[Huawei-ip-pool-for101]dns-list 1.1.1.1

[Huawei-ip-pool-for101]option 43 sub-option 3 ascii 10.0.100.1

[Huawei-ip-pool-for101]ip pool for102

Info: It's successful to create an IP address pool.

[Huawei-ip-pool-for102]gateway-list 10.0.102.254

[Huawei-ip-pool-for102]network 10.0.102.0 mask 255.255.255.0

[Huawei-ip-pool-for102]dns-list 1.1.1.1

[Huawei-ip-pool-for102]option 43 sub-option 3 ascii 10.0.100.1

[Huawei-ip-pool-for102]interface vlanif1

[Huawei-Vlanif1]ip add 10.0.0.254 255.255.255.0

[Huawei-Vlanif1]dhcp select global

[Huawei-Vlanif1]quit

[Huawei]ip route-static 10.0.100.0 255.255.255.0 10.0.0.1

[Huawei]ip route-static 10.0.101.0 255.255.255.0 10.0.0.1

[Huawei]ip route-static 10.0.102.0 255.255.255.0 10.0.0.1

五、實驗結果與分析

1. AC上檢查ap的上線情況

dis ap all

2.Ap上檢查與AC的連線情況

dis capwap link state