It would be really nice if route(8) could add the necessary magic to create "proxy only" arp entries. One might argue that arp(8) should do this by default however route(8) is much more powerful; for example, it already allows the user to specify the network interface. (One might argue futher that arp(8) could be replaced with a shell script that uses route to create entries and netstat to display them!) Fix: Add a -proxy flag to route(8) and then we have: fun 216 # route -n add -host 131.243.1.120 \ -link fxp0:0.a0.c9.b7.e3.3c -llinfo -proxy -iface add host 131.243.1.120: gateway fxp0:0.a0.c9.b7.e3.3c fun 217 # netstat -rn | egrep 131.243.1.120 131.243.1.120 0:a0:c9:b7:e3:3c UHLS2 0 0 fxp0 fun 218 # arp 131.243.1.120 kitten.ee.lbl.gov (131.243.1.120) at 0:a0:c9:b7:e3:3c \ permanent published (proxy only) Notice that this arp/routing entry has the correct flags and also is designated as "proxy only" . Also note that the proxy arp code in the FreeBSD-current version of ppp(8) creates proxy arp entries that have the same flags and arp output as shown above. Context diffs are appended. However, any similar change to that allows RTF_ANNOUNCE (aka RTF_PROTO2) and SIN_PROXY to be set would be acceptable. RCS file: RCS/route.c,v retrieving revision 1.1 How-To-Repeat: Try to create a proxy arp entry using arp(8): fun 212 # arp -s 131.243.1.120 0:a0:c9:b7:e3:3c pub fun 213 # netstat -rn | egrep 131.243.1.120 131.243.1.120/32 0:a0:c9:b7:e3:3c ULS2c 0 0 fxp0 fun 214 # arp 131.243.1.120 kitten.ee.lbl.gov (131.243.1.120) at 0:a0:c9:b7:e3:3c \ permanent published Notice that the routing table flags are wrong ('H' should be set but 'c' should not since this should be a host route but not a cloning route). Also notice that arp does not indicate "proxy only" in its listing of this entry. The example where this is buring me is a system that uses a pair of wavelans to do a point to point link. A subset of the real subnet is used at the far end of the link so we have a route like this: 131.243.1.112/28 131.243.1.102 UGSc 0 0 wl1 Where 131.243.1/24 is the "real" subnet and 131.243.1.112/28 is the subset subnet at the far end of the uwave link. But since arp(8) doesn't set the right flags, the arp entry is used to route packets back out the ethernet interface which results in lots of icmp redirects and a routing loop.
<<On Tue, 22 Jun 1999 23:05:50 PDT, Craig Leres <leres@ee.lbl.gov> said: > It would be really nice if route(8) could add the necessary > magic to create "proxy only" arp entries. As titular networking czar, I don't have a strong feeling about this patch, so if someone wants to apply it, that's fine with me. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick
On Wed, Jun 23, 1999 at 08:20:02AM -0700, Garrett Wollman wrote: > As titular networking czar, I don't have a strong feeling about this > patch, so if someone wants to apply it, that's fine with me. I'd like to commit it, but what about renaming the option -announce instead of -proxy, for consistency with the route flag name? Besides, it's a patch for 3.2 and this doesn't exactly qualify as a stability fix, should it be committed to the stable branch? -- Pierre Beyssac pb@enst.fr
<<On Fri, 25 Jun 1999 21:28:08 +0200, Pierre Beyssac <beyssac@enst.fr> said: > I'd like to commit it, but what about renaming the option -announce > instead of -proxy, for consistency with the route flag name? Hmmm. I'm not sure I like either name much.... > Besides, it's a patch for 3.2 and this doesn't exactly qualify as > a stability fix, should it be committed to the stable branch? No. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick
> I'd like to commit it, but what about renaming the option -announce > instead of -proxy, for consistency with the route flag name? Let me suggest adding -announce as a command line alias for -proto2 (since RTF_ANNOUNCE and RTF_PROTO2 are the same bit) and then have -proxy do the SIN_PROXY (i.e. "proxy only") magic. The example would then be: fun 216 # route -n add -host 131.243.1.120 \ -link fxp0:0.a0.c9.b7.e3.3c -llinfo -proxy -announce -iface or: fun 216 # route -n add -host 131.243.1.120 \ -link fxp0:0.a0.c9.b7.e3.3c -llinfo -proxy -proto2 -iface Craig
State Changed From-To: open->analyzed I have just fixed the arp(8) command so that it can create published proxy-only ARP entries irrespective of whether or not the route to a destination already exists.
Responsible Changed From-To: freebsd-bugs->ru But I think having a similar functionality in route(8) would also be great.
State Changed From-To: analyzed->closed Committed, thanks! It's pity that you can't use the new -proxy modifier to provide a single cloning entry for a whole subnet, due to SIN_PROXY bit being reset by applying the netmask to the key (destination) when putting an entrey into the routing table.