單臂路由的過程模擬和數據分析

工具:eNSP


拓撲:

wKiom1kIKJjz_rgPAABnlcrOXRI050.png

配置:

SW-1:

#

sysname SW-1

#

vlan batch 2 to 3

#

interface GigabitEthernet0/0/1

 description to_RT-1

 port link-type trunk

 port trunk allow-pass vlan 2 to 3

 stp disable

#

interface GigabitEthernet0/0/2

 description to_pc1

 port link-type access

 port default vlan 2

#

interface GigabitEthernet0/0/3

 description to_pc2

 port link-type access

 port default vlan 3

#

---------------------

RT-1:

#

 sysname RT-1

#

interface GigabitEthernet0/0/0

 description to_SW-1

#

interface GigabitEthernet0/0/0.2

 dot1q termination vid 2

 ip address 10.10.10.1 255.255.255.0 

 arp broadcast enable

#

interface GigabitEthernet0/0/0.3

 dot1q termination vid 3  //指定使用標準IEEE802.1q打上VLAN號爲3的標籤

 ip address 10.10.20.1 255.255.255.0 

 arp broadcast enable  //開啓路由子接口的ARP廣播功能,默認關閉狀態,無法進行ARP廣播導致獲取                        //目標的MAC地址

----------------------

PC-1:

10.10.10.100

255.255.255.0

10.10.10.1

----------------------

PC-2:

10.10.20.100

255.255.255.0

10.10.20.1

----------------------

結果分析:

PC2  Ping PC1

wKiom1kIKnuSB2rYAAAs20mR5LM609.png

通訊過程:

wKiom1kIKqLgbp0tAADxQ5sl7RU468.png

順便分析一下數據幀中插入的4個字節的802.1q標籤(非封裝型)

wKiom1kIKuiRqf4QAAA3O5KYLGA658.png

建立正常的通訊之後,路由器會維護自身的ARP表項,因此會定期向兩個終端發送ARP請求來保持ARP表項不過期。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章