ac的dhcp池里option43配錯導致ap無法上線問題排查過程

dhcp池里ac地址配錯,導致ap無法上線問題排查過程

問題:ap手動設置ac的ip正常注冊在線,但dhcp獲得ip和ac地址發現無法在ac上注冊成功。

組網:

ac旁路結構,路由器lan口地址172.16.1.1,開dhcp服務,option43提供ac的地址172.16.1.206,地址池172.16.100-200,網關ip172.16.1.1。

解決過程:

如上圖,路由器上開dhcp服務,給ap提供dhcp服務,dhcp池設置ip范圍是172.16.1.100-172.16.1.200,掩碼24,gw是172.16.1.1,ac的地址是172.16.1.206

ap1上電后,查看dhcp分配情況,發現分配地址是172.16.1.200,但在ac172.16.1.206上看不到ap1上線

路由器上

ac上

ap1 ping正常

登錄ap,設置ac地址為手動配置172.16.1.206,并在路由器4口抓包

發現ac上,看到ap上線了

抓包tcpdump? -i eth4?? -nnev? udp port? 5246? -c 20 抓ap的capwap消息,udp port是5246,并抓20包自動退出-c 20,-nnev是關閉dns查詢,數字化顯示,顯示mac地址,并顯示詳情

tcpdump: listening on eth4, link-type EN10MB (Ethernet), capture size 262144 bytes

17:29:35.427300 6c:ef:c6:65:ab:c0 > 64:c3:41:b2:18:21, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 43379, offset 0, flags [DF], proto UDP (17), length 553)

??? 172.16.1.200.5246 > 172.16.1.206.5246: UDP, length 525

17:29:35.427579 64:c3:41:b2:18:21 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 277: (tos 0x7,CE, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 263)

??? 172.16.1.206.5246 > 172.16.1.200.5246: UDP, length 235

17:29:40.429262 6c:ef:c6:65:ab:c0 > 64:c3:41:b2:18:21, ethertype IPv4 (0x0800), length 825: (tos 0x7,CE, ttl 64, id 43559, offset 0, flags [DF], proto UDP (17), length 811)

??? 172.16.1.200.5246 > 172.16.1.206.5246: UDP, length 783

17:29:40.429650 64:c3:41:b2:18:21 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 277: (tos 0x7,CE, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 263)

??? 172.16.1.206.5246 > 172.16.1.200.5246: UDP, length 235

17:29:40.431498 6c:ef:c6:65:ab:c0 > 64:c3:41:b2:18:21, ethertype IPv4 (0x0800), length 603: (tos 0x7,CE, ttl 64, id 43560, offset 0, flags [DF], proto UDP (17), length 589)

??? 172.16.1.200.5246 > 172.16.1.206.5246: UDP, length 561

17:29:40.432161 64:c3:41:b2:18:21 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 1050: (tos 0x7,CE, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 1036)

??? 172.16.1.206.5246 > 172.16.1.200.5246: UDP, length 1008

17:29:40.616124 6c:ef:c6:65:ab:c0 > 64:c3:41:b2:18:21, ethertype IPv4 (0x0800), length 80: (tos 0x7,CE, ttl 64, id 43564, offset 0, flags [DF], proto UDP (17), length 66)

??? 172.16.1.200.5246 > 172.16.1.206.5246: UDP, length 38

17:29:40.616458 64:c3:41:b2:18:21 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 60: (tos 0x7,CE, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 44)

???

發現ap的mac是6c:ef:c6:65:ab:c0,ip是172.16.1.200,ac的ip是172.168.1.206,mac地址是64:c3:41:b2:18:21,2毫秒后,開始有響應。

root@IIIoT:~# arp? -n?? ap上執行命令arp -n
IP address?????? HW type???? Flags?????? HW address??????????? Mask???? Device
172.16.1.1?????? 0x1???????? 0x2???????? 20:1f:54:f5:36:61???? *??????? br-wan
172.16.1.206???? 0x1???????? 0x2???????? 64:c3:41:b2:18:21???? *??????? br-wan

ap的banner顯示mac地址

NAME:?????????? WAP6240-IE
?MAC:??????????? 6c:ef:c6:65:ab:c0

奇怪,刪除ap上手動配置ac地址,改成從dhcp的option43里獲取ac地址,重啟ap,在路由器上再次抓包

