Example for Configuring Wireless User Access to a WLAN
Networking Requirements
As shown in Figure 2-14, an enterprise provides the WLAN service for users. The router functions as a Fat AP to provide the wireless Internet access service and as a DHCP server to assign IP addresses to STAs.
Configuration Roadmap
The configuration roadmap is as follows:
- Configure a default route on the Fat AP so that the Fat AP can connect to the Internet.
- Configure the DHCP server to assign IP addresses to the STAs connected to the Fat AP.
- Configure basic function parameters and service VAPs for the Fat AP so that the STAs can connect to the Internet through the service VAPs.
- WMM profile wmmf with ID 0
- Radio profile radiof with ID 0. The default radio profile is already bound to the default WMM profile.
- Security profile secf with ID 0
- Traffic profile traf with ID 0
The WMM, radio, security, and traffic profiles in this example are created by users.
Procedure
- Configure a default route on the Fat AP.
Assume that the IP address of the device peer end is 1.1.1.1.
<Huawei> system-view [Huawei] ip route-static 0.0.0.0 0 1.1.1.1
- Create a VLANIF interface and assign an IP address to it. This interface functions as a logical Layer 3 interface for data forwarding and enables the DHCP service function to assign IP addresses to STAs.
[Huawei] dhcp enable [Huawei] vlan 100 [Huawei-vlan100] quit [Huawei] interface vlanif 100 [Huawei-Vlanif100] ip address 10.10.10.1 24 [Huawei-Vlanif100] dhcp select interface [Huawei-Vlanif100] quit
- Configure basic function parameters and service VAPs for the Fat AP.
# Configure the country code for the Fat AP.
[Huawei] wlan global country-code cn
# Create a WMM profile wmm-1 and retain the default parameter settings.
[Huawei] wlan [Huawei-wlan-view] wmm-profile name wmm-1 id 1 [Huawei-wlan-wmm-prof-wmm-1] quit
# Create a radio profile named radio-1 and bind the WMM profile wmm-1 to it.
[Huawei-wlan-view] radio-profile name radio-1 id 1 [Huawei-wlan-radio-prof-radio-1] wmm-profile name wmm-1 [Huawei-wlan-radio-prof-radio-1] quit [Huawei-wlan-view] quit
# Bind the radio profile named radio-1 to the radio interface.
[Huawei] interface wlan-radio 0/0/0 [Huawei-Wlan-Radio0/0/0] radio-profile name radio-1 [Huawei-Wlan-Radio0/0/0] quit
# Configure a WLAN-BSS interface so that radio packets sent from users can be sent to the WLAN service processing module after reaching the AP.
[Huawei] interface wlan-bss 1 [Huawei-Wlan-Bss1] port hybrid tagged vlan 100 [Huawei-Wlan-Bss1] quit
# Create a security profile named security-1.[Huawei] wlan [Huawei-wlan-view] security-profile name security-1 id 1 [Huawei-wlan-sec-prof-security-1] security-policy wpa2 [Huawei-wlan-sec-prof-security-1] wpa2 authentication-method psk pass-phrase cipher huawei@123 encryption-method ccmp [Huawei-wlan-sec-prof-security-1] quit
# Configure QoS policies. Create a traffic profile named traffic-1 and retain the default parameter settings.
[Huawei-wlan-view] traffic-profile name traffic-1 id 1 [Huawei-wlan-traffic-prof-traffic-1] quit
# Create a service set, set the SSID to huawei-1, bind the traffic profile, security profile, and WLAN-BSS interface to the service set.
[Huawei-wlan-view] service-set name huawei-1 id 1 [Huawei-wlan-service-set-huawei-1] ssid huawei-1 [Huawei-wlan-service-set-huawei-1] traffic-profile name traffic-1 [Huawei-wlan-service-set-huawei-1] security-profile name security-1 [Huawei-wlan-service-set-huawei-1] wlan-bss 1 [Huawei-wlan-service-set-huawei-1] quit [Huawei-wlan-view] quit
# Bind the service set huawei-1 to a radio interface.
[Huawei] interface wlan-radio 0/0/0 [Huawei-Wlan-Radio0/0/0] service-set name huawei-1 [Huawei-Wlan-Radio0/0/0] quit
- Verify the configuration.
# The WLAN with the SSID huawei-1 is available for STAs connected to the AP. Users must enter the password huawei@123 to use the WLAN services.
Configuration Files
- Configuration file of the Router
# sysname Huawei # vlan batch 100 # dhcp enable # interface Vlanif100 ip address 10.10.10.1 255.255.255.0 dhcp select interface # interface Wlan-Bss1 port hybrid tagged vlan 100 # ip route-static 0.0.0.0 0.0.0.0 1.1.1.1 # wlan wmm-profile name wmmf id 0 wmm-profile name wmm-1 id 1 traffic-profile name traf id 0 traffic-profile name traffic-1 id 1 security-profile name secf id 0 security-profile name security-1 id 1 security-policy wpa2 wpa2 authentication-method psk pass-phrase cipher %@%@0\MqY9X~eYpe}\1;2439e"2P%@%@ encryption-method ccmp service-set name huawei-1 id 1 wlan-bss 1 ssid huawei-1 traffic-profile id 1 security-profile id 1 radio-profile name radiof id 0 wmm-profile id 0 radio-profile name radio-1 id 1 wmm-profile id 1 # interface Wlan-Radio0/0/0 radio-profile id 1 service-set id 1 wlan 1 # return