LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   unable to create/delete an ARP entry for a host on another subnet. (https://www.linuxquestions.org/questions/linux-networking-3/unable-to-create-delete-an-arp-entry-for-a-host-on-another-subnet-4175461460/)

amitbhatt 05-10-2013 01:27 PM

unable to create/delete an ARP entry for a host on another subnet.
 
Hi Everyone,

Here is my query..

i am on host 192.168.0.254 using Red hat linux 6.

i am trying to create and delete arp table entries for host 192.168.1.2 which also has Redhat linux 6, using arp command as follows:-

To create any entry in arp table i am using:-
arp -s 192.168.1.2 <MAC-ADDRESS>

and To delete any entry from arp table i am using:-
arp -d 192.168.1.2

But in both cases i got an error:-
SIOCDARP(priv): Network is unreachable

although host 192.168.1.2 is up and i am able to judge that using ping and ssh.


Whereas in case i am trying to create or delete any entry for a host 192.168.0.1(which also has RHEL6)
using arp command same as above. There is no error then and entry is created/deleted for 192.168.0.1.

Means for a host on same subnet i am able to create/delete an arp entry.
But for a host on another subnet this is not working.


I am still trying to find out the solution. if anybody have appropriate answer or any guide-ens please let me know.

jefro 05-10-2013 04:50 PM

"on host 192.168.0.254

arp -s 192.168.1.2 <MAC-ADDRESS>

although host 192.168.1.2 is up and i am able to judge that using ping and ssh"

The last part gets me confused. If you are on the original host and you can ping then either two situations are happening. One is that you have a dynamic arp entry or some router that is connecting the two subnets.

Try simple arp for display of both static and dynamic entries.

See this web page for some more ideas or tell me a bit more of this issue.

http://ustechnica.com/tag/siocdarppr...s-unreachable/


What I'd need to know is the site topology for this test and how you are able to ping it.

About the only time I use a static arp entry is to program a device. For example I need to program a 192XXX device on a 10.xxx. I don't reconfigure the host 10xxx, I make a static entry on that mac for the 10xxx. Then I can make it a 10xxx from default.

amitbhatt 05-11-2013 06:38 AM

Hi Jefro,

Thanks for your concern..

Actually all these three machines 192.168.0.254/24, 192.168.0.1/24 and 192.168.1.2/24 are installed virtually on vmware7.

And i am trying to create a dynamic arp entry of the machine 192.168.1.2/24 in the arp cache of machine 192.168.0.254/24.

But when i am trying to do so using arp command with -s option that gave me an error:- "Network not rechable"

Whereas while creating an arp entry for machine 192.168.0.1/24 with the same command and option i am able to do so.

So i tried to check the network connection between 192.168.0.254/24 and 192.168.1.2/24 as follows:-

First, i ran ping command on terminal of 192.168.0.254/24 machine as follows:-

ping 192.168.1.2

and i found that machine 192.168.1.2 is reachable from machine 192.168.0.254

Second, i tried to access the machine 192.168.1.2 from machine 192.168.0.254 using ssh connection and that is also working.

So through that i concluded that network is ok.

So finally i made a conclusion that i am not able to create any arp entry manually for a host on another subnet like 192.168.1.2 but for a host on same subnet like 192.168.0.1 i am able to create an arp entry.

Thus now i am trying to find out a solution for this. How can i manually create an arp entry in the arp cache of machine 192.168.0.254 for the machine 192.168.1.2 either by using arp command or by any other method.


All times are GMT -5. The time now is 11:25 AM.