~ # tcpdump? -i eth4? -nnev? udp port? 5246? -c 20

tcpdump: listening on eth4, link-type EN10MB (Ethernet), capture size 262144 bytes

17:58:51.777366 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 52870, offset 0, flags [DF], proto UDP (17), length 553)發給了這個mac地址

??? 172.16.1.200.5246 > 17.16.1.206.5246: UDP, length 525? 發出的目的ip 是17.16.1.206,好像ip錯了,正確的ip是172.16.1.206,ip第一段錯了

17:58:58.793246 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 53510, offset 0, flags [DF], proto UDP (17), length 553)

??? 172.16.1.200.5246 > 17.16.1.206.5246: UDP, length 525? 沒有響應,在重發

17:59:22.803515 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 54484, offset 0, flags [DF], proto UDP (17), length 553)

??? 172.16.1.200.5246 > 17.16.1.206.5246: UDP, length 525 沒有響應,在重發

17:59:52.823960 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 56270, offset 0, flags [DF], proto UDP (17), length 553)

??? 172.16.1.200.5246 > 17.16.1.206.5246: UDP, length 525? 沒有響應,在重發

18:00:18.835629 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 57090, offset 0, flags [DF], proto UDP (17), length 553)

??? 172.16.1.200.5246 > 17.16.1.206.5246: UDP, length 525? 沒有響應,在重發

18:00:20.843741 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 57274, offset 0, flags [DF], proto UDP (17), length 553)

??? 172.16.1.200.5246 > 17.16.1.206.5246: UDP, length 525? 沒有響應,在重發

18:00:39.874509 6c:ef:c6:65:ab:c0 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 567: (tos 0x7,CE, ttl 64, id 18424, offset 0, flags [DF], proto UDP (17), length 553)

??? 172.16.1.200.5246 > 255.255.255.255.5246: UDP, length 525? 發出二層廣播和三層廣播發現消息

18:00:39.875037 64:c3:41:b2:18:21 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 277: (tos 0x7,CE, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 263)

??? 172.16.1.206.5246 > 172.16.1.200.5246: UDP, length 235? 有ac的響應

18:00:39.875166 20:1f:54:f5:36:61 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 277: (tos 0x7,CE, ttl 64, id 53519, offset 0, flags [DF], proto UDP (17), length 263)

??? 172.16.1.1.5246 > 172.16.1.200.5246: UDP, length 235? 有另一個ac的響應

18:00:44.876971 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 825: (tos 0x7,CE, ttl 64, id 46801, offset 0, flags [DF], proto UDP (17), length 811)

172.16.1.200.5246 > 172.16.1.1.5246: UDP, length 783? 選擇向這個ac的響應

18:00:44.877689 20:1f:54:f5:36:61 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 277: (tos 0x7,CE, ttl 64, id 54647, offset 0, flags [DF], proto UDP (17), length 263)

??? 172.16.1.1.5246 > 172.16.1.200.5246: UDP, length 235

18:00:44.879582 6c:ef:c6:65:ab:c0 > 20:1f:54:f5:36:61, ethertype IPv4 (0x0800), length 603: (tos 0x7,CE, ttl 64, id 46802, offset 0, flags [DF], proto UDP (17), length 589)

? 發現最初ap發出的ip錯誤,mac地址發給20:1f:54:f5:36:61查詢發現是路由器lan口地址,重發幾次后,發出廣播消息,所有的ac都會響應。

XOS#show? ip arp
?? IP Address?????? MAC Address???? Interface? Type
?? 172.16.1.187? c0:a6:6d:45:06:80? vlan1.3???? ether
? 172.16.81.205? 00:0f:c9:24:10:b1? vlan1.1???? ether
???? 172.16.1.1? 20:1f:54:f5:36:61? vlan1.3???? ether?? 發現這是路由器lan口地址對應mac是20:1f:54:f5:36:61,最初ap的capwap消息發給了路由器lan口mac地址
?? 172.16.1.200? 6c:ef:c6:65:ab:c0? vlan1.3???? ether
Total arp count : 4?

tcpdump不好判斷,生成抓包文件,下載下拉查看

/mnt/userspace # tcpdump? -i eth4? -w? abc0.pcap 生成抓包文件

