交換機ARP代理詳解
交換機ARP代理詳解
圖表
The Host A (172.16.10.100) on Subnet A needs to send packets to Host D (172.16.20.200) on Subnet B. As shown in the diagram above, Host A has a /16 subnet mask. What this means is that Host A believes that it is directly connected to all of network 172.16.0.0. When Host A needs to communicate with any devices it believes are directly connected, it will send an ARP request to the destination. Therefore, when Host A needs to send a packet to Host D, Host A believes that Host D is directly connected, so it sends an ARP request to Host D.
這個主機A要傳送資料包到主機D。圖表顯示主機A使用的是16位掩碼。主機A相信目的網段是直接連線在172.16.0.0上的。於是主機A直接傳送一個ARP請求給目的站點。
To reach Host D (172.16.20.200), Host A needs the MAC address of Host D.
Therefore, Host A broadcasts an ARP request on Subnet A, as below:
主機A 需要得到主機D的MAC地址,所以主機A廣播ARP請求:
In above ARP request, Host A (172.16.10.100) is requesting that Host D (172.16.20.200) send its MAC address. The above ARP request packet is then encapsulated in an Ethernet frame with Host A's MAC address as the source address and a broadcast (FFFF.FFFF.FFFF) as the destination address. Since the ARP request is a broadcast, it reaches all the nodes in the Subnet A, including the router's e0 interface, but does not reach Host D. The broadcast will not reach Host D because routers, by default, do not forward broadcasts.
ARP請求裡主機A將自己的MAC地址作為源地址 FFFF.FFFF.FFFF 做為目的地址進行廣播。但是路由器的E0 口預設不支援轉發廣播。所以主機D不能響應這個ARP請求。
Since the router knows that the target address (172.16.20.200) is on another subnet and can reach Host D, it will reply with its own MAC address to Host A.
路由器知道主機D在其他子網,於是用自己的MAC地址來應答A
Above is the Proxy ARP reply that the router sends to Host A. The proxy ARP reply packet is encapsulated in an Ethernet frame with router's MAC address as the source address and Host A's MAC address as the destination address. The ARP replies are always unicast to the original requester.
路由器用自己介面的MAC地址作為源地址回覆ARP應答給主機A。這個ARP應答總是利用單播來回復。
On receiving this ARP reply, Host A updates its ARP table as below:
主機A收到ARP請求後更新自己的MAC地址表
From now on Host A will forward all the packets that it wants to reach 172.16.20.200 (Host D) to the MAC address 00-00-0c-94-36-ab (router). Since the router knows how to reach Host D, the router forwards the packet to Host D. The ARP cache on the hosts in Subnet A is populated with the MAC address of the router for all the hosts on Subnet B. Hence, all packets destined to Subnet B are sent to the router. The router forwards those packets to the hosts in Subnet B.
現在主機A如果傳送資料包給主機D就將資料傳送給MAC 00-00-0c-94-36-ab.由路由器轉發給主機D。所以目的地址為子網B的資料都傳送給路由器。子網A內所有主機ARP地址表顯示去往子網B主機的MAC地址 全是路由器介面的MAC地址。這個路由器轉發其他資料包到子網B。
The ARP cache of Host A is given below:
這個主機A的ARP 地址表
Note:
Multiple IP addresses are mapped to a single MAC address (the router's
MAC address), indicating that proxy ARP is in use.
多個IP地址被對映到一個MAC地址。標誌這在路由器上使用了 proxy-arp。
The Cisco router's interface should be configured to accept and respond to proxy ARP. This is enabled by default. Proxy ARP can be disabled on a per interface basis with the interface configuration command no ip proxy-arp, as shown below:
cisco 交換機應該配置為能夠支援proxy arp。而且它預設是被開啟的。如果需要關閉可以使用 no ip proxy-arp 在介面模式下關閉。
在介面上使用 ip proxy-arp 命令啟用 proxy-arp
The Host A (172.16.10.100) on Subnet A needs to send packets to Host D (172.16.20.200) on Subnet B. As shown in the diagram above, Host A has a /16 subnet mask. What this means is that Host A believes that it is directly connected to all of network 172.16.0.0. When Host A needs to communicate with any devices it believes are directly connected, it will send an ARP request to the destination. Therefore, when Host A needs to send a packet to Host D, Host A believes that Host D is directly connected, so it sends an ARP request to Host D.
這個主機A要傳送資料包到主機D。圖表顯示主機A使用的是16位掩碼。主機A相信目的網段是直接連線在172.16.0.0上的。於是主機A直接傳送一個ARP請求給目的站點。
To reach Host D (172.16.20.200), Host A needs the MAC address of Host D.
Therefore, Host A broadcasts an ARP request on Subnet A, as below:
主機A 需要得到主機D的MAC地址,所以主機A廣播ARP請求:
Sender's MAC Address |
Sender's IP Address |
Target MAC Address |
Target IP Address |
00-00-0c-94-36-aa |
172.16.10.100 |
00-00-00-00-00-00 |
172.16.20.200 |
In above ARP request, Host A (172.16.10.100) is requesting that Host D (172.16.20.200) send its MAC address. The above ARP request packet is then encapsulated in an Ethernet frame with Host A's MAC address as the source address and a broadcast (FFFF.FFFF.FFFF) as the destination address. Since the ARP request is a broadcast, it reaches all the nodes in the Subnet A, including the router's e0 interface, but does not reach Host D. The broadcast will not reach Host D because routers, by default, do not forward broadcasts.
ARP請求裡主機A將自己的MAC地址作為源地址 FFFF.FFFF.FFFF 做為目的地址進行廣播。但是路由器的E0 口預設不支援轉發廣播。所以主機D不能響應這個ARP請求。
Since the router knows that the target address (172.16.20.200) is on another subnet and can reach Host D, it will reply with its own MAC address to Host A.
路由器知道主機D在其他子網,於是用自己的MAC地址來應答A
Sender's MAC Address |
Sender's IP Address |
Target MAC Address |
Target IP Address |
00-00-0c-94-36-ab |
172.16.20.200 |
00-00-0c-94-36-aa |
172.16.10.100 |
Above is the Proxy ARP reply that the router sends to Host A. The proxy ARP reply packet is encapsulated in an Ethernet frame with router's MAC address as the source address and Host A's MAC address as the destination address. The ARP replies are always unicast to the original requester.
路由器用自己介面的MAC地址作為源地址回覆ARP應答給主機A。這個ARP應答總是利用單播來回復。
On receiving this ARP reply, Host A updates its ARP table as below:
主機A收到ARP請求後更新自己的MAC地址表
IP Address |
MAC Address |
172.16.20.200 |
00-00-0c-94-36-ab |
From now on Host A will forward all the packets that it wants to reach 172.16.20.200 (Host D) to the MAC address 00-00-0c-94-36-ab (router). Since the router knows how to reach Host D, the router forwards the packet to Host D. The ARP cache on the hosts in Subnet A is populated with the MAC address of the router for all the hosts on Subnet B. Hence, all packets destined to Subnet B are sent to the router. The router forwards those packets to the hosts in Subnet B.
現在主機A如果傳送資料包給主機D就將資料傳送給MAC 00-00-0c-94-36-ab.由路由器轉發給主機D。所以目的地址為子網B的資料都傳送給路由器。子網A內所有主機ARP地址表顯示去往子網B主機的MAC地址 全是路由器介面的MAC地址。這個路由器轉發其他資料包到子網B。
The ARP cache of Host A is given below:
這個主機A的ARP 地址表
IP Address |
MAC Address |
172.16.20.200 |
00-00-0c-94-36-ab |
172.16.20.100 |
00-00-0c-94-36-ab |
172.16.10.99 |
00-00-0c-94-36-ab |
172.16.10.200 |
00-00-0c-94-36-bb |
多個IP地址被對映到一個MAC地址。標誌這在路由器上使用了 proxy-arp。
The Cisco router's interface should be configured to accept and respond to proxy ARP. This is enabled by default. Proxy ARP can be disabled on a per interface basis with the interface configuration command no ip proxy-arp, as shown below:
cisco 交換機應該配置為能夠支援proxy arp。而且它預設是被開啟的。如果需要關閉可以使用 no ip proxy-arp 在介面模式下關閉。
Router# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)# interface ethernet 0Router(config-if)# no ip proxy-arpRouter(config-if)# ^ZRouter#To enable proxy ARP on an interface, use the ip proxy-arp interface configuration command.
在介面上使用 ip proxy-arp 命令啟用 proxy-arp
相關文章
- ARP協議詳解之Gratuitous ARP(免費ARP)協議UI
- 【轉】交換機開發(四)—— ARP 基礎知識解析
- 交換機的作用、功能和工作原理詳解
- Java 動態代理機制詳解Java
- 詳解H3C交換機“埠安全”功能
- 一文詳解 ARP 協議協議
- java的動態代理機制詳解Java
- Linux ARP代理 與 NATLinux
- Linux 核心引數 arp_ignore & arp_announce 詳解Linux
- 使用tcpdump觀察ARP通訊過程和ARP報文詳解TCP
- 核心交換機的TRUNK配置功能詳細講解(轉)
- 代理模式詳解模式
- HTTP代理與SOCKS代理詳解HTTP
- 交換機中網路環路常見問題詳解
- 瞭解交換機原理 詳解廣播風暴成因(轉)
- Java進階 | Proxy動態代理機制詳解Java
- ARP協議詳解之ARP動態與靜態條目的生命週期協議
- 乙太網交換機效能比較對照指標詳解(轉)指標
- 詳解HTTP代理與SOCKS代理 海外代理IP介紹HTTP
- HCNP Routing&Switching之代理ARP
- JDK動態代理詳解JDK
- 二層交換機 三層交換機 四層交換機的區別
- 【設計模式】-代理模式及動態代理詳解設計模式
- 設計模式 - 代理模式詳解設計模式
- c#中代理模式詳解C#模式
- 設計模式:代理模式詳解設計模式
- ARP地址解析協議、DNS域名系統和交換機、路由器、閘道器的概念協議DNS路由器
- 華為交換機埠安全詳解--埠隔離、環路檢測與埠安全
- 核心交換機的TRUNK配置功能詳細講解 ( 到底什麼是TRUNK呢?)
- 代理模式詳解:靜態代理、JDK動態代理與Cglib動態代理模式JDKCGLib
- ARP快取表的構成ARP協議全面實戰協議詳解、攻擊與防禦快取協議
- 最詳細的代理講解--JDK動態代理和cglib代理JDKCGLib
- 靜態代理和動態代理(jdk/cglib)詳解JDKCGLib
- 如何加盟代理小程式?小程式加盟代理流程詳解
- 好程式設計師Java教程Java動態代理機制詳解程式設計師Java
- nginx詳解反向代理負載均衡Nginx負載
- 選購交換機的引數依據和主要的引數指標詳解指標
- 全國產交換機、軍用交換機與普通交換機到底有啥區別?