# IPv6 configuration with prefixlen != 64



## cmeerw (Jul 20, 2010)

Is there a way to configure the prefixlen for an IPv6 address (in /etc/rc.conf)?

Currently, I have set ipv6_enable, ipv6_ifconfig_re0 and ipv6_defaultrouter in /etc/rc.conf which appears to work to some extent except that the prefixlen appears to be set (hardcoded?) to 64, but I would like the prefixlen to be 80. Is there a way to configure the prefixlen (and what would be the best way)?


----------



## vivek (Jul 20, 2010)

Try in rc.conf

```
ipv6_ifconfig_em0="2001:470:1e04:5ea::10 prefix 80"
```
Or at shell:

```
ifconfig em0 inet6 001:470:1e04:5ea::10 prefixlen 80
```
Replace em0 and ips with your actual setup. 
Ref:

http://www.kame.net/~suz/freebsd-ipv6-config-guide.txt
http://www.cyberciti.biz/faq/freebsd-configure-ipv6-networking-static-ip-address/
ifconfig()


----------

