# ipv6: neighbor advertisement



## nORKy (Feb 8, 2011)

Hi,

does someone known why my FreeBSD doesn't respond to neighbor solicitation ?

I set a rc.conf like this :

```
ipv6_enable="YES"
ipv6_ifconfig_em0="xxx:xxx:xxx::11/64"
ipv6_defaultrouter="xxx:xxx:xxx::"
```

Perhaps I didn't understand something with ipv6.

Thanks you


----------



## SirDice (Feb 8, 2011)

Because you've set a static IPv6 address. Neighbor solicitation only works with stateless IPv6.


----------



## nORKy (Feb 9, 2011)

Hmm. So how does it works? It's like removing arp for ipv4! ipv4 can't work with arp. ipv6 can't work with neighbor discovery. No?


----------



## SirDice (Feb 9, 2011)

Yeah, it's been a while... It's been working fine here for so long I forgot how it all actually works :e

For stateless IPv6 you'll need rtsol(8) and a rtadvd(8), these will use the router-host functions of Neighbor Discovery to figure out who can use what IPv6 address and where to route packets to. Because you are using static addresses and routing you won't see these. That's what I thought you were talking about.

Neighbor discovery contains a lot more functions then just that. So what exactly are you sending and could you post a tcpdump(1) of that?


----------



## nORKy (Feb 9, 2011)

ifconfig :

```
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 00:xx:xx:xx:xx:xx
	inet ...
	inet6 2a01:YYY:YYY::11 prefixlen 64 
	nd6 options=8003<PERFORMNUD,ACCEPT_RTADV,DEFAULTIF>
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
```
I don't understand why I don't have a link-local adresse "fe80: ....%em0"

routes

```
Internet6:
Destination                       Gateway                       Flags      Netif Expire
::/96                             ::1                           UGRS        lo0 =>
default                           2a01:YYY:YYY::                UGS         em0
::1                               ::1                           UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
2a01:YYY:YYY::/64                 link#1                        U           em0
2a01:YYY:YYY::11                  link#1                        UHS         lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#3                        U           lo0
fe80::1%lo0                       link#3                        UHS         lo0
ff01:1::/32                       2a01:YYY:YYY::11              U           em0
ff01:3::/32                       fe80::1%lo0                   U           lo0
ff02::/16                         ::1                           UGRS        lo0
ff02::%em0/32                     2a01:YYY:YYY::11              U           em0
ff02::%lo0/32                     fe80::1%lo0                   U           lo0
```

tcpdump while there is a ping6 to the host from an other "far away"

```
istening on em0, link-type EN10MB (Ethernet), capture size 96 bytes
23:33:14.028157 IP6 fe80::209:e9ff:fed5:f419 > ff02::1:ff00:11: ICMP6, neighbor solicitation, who has 2a01:728:401::11, length 32
23:33:14.657688 IP6 fe80::223:33ff:fea7:e51a.2029 > ff02::66.2029: UDP, length 52
23:33:15.028008 IP6 fe80::209:e9ff:fed5:f419 > ff02::1:ff00:11: ICMP6, neighbor solicitation, who has 2a01:728:401::11, length 32
23:33:15.871965 IP6 fe80::209:e9ff:fed5:f419.2029 > ff02::66.2029: UDP, length 52
```

The host don't response to the neighbor solicitation. I think it's because I don't have a local-link adresse. what do you think ?


----------



## SirDice (Feb 10, 2011)

nORKy said:
			
		

> The host don't response to the neighbor solicitation. I think it's because I don't have a local-link adresse. what do you think ?


I think you are correct.

Do you have *auto_linklocal="NO"* set? Have a look with:
`# sysctl net.inet6.ip6.auto_linklocal`
That should return 1.


----------



## nORKy (Feb 10, 2011)

I set net.inet6.ip6.auto_linklocal to 1, restart network_ipv6 rc script : no change. So I built a link-link adresse myself and it works !

I didn't test 
	
	



```
auto_linklocal="NO"
```
 Which file? rc.conf? I didn't see it in rc.conf(5).


----------



## SirDice (Feb 11, 2011)

nORKy said:
			
		

> I didn't test
> 
> 
> 
> ...



That will turn off the automatic assignment of the link-local addresses. If it's not in rc.conf that's good. Have a look in /etc/defaults/rc.conf, it should be set to YES there. It might have been changed.


----------

