- MAC地址表
MAC地址表工作于數(shù)據(jù)鏈路層,Linux系統(tǒng)中對(duì)應(yīng)的是Linux Bridge。初始狀態(tài)下,Bridge不知道哪個(gè)設(shè)備連接了自己,也不會(huì)知道所連設(shè)備的MAC地址;工作過程中,采用邊學(xué)習(xí)邊轉(zhuǎn)發(fā)的方式,也就是基于SMAC學(xué)習(xí)生成MAC地址表,基于DMAC轉(zhuǎn)發(fā)數(shù)據(jù)幀。
- ARP表
當(dāng)發(fā)送端設(shè)備不知道接收端設(shè)備的MAC地址時(shí),需要根據(jù)接收端設(shè)備的IP地址進(jìn)行查詢,以獲得MAC地址。此時(shí),需要ARP--Address Resolution Protocol--地址解析協(xié)議。具體來說,發(fā)送端設(shè)備發(fā)送一個(gè)ARP請(qǐng)求,并在廣播域內(nèi)詢問,接收端收到ARP請(qǐng)求后將自己的MAC地址單播給發(fā)送端,發(fā)送端接收后記錄IP和MAC的映射關(guān)系到本地ARP緩存表。
root@linux:/# arp
Address HWtype HWaddress Flags Mask Iface
_gateway ether fa:16:3e:bf:14:20 C ens3
30.0.0.2 ether fa:16:3e:42:4f:07 C ens3
root@linux:/# arp -n
Address HWtype HWaddress Flags Mask Iface
30.0.0.1 ether fa:16:3e:bf:14:20 C ens3
30.0.0.2 ether fa:16:3e:42:4f:07 C ens3
root@linux:/# arp -v
Address HWtype HWaddress Flags Mask Iface
_gateway ether fa:16:3e:bf:14:20 C ens3
30.0.0.2 ether fa:16:3e:42:4f:07 C ens3
Entries: 2Skipped: 0Found: 2
- 路由表
記錄數(shù)據(jù)可能的傳輸路徑,有兩種表:
RIB:Routing Information Base,路由信息表;存放路由策略。
FIB:Forwarding Information Base,轉(zhuǎn)發(fā)信息表;用來轉(zhuǎn)發(fā)數(shù)據(jù)包。
#RIB
root@linux:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 ens3
30.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3
169.254.169.254 _gateway 255.255.255.255 UGH 100 0 0 ens3
#FIB
root@linux:~# route -F
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 ens3
30.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3
169.254.169.254 _gateway 255.255.255.255 UGH 100 0 0 ens3
Destination -- 目的網(wǎng)絡(luò)地址
Genmask -- 子網(wǎng)掩碼
Gateway -- 網(wǎng)關(guān)
Iface -- 接口,數(shù)據(jù)包從iface發(fā)送到下一跳
Flags -- 標(biāo)記
U:動(dòng)態(tài)路由
H:目標(biāo)是一個(gè)主機(jī);
G:路由指向網(wǎng)關(guān);
目的網(wǎng)絡(luò)地址和子網(wǎng)掩碼共同確定目的網(wǎng)絡(luò)范圍,可以是主機(jī)地址、子網(wǎng)地址、或者默認(rèn)路由。
路由表的匹配有精確匹配算法、最長前綴匹配算法(Longest Prefix Matching, 簡稱LPM)。
-
Linux系統(tǒng)
+關(guān)注
關(guān)注
4文章
596瀏覽量
27510 -
MAC地址表
+關(guān)注
關(guān)注
0文章
3瀏覽量
5623 -
數(shù)據(jù)鏈路層
+關(guān)注
關(guān)注
0文章
58瀏覽量
12035
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
基本網(wǎng)絡(luò)配置與網(wǎng)絡(luò)組件的安裝
[求助]調(diào)諧網(wǎng)絡(luò)和匹配網(wǎng)絡(luò)關(guān)系?
PPTV網(wǎng)絡(luò)電視|PPTV網(wǎng)絡(luò)電視(pplive網(wǎng)絡(luò)電視下載)多版本集
網(wǎng)絡(luò)報(bào)表中無GND和VCC網(wǎng)絡(luò)
Linux網(wǎng)絡(luò)和VM網(wǎng)絡(luò)經(jīng)驗(yàn)
zigbee恢復(fù)網(wǎng)絡(luò)是依據(jù)哪些參數(shù)恢復(fù)網(wǎng)絡(luò)?
Altium DesignerPCB中手動(dòng)添加網(wǎng)絡(luò)及網(wǎng)絡(luò)編輯
GSM網(wǎng)絡(luò)向WCDMA網(wǎng)絡(luò)平滑演進(jìn)的幾點(diǎn)建議
基于LoRaWAN協(xié)議的網(wǎng)絡(luò)網(wǎng)絡(luò)部署
AD網(wǎng)絡(luò)問題
SGMII網(wǎng)絡(luò)與RGMII網(wǎng)絡(luò)不能獨(dú)立啟動(dòng)工作嗎
網(wǎng)絡(luò)測試與網(wǎng)絡(luò)損傷融合技術(shù)
網(wǎng)絡(luò)病毒,網(wǎng)絡(luò)病毒是什么意思
為什么需要Overlay網(wǎng)絡(luò)?Overlay網(wǎng)絡(luò)是如何形成的?Overlay網(wǎng)絡(luò)的應(yīng)用有哪些?
![為什么需要Overlay<b class='flag-5'>網(wǎng)絡(luò)</b>?Overlay<b class='flag-5'>網(wǎng)絡(luò)</b>是如何形成的?Overlay<b class='flag-5'>網(wǎng)絡(luò)</b>的應(yīng)用有哪些?](https://file1.elecfans.com/web2/M00/93/EC/wKgZomTi1BeADNWyAAAnVGEjV_A498.png)
評(píng)論