Linux
MDNS 多播 DNS 和 resolv.conf 文件
MDNS(多播 dns)問題會導致 resolv.conf 文件中出現重複的行嗎?
例如,我們有以下 resolv.conf 文件
more /etc/resolv.conf search coronplesdf.hh.com server 108.16.1.71 domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com domain coronplesdf.hh.com
例如我們從 dmesg 得到什麼
[6484420.812643] raid6: using avx2x2 recovery algorithm [6484420.859086] Btrfs loaded [6484426.278636] nr_pdflush_threads exported in /proc is scheduled for removal [6484708.776239] ixgbe 0000:04:00.0: invalid short VPD tag 06 at offset 4 [6900952.098901] perf: interrupt took too long (6247 > 6167), lowering kernel.perf_event_max_sample_rate to 32000 [7372848.819396] Peer 0000:0000:0000:0000:0000:ffff:0a15:f030:1054/8042 unexpectedly shrunk window 3002395993:3002395997 (repaired) [8139485.039423] Turbo disabled by BIOS or unavailable on processor [8380300.891343] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380320.890541] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380440.896206] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380460.895001] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380463.207397] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380467.316531] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380468.363352] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380469.332044] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380489.330943] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380509.329849] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380529.328678] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380549.468256] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380569.326474] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380589.340946] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380609.339969] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380619.870472] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380620.964216] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380621.979847] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380641.869255] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 [8380661.883737] UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69
第 2 層網路性能優化/怪癖不應該影響
resolv.conf
. 我敢打賭,您的某些 devops 腳本上的一些非冪等操作是在多個呼叫中添加/添加域行。此外,mDNS 不使用中心點,並且獨立於正常 DNS;說話的設備向整個網路宣布它們的名稱/IP 地址(m 代表多播)。由於我在 DNS 中擁有一切,我通常會在“我的”企業伺服器中停止 mDNS 守護程序/avahi。
不,錯誤的 MDNS 數據包校驗和不應導致多
domain
行輸入,/etc/resolv.conf
反之亦然。訊息
UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69
將表明 IP 為 82.2.33.1 的系統正在接收來自 73.2.33.11 的錯誤 UDP 數據包,因此 IP 為 73.2.33.11 的系統可能存在軟體錯誤或某些 NIC 硬體故障。它也可能是通過故意發送壞包並查看您的系統如何/是否會響應它們來嘗試探測您的系統。
我假設您出於隱私考慮修改了 IP 地址,因為在同一個網段中擁有像 73.xxx 和 82.xxx 這樣的 IP 通常沒有意義。MDNS 通常僅在單個網段內有用,因此如果 73.2.33.11 不是您的本地網路的一部分,您可能希望在路由器(或專用防火牆設備,如果你有一個)。