# How to obtain ipv6 via dhcp from my router



## masei (Sep 13, 2012)

Hi,

I have some trouble to get ipv6 running on my notebook.

Setup is:

* Router (AVM Fritzbox) with ipv6 tunnel from Hurrican Electric copnfigured via 6in4
* Obtaining an ipv6 with windows, linux, android works out of the box
* Obtaining an ipv6 on my w520 with PCBSD 9.0 does not work

I have tried dhcp6c but cannot figure out, how to use it.
my /usr/local/etc/dhcp6c.conf looks like this (but also tried wlan0 etc.):


```
interface lagg0 {
    send ia-pd 0;
};

id-assoc pd {
    prefix-interface lagg0 {
        sla-id 1;
    };
};
```

Has anyone an idea what to do here?

Best Regards
Marc


----------



## masei (Sep 13, 2012)

I just have managed it to obtain a static address 
with ifconfig. 
But it would be interessting how to use dhcp anyway...


----------



## SirDice (Sep 14, 2012)

Does your router support DHCPv6? Probably not, you might want to try a stateless configuration by using router advertisements.


```
ifconfig_lagg0_ipv6="inet6 accept_rtadv"
```


----------



## gkontos (Sep 14, 2012)

I think you also need to add this to rc.conf:


```
ipv6_prefer="YES"
```


----------



## masei (Sep 15, 2012)

*solved*

Great - that works.
Great - that works. with those two lines
Thank you very much!


----------

