ARP地址解析(不同網段)


ARP地址解析(不同網段)

1.實驗拓撲圖

 

 

2.配置兩台PC的IP

 

 

 

3.配置路由器端口IP

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]sy R1

[R1]int G0/0/0

[R1-GigabitEthernet0/0/0]ip ad    

[R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24

Jun 29 2017 14:26:01-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[R1-GigabitEthernet0/0/0]dis this

[V200R003C00]

#

interface GigabitEthernet0/0/0

 ip address 192.168.1.254 255.255.255.0

 

[R1-GigabitEthernet0/0/0]int G0/0/1

[R1-GigabitEthernet0/0/1]ip add    

[R1-GigabitEthernet0/0/1]ip address 192.168.2.254 24

Jun 29 2017 14:29:02-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[R1-GigabitEthernet0/0/1]dis this

[V200R003C00]

#

interface GigabitEthernet0/0/1

 ip address 192.168.2.254 255.255.255.0

#

return

[R1-GigabitEthernet0/0/1]

4.在路由器上開啟ARP代理

<R1>system-view

Enter system view, return user view with Ctrl+Z.

[R1]int G0/0/0

[R1-GigabitEthernet0/0/0]arp-pro    

[R1-GigabitEthernet0/0/0]arp-proxy en    

[R1-GigabitEthernet0/0/0]arp-proxy enable

[R1-GigabitEthernet0/0/0]

[R1-GigabitEthernet0/0/0]int G0/0/1

[R1-GigabitEthernet0/0/1]arp-pro    

[R1-GigabitEthernet0/0/1]arp-proxy enab    

[R1-GigabitEthernet0/0/1]arp-proxy enable

[R1-GigabitEthernet0/0/1]

5.在PC3上抓ARP包,並開始用PC3pingPC4

 

 

 

6.在PC4上抓ARP包

 

 

7.建立連接發送ping 包

PC3MAC:54-89-98-70-63-0B

PC4MAC:54-89-98-6D-65-AF

G0/0/1MAC:00-e0-fc-f4-06-8a

G0/0/0MAC:00-e0-fc-f4-06-89

在192.168.1.0網段抓包

 

 

在192.168.2.0網段抓包

 

 

說明數據包在跨網絡傳輸的時候,源IP與目的IP不會改變,源MAC和目的MAC每經過一跳會變化。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM