What does NOARP actually do? The ifconfig(8) man page just says that
it disables the use of the ARP protocol.
Am I still able to send packets through sockets if I a have a valid
entry in the ARP table?
--
/* Tuomas Määttänen <maat...@iki.fi>
* Finland
* Avoid the Gates of Hell - use Linux!
*/
Yes. It's mainly for point-to-point devices which can resolve their destination
implicitly.
>Am I still able to send packets through sockets if I a have a valid
>entry in the ARP table?
You mean, what will happen if you set NOARP on, say, an ethernet device?
The arp entries that are in the cache will continue to work until
they expire (unless they are permanent/static).
Try it. Do ``ifconfig eth0 -arp'', see what's in your arp cache with ``arp -a''
and try pinging those addresses as well as ones that are not in there.
> You mean, what will happen if you set NOARP on, say, an ethernet device?
> The arp entries that are in the cache will continue to work until
> they expire (unless they are permanent/static).
That's what I thought. There must be something wrong with my code
then as if NOARP is set on an ethernet device, 'tcpdump -e' shows
that the destination ethernet address is 0.
I'm 101% sure that there is an entry in the ARP table. Strange.
> k...@ashi.FootPrints.net (Kaz Kylheku) writes:
>
> > You mean, what will happen if you set NOARP on, say, an ethernet device?
> > The arp entries that are in the cache will continue to work until
> > they expire (unless they are permanent/static).
>
> That's what I thought. There must be something wrong with my code
> then as if NOARP is set on an ethernet device, 'tcpdump -e' shows
> that the destination ethernet address is 0.
>
> I'm 101% sure that there is an entry in the ARP table. Strange.
The address in the neighbour table (=ARP table for IPv4) is ignored
when IFF_NOARP is set and the ethernet code sets the destination to 0.
Arguably it could insert the neighbour destination too, but it wouldn't
make sense anyways, and may break code that depends on the current
behaviour.
The question is, why do you want to use NOARP on Ethernet, it normally
only makes sense on p-t-p network types like like HIPPI. If you just
want to prevent dynamic ARP for a given destination just set up static
ARP entries for them.
-Andi
--
This is like TV. I don't like TV.
> The question is, why do you want to use NOARP on Ethernet, it normally
Well, I have been playing around with Mobile IP code and the RFC2002
states that the mobile node must not request or reply to ARP messages
while in foreign network.
> only makes sense on p-t-p network types like like HIPPI. If you just
> want to prevent dynamic ARP for a given destination just set up static
> ARP entries for them.
Static entries? How do I do that?
--
/* Tuomas Määttänen <maat...@iki.fi>
* Insinöörinkatu 60 C190
* 33720 Tampere My other vehicle is a Minbari Cruiser.
*/
At the administrative level, you can use the -s option to ARP. At the ioctl
level, you set certain flags in the request. Read the man page for the arp
command, and the relevant kernel code. :)
> Static entries? How do I do that?
Duh, what was I thinking as I'm currently doing just that ;)
So the problem is that I should be able to send data through socket but
I should neither send any ARP requests nor answer any requests.
I have been trying to solve that by enabling ARP when sending a packet
and disabling it after that. There is always an entry for the destination
in the neighbour table so me sending a request should never happen but
I think it might be possible to receive a request while ARP is enabled.
--
/* Tuomas Määttänen <maat...@iki.fi>
* Finland
* My other vehicle is a Minbari Cruiser.
*/
> The address in the neighbour table (=ARP table for IPv4) is ignored
> when IFF_NOARP is set and the ethernet code sets the destination to 0.
One more question; was this the case with 2.0.X as well?
I have eaten way too many penguin mints this morning as I can't even
think straight ;)
<shameless plug>
Or alternatively arp(7) in man-pages-1.24 for the kernel interface
</plug>
I've also added a note about the IFF_NOARP destination address behaviour
to netdevice(7), so at least it is documented behaviour now :)