Re: arp: SIOCSARP: No such device

really kuznet@ms2.inr.ac.ru (inr-linux-kernel@ms2.inr.ac.ru)
24 Jun 1996 21:44:37 +0400


Bernd Eckenfels (ecki@tapac.INka.DE) wrote:
:

Before all, I forgot one more thing to fix in nettools:

libc (<=5.3.x) has broken gethostbyname that fails on 255.255.255.255.
Please, insert inet_aton before gethostbyname, it will cure for
this bug and, besides that, will not trigger resolver at all, if you specify
numeric address.

: The Problem is, that you still need to give the Device:

: arp -i eth0 -D -s 157.158.29.94 eth0 pub
^ ^
Is it misprint? Why twice?

: The reason why I want the KErnel to guess the device is
: backward-compatibility:

: arp -s 157.158.29.94 xx:xx:Xx:xx:xx:xx pub

: should work.

It worked in 1.2 if you had one arpable interface. And it still works.
We cannot make this thing backward compatible because
old arp COULD NOT handle proxies for multiple arpable devices.
This command published 157.158.29.94 on all arpable interfaces,
that was apparently wrong (two ethernets cannot have coincident adresses).
New arp is FULLY compatible with old, when you have just one arpable
interface, and it adds new functionality.

: My general policy is not to guess anythin in arp, thats why you will have to
: specify

: arp -i eth0 -D -s 157.158.29.94 eth0 pub
:
: even if that looks very odd.

Well, it would not look very odd if you omitted redundant device
specification :-).

: But I think the KErnel should be a little bit
: inteligent. Since the Kernel does device-guessing anyway, I think the check
: for hardware address would make arp(8) happy.

I stress again. Old style works. If you have one arpable interface:
arp -s 157.158.29.94 hw-addr pub is OK.

If you have multiple ethernets, all the software that sets proxies
automatically (pppd,proxyarpd etc.) is WRONG ANYWAY. So that compatibility
is not argument here. I'd agree with you, if someone really needed
this option for manual operations, but -D is much more convenient
for this sake. Do you remember hw-addr of your ethernet?

: : Let's leave P-n-P functions to configuration scripts and
: : network managers with nice menus and pictures. Good?
: ...
: "arp -d 1.2.3.4" deletes pub and nonpub entries, "arp -d 1.2.3.4 nopub"
: deletes the unpublished entry and "arp -d 1.2.3.4 pub" deletes the published
: one. Therefore one can use the new features, but the old functionality is
: still given.

It is one of the places, where old functionality should be dropped as soon
as possible. ARP and proxy ARP are absolutely different things,
BSD made mess from them and we will have to teach people, that one
command cannot delete both apples and boxes for oranges :-)

: : And the last thing: it would be very convenient, if net-tools understood
: : network addresses in CIDR form. F.e.
: :
: : route add 193.233.7.64 netmask 255.255.255.192 ...
: :
: : should be equivalent to:
: :
: : route add 193.233.7.64/26 ...

: I have thought about that, too... I only need a clean way to do it, since I
: use library calls to be completely Adress-family independent.

You can separate two objects: addresses and network prefixes
and make separate handlers for them. Good idea?

Alexey Kuznetsov.