tcpdump: listening on eth4, link-type EN10MB (Ethernet), capture size 262144 bytes

^C311 packets captured? 中斷后生成文件

313 packets received by filter

0 packets dropped by kernel

crt打開tftp服務器,準備傳出文件

cmd下查看udp69端口是否打開?

C:\>netstat? -aon | findstr :69??? 查看69端口是那個進程號打開,行尾紅色為進程號,本例為22560
? UDP??? 0.0.0.0:69???????????? *:*??????????????????????????????????? 22560
? UDP??? [::]:69??????????????? *:*?????????????????????????????????? ? ?? 22560

C:\>tasklist? | findstr? 22560?? 根據進程號查詢文件名
SecureCRT.exe??????????????? 22560 Console??????????????????? 1???? 59,104 K 證明是crt打開了文件

確定文件保存目錄

路由器里傳出文件

/mnt/userspace # tftp? -pl? abc0.pcap?? 172.16.81.205? tftp傳出文件

abc0.pcap??????????? 100% |*************************************************************| 34733? 0:00:00 ETA傳遞完成

在已經獲得tftp目錄下打開抓包文件,并過濾bootp,arp和capwap消息

現在問題是dhcp獲得的ac地址錯誤,導致ap注冊關聯消息發給網關

檢查一下dhcp的offer消息

Value: 800c0131372e31362e312e323036?? 17.16.1.206

在ap上查詢

root@IIIoT:~#

root@IIIoT:~# cd? /tmp

root@IIIoT:/tmp# cat? wtp.cfg? dhcp獲得ac的地址,

<WTP_DHCP_AC_IPV4_ADDR> 17.16.1.206?? 發現這個地址錯誤

root@IIIoT:/tmp# cat wtp.ip?? 這是目前ap連接的ac的ip地址

172.16.1.1? 發現是網關的地址

在路由器上查看配置

修正

路由器上重新抓包查看:

tcpdump? -i eth4 -nnev? ether host 6c:ef:c6:65:ab:c0

19:56:08.315353 20:1f:54:f5:36:61 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)

??? 172.16.1.1.67 > 172.16.1.200.68: BOOTP/DHCP, Reply, length 300, xid 0xaf764a47, Flags [none]

????????? Your-IP 172.16.1.200

????????? Client-Ethernet-Address 6c:ef:c6:65:ab:c0

????????? Vendor-rfc1048 Extensions

??????????? Magic Cookie 0x63825363

??????????? DHCP-Message Option 53, length 1: Offer

??????????? Server-ID Option 54, length 4: 172.16.1.1

??????????? Lease-Time Option 51, length 4: 86400

??????????? Subnet-Mask Option 1, length 4: 255.255.255.0

??????????? Default-Gateway Option 3, length 4: 172.16.1.1

??????????? Domain-Name-Server Option 6, length 4: 114.114.114.114

Vendor-Option Option 43, length 15: 128.13.1.49.55.50.46.49.54.46.49.46.50.48.54

??? ascii碼顯示的ac地址 ? ? ? ? ? ? ? ? ? ? ???????????????????? 1 7 ?2? .? 1 ?6? . 1? .? 2? 0 6?

19:56:09.304704 6c:ef:c6:65:ab:c0 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 172.16.1.206 tell 172.16.1.200, length 46? arp查詢

19:56:09.305024 64:c3:41:b2:18:21 > 6c:ef:c6:65:ab:c0, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Reply 172.16.1.206 is-at 64:c3:41:b2:18:21, length 46 arp響應

capwap消息

19:56:14.311909 6c:ef:c6:65:ab:c0 > 64:c3:41:b2:18:21, ethertype IPv4 (0x0800), length 825: (tos 0x7,CE, ttl 64, id 18791, offset 0, flags [DF], proto UDP (17), length 811)

??? 172.16.1.200.5246 > 172.16.1.206.5246: UDP, length 783? 注冊消息

19:56:14.312308 64:c3:41:b2:18:21 > 6c:ef:c6:65:ab:c0, ethertype IPv4 (0x0800), length 277: (tos 0x7,CE, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 263)

??? 172.16.1.206.5246 > 172.16.1.200.5246: UDP, length 235? 響應

問題總結:

原以為dhcp獲得的ac地址和手動設置ac地址兩個發discover包會有所區別,起始沒有區別。

獲得地址錯誤,查詢路由器發現不是直連路由,會發向網關mac地址。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/71535.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/71535.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/71535.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

IntelliJ IDEA中Maven配置全指南

一、環境準備與基礎配置 1.1 Windows 環境下載并配置 Maven 見此篇博文&#xff1a;環境配置 1.2 IDEA配置步驟 打開設置面板&#xff1a;File → Settings → Build → Build Tools → Maven 關鍵配置項&#xff1a; Maven home path E:\apache-maven-3.9.9 &#xff08;…

存儲區域網絡(SAN)管理

存儲區域網絡&#xff08;Storage Area Network&#xff0c;SAN&#xff09;采用網狀通道&#xff08;Fibre Channel &#xff0c;簡稱FC&#xff09;技術&#xff0c;通過FC交換機連接存儲陣列和服務器主機&#xff0c;建立專用于數據存儲的區域網絡。SAN提供了一種與現有LAN連…

使用vue-office報錯TypeError: ft.createElementVNode is not a function

支持多種文件(.docx、.xlsx、.xls、.pdf、.pptx)預覽的vue組件庫&#xff0c;支持vue2/3。也支持非Vue框架的預覽。 不支持.doc、.ppt&#xff08;2003年及以前的版本&#xff09; 官網&#xff1a;https://www.npmjs.com/package/vue-office/excel?activeTabreadme 官方有實…

Ubuntu部署ktransformers

準備工作 一臺服務器 CPU&#xff1a;500G GPU&#xff1a;48G&#xff08;NVIDIA4090&#xff09; 系統&#xff1a;Ubuntu20.04&#xff08;github的文檔好像用的是22.04&#xff09; 第一步&#xff1a;下載權重文件 1.下載hfd wget https://hf-mirror.com/hfd/hfd.s…

C++初階——簡單實現vector

目錄 1、前言 2、Vector.h 3、Test.cpp 1、前言 簡單實現std::vector類模板。 相較于前面的string&#xff0c;vector要注意&#xff1a; 深拷貝&#xff0c;因為vector的元素可能是類類型&#xff0c;類類型元素可以通過賦值重載&#xff0c;自己實現深拷貝。 迭代器失效…

全志A133 android10 適配SLM770A 4G模塊

一&#xff0c;模塊基本信息 1.官方介紹 SLM770A是美格智能最新推出的一款LTE Cat.4無線通訊模組&#xff0c;最大支持下行速率150Mbps及上行速率50Mbps。同時向下兼容現有的3G和2G網絡&#xff0c;以確保即使在偏遠地區也可以進行網絡通信。 SLM770A模組支持分集接收和MIMO技…

微信小程序:多菜單欄設計效果

一、實現效果 二、代碼 wxml 編輯前端界面,步驟 菜單邏輯: 逐步取出數組中的項,首先取出頂部菜單項,然后選中后取出選中的底部數據(左側菜單+右側內容),然后點擊左側菜單取出選中的左側菜單對應的右側內容 ①這里我的數據是全部封裝到一個數組對象的,首先我的循環…

C++基礎知識學習記錄—string類

string實際上是C內置的一個類&#xff0c;內部對char *進行了封裝&#xff0c;不用擔心數組越界問題&#xff0c;string類中&#xff0c;除了上課講解的函數外&#xff0c;還有很多函數可以使用&#xff0c;可以自行查閱文檔。 構造函數原型&#xff1a; string(); //創建一個…

Ollama+DeepSeek+Open-WebUi

環境準備 Docker Ollama Open-WebUi Ollama 下載地址&#xff1a;Ollama docker安裝ollama docker run -d \ -v /data/ollama/data:/root/.ollama \ -p 11434:11434 \ --name ollama ollama/ollama 下載模型 Ollama模型倉庫 # 示例&#xff1a;安裝deepseek-r1:7b doc…

設計模式--訪問者模式【行為型模式】

設計模式的分類 我們都知道有 23 種設計模式&#xff0c;這 23 種設計模式可分為如下三類&#xff1a; 創建型模式&#xff08;5 種&#xff09;&#xff1a;單例模式、工廠方法模式、抽象工廠模式、建造者模式、原型模式。結構型模式&#xff08;7 種&#xff09;&#xff1…

