# Preventing IPv6 link-local address assignment?



## Terry_Kennedy (Oct 15, 2010)

I am using a pair of igb ports to implement LACP using the lagg device. I'm also using IPv6. For some reason these ports are still getting a link-local address assigned. This confuses some application software which iterates through the network devices, sees that they have an IPv6 address assigned, and then tries to access those devices. That won't work, as the lagg device gets exclusive access to the igb devices, so any attempt to access them returns EBUSY.

I added:

```
ipv6_network_interfaces="lo0 lagg0"
```
to /etc/rc.conf, but that didn't change anything.

Here's the relevant parts of /etc/rc.conf (addresses censored):

```
ifconfig_igb0="up media 1000BaseT mediaopt full-duplex mtu 9000"
ifconfig_igb1="up media 1000BaseT mediaopt full-duplex mtu 9000"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto lacp laggport igb0 laggport igb1 xxx.xxx.xxx.104 netmask 255.255.255.0"
ipv6_enable="YES"
ipv6_network_interfaces="lo0 lagg0"
ipv6_ifconfig_lagg0="2xxx:xxx:1:2::104"
ipv6_defaultrouter="2xxx:xxx:1:2::1"
```

Here's the output from `# ifconfig`:

```
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4>
        ether xx:xx:xx:02:24:bc
        inet6 fe80::225:90ff:fe02:24bc%igb0 prefixlen 64 scopeid 0x1 
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet 1000baseT <full-duplex>
        status: active
igb1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4>
        ether xx:xx:xx:02:24:bc
        inet6 fe80::225:90ff:fe02:24bd%igb1 prefixlen 64 scopeid 0x2 
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet 1000baseT <full-duplex>
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet 127.0.0.1 netmask 0xff000000 
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4>
        ether xx:xx:xx:02:24:bc
        inet xxx.xxx.xxx.104 netmask 0xffffff00 broadcast xxx.xxx.xxx.255
        inet6 fe80::225:90ff:fe02:24bc%lagg0 prefixlen 64 scopeid 0x4 
        inet6 2xxx:xxx:1:2::104 prefixlen 64 
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet autoselect
        status: active
        laggproto lacp
        laggport: igb1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
        laggport: igb0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
```

Also, note that igb1 gets the wrong link-local address, since the lagg driver sets both igb0 and igb1 to the same MAC address, while the igb1 link-local address was based on the hardware MAC address of that port.


----------



## SirDice (Oct 15, 2010)

This should turn it off:
`# sysctl net.inet6.ip6.auto_linklocal=0`

Add this to /etc/rc.conf:

```
auto_linklocal="NO"
```


----------



## Terry_Kennedy (Oct 15, 2010)

SirDice said:
			
		

> This should turn it off:
> `# sysctl net.inet6.ip6.auto_linklocal=0`


That fixed it. I put it in /boot/loader.conf.

It globally disabled all IPv6 link-local addresses. But since I have an actual IPv6 allocation and I'm not using rtadvd, I don't need them on my lo0 and lagg0 interfaces, right? IPv6 seems to be working fine without them.


----------

