风雨同行 发表于 2024-6-28 02:19:09

商超物联网~配置弟子健康与安全

配置弟子健康与安全示实验

https://img-blog.csdnimg.cn/direct/e34457a958e14422a76f9794d8fc3f79.gif
                                    https://img-blog.csdnimg.cn/direct/d20c2adf21db46ffac7a7e2d68bcf8a4.gif
作者:知孤云出岫 
作者主页:点击这里

                  组网图形
    https://img-blog.csdnimg.cn/direct/488a284aec3b4e03bcdb38ccbb78104a.png
                      图1 配置弟子健康与安全示例组网图                                 

[*]业务需求
[*]组网需求
[*]数据规划
[*]配置思路
[*]配置注意事项
[*]操作步调
[*]配置文件
                        业务需求

   某学校由于器重弟子的健康与安全,希望可以或许通过技术手段监控和检察弟子平常的健康与安全信息。
   为实现学校需求,可以采用弟子健康与安全物联网方案,与WLAN网络复用同一网络。
                            组网需求

         

[*]AC组网方式:旁挂二层组网。
[*]DHCP摆设方式:AC作为DHCP服务器为AP和STA分配IP地址。
[*]业务数据转发方式:直接转发。
                                 数据规划

                     表1 AC数据规划表       配置项
数据
管理VLAN
VLAN100
业务VLAN
VLAN101
AC的源接口
VLANIF100
DHCP服务器
AC作为DHCP服务器为AP和STA分配IP地址
STA的IP地址池
10.23.101.2~10.23.101.254/24
AP组
         

[*]名称:ap-group1
[*]引用模板:VAP模板wlan-net、域管理模板default
[*]IoT插卡接口对应的本端TCP端标语:50200
域管理模板
         

[*]名称:default
[*]国家码:CN
SSID模板
                     

[*]名称:wlan-net
[*]SSID名称:wlan-net
          安全模板
                     

[*]名称:wlan-net
[*]安全战略:WPA-WPA2+PSK+AES
[*]暗码:a1234567
          VAP模板
                     

[*]名称:wlan-net
[*]转发模式:直接转发
[*]业务VLAN:VLAN101
[*]引用模板:SSID模板wlan-net、安全模板wlan-net
          IoT模板
         

[*]名称:wlan-iot
[*]上位机的IP地址:10.23.200.1
[*]上位机的端标语:3000
[*]代理信任主机:10.23.102.253/255.255.255.0
[*]共享密钥:aabb0011@11
                                 配置思路

   
[*] 配置AP、Switch、AC和上位机之间的网络互通。
[*] 配置AC作为DHCP服务器为AP和STA分配IP地址。
[*] 配置AP上线。
[*] 配置WLAN覆盖业务。
[*] 配置AP与上位机的通信参数。
[*] 在上位机上添加AP的IP地址并配置与AP同等的共享密钥。
                            配置注意事项

   

[*]               纯组播报文由于协议要求在无线空口没有ACK机制保障,且无线空口链路不稳固,为了纯组播报文可以或许稳固发送,通常会以低速报文形式发送。假如网络侧有大量异常组播流量涌入,则会造成无线空口拥堵。为了减小大量低速组播报文对无线网络造成的冲击,建议配置组播报文抑制功能。配置前请确认是否有组播业务,假如有,请审慎配置限速值。      

[*]业务数据转发方式采用直接转发时,建议在直连AP的互换机接口上配置组播报文抑制。
[*]业务数据转发方式采用隧道转发时,建议在AC的流量模板下配置组播报文抑制。

[*] 建议在与AP直连的设备接口上配置端口隔离,假如不配置端口隔离,尤其是业务数据转发方式采用直接转发时,大概会在VLAN内形成大量不必要的广播报文,导致网络阻塞,影响用户体验。
[*] 隧道转发模式下,管理VLAN和业务VLAN不能配置为同一VLAN,且AP和AC之间只能放通管理VLAN,不能放通业务VLAN。
[*]V200R021C00版本开始,配置CAPWAP源接口或源地址时,会检查和安全相干的配置是否已存在,包括DTLS加密的PSK、AC间DTLS加密的PSK、登录AP的用户名和暗码、全局离线管理VAP的登录暗码,均已存在才气成功配置,否则会提示用户先完成相干的配置。
[*]V200R021C00版本开始,AC默认开启CAPWAP控制隧道的DTLS加密功能。开启该功能,添加AP时AP会上线失败,此时需要先开启CAPWAP DTLS不认证方式(capwap dtls no-auth enable)让AP上线,以便AP获取安全根据,AP上线后应实时关闭该功能(undo capwap dtls no-auth enable),避免未授权AP上线。
                  操作步调

               1.配置互换机和AC,使AP与AC之间互通                 
# 配置接入交换机Switch。将Switch的接口GE0/0/1~GE0/0/4加入VLAN100(管理VLAN)和VLAN101(业务VLAN)。
<HUAWEI> system-view
sysname Switch
vlan batch 100 to 101
interface gigabitethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 100 to 101
quit
interface gigabitethernet 0/0/2
port link-type trunk
port trunk pvid vlan 100
port trunk allow-pass vlan 100 to 101
quit
interface gigabitethernet 0/0/3
port link-type trunk
port trunk pvid vlan 100
port trunk allow-pass vlan 100 to 101
quit
interface gigabitethernet 0/0/4
port link-type trunk
port trunk pvid vlan 100
port trunk allow-pass vlan 100 to 101
quit
# 配置AC。配置接口GE0/0/1加入VLAN100、VLAN101。

<HUAWEI> system-view
sysname AC
vlan batch 100 to 101
interface gigabitethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 100 101
quit   
[*]配置AP与服务器之间的互通。
请根据现实组网环境配置路由,保证AP与上位机间网络互通。
[*]配置AC作为DHCP服务器,为AP和STA分配IP地址
# 配置基于接口地址池的DHCP服务器。

DNS服务器地址请根据实际需要配置。常用配置方法如下:
接口地址池场景,需要在VLANIF接口视图下执行命令dhcp server dns-list ip-address &<1-8>。
全局地址池场景,需要在IP地址池视图下执行命令dns-list ip-address &<1-8>。
dhcp enable
interface vlanif 100
ip address 10.23.100.1 24
dhcp select interface
quit
interface vlanif 101
ip address 10.23.101.1 24
dhcp select interface
quit
[*]配置AP上线 # 创建AP组,用于将相同配置的AP都加入同一AP组中。
wlan
ap-group name ap-group1
quit
# 创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板。
regulatory-domain-profile name default
country-code cn
quit
ap-group name 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
quit
quit
# 配置AC的源接口。
capwap source interface vlanif 100
# 在AC上离线导入AP,并将AP加入AP组“ap-group1”中。根据AP的部署位置为AP配置名称,便于从名称上就能够了解AP的部署位置。例如MAC地址为60de-4476-e360的AP部署在教室内,命名为room_1;MAC地址为60de-4476-e460和60de-4476-e560的AP分别部署在校门内外侧,命名为door_1和door_2。
ap auth-mode命令缺省情况下为MAC认证,如果之前没有修改其缺省配置,可以不用执行ap auth-mode mac-auth。

举例中使用的AP为AP4050DN-E,具有射频0和射频1两个射频。

wlan
ap auth-mode mac-auth
ap-id 0 ap-mac 60de-4476-e360
ap-name room_1
Warning: This operation may cause AP reset. Continue? :y
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
quit
ap-id 1 ap-mac 60de-4476-e460
ap-name door_1
Warning: This operation may cause AP reset. Continue? :y
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
quit
ap-id 2 ap-mac 60de-4476-e560
ap-name door_2
Warning: This operation may cause AP reset. Continue? :y
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
quit
# 将AP上电后,当执行命令display ap all查看到AP的“State”字段为“nor”时,表示AP正常上线。

display ap all
Total AP information:
nor: normal         
ExtraInfo : Extra information   
P: insufficient power supply
----------------------------------------------------------------------------------------------
ID   MAC            Name   Group   IP            Type            State STA Uptime ExtraInfo
----------------------------------------------------------------------------------------------
0    60de-4476-e360 room_1 ap-group1 10.23.100.254 AP4050DN-E      nor   0   51S    -
1    60de-4476-e460 door_1 ap-group1 10.23.100.253 AP4050DN-E      nor   0   45S    -
2    60de-4476-e560 door_2 ap-group1 10.23.100.252 AP4050DN-E      nor   0   25S    -
----------------------------------------------------------------------------------------------
Total: 3
[*]配置WLAN覆盖业务
# 创建名为“wlan-net”的安全模板,并配置安全策略。
举例中以配置WPA-WPA2+PSK+AES的安全策略为例,密码为“a1234567”,实际配置中请根据实际情况,配置符合实际要求的安全策略。

