• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

Static IPv6 on Ubuntu Server 10.10

Started by phipac, March 14, 2011, 11:59:47 AM

Previous topic - Next topic

phipac

Thank you for reading.  I recently switched all of my server functions from Windows to Linux on Ubuntu Server 10.10.  This Ubuntu server is NOT my IPv6 tunnel server - that is being handled by a router.  IPv6 works fine on this Ubuntu if I let it discover the IPv6 address from the router.  However, I need to set a static IPv6 address for this server.  I know how to turn off the router discovery, and I know how to add the IPv6 address to /etc/networking/interfaces, but what do I set for the gateway address?  I've tried setting it to the IPv6 address of the router and my tunnel IPv6 address, and I get no routing via IPv6.  Either I am misunderstanding what needs to be set for the IPv6 gateway, or I need to set up some routing and I haven't done it yet.  I appreciate any assistance!

Phil

cholzhauer

Your default route on your Ubuntu Server needs to be the inside interface of your IPv6 router.

To prove this, leave your Ubuntu server set to dynamic.  Once, you have an address, look at your routing table.  Look at your default route...whatever IP address that points to should be the one you use for your static IP, which should be the fe80 address of the Inside interface of your router

johnpoz

If you don't want to use the link local address on the inside of your router, use the IP from your router network you put on that interface - did you do that?

So my tunnel endpoint is my pfsense box.

I put the ::1 address of my routed network on the lan inteface of the pfsense box, now you can point to that address as your gateway.

route -A inet6

::/0                           2001:470:snippedroutednetwork:b85::1       UG   1   0   355 eth0

phipac

Quote from: cholzhauer on March 14, 2011, 12:03:27 PM
Your default route on your Ubuntu Server needs to be the inside interface of your IPv6 router.

To prove this, leave your Ubuntu server set to dynamic.  Once, you have an address, look at your routing table.  Look at your default route...whatever IP address that points to should be the one you use for your static IP, which should be the fe80 address of the Inside interface of your router

That didn't seem to work.  Here's what I got from the route:

2001:470:aaaa:aaaa::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
default via fe80::21a:92ff:fe83:66f2 dev eth0  proto kernel  metric 1024  expires 0sec mtu 1500 advmss 1440 hoplimit 4294967295

.. and so I added the following to /etc/network/interfaces

# IPv6 Configuration
iface eth0 inet6 static
        pre-up modprobe ipv6
        address 2001:470:aaaa:bbbb::5
        netmask 64
        gateway fe80::21a:92ff:fe83:66f2

And I get address unreachable/no route to host errors.

phipac

Quote from: johnpoz on March 14, 2011, 01:06:38 PM
If you don't want to use the link local address on the inside of your router, use the IP from your router network you put on that interface - did you do that?

So my tunnel endpoint is my pfsense box.

I put the ::1 address of my routed network on the lan inteface of the pfsense box, now you can point to that address as your gateway.

route -A inet6

::/0                           2001:470:snippedroutednetwork:b85::1       UG   1   0   355 eth0


I tried that too.  If I have assigned 2001:470:aaaa:bbbb::1 to the tunnel router, then I tried

# IPv6 Configuration
iface eth0 inet6 static
        pre-up modprobe ipv6
        address 2001:470:aaaa:bbbb::5
        netmask 64
        gateway 2001:470:aaaa:bbbb::1

Same negative results.

cholzhauer

It looks like you're using different networks

You have 2001:470:aaaa:aaaa::/64 on eth0 on your router, but you're using 2001:470:aaaa:bbbb::5 on your host.