Re: Disable auto_linklocal

2012-01-16 Thread Matt Mullins
On Sun, Jan 15, 2012 at 7:27 AM, Freek Dijkstra pub...@macfreek.nl wrote:
 The link-local addresses don't really harm, but I found them confusing,
 as the host is running as a router, and rtadv announces the link-local
 address by default.

IPv6-standards-wise, this is the correct thing to do.  Router
advertisements should contain link-local source addresses and
advertise the link-local address as the router; the globally-routable
prefix that is being advertised is a completely different field in
those messages.  I'm not too sure of the reasons behind this, other
than eliminating some need for carp(4): you can have multiple routers
on a subnet and if one goes down, clients will just pick up the
other's router advertisements.

It's atypical that one would want to disable link-local addressing,
since it's one of the core differences from IPv4 that adds some
benefit and flexibility.

References:
http://tools.ietf.org/html/rfc4861#section-4.2
  Source Address
 MUST be the link-local address assigned to the
 interface from which this message is sent.
--
Matt Mullins
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disable auto_linklocal

2012-01-16 Thread Freek Dijkstra
Matt Mullins wrote:

 The link-local addresses don't really harm, but I found them confusing,
 as the host is running as a router, and rtadv announces the link-local
 address by default.
 
 IPv6-standards-wise, this is the correct thing to do.  Router
 advertisements should contain link-local source addresses and
 advertise the link-local address as the router; the globally-routable
 prefix that is being advertised is a completely different field in
 those messages.

Hi Matt,

Thanks for the info. I figured out as much. It is not possible to turn
of link-local addresses in FreeBSD 9. Neither
  sysctl net.inet6.ip6.auto_linklocal=0
nor
  ifconfig em0 inet6 -auto_linklocal
has any effect.

The man page for ifconfig explicitly states that removing the link-local
IPv6 address may result in unexpected behaviour


The good news is that it *is* possible to use the global scope IPv6
address in router advertisements. RFC 4861, as you mentioned, defines a
prefix. However, RFC 6275 alters the property of that field if a new
flag, the router address flag, is set. In that case, the prefix field
can contain the actual IPv6 address of the router. Apparently, this is
needed for mobile IP.

Unfortunately rtadvd (the default BSD router advertisement daemon) does
not support this R-flag. The radvd daemon (available in a port) does
support this bit by setting:
  AdvRouterAddr on

Wireshark show that indeed this works. Unfortunately, most of my clients
on the network still don't understand this bit, so it seems that after
all I just have to remember the link-local IP addresses next to the
global scope IP addresses for my network. Oh well, they say it's good to
train one's memory :)

Freek
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Disable auto_linklocal

2012-01-15 Thread Freek Dijkstra
Hello,

I like to disable linklocal IPv6 addresses on my host, running FreeBSD
9.0-RC3.

I already set net.inet6.ip6.auto_linklocal in /etc/sysctl.conf.

# sysctl net.inet6.ip6.auto_linklocal
net.inet6.ip6.auto_linklocal: 0

Even after a reboot, this does not seem to have any effect. Here is the
config on one interface:

% ifconfig em3
em3: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=219bRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,
   TSO4,WOL_MAGIC
ether 00:00:24:ce:69:ef
inet 172.25.129.1 netmask 0xff00 broadcast 172.25.129.255
inet6 fe80::200:24ff:fece:69ef%em3 prefixlen 64 scopeid 0xc
inet6 2001:610::::1 prefixlen 64
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
media: Ethernet autoselect (1000baseT full-duplex)
status: active

Did I overlook something? Is there perhaps a per-interface option I need
to configure in /etc/rc.conf?


The link-local addresses don't really harm, but I found them confusing,
as the host is running as a router, and rtadv announces the link-local
address by default.

Thanks for any help,
Freek
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org