前端循環全解析:JS/ES/TS 循環寫法與實戰示例

循環是編程中控制流程的核心工具。本文將詳細介紹 JavaScript、ES6 及 TypeScript 中各種循環的寫法、特性&#xff0c;并通過實際示例幫助你掌握它們的正確使用姿勢。 目錄 傳統三劍客 for 循環 while 循環 do...while 循環 ES6 新特性 forEach for...of for...in 數組…

數據中心儲能蓄電池狀態監測管理系統 組成架構介紹

安科瑞劉鴻鵬 摘要 隨著數據中心對供電可靠性要求的提高&#xff0c;蓄電池儲能系統成為關鍵的后備電源。本文探討了蓄電池監測系統在數據中心儲能系統中的重要性&#xff0c;分析了ABAT系列蓄電池在線監測系統的功能、技術特點及其應用優勢。通過蓄電池監測系統的實施&#…

Mac端homebrew安裝配置

拷打了一下午o3-mini-high&#xff0c;不如這位博主的超強帖子&#xff0c;10分鐘結束戰斗 跟隨該文章即可&#xff0c;2025/2/19親測可行 mac 安裝HomeBrew(100%成功)_mac安裝homebrew-CSDN博客文章瀏覽閱讀10w次&#xff0c;點贊258次&#xff0c;收藏837次。一直覺得自己寫…

機器學習實戰(8):降維技術——主成分分析(PCA)

第8集&#xff1a;降維技術——主成分分析&#xff08;PCA&#xff09; 在機器學習中&#xff0c;降維&#xff08;Dimensionality Reduction&#xff09; 是一種重要的數據處理技術&#xff0c;用于減少特征維度、去除噪聲并提高模型效率。主成分分析&#xff08;Principal C…

windows環境下用docker搭建php開發環境dnmp

安裝WSL WSL即Linux子系統&#xff0c;比虛擬機占用資源少&#xff0c;安裝的前提是系統必須是win10以上。 WSL的安裝比較簡單&#xff0c;網上有很多教程&#xff0c;例如&#xff1a;WSL簡介與安裝流程&#xff08;Windows 下的 Linux 子系統&#xff09;_wsl安裝-CSDN博客&…

Python網絡爬蟲技術詳解文檔

Python網絡爬蟲技術詳解文檔 目錄 網絡爬蟲概述爬蟲核心技術解析常用Python爬蟲庫實戰案例演示反爬蟲機制與應對策略爬蟲法律與道德規范高級爬蟲技術資源推薦與學習路徑1. 網絡爬蟲概述 1.1 什么是網絡爬蟲 網絡爬蟲(Web Crawler)是一種按特定規則自動抓取互聯網信息的程序…

位運算,雙指針,二分,排序算法

文章目錄 位運算二進制中1的個數題解代碼我們需要0題解代碼 排序模版排序1題解代碼模版排序2題解代碼模版排序3題解代碼 雙指針最長連續不重復子序列題解代碼 二分查找題解代碼 位運算 1. bitset< 16 >將十進制數轉為16位的二進制數 int x 25; cout << bitset<…

一周學會Flask3 Python Web開發-redirect重定向

鋒哥原創的Flask3 Python Web開發 Flask3視頻教程&#xff1a; 2025版 Flask3 Python web開發 視頻教程(無廢話版) 玩命更新中~_嗶哩嗶哩_bilibili 前面我們學過渲染到模板頁面&#xff0c;這個其實是一種內部的轉發&#xff0c;瀏覽器地址欄地址沒有變化。如果我們想重定向…

圖片粘貼上傳實現

圖片上傳 html demo 直接粘貼本地運行查看效果即可&#xff0c;有看不懂的直接喂給 deepseek 會解釋的很清晰 <!DOCTYPE html> <html lang"zh-CN"> <head><meta charset"UTF-8"><meta name"viewport" content"…

RedisTemplate存儲含有特殊字符解決

ERROR信息: 案發時間: 2025-02-18 01:01 案發現場: UserServiceImpl.java 嫌疑人: stringRedisTemplate.opsForValue().set(SystemConstants.LOGIN_CODE_PREFIX phone, code, Duration.ofMinutes(3L)); // 3分鐘過期作案動機: stringRedisTemplate繼承了Redistemplate 使用的…