On Wed, 7 Jul 1999, Justin C. Walker wrote:
> Out of curiosity, what does 'arp -a' show after the 'arp -s'
> command?
Same thing it shows before the "arp -s" attempt, as does "netstat -nr" :(
For the record, regular "arp -s" commands without the "pub" parameter
(i.e. static ARP cache entries, no proxying) work fine.
I have a couple of other related questions for anyone who knows the
answer, too:
1) Can anyone explain the difference between "permanent published" ARP
table entries, and "permanent published (proxy only)" ARP table
entries?
2) What purpose does the RTF_ANNOUNCE (aka RTF_PROTO2) routing message
flag serve? How about the sin_other parameter of the sockaddr_inarp
structure (defined in /usr/include/netinet/if_ether.h)? How do they
relate?
3) How about the significance of the RTF_HOST routing message flag (i.e.
how does an IP "host" route functionally differ from a "net" route with
a /32 netmask)? Or does this only have significance for non-IP routes?
4) What's the purpose of this snippet of code from rtmsg() in
usr.sbin/arp/arp.c?
if (doing_proxy) {
if (export_only)
sin_m.sin_other = SIN_PROXY;
else {
rtm->rtm_addrs |= RTA_NETMASK;
rtm->rtm_flags &= ~RTF_HOST;
}
}
If I remove the last line of code (rtm->rtm_flags &= ~RTF_HOST;) and
recompile the arp command, it seems to insert the correct entry
according to netstat -nr, but arp -a doesn't recognize it as
"published":
# newarp -s 192.168.54.5 auto pub
using interface ed1 for proxy with address 0:e0:29:32:21:ee
# newarp -a
? (192.168.54.5) at 0:e0:29:32:21:ee permanent [ethernet]
? (192.168.54.133) at 0:a0:c9:70:4c:1c [ethernet]
? (192.168.54.254) at 0:e0:1e:b9:7d:c1 [ethernet]
# netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.54.254 UGSc 2 0 ed1
127.0.0.1 127.0.0.1 UH 0 4 lo0
192.168.27 link#1 UC 0 0 fxp0
192.168.54 link#2 UC 0 0 ed1
192.168.54.5 0:e0:29:32:21:ee UHLS2 0 0 ed1
192.168.54.133 0:a0:c9:70:4c:1c UHLW 1 322 ed1 509
192.168.54.254 0:e0:1e:b9:7d:c1 UHLW 1 0 ed1 509
Note, however, that the code *with* the rtm->rtm_flags &= ~RTF_HOST;
worked in earlier incarnations of 3.2-STABLE (it's in 3.2-RELEASE).
Cheers,
Mick
The Reverend Jasper P. O'Malley dotdot:[EMAIL PROTECTED]
Systems Administrator ringring:asktheadmiral
Webnology, LLC woowoo:http://www.webnology.com/~jooji
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message