A hospital wants to deploy a network to expand IoT applications while providing the wireless network access service to prevent infant abductions.
Item |
Data |
---|---|
Management VLAN |
VLAN 100 |
Service VLAN |
VLAN 101 |
AC's source interface |
VLANIF 100 |
DHCP server |
The AC functions as a DHCP server to assign IP addresses to STAs. |
AP's IP address |
Static IP address: 10.23.100.254 |
IP address pool for STAs |
10.23.101.2 to 10.23.101.254/24 |
AP group |
|
Regulatory domain profile |
|
SSID profile |
|
Security profile |
|
VAP profile |
|
IoT profile |
|
Configure network interworking of the AP, switch, AC, and host computer (on which the infant protection system is deployed).
Configure the AC as a DHCP server to assign an IP address to the AP.
Configure the AP to go online and configure WLAN services.
Configure parameters for the AP to communicate with RFID cards.
Configure parameters for the AP to communicate with the host computer.
Add the AP's IP address to the host computer and configure the same shared key as that on the AP.
Configure port isolation on the interfaces of the device directly connected to APs. If port isolation is not configured and direct forwarding is used, a large number of unnecessary broadcast packets may be generated in the VLAN, blocking the network and degrading user experience.
In tunnel forwarding mode, the management VLAN and service VLAN cannot be the same. Only packets from the management VLAN are transmitted between the AC and APs. Packets from the service VLAN are not allowed between the AC and APs.
<HUAWEI> system-view [HUAWEI] authentication unified-mode
If the NAC mode is changed from traditional to unified, the unified mode takes effect after you save the configuration and restart the device.
# Configure the access switch, and add GE0/0/1 through GE0/0/3 on the switch to VLAN 100 (management VLAN) and VLAN 101 (service VLAN).
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan batch 100 101 [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type trunk [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 101 [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 pvid vlan 100 [Switch-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 101 [Switch-GigabitEthernet0/0/2] quit [Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] port link-type trunk [Switch-GigabitEthernet0/0/3] port trunk pvid vlan 100 [Switch-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 101 [Switch-GigabitEthernet0/0/3] quit
# Configure the AC, and add GE0/0/1 to VLAN 100 and VLAN 101.
<HUAWEI> system-view [HUAWEI] sysname AC [AC] vlan batch 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 100 101 [AC-GigabitEthernet0/0/1] quit
# Add GE0/0/4 on the AC connected to the host computer to VLAN 100 and VLAN 101.
[Switch] interface gigabitethernet 0/0/4 [Switch-GigabitEthernet0/0/4] port link-type trunk [Switch-GigabitEthernet0/0/4] port trunk pvid vlan 100 [Switch-GigabitEthernet0/0/4] port trunk allow-pass vlan 100 101 [Switch-GigabitEthernet0/0/4] quit
# Configure the AC as a DHCP server to assign IP addresses to STAs from the IP address pool on VLANIF 101.
[AC] dhcp enable [AC] interface vlanif 100 [AC-Vlanif100] ip address 10.23.100.1 24 [AC-Vlanif100] quit [AC] interface vlanif 101 [AC-Vlanif101] ip address 10.23.101.1 24 [AC-Vlanif101] dhcp select interface [AC-Vlanif101] quit
[AC] wlan [AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] regulatory-domain-profile name domain1 [AC-wlan-regulate-domain-domain1] country-code cn [AC-wlan-regulate-domain-domain1] quit [AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] regulatory-domain-profile domain1 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
[AC] capwap source interface vlanif 100
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 AP4050DN-E is used and has two radios: radio 0 and radio 1.
[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
[AC-wlan-view] provision-ap [AC-wlan-provision-ap] address-mode static [AC-wlan-provision-ap] ip-address 10.23.100.254 24 gateway 10.23.100.1 [AC-wlan-provision-ap] ac-list 10.23.100.1 [AC-wlan-provision-ap] commit ap-name area_1 Warning: The incorrect configuration will cause the AP to go out of management. This operation will deliver parameter setting and ma y cause reboot of AP(s). Continue?[Y/N]:y [AC-wlan-provision-ap] quit
# After the AP is powered on, run the display ap all command to check the AP status. If the State field in the command output displays nor, the AP has gone online.
[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 60de-4476-e360 area_1 ap-group1 10.23.100.254 AP4050DN-E nor 0 25S - -------------------------------------------------------------------------------------------------- Total: 1
In this example, the security policy is set to WPA-WPA2+PSK+AES and password to a1234567. In actual situations, the security policy must be configured 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
[AC-wlan-view] ssid-profile name wlan-net [AC-wlan-ssid-prof-wlan-net] ssid wlan-net [AC-wlan-ssid-prof-wlan-net] quit
[AC-wlan-view] vap-profile name wlan-net [AC-wlan-vap-prof-wlan-net] forward-mode direct-forward [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
[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
# Create IoT profile wlan-iot, configure the IP address and port number of the host computer, and configure security communication parameters.
[AC-wlan-view] iot-profile name wlan-iot [AC-wlan-iot-prof-wlan-iot] type common [AC-wlan-iot-prof-wlan-iot] management-server server-ip 10.23.100.254 server-port 3000 [AC-wlan-iot-prof-wlan-iot] config-agent permit ip-address 10.23.102.253 255.255.255.0 [AC-wlan-iot-prof-wlan-iot] share-key aabb0011@11 [AC-wlan-iot-prof-wlan-iot] quit
# Bind profiles wlan-iot to the IoT card interface.
[AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] card 1 [AC-wlan-group-card-ap-group1/1] [AC-wlan-group-card-ap-group1/1] quit [AC-wlan-ap-group-ap-group1] quit
The configuration is automatically delivered to the AP after it is completed. Run the display vap ssid wlan-net command. If Status in the command output is displayed as ON, a VAP has been successfully created on the 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 1 wlan-net 0 area_1 1 1 60DE-4476-E370 ON WPA/WPA2-PSK 0 wlan-net ------------------------------------------------------------------------------------ Total: 2
# Check configuration information about the IoT profile.
[AC-wlan-view] display iot-profile name wlan-iot -------------------------------------------------------------------------------- Type : common Agent permit IP address : 10.23.102.253 Agent permit net-mask : 255.255.255.0 Management server IP address : 10.23.100.254 Management server port : 3000 ExtManagement server IP address : - ExtManagement server port : - Share key : ****** --------------------------------------------------------------------------------
Access switch configuration file
# sysname Switch # vlan batch 100 to 101 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 to 101 # interface GigabitEthernet0/0/2 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 to 101 # interface GigabitEthernet0/0/3 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 to 101 # interface GigabitEthernet0/0/4 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 to 101 # return
AC configuration file
# sysname AC # vlan batch 100 to 101 # dhcp enable # interface Vlanif100 ip address 10.23.100.1 255.255.255.0 # interface Vlanif101 ip address 10.23.101.1 255.255.255.0 dhcp select interface # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 to 101 # capwap source interface vlanif100 # wlan security-profile name wlan-net security wpa2 psk pass-phrase %^%#cy>>Ce/KCZjbk%'(pjO'$d3L6xs\I(7R_~.ZfhCW%^%# aes ssid-profile name wlan-net ssid wlan-net vap-profile name wlan-net service-vlan vlan-id 101 ssid-profile wlan-net security-profile wlan-net regulatory-domain-profile name domain1 iot-profile name wlan-iot config-agent permit ip-address 10.23.102.253 255.255.255.0 management-server server-ip 10.23.100.254 server-port 3000 share-key %^%#:}$U=mz%jCu.$K.XP>pC{(\_*]gOy5qZ)o*T}5SA%^%# ap-group name ap-group1 regulatory-domain-profile domain1 radio 0 vap-profile wlan-net wlan 1 radio 1 vap-profile wlan-net wlan 1 card 1 ap-id 0 ap-mac 60de-4476-e360 ap-name area_1 ap-group ap-group1 provision-ap address-mode static ip-address 10.23.100.254 255.255.255.0 gateway 10.23.100.1 ac-list 10.23.100.1 # return