cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1536
Views
0
Helpful
2
Replies

arp table and remote host

sarahr202
Level 5
Level 5

Hi every body!

let say we have following set up:

h1-----r--------h2

Mac address of h1 is mh1

mac address of r is mr

mac address of h2 is m2

h1 has following config:

ip address 199.199.199.2/24

default gateway 199.199.199.1/24

arp table at h1:

199.199.199.1 macr

Let say h1 sends a packet (198.198.198.2) ,the ip address of h2.

h1 sends the packet to r

r delivers the packet to h2.

h2 sends the packet to h1.

h1 builds its arp table with following entry.

198.198.198.2 macr

=====================

My question if h1 sends another packet, it will send it again to r. So why does h1 build arp entry for h2 which h1 will never check. every time h1 has to sends a packet to h2, it first finds if the destined packet 'ip is on same same subnet as h1's ip. if it is not, it simply sends a packet to gateway . So in this situation though h1 builds an entry "198.198.198.2 macr" but it is not using this entry. The logic h1 uses to decide if the packet needs to be sent to gateway is simple: check if the destined ip address is on same subnet as h1.If not, sends it to gateway. So why waste memory by building entry 198.198.198.2 macr?

Thanks a lot!

2 Accepted Solutions

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Sarah,

first of all H1 will create an entry for H2 only if it set to use itself as its default gateway (= it is relaying on proxy-arp).

if H1 has default gateway 199.199.199.1 it uses the ARP process to find the MAC address of its default gateway and creates only one entry for it.

if you use arp -g you cannot find an entry for 198.198.198.2 on H1.

For example I'm connected to the internet, my pc has a default gateway I didn't ping any other device in the subnet

C:\Documents and Settings\eitaltel15>arp -g

Interfaccia: 10.55.49.57 --- 0x2

Indirizzo Internet Indirizzo fisico Tipo

10.55.49.1 00-e0-b6-05-f4-39 dinamico

as you see only one entry.

check if the def gateway = pc ip address in this case the PC will ARP for every possible address.

Hope to help

Giuseppe

View solution in original post

Giuseppe is exactly right.

Hosts will only ARP for addresses that are on the same subnet.

View solution in original post

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Sarah,

first of all H1 will create an entry for H2 only if it set to use itself as its default gateway (= it is relaying on proxy-arp).

if H1 has default gateway 199.199.199.1 it uses the ARP process to find the MAC address of its default gateway and creates only one entry for it.

if you use arp -g you cannot find an entry for 198.198.198.2 on H1.

For example I'm connected to the internet, my pc has a default gateway I didn't ping any other device in the subnet

C:\Documents and Settings\eitaltel15>arp -g

Interfaccia: 10.55.49.57 --- 0x2

Indirizzo Internet Indirizzo fisico Tipo

10.55.49.1 00-e0-b6-05-f4-39 dinamico

as you see only one entry.

check if the def gateway = pc ip address in this case the PC will ARP for every possible address.

Hope to help

Giuseppe

Giuseppe is exactly right.

Hosts will only ARP for addresses that are on the same subnet.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card