security-profile name wlan-net
security wpa-wpa2 psk pass-phrase a1234567 aes
quit
# 创建名为“wlan-net”的SSID模板,并配置SSID名称为“wlan-net”。
ssid-profile name wlan-net
ssid wlan-net
quit
# 创建名为“wlan-net”的VAP模板,配置业务数据转发模式、业务VLAN,并且引用安全模板和SSID模板。
vap-profile name wlan-net
forward-mode direct-forward
service-vlan vlan-id 101
security-profile wlan-net
ssid-profile wlan-net
quit
# 配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-net”的配置。
ap-group name ap-group1
vap-profile wlan-net wlan 1 radio 0
vap-profile wlan-net wlan 1 radio 1
quit
[*]配置AP与上位机的通信参数
iot-profile name wlan-iot
management-server server-ip 10.23.200.1 server-port 3000
config-agent permit ip-address 10.23.102.253 255.255.255.0
share-key aabb0011@11
quit
ap-group name ap-group1
card 1
iot-profile wlan-iot config-agent tcp port 50200
quit
quit
[*]在上位机上添加AP的IP地址并配置与AP同等的共享密钥
[*]检查配置结果
# WLAN业务配置会自动下发给AP。配置完成后,通过执行命令display vap ssid wlan-net查看如下信息,当“Status”项显示为“ON”时,表示AP对应的射频上的VAP已创建成功。
display vap ssid wlan-net
WID : WLAN ID
--------------------------------------------------------------------------------
AP ID AP name RfID WID    BSSID          StatusAuth type   STA   SSID
--------------------------------------------------------------------------------
0   room_10    1      60DE-4476-E360 ON      WPA/WPA2-PSK1   wlan-net
0   room_11    1      60DE-4476-E370 ON      WPA/WPA2-PSK0   wlan-net
0   door_10    1      60DE-4476-E460 ON      WPA/WPA2-PSK1   wlan-net
0   door_11    1      60DE-4476-E470 ON      WPA/WPA2-PSK0   wlan-net
0   door_20    1      60DE-4476-E560 ON      WPA/WPA2-PSK1   wlan-net
0   door_21    1      60DE-4476-E570 ON      WPA/WPA2-PSK0   wlan-net
------------------------------------------------------------------------------------
Total: 6
# 查看IoT模板的配置信息。
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.200.1
Management server port         : 3000
ExtManagement server IP address: -
ExtManagement server port      : -
Share key                        : ******
--------------------------------------------------------------------------------
                  配置文件

   

[*] 接入互换机的配置文件
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">#
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</span></span></span>
[*] AC的配置文件
               <span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">#
sysname AC
#
vlan batch 100 to 101
#
dhcp enable
#
interface Vlanif100
ip address 10.23.100.1 255.255.255.0
dhcp select interface
#
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 101
#
capwap source interface vlanif100
#
wlan
security-profile name wlan-net
security wpa-wpa2 psk pass-phrase %^%#CU9SYQg[.Vxx;xH%>nwFA.WJ6i/Fm~me>&W%`b/-%^%# 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 default
iot-profile name wlan-iot
config-agent permit ip-address 10.23.102.253 255.255.255.0
management-server server-ip 10.23.200.1 server-port 3000
share-key %^%#vj*JIT.]q%6Q6[VqoHMJHs(5Oss3g3*%@r9Vy%aW%^%#
ap-group name ap-group1
radio 0
   vap-profile wlan-net wlan 1
radio 1
   vap-profile wlan-net wlan 1
card 1
   iot-profile wlan-iot config-agent tcp port 50200
ap-id 0 ap-mac 60de-4476-e360 ap-sn 210235419610D2000066
ap-name room_1
ap-group ap-group1
ap-id 1 ap-mac 60de-4476-e460 ap-sn 210235419610D2000067
ap-name door_1
ap-group ap-group1
ap-id 2 ap-mac 60de-4476-e560 ap-sn 210235419610D2000068
ap-name door_2
ap-group ap-group1
#
return</span></span></span>

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: 商超物联网~配置弟子健康与安全