Configuring an AP to Go Online
Configuring an AP to Go Online in Static Mode
Networking Requirements
As shown in Figure 19-19, the AC and AP are connected through a Layer 2 network, and the AP needs to go online in static mode.
Procedure
- Configure the switch.
# Add GE0/0/1 and GE0/0/2 on the switch to VLAN 100, and set the default VLAN of GE0/0/1 to VLAN 100.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan batch 100 [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type trunk [Switch-GigabitEthernet0/0/1] port trunk pvid vlan 100 [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [Switch-GigabitEthernet0/0/1] port-isolate enable [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] port link-type trunk [Switch-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 [Switch-GigabitEthernet0/0/2] quit
- Configure the AC to communicate with other devices on the network.
If the AC and AP are directly connected, set the default VLAN of the AC's interface connected to the AP to the management VLAN (VLAN 100 in this example).
# Add GE0/0/1 on the AC to VLAN 100, create VLANIF 100, and set the IP address of VLANIF 100 to 10.23.100.1/24.
<HUAWEI> system-view [HUAWEI] sysname AC [AC] vlan batch 100 [AC] interface gigabitethernet 0/0/1 [AC-GigabitEthernet0/0/1] port link-type trunk [AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [AC-GigabitEthernet0/0/1] quit [AC] interface vlanif 100 [AC-Vlanif100] ip address 10.23.100.1 24 [AC-Vlanif100] quit
- Configure a static IP address for the AP.# Log in to the AP and configure static IP address allocation for it (default: DHCP mode).
<AP> system-view [AP] ap-address mode static
# Configure the IP address and gateway address for the AP to go online in static mode.[AP] ap-address static ip-address 10.23.100.100 24 10.23.100.1 [AP] ap-address static ac-list 10.23.100.1 // A maximum of four contiguous IP addresses of ACs can be configured in this list, which are separated by spaces. [AP] quit
# Verify the configuration.<AP> display ap-address-info ============================================================== Active AP Address Info AP Mode : dhcp Ip Address : - Ip Version : - Mask : - Gateway : - AC 0 ip : - AC 1 ip : - AC 2 ip : - AC 3 ip : - -------------------------------------------------------------- Reboot Active AP Address Info //Address information after the AP is restarted AP Mode : static Ip Address : 10.23.100.100 Ip Version : 4 Mask : 24 Gateway : 10.23.100.1 AC 0 ip : 10.23.100.1 AC 1 ip : - AC 2 ip : - AC 3 ip : - ==============================================================
If the AC and AP are connected at Layer 3, configure a route on the gateway of the AP to ensure connectivity between the AP's IP address and the AC's source address.
# Confirm the configuration and restart the AP to make the configuration take effect. (If the AP and AC are connected at Layer 3, restarting the AP is recommended after the AC's IP address is specified.)<AP> reboot System will reboot! Continue ? [y/n]:y
- Configure the AP to go online.
- Create an AP group to which APs with the same configuration can be added.
[AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] quit
- Configure the AC's source interface.
[AC] capwap source interface vlanif 100
- Import the AP offline on the AC and add the AP to the AP group ap-group1. Assume that the AP's MAC address is 60de-4476-e360. Configure a name for the AP based on the AP's deployment location, so that you can know where the AP is deployed from its name. For example, name the AP area_1 if it is deployed in Area 1.
The ap auth-mode command sets the AP authentication mode to MAC address authentication by default. If the default settings are retained, you do not need to run the ap auth-mode mac-auth command.
In this example, the AP5030DN is used and has two radios: radio 0 and radio 1. Radio 0 of the AP5030DN works on the 2.4 GHz frequency band and radio 1 works on the 5 GHz frequency band.
[AC] wlan [AC-wlan-view] ap auth-mode mac-auth [AC-wlan-view] ap-id 0 ap-mac 60de-4476-e360 [AC-wlan-ap-0] ap-name area_1 Warning: This operation may cause AP reset. Continue? [Y/N]:y [AC-wlan-ap-0] ap-group ap-group1 Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configuration s of the radio, Whether to continue? [Y/N]:y [AC-wlan-ap-0] quit
- Create an AP group to which APs with the same configuration can be added.
Verifying the Configuration
# Run the display ap all command to check the AP state. If the State field displays nor, the AP has gone online.
[AC-wlan-view] display ap all Total AP information:nor : normal [1] Extra information: P : insufficient power supply -------------------------------------------------------------------------------------------------- ID MAC Name Group IP Type State STA Uptime ExtraInfo -------------------------------------------------------------------------------------------------- 0 60de-4476-e360 area_1 ap-group1 10.23.10.254 AP5030DN nor 0 10S - -------------------------------------------------------------------------------------------------- Total: 1
Configuring an AP to Go Online in DHCP Mode
Networking Requirements
As shown in Figure 19-20, the AC and APs are connected at Layer 3, and the AC functions as a DHCP server to allocate IP addresses to APs.
Procedure
- Configure the switch.
# Add GE0/0/1 and GE0/0/2 on the switch to VLAN 100, and set the default VLAN of GE0/0/1 to VLAN 100.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan batch 100 [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type trunk [Switch-GigabitEthernet0/0/1] port trunk pvid vlan 100 [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [Switch-GigabitEthernet0/0/1] port-isolate enable [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] port link-type trunk [Switch-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 [Switch-GigabitEthernet0/0/2] quit
- Configure the AC to communicate with other devices on the network.
If the AC and AP are directly connected, set the default VLAN of the AC's interface connected to the AP to the management VLAN (VLAN 100 in this example).
# Add GE0/0/1 on the AC to VLAN 100, create VLANIF 100, and set the IP address of VLANIF 100 to 10.23.100.1/24.
<HUAWEI> system-view [HUAWEI] sysname AC [AC] vlan batch 100 [AC] interface gigabitethernet 0/0/1 [AC-GigabitEthernet0/0/1] port link-type trunk [AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [AC-GigabitEthernet0/0/1] quit [AC] interface vlanif 100 [AC-Vlanif100] ip address 10.23.100.1 24 [AC-Vlanif100] quit
- Configure a DHCP server to assign IP addresses to APs.In this example, the AC functions as a DHCP server. It can allocate IP addresses to APs using either of the following address pools:
- Global address pool: is created in the system view on the DHCP server. The server is configured in the interface view to allocate IP addresses, gateway addresses, and DNS server addresses to clients based on the global address pool.
- Interface address pool: is created in the interface view on the DHCP server. The server is configured to allocate IP addresses, gateway addresses, and DNS server addresses to clients based on the interface address pool.
The difference is that the global address pool mode supports the DHCP relay scenario, but the interface address pool mode does not.
- The following provides an example for configuring a DHCP server to allocate IP addresses based on a global address pool:
- # On the AC, create a global IP address pool to allocate IP addresses to APs.
<AC> system-view [AC] dhcp enable //Enable DHCP globally. AC] ip pool huawei //Create a global address pool. [AC-ip-pool-huawei] network 10.23.10.0 mask 24 //Specify the range of IP addresses that can be dynamically allocated from the global address pool. [AC-ip-pool-huawei] gateway-list 10.23.10.1 //Configure a gateway IP address for APs. [AC-ip-pool-huawei] option 43 sub-option 2 ip-address 10.23.100.1 //Configure DHCP messages to carry Option 43 to specify the AC's IP address for APs. [AC-ip-pool-huawei] quit [AC] interface vlanif 100 [AC-Vlanif100] dhcp select global //Enable the interface to use the global address pool. [AC-Vlanif100] quit
- Configure the DHCP relay function on the switch to forward DHCP packets between the AC and APs.
<Switch> system-view [Switch] dhcp enable //Enable DHCP. [Switch] interface vlanif 10 [Switch-Vlanif10] ip address 10.23.10.1 24 [Switch-Vlanif10] dhcp select relay //Enable the DHCP relay function. [Switch-Vlanif10] dhcp relay server-ip 10.23.100.1 //Specify the DHCP server's IP address on the DHCP relay agent. [Switch-Vlanif10] quit
- # On the AC, create a global IP address pool to allocate IP addresses to APs.
- The following provides an example for configuring a DHCP server to allocate IP addresses based on an interface address pool:
- Enable the DHCP function.
<AC> system-view [AC] dhcp enable
- Enable the DHCP server function on VLANIF 100 and configure the server to use the interface address pool.
[AC] interface vlanif 100 [AC-Vlanif10] ip address 10.23.100.1 255.255.255.0 //Configure an IP address for the interface. [AC-Vlanif10] dhcp select interface //Configure the DHCP server to allocate IP addresses based on the interface address pool. [AC-Vlanif10] quit
- Enable the DHCP function.
- Configure the AP to go online.
- Create an AP group to which APs with the same configuration can be added.
[AC] wlan [AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] quit [AC-wlan-view] quit
- Configure the AC's source interface.
[AC] capwap source interface vlanif 100
- Add the AP on the AC.
You can add APs by manual configuration, automatic discovery, and manual confirmation.
- Manual configuration (importing APs when they are offline): The APs' MAC addresses and SNs are configured on an AC before they go online. The AC automatically starts to set up a connection with an AP if its MAC address or SN matches the configured ones.
<AC> system-view [AC] wlan [AC-wlan-view] ap auth-mode mac-auth //Set the AP authentication mode to MAC authentication. [AC-wlan-view] ap-id 1 type-id 115 ap-mac 0025-9e07-8270 //Add an AP before it goes online.
- Automatic discovery (configuring the AC to automatically discover an AP): When the AP authentication mode is set to no authentication, or the AP authentication mode is set to MAC or SN authentication and the AP's MAC address or SN is whitelisted, the AC automatically discovers the AP as long as the AP connects to it and allows the AP to go online.
- Set the AS authentication mode to no authentication.
<AC> system-view [AC] wlan [AC-wlan-view] ap auth-mode no-auth
- Set the AP authentication mode to MAC authentication and whitelist the AP.
<AC> system-view [AC] wlan [AC-wlan-view] ap auth-mode mac-auth //Set the AP authentication mode to MAC authentication. [AC-wlan-view] ap whitelist mac 0025-9e07-8270 //Add the AP to the whitelist.
- Set the AP authentication mode to SN authentication and whitelist the AP.
<AC> system-view [AC] wlan [AC-wlan-view] ap auth-mode sn-auth //Set the AP authentication mode to SN authentication. [AC-wlan-view] ap whitelist sn 08PE56430071 //Add the AP to the whitelist.
- Set the AS authentication mode to no authentication.
- Manual confirmation (manually confirming APs in the list of unauthorized APs): The AP authentication mode is set to MAC or SN authentication, and the AP whitelist is configured on the AC. When an AP out of the whitelist connects to the AC, the AC adds the AP to the list of unauthorized APs. The AP can go online only after its identity is manually confirmed.
<AC> system-view [AC] wlan [AC-wlan-view] ap auth-mode mac-auth //Set the AP authentication mode to MAC authentication. [AC-wlan-view] display ap unauthorized record [AC-wlan-view] ap-confirm mac 0025-9e07-8270 //Manually confirm the AP that fails to be authenticated and allows it to go online.
- Manual configuration (importing APs when they are offline): The APs' MAC addresses and SNs are configured on an AC before they go online. The AC automatically starts to set up a connection with an AP if its MAC address or SN matches the configured ones.
- Create an AP group to which APs with the same configuration can be added.
Verifying the Configuration
# Run the display ap all command to check the AP state. If the State field displays nor, the AP has gone online.
[AC-wlan-view] display ap all Total AP information:nor : normal [1] Extra information: P : insufficient power supply -------------------------------------------------------------------------------------------------- ID MAC Name Group IP Type State STA Uptime ExtraInfo -------------------------------------------------------------------------------------------------- 0 60de-4476-e360 area_1 ap-group1 10.23.10.254 AP5030DN nor 0 10S - -------------------------------------------------------------------------------------------------- Total: 1