# ipv6 block



## dolphinaura (Feb 19, 2012)

I recently got a /64 block from my datacenter, so I decided to try it out.

I run VMWare ESXi on the server, with a FreeBSD gateway, and several VMWare clients.

I*'*ve managed to get the ipv6 working on the gateway, but the clients return "Destination Unreachable, Address Unreachable". I cannot ping my gateway.

This is my current config:
em0 is connected to the internet, em1 is connected to the LAN.

/etc/rc.conf:

```
ipv6_enable="TRUE"
ifconfig_em0="2604:xxxx:a:24::2"
ifconfig_em1="2604:xxxx:a:24::3"
ipv6_gateway_enable="YES"
rdadvd_enable="YES"
rtadvd_interfaces="em1"
```

/etc/rtadvd.conf:

```
em1:\
:addr="2604:xxxx:a:24::":prefixlen#64:rltime#0:
```


----------



## OH (Feb 19, 2012)

dolphinaura said:
			
		

> /etc/rc.conf:
> 
> ```
> (...)
> ...



You're setting IPv4 here, not IPv6. Also in the future specify the version of FreeBSD you're using when asking questions.


----------



## dolphinaura (Feb 19, 2012)

OH said:
			
		

> You're setting IPv4 here, not IPv6. Also in the future specify the version of FreeBSD you're using when asking questions.



That*'*s a typo, should be

```
ipv6_ifconfig_eth0="2604:xxxx:a:24::3"
ipv6_ifconfig_eth1="2604:xxxx:a:24::2"
```

*I'm* currently running freebsd FreeBSD 9.


----------



## OH (Feb 19, 2012)

In that case, you're using the 8.x style of setting an IPv6 address. Granted, the switch seems poorly documented, but examples are present in /etc/defaults/rc.conf

Try it like this:

```
ifconfig_eth0_ipv6="2604:xxxx:a:24::3"
ifconfig_eth1_ipv6="2604:xxxx:a:24::2"
```


----------



## dolphinaura (Feb 20, 2012)

OH said:
			
		

> In that case, you're using the 8.x style of setting an IPv6 address. Granted, the switch seems poorly documented, but examples are present in /etc/defaults/rc.conf
> 
> Try it like this:
> 
> ...



Alright.

*I've* fixed that. *It's* still having the same problem.


----------



## SirDice (Feb 20, 2012)

You don't have a default route for IPv6:


```
ipv6_defaultrouter="2604:xxx:xxx::1"
```

You also have a typo:

```
rdadvd_enable="YES"
```
Which should be:

```
rtadvd_enable="YES"
```


----------



## razrx (Feb 23, 2012)

OH said:
			
		

> Try it like this:
> 
> ```
> ifconfig_eth0_ipv6="2604:xxxx:a:24::3"
> ...



That should also read:

```
ifconfig_eth0_ipv6="[B]inet6[/B] 2604:xxxx:a:24::3 prefixlen 64"
```


----------



## dolphinaura (Feb 26, 2012)

The changes have been made, and there is still no ipv6 access from clients on the LAN.

/etc/rc.conf


```
#Enable ipv6 gateway
ipv6_gateway_enable="YES"

#rtadvd
rtadvd_enable="YES"
rtadvd_interfaces="em1"


#IPV6 networking
ipv6_enable="YES"

ipv6_defaultrouter="2604:4300:b:9::1"

#ipv6 facing internet
ifconfig_em2_ipv6="inet6 2604:4300:b:9::2"

#ipv6 facing LAN
ifconfig_em1_ipv6="inet6 2604:4300:b:9::3"
```

/etc/rtadvd.conf


```
em1:\
:addr="2604:4300:b:9::":prefixlen#64:rltime#0:
```


----------



## SirDice (Feb 26, 2012)

dolphinaura said:
			
		

> ```
> #ipv6 facing internet
> ifconfig_em2_ipv6="inet6 2604:4300:b:9::2"
> 
> ...


Both em0 and em1 are in the same subnet.


----------



## dolphinaura (Feb 27, 2012)

SirDice said:
			
		

> Both em0 and em1 are in the same subnet.



I*'*m a bit confused now. I*'*m attempting to assign the ipv6 block to the LAN so that the clients on the LAN can have ipv6 access, and users outside can access the clients via the ipv6 address. The em0 is public, and the em1 is the LAN.

If I assign an ipv6 to em1, it won't work because em1 isn't connected to the internet. If I assign an ipv6 to em0, it won't work because it isn't connected to the LAN.


----------



## OH (Feb 28, 2012)

Looks to me that you can't route anything in this setup. The ISP does the routing for you on 2604:4300:b:9::1 for your entire /64.

Routing into smaller blocks is, iirc, technically complicated.


----------



## dolphinaura (Feb 28, 2012)

OH said:
			
		

> Looks to me that you can't route anything in this setup. The ISP does the routing for you on 2604:4300:b:9::1 for your entire /64.
> 
> Routing into smaller blocks is, iirc, technically complicated.



ah. Now I know why I'm having difficulty getting this working.
I guess I'll just continue with the ipv6 -> nginx -> LAN setup that I have.


----------



## dolphinaura (Feb 28, 2012)

I'm a bit curious though - If I bind ipv6s to the gateway (FreeBSD), is it possible to route a private ipv6 subnet (i.e. 2001:db8::/64) through the gateway server to gain ipv6 support, and how would I do this?


----------



## SirDice (Feb 28, 2012)

Routing works just like it does with IPv4. Just create a different subnet on each interface.

NB. There's no such thing as a 'private' IPv6 subnet. All addresses that start with 2000::/3 are global.


----------

