# FreeBSD 10 and IPv6 - something new?



## Lewyx (Jan 8, 2016)

Hi 
I tried to set up IPv6 on my fbsd FreeBSD, and:

```
ifconfig gif0 create
ifconfig gif0 tunnel XXX.XXX.XX.XX 62.205.132.12
ifconfig gif0 inet6 2a01:d0:ffff:XXX::2 2a01:d0:ffff:XXX::1 prefixlen 128
route -n add -inet6 default 2a01:d0:ffff:XXX::1
ifconfig gif0 up
ifconfig gif0 inet6 2a01:d0:8XXX:: prefixlen 48
ifconfig gif0 inet6 2a01:d0:8XXX::1 prefixlen 128
```

rc.conf

```
ipv6_enable="YES"
ipv6_activate_all_interfaces="YES"
```

but IPv6 is not working. On fbsd FreeBSD 8.2 I had no problems.


----------



## SirDice (Jan 8, 2016)

Does it work after you entered those commands? Is this for a particular IPv6 tunnelbroker? Which one?


----------



## Lewyx (Jan 8, 2016)

I tried tunnelbroker.net and NetAssist. I tryed to disable my firewall ( packet filter ) but still not working.


----------



## kpa (Jan 8, 2016)

Leave the last two commands out and test for connectivity then by pinging the remote IPv6 endpoint. Double check that the gif0 interface has no IFDISABLED option set.


----------



## Lewyx (Jan 8, 2016)

```
gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
  options=80000<LINKSTATE>
  tunnel inet XXX.XXX.XX.XX --> 62.205.132.12
  inet6 2a01:d0:ffff:XXX::2 --> 2a01:d0:ffff:XXX::1 prefixlen 128
  inet6 fe80::fad1:11ff:fe3f:f581%gif0 prefixlen 64 scopeid 0x8
  inet6 2a01:d0:XXXX:: prefixlen 48
  inet6 2a01:d0:XXXX::1 prefixlen 128
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```
`ping6  2a01:d0:ffff:XXX::1`

```
PING6(56=40+8+8 bytes) 2a01:d0:ffff:XXX::2 --> 2a01:d0:ffff:XXX::1
^C
--- 2a01:d0:ffff:XXX::1 ping6 statistics ---
13 packets transmitted, 0 packets received, 100.0% packet loss
```
`ping 62.205.132.12`

```
PING 62.205.132.12 (62.205.132.12): 56 data bytes
64 bytes from 62.205.132.12: icmp_seq=0 ttl=58 time=23.209 ms
64 bytes from 62.205.132.12: icmp_seq=1 ttl=58 time=23.061 ms
```
`tcpdump -n -e -ttt -i gif0`

```
00:01:10.307088 AF IPv6 (28), length 60: 2a01:d0:ffff:XXX::2 > 2a01:d0:ffff:XXX::1: ICMP6, echo request, seq 0, length 16
00:00:01.002433 AF IPv6 (28), length 60: 2a01:d0:ffff:XXX::2 > 2a01:d0:ffff:XXX::1: ICMP6, echo request, seq 1, length 16
00:00:01.018572 AF IPv6 (28), length 60: 2a01:d0:ffff:XXX::2 > 2a01:d0:ffff:XXX::1: ICMP6, echo request, seq 2, length 16
00:00:01.016984 AF IPv6 (28), length 60: 2a01:d0:ffff:XXX::2 > 2a01:d0:ffff:XXX::1: ICMP6, echo request, seq 3, length 16
00:00:01.009593 AF IPv6 (28), length 60: 2a01:d0:ffff:XXX::2 > 2a01:d0:ffff:XXX::1: ICMP6, echo request, seq 4, length 16
00:00:01.009232 AF IPv6 (28), length 60: 2a01:d0:ffff:XXX::2 > 2a01:d0:ffff:XXX::1: ICMP6, echo request, seq 5, length 16
```


----------



## SirDice (Jan 11, 2016)

You've set the default gateway to yourself, so nothing is ever routed out. Also, don't forget:

```
ipv6_gateway_enable="YES"
```
To enable IPv6 routing. 

As for the default gateway, try this:

```
ipv6_defaultrouter="-iface gif0"
```


----------



## Lewyx (Jan 11, 2016)

Ok, but 2a01:d0:ffff:XXX::1 is tunnelbroker gateway.


----------



## Lewyx (Jan 12, 2016)

After add this, I must reboot server?


```
ipv6_defaultrouter="-iface gif0"
```


----------



## tobik@ (Jan 12, 2016)

`service netif restart gif0` should work, but if in doubt reboot.


----------



## Lewyx (Jan 12, 2016)

Nope...

`cat /etc/rc.conf|grep ipv6`

```
ipv6_activate_all_interfaces="YES"
ipv6_gateway_enable="YES"
ipv6_defaultrouter="-iface gif0"
ipv6_gateway_enable="YES"
```


```
PING6(56=40+8+8 bytes) 2a01:d0:ffff:XXX::2 --> 2a01:d0:ffff:XXX::1
^C
--- 2a01:d0:ffff:XXX::1 ping6 statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
```


----------

