1

I am trying to setup some IPV6 address on a FreeBSD 11 server, I was told to use as a gateway this IP:

2001:4ba0:fffd:1:beef::1 /128

My addresses are:

2001:4ba0:fffd:0063::0 /64

I tried this:

ipv6_activate_all_interfaces="YES"
ipv6_defaultrouter="2001:4ba0:fffd:1:beef::1"
ifconfig_bge0_ipv6="inet6 2001:4ba0:fffd:0063::1 prefixlen 64"

But I get this message:

route: writing to routing socket: Network is unreachable
add net default: gateway 2001:4ba0:fffd:1:beef::1 fib 0: Network is unreachable

By doing an npd -a I got this:

> ndp -a
Neighbor                             Linklayer Address  Netif Expire    S Flags
2001:4ba0:fffd:63::1                 2c:44:fd:9a:3f:90   bge0 permanent R
fe80::1%bge0                         28:92:4a:cd:08:18   bge0 22h8m42s  S R
fe80::2a92:4aff:fecd:818%bge0        28:92:4a:cd:08:18   bge0 23h27m31s S R
fe80::2e44:fdff:fe9a:3f90%bge0       2c:44:fd:9a:3f:90   bge0 permanent R

Then I give a try to use as a default router fe80::1.:

ipv6_activate_all_interfaces="YES"
ipv6_defaultrouter="fe80::1%bge0"
ifconfig_bge0_ipv6="inet6 2001:4ba0:fffd:0063::1 prefixlen 64"

When using the link-local fe80::1 address as the gateway, IPV6 works.

I would like to know what are the advantages/disadvantagtes of using the link-local address as the gateway and also how to use the provied gateway or using either is the same ?

1 Answer 1

3

The IPv6 gateway address your got (2001:4ba0:fffd:1:beef::1) is not inside the subnet you got (2001:4ba0:fffd:0063::/64) so your box is right to complain that that network is unreachable.

Using the link-local address as default gateway is usually a good solution, as long as the link-local address of the gateway doesn't change. The address fe80::1 looks like a manually configured address which would indicate that it is provided intentionally and therefore probably stable.

It doesn't really matter what address you use for a gateway. The only thing that the address is used for is to determine the layer-2 (MAC) address of the gateway so that packets can be sent there. Whether the MAC address is found by looking up a global address or by using a link-local address doesn't make any difference for the actual packets being routed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .