Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Debian Wheezy on a dedicated server which uses IPv4 and IPv6 at the same time.

ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 11:11:11:11:11:11  
          inet adr:  Bcast:  Masque:
          adr inet6: fe80::21c:c0ff:feb9:829c/64 Scope:Lien
          adr inet6: 2001:a100:1:bbbb::1/64 Scope:Global
          RX packets:1544 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2199 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:304146 (297.0 KiB)  TX bytes:1376282 (1.3 MiB)

(Several minutes later, the RX dropped counter increases.)

cat /etc/network/interfaces

I first used the "gateway" keyword, but it didn't work, so I then tried to add the route in the file, but it didn't work either.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

iface eth0 inet6 static
    address 2001:a100:1:bbbb::1
    netmask 64
#   gateway 2001:a100:1:bbff:ff:ff:ff:ff
    up ip -6 route add ::/0 via 2001:a100:1:bbff:ff:ff:ff:ff dev eth0
    down ip -6 route del ::/0 via 2001:a100:1:bbff:ff:ff:ff:ff dev eth0

ip -6 route show

These are the routes shown several minutes after rebooting the server.

2001:a100:1:bbbb::/64 dev eth0  proto kernel  metric 256 
2001:a100:1:bb00::/56 dev eth0  proto kernel  metric 256  expires 2591959sec
fe80::/64 dev eth0  proto kernel  metric 256 
default via fe80::224:c3ff:fe84:400 dev eth0  proto ra  metric 1024  expires 1759sec
default via fe80::224:c3ff:fe84:800 dev eth0  proto ra  metric 1024  expires 1759sec


  1. Why isn't my default route taken into account (no matter using keyword gateway or ip -6 route add in the /etc/network/interfaces, during boot time? Note that if I add the route manually, it works perfectly and I can TX and RX to and from the Internet using IPv6. (The problem is to make it automatic.)

  2. What are those strange kernel routes, that will expire? Do I need them? My server is connected directly to the same network as a rooter (2001:a100:1:bbff:ff:ff:ff:ff), which is itself connected directly to the internet.


ifdown --force eth0; ifup --verbose eth0;

Configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
ip addr add broadcast       dev eth0 label eth0
ip link set dev eth0   up
 ip route add default via  dev eth0 
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/bind9
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/openvpn
run-parts: executing /etc/network/if-up.d/postfix
run-parts: executing /etc/network/if-up.d/upstart
Configuring interface eth0=eth0 (inet6)
run-parts --verbose /etc/network/if-pre-up.d
modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.

sysctl -q -e -w net.ipv6.conf.eth0.autoconf=0
ip link set dev eth0   up
ip -6 addr add 2001:a100:1:bbbb::1/64  dev eth0 
 ip -6 route add default via 2001:a100:1:bbff:ff:ff:ff:ff dev eth0 
RTNETLINK answers: File exists
Failed to bring up eth0.
share|improve this question
I am confused 2001:a100:1:bbff:ff:ff:ff:ff is not on the same network as 2001:41D0:2:4F51::1. Those are different networks. Can you ping 2001:a100:1:bbff:ff:ff:ff:ff without the gateway set? –  Zoredache Jul 24 '13 at 20:17
Sorry, I made a mistake. I just updated. Yes, I can ping it when the route is not set. –  Fox Jul 24 '13 at 20:30
IPv4 address and gateway are on different networks, as are 2001:41D0:2:4F51::1/64 and 2001:a100:1:bbff:ff:ff:ff:ff. The default routes you see (the fe80: addresses) are learned from Router Advertisements (proto ra). Your configuration makes no sense, so it is no surprise that it doesn't work... –  Sander Steffann Jul 24 '13 at 20:30
Don't configure a /56 on an interface, always use a /64 –  Sander Steffann Jul 25 '13 at 18:21
I've checked my config, and I am pretty sure you are getting 2001:a100:1:bb00::/56 gateway address from your router as part of the IPv6 auto-configuration handshake. I notice you disabled net.ipv6.conf.eth1.autoconf, but you also need to disable net.ipv6.conf.eth1.accept_ra, if you want to completely turn-off IPv6 auto-configuration. (ref: superuser.com/questions/33196/…) –  Chainik Sep 19 '13 at 17:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.