Example for Configuring EoGRE to Implement Layer 2 Communication Between the WAG and AC
Networking Requirements
As shown in Figure 4-91, an enterprise provides the Internet access service for STAs through a WLAN. On the WLAN, APs provide access to traffic from STAs, the AC provides AP access and STA authentication, and the WLAN access gateway (WAG) serves as the STA gateway and assigns IP addresses to STAs. The AC and WAG are connected over an IP/MPLS backbone network. A large number of APs are involved in this scenario. To prevent resource depletion when a large number of GRE tunnels are frequently set up and deleted on the WAG, an administrator configures Ethernet over GRE (EoGRE) between the AC and WAG to implement Layer 2 communication.
Data Planning
Item |
Data |
---|---|
Management VLAN |
VLAN 100 |
Service VLAN |
VLAN 101 |
AC's source interface address |
VLANIF 100: 10.23.100.1/24 |
DHCP server |
The AC serves as a DHCP server to assign IP addresses to APs, and the WAG serves as a DHCP server to assign IP addresses to STAs. |
IP address pool for APs |
10.23.100.2 to 10.23.100.254/24 |
IP address pool for STAs |
10.23.101.3-10.23.101.254/24 |
AP group |
|
Regulatory domain profile |
|
SSID profile |
|
Security profile |
|
VAP profile |
|
Item |
Data |
---|---|
Tunnel interface on the AC |
|
VE interface on the AC |
|
Configuration Roadmap
To meet the preceding requirements, deploy EoGRE between the AC and WAG so that Ethernet packets can be forwarded from a VE interface over a GRE tunnel. This enables Layer 2 communication between the AC and WAG.
The configuration roadmap is as follows:
Run the Interior Gateway Protocol (IGP) between all devices for communication on the public network.
Create a tunnel interface on the AC and deploy a GRE tunnel. The source address of a tunnel interface is the IP address of the physical interface sending packets, and the destination address is the IP address of the physical interface receiving packets.
Create a VE interface on the AC and add this interface to the corresponding VLAN.
On the AC, bind the VE interface to the GRE tunnel so that Ethernet packets can be forwarded over the GRE tunnel.
Configure WLAN services on the AC. In this example, the WLAN security policy is WPA-WPA2+PSK+AES. Configure the security policy based on site requirements.
Procedure
- Configure an IP address for each physical interface.
# Configure the AC.
<HUAWEI> system-view [HUAWEI] sysname AC [AC] vlan batch 10 100 101 [AC] interface gigabitethernet 0/0/1 [AC-GigabitEthernet0/0/1] port link-type trunk [AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [AC-GigabitEthernet0/0/1] quit [AC] interface gigabitethernet 0/0/2 [AC-GigabitEthernet0/0/2] port link-type trunk [AC-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 101 [AC-GigabitEthernet0/0/2] port trunk pvid vlan 100 [AC-GigabitEthernet0/0/2] quit [AC] interface vlanif 10 [AC-Vlanif10] ip address 10.20.1.1 24 [AC-Vlanif10] quit
# Configure the WAG. The detailed configurations are not mentioned here.
- Configure a tunnel interface on the AC and deploy a GRE tunnel.
# This example assumes that IGP is run between all devices for communication on the public network, the source and destination interface IP addresses of the GRE tunnel on the AC is 10.20.1.1 and 10.30.1.1 (WAG's IP address), respectively.
[AC] interface tunnel 0/0/1 [AC-Tunnel0/0/1] tunnel-protocol gre [AC-Tunnel0/0/1] ip address 10.40.1.1 255.255.255.0 [AC-Tunnel0/0/1] source 10.20.1.1 [AC-Tunnel0/0/1] destination 10.30.1.1 [AC-Tunnel0/0/1] quit
- Create a VE interface and add this interface to the corresponding VLAN. Ensure that this VE interface and the inbound interface of user packets are added to the same VLAN.
[AC] interface virtual-ethernet 0/0/1 [AC-Virtual-Ethernet0/0/1] port link-type trunk [AC-Virtual-Ethernet0/0/1] undo port trunk allow-pass vlan 1 [AC-Virtual-Ethernet0/0/1] port trunk allow-pass vlan 101 [AC-Virtual-Ethernet0/0/1] quit
- Bind the VE interface to the GRE tunnel so that Ethernet packets can be forwarded over the GRE tunnel.
# Configure the AC.
[AC] interface tunnel 0/0/1 [AC-Tunnel0/0/1] map interface virtual-ethernet 0/0/1 [AC-Tunnel0/0/1] quit
# Check the VE interface status on the AC.
[AC] display interface virtual-ethernet Virtual-Ethernet0/0/1 current state : UP Line protocol current state : UP Description:HUAWEI, AC Series, Virtual-Ethernet0/0/1 Interface Switch Port, PVID : 1, TPID : 8100(Hex), The Maximum Transmit Unit is 1500 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0200-0000-00e0 Current system time: 2018-01-23 20:16:05 Input bandwidth utilization : 0% Output bandwidth utilization : 0%
- Configure the DHCP servers to assign IP addresses to APs and STAs.
# Configure VLANIF 100 on the AC to assign IP address to APs.
[AC] dhcp enable [AC] interface vlanif 100 [AC-Vlanif100] ip address 10.23.100.1 24 [AC-Vlanif100] dhcp select interface [AC-Vlanif100] quit
# Configure the WAG to assign IP addresses to STAs. The detailed configurations are not mentioned here.
- Configure the AP to go online.# Create an AP group to which APs with the same configuration are to be added.
[AC] wlan [AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] quit
# Create a regulatory domain profile, configure the AC country code in the profile, and apply the profile to the AP group.[AC-wlan-view] regulatory-domain-profile name default [AC-wlan-regulate-domain-default] country-code cn [AC-wlan-regulate-domain-default] quit [AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] regulatory-domain-profile default Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue?[Y/N]:y [AC-wlan-ap-group-ap-group1] quit [AC-wlan-view] 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 default AP authentication mode is MAC address authentication. 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
# After the AP is powered on, run the display ap all command to check the AP state. If the State field displays nor, the AP goes online successfully.[AC-wlan-view] display ap all
Total AP information: nor : normal [1] Extrainfo : Extra information P : insufficient power supply -------------------------------------------------------------------------------------------------- ID MAC Name Group IP Type State STA Uptime ExtraInfo -------------------------------------------------------------------------------------------------- 0 00e0-fc76-e360 area_1 ap-group1 10.23.100.254 AP5030DN nor 0 10S - -------------------------------------------------------------------------------------------------- Total: 1
- Configure WLAN service parameters.# Create security profile wlan-net and configure a security policy in the profile.
In this example, the security policy is set to WPA-WPA2+PSK+AES and the password to a1234567. In actual situations, configure the security policy according to service requirements.
[AC-wlan-view] security-profile name wlan-net [AC-wlan-sec-prof-wlan-net] security wpa-wpa2 psk pass-phrase a1234567 aes [AC-wlan-sec-prof-wlan-net] quit
# Create SSID profile wlan-net and set the SSID name to wlan-net.[AC-wlan-view] ssid-profile name wlan-net [AC-wlan-ssid-prof-wlan-net] ssid wlan-net [AC-wlan-ssid-prof-wlan-net] quit
# Create VAP profile wlan-net, set the data forwarding mode and service VLAN, and bind the security profile and SSID profile to the VAP profile.[AC-wlan-view] vap-profile name wlan-net [AC-wlan-vap-prof-wlan-net] forward-mode tunnel [AC-wlan-vap-prof-wlan-net] service-vlan vlan-id 101 [AC-wlan-vap-prof-wlan-net] security-profile wlan-net [AC-wlan-vap-prof-wlan-net] ssid-profile wlan-net [AC-wlan-vap-prof-wlan-net] quit
# Bind VAP profile wlan-net to the AP group and apply the profile to radio 0 and radio 1 of APs in the AP group.[AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 0 [AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 1 [AC-wlan-ap-group-ap-group1] quit
- Verify the configuration.
The AC automatically delivers WLAN service configurations to the AP. After the service configuration is complete, run the display vap ssid wlan-net command. If Status in the command output is displayed as ON, the VAPs have been successfully created on AP radios.
[AC-wlan-view] display vap ssid wlan-net WID : WLAN ID -------------------------------------------------------------------------------- AP ID AP name RfID WID BSSID Status Auth type STA SSID -------------------------------------------------------------------------------- 0 area_1 0 1 60DE-4476-E360 ON WPA/WPA2-PSK 0 wlan-net 0 area_1 1 1 60DE-4476-E370 ON WPA/WPA2-PSK 0 wlan-net ------------------------------------------------------------------------------- Total: 2
Connect STAs to the WLAN with SSID wlan-net and enter the password a1234567. Run the display station ssid wlan-net command on the AC. The command output shows that the STAs are connected to the WLAN wlan-net.
[AC-wlan-view] display station ssid wlan-net Rf/WLAN: Radio ID/WLAN ID Rx/Tx: link receive rate/link transmit rate(Mbps) --------------------------------------------------------------------------------- STA MAC AP ID Ap name Rf/WLAN Band Type Rx/Tx RSSI VLAN IP address --------------------------------------------------------------------------------- e019-1dc7-1e08 0 area_1 1/1 5G 11n 46/59 -68 101 10.23.101.254 --------------------------------------------------------------------------------- Total: 1 2.4G: 0 5G: 1
Configuration Files
AC configuration file
# sysname AC # vlan batch 10 100 to 101 # dhcp enable # interface Vlanif10 ip address 10.20.1.1 255.255.255.0 # interface Vlanif100 ip address 10.23.100.1 255.255.255.0 dhcp select interface # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/2 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 to 101 # interface Virtual-Ethernet0/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 101 # interface Tunnel0/0/1 ip address 10.40.1.1 255.255.255.0 tunnel-protocol gre source 10.20.1.1 destination 10.30.1.1 map interface Virtual-Ethernet0/0/1 # capwap source interface vlanif100 # wlan security-profile name wlan-net security wpa-wpa2 psk pass-phrase %^%#t2*V0VTj#9iEQkEnC)59YCFlO\*RyW5];yUs&K4W%^%# aes ssid-profile name wlan-net ssid wlan-net vap-profile name wlan-net forward-mode tunnel service-vlan vlan-id 101 ssid-profile wlan-net security-profile wlan-net ap-group name ap-group1 radio 0 vap-profile wlan-net wlan 1 radio 1 vap-profile wlan-net wlan 1 ap-id 0 type-id 35 ap-mac 60de-4476-e360 ap-sn 21500826412SG4900740 ap-name area_1 ap-group ap-group1 # return