在某魚買了兩臺華為AP 4050DN-HD , AP是二手的 , 在AC上上過線 , 所以就不能開機自選為FIP模式了
我沒有AC無線控制器 , 就是買一個自己玩 , AP又是FIT瘦AP模式 ,所以我就想把AP的瘦AP模式改為FAT胖AP模式
1. 準備工作
1.1下載好對應軟件,進入到 企業業務網站去下載自己對應軟件 , 下載好后解壓
這兩個補丁都要下載 , 下載后解壓
1.2一個SSH連接工具 , 我用的是SecureCRT
1.3 ftp服務器工具
- 我是用python搭建的 , 也可以自己去下載軟件 , E:\python\src\pojo\server這個目錄自定義
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
def main():# 創建一個授權對象authorizer = DummyAuthorizer()# 添加一個具有指定用戶名和密碼的用戶authorizer.add_user('user', '123456', 'E:\python\src\pojo\server', perm='elradfmwMT')# # 添加一個匿名用戶,允許讀取和寫入權限# authorizer.add_anonymous('/path/to/ftp/directory', perm='elradfmwMT')# 實例化 FTP 處理器,并設置授權handler = FTPHandlerhandler.authorizer = authorizer# 可選:設置歡迎信息handler.banner = "ftp已啟動"# 設置服務器地址和端口address = ('169.254.1.100', 2122) # 監聽所有可用接口,端口為2122server = FTPServer(address, handler)# 設置最大連接數server.max_cons = 256server.max_cons_per_ip = 5print(f"FTP服務器啟動,監聽地址 {address[0]}:{address[1]}")# 啟動服務器server.serve_forever()
if __name__ == '__main__':main()
- 把解壓后的 .bin文件放入 E:\python\src\pojo\server目錄下
2.電腦和AP建立連接
讓PC和AP互通
- 單獨拿一個電源給AP供電,網線連接電腦和AP , AP的IP是出廠自帶的 169.254.1.1/24 , 電腦這個IP自己手動配置 , 不要用DHCP獲取地址 , 靜態地址
- 最終目的是為了讓電腦和AP能夠通信就可以了 , 這連接不適用可以自己試試其他的
- 連接好后 , 電腦和AP互Ping一下看能不能通信 , 要確保能夠通信 .
3.升級固件
- 升級固件要理清思路 , 1.當前版本是FIT V200R007C10SPC900 , 2.需要升級到FAT V200R019C00SPC918
- 這個是不能直接升級的 , 我需要先升級到FIT V200R019C00SPC900 , 再升級到FAT V200R019C00SPC918
- 開始升級到FIT V200R019C00SPC900
[Huawei]ssh client first-time enable
[Huawei]ap-mode-switch fat ftp FitAP4050DN-HD_V200R019C00SPC918.bin 169.254.1.100 user 123456 2122
- 升級成功后,reboot重啟
- 重啟后在升級到FAT V200R019C00SPC918 , 升級后一樣reboot重啟
[Huawei]ssh client first-time enable
[Huawei]ap-mode-switch fat ftp Fat&CloudAP4050DN-HD_V200R019C00SPC918.bin 169.254.1.100 user 123456 2122
4.上線基本配置配置
- 如果是連的console線 , 就直接連接登錄就好了
- 如果沒有console線 , 就需要連接wifi , 然后通過ssh連接進入到命令行
4.1確定好要怎么配置
- 配置AP通過NAT地址轉換的方式上網, 這樣的話就不需要對上行設備做任何配置了
-
- 先配置與上行互通
# 光貓的網關ip 192.168.1.1
[Huawei]int Vlanif 200
[Huawei-Vlanif200]ip add 192.168.1.191 24
[Huawei-Vlanif200]quit
[Huawei]interface GigabitEthernet 0/0/0
## 我用的access模式,trunk模式更好
[Huawei-GigabitEthernet0/0/0]port link-type access
[Huawei-GigabitEthernet0/0/0]port default vlan 200
[Huawei-GigabitEthernet0/0/0]quit
#配置靜態路由
[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
-
- AP作為配置DHCP服務器
[Huawei]int Vlanif 100
[Huawei-Vlanif100]ip address 10.23.100.1 24
[Huawei-Vlanif100]dhcp select interface
##可選配置-------
#1.分配給終端的地址范圍
[Huawei-Vlanif100]dhcp server ip-range 10.23.100.2 10.23.100.100
- 3.配置系統參數
# 配置AP的國家碼--配置設備的國家碼,從而滿足不同國家或不同區域的射頻特性(如功率和信道規范)
[Huawei]wlan
[Huawei-wlan-view]country-code CN
-
- WLAN業務
4.1創建安全模版 , 配置安全策略
- WLAN業務
#創建名為wlan-net的安全模板
[Huawei-wlan-view]security-profile name wlan-net
# WPA/WPA2認證分為兩種:
# WPA/WPA2-PSK和WPA/WPA2 802.1X認證,又稱為WPA/WPA2個人版和WPA/WPA2企業版。
# 我這里是個人使用 , 所以用的wpa-wpa2 psk。
[Huawei-wlan-sec-prof-wlan-net]security wpa-wpa2 psk pass-phrase l1234567 aes
[Huawei-wlan-sec-prof-wlan-net]quit
4.2創建SSID
#創建名為wlan-net的SSID模板
[Huawei-wlan-view]ssid-profile name wlan-net
#SSID用來指定不同的無線網絡。在無線終端上搜索可接入的無線網絡時,顯示出來的網絡名稱,就是SSID。
[Huawei-wlan-ssid-prof-wlan-net]ssid ax_anan
Info: This operation may take a few seconds, please wait.done.
[Huawei-wlan-ssid-prof-wlan-net]quit
4.3創建VAP模板
#創建名為wlan-net的VAP模板
[Huawei-wlan-view]vap-profile name wlan-net
#配置VAP的業務vlan
[Huawei-wlan-vap-prof-wlan-net]service-vlan vlan-id 100
#指定對應安全模板,對使用該VAP模板的所有用戶起作用
[Huawei-wlan-vap-prof-wlan-net]security-profile wlan-net
Info: This operation may take a few seconds, please wait.done.
#將指定的SSID模板引用到VAP模板。在VAP模板下引用SSID模板后,SSID模板中的參數配置會對使用該VAP模板的所有AP生效。
[Huawei-wlan-vap-prof-wlan-net]ssid-profile wlan-net
Info: This operation may take a few seconds, please wait.done.
[Huawei-wlan-vap-prof-wlan-net]quit
[Huawei-wlan-view]quit
[Huawei]
-
- 配置配置VAP和AP射頻參數
#進入射頻接口視圖
[Huawei]interface Wlan-Radio 0/0/0
# 將指定的VAP模板引用到射頻。wlan 2表示指定VAP的ID,可以在全局視圖[Huawei]dis vap all查看wlan id
[Huawei-Wlan-Radio0/0/0]vap-profile wlan-net wlan 2
Info: This operation may take a few seconds, please wait.done.
#關閉信道自動選擇功能。
[Huawei-Wlan-Radio0/0/0]calibrate auto-channel-select disable
Info: This operation will recover the redundant radio.
#關閉發送功率自動選擇功能。
[Huawei-Wlan-Radio0/0/0]calibrate auto-txpower-select disable
#配置射頻接口Wlan-Radio 0/0/0的工作帶寬為20MHz,工作信道為6。
[Huawei-Wlan-Radio0/0/0]channel 20mhz 6
Warning: This action may cause service interruption. Continue?[Y/N]y
Info: The channel value and bandwidth value take effect only when automatic channel selection is disabled, and the value depends on the AP specifications and local laws and regulations.
#配置射頻接口Wlan-Radio 0/0/0的發射功率為127dBm。
[Huawei-Wlan-Radio0/0/0]eirp 127
Info: The EIRP value takes effect only when automatic transmit power selection is disabled, and the value depends on the AP specifications and local laws and regulations.
[Huawei-Wlan-Radio0/0/0]quit
[Huawei]interface Wlan-Radio 0/0/1
[Huawei-Wlan-Radio0/0/1]vap-profile wlan-net wlan 2
[Huawei-Wlan-Radio0/0/1]calibrate auto-channel-select disable
[Huawei-Wlan-Radio0/0/1]calibrate auto-txpower-select disable
[Huawei-Wlan-Radio0/0/1]channel 20mhz 153
Warning: This action may cause service interruption. Continue?[Y/N]y
[Huawei-Wlan-Radio0/0/1]eirp 127
[Huawei-Wlan-Radio0/0/1]quit
[Huawei]
-
- 配置NAT地址轉換
[Huawei]acl 2000
[Huawei-acl-basic-nat]rule 5 permit source 10.23.100.0 0.0.0.255
[Huawei-acl-basic-nat]quit
[Huawei]interface Vlanif 200
#將ACL和vlan 200關聯起來
[Huawei-Vlanif200]nat outbound 2000
[Huawei-Vlanif200]quit
-
- 驗證
<Huawei>dis vap ssid wlan-net
<Huawei>dis nat outbound
<Huawei>ping -a 10.23.100.1 192.168.1.1
#查看在線無線用戶信息。
<Huawei>dis station all