[RFC] script for binding ARP <-> IP pairs
ady at freebsd.ady.ro
Tue Aug 25 14:55:23 UTC 2009
On Tue, Aug 25, 2009 at 3:16 AM, Xin LI <delphij at delphij.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Doug Barton wrote:
> > Xin LI wrote:
> >> Any objections for the attached patch? I'll commit this version if
> >> everybody is happy with it and then see if re@ would approve it for
> >> 8.0-RELEASE.
> > Sorry if I wasn't clear before, but all of the rc.conf variables
> > should be prepended with static_arp_ (as opposed to just arp_). So
> > rather than arp_args you'd want static_arp_args. I realize you're not
> > using set_rcvar() but it's still a good idea to do that for
> > consistency's sake, as well as to make it easier for admins to sort
> > stuff, etc. Please make sure you change that in the man page as well.
For consistency we should leave it as "arp_xxx" like it's currently done for
static_routes/route_xxx and ipv6_static_routes/ipv6_route_xxx ...
If we want to keep consistency then either leave it as
"static_arp_pairs/arp_xxx" or change it to something
> I see. I have corrected arp_ prefixes to static_arp_ prefixes. Note
> that "arp_args" are not changed because they are intermediate variables
> that are intended as "arp(1) arguments". I have marked these as local.
> > Other than that it looks fine to me.
> > Silly question that I'm sorry just occurred to me right now, have you
> > tested this with IPv6? :)
> I think IPv6 would need to use "ndp" instead (cross referenced from
> arp(8)) but am not sure. Because the script rely on space or tab as
> separator I think it would just work after a simple s/arp/ndp/g for ndp
> but I don't have a local production IPv6 network for the test...
> - --
> Xin LI <delphij at delphij.net> http://www.delphij.net/
> FreeBSD - The Power to Serve!
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.12 (FreeBSD)
> -----END PGP SIGNATURE-----
> Index: etc/defaults/rc.conf
> --- etc/defaults/rc.conf (revision 196516)
> +++ etc/defaults/rc.conf (working copy)
> @@ -357,6 +357,7 @@
> ### Network routing options: ###
> defaultrouter="NO" # Set to default gateway (or NO).
> +static_arp_pairs="" # Set to static ARP list (or leave empty).
> static_routes="" # Set to static route list (or leave
> natm_static_routes="" # Set to static route list for NATM (or
> leave empty).
> gateway_enable="NO" # Set to YES if this host will be a
Please add commented line(s) as an example on how to use this, like for
#static_arp_pairs="xxx" # An example to set an ARP static entry
More information about the freebsd-rc