You are not logged in.

#1 2015-04-10 14:03:30

tuxfusion
Member
Registered: 2007-12-31
Posts: 98

Systemd-networkd not setting ipv6 route

Hi all,

I have to use ipv6 and ipv4 as I'm behind a DSLITE system from my cable provider.
I wanted to use static setup as I have strange behaviour where I could often only ping ipv6 or ipv4.


/etc/systemd/network/wired.network

[Match]
Name=eth0

[Network]
Address=192.168.0.2/24
Gateway=192.168.0.1
DNS=192.168.0.1

[Network]
Address=2a02:8071:480:500:ca60:ff:fec2:bc95/128
Gateway=2a02:8071:480:500:5a23:8cff:fe1f:f1a2
DNS=2a02:8071:480:500:5a23:8cff:fe1f:f1a2

This works pretty fine except something was wrong with the ipv6 route. First the values :

networkctl status eth0

● 2: eth0
   Link File: n/a
Network File: /etc/systemd/network/wired.network
        Type: ether
       State: routable (configured)
      Vendor: Intel Corporation
       Model: 82579V Gigabit Network Connection (P8P67 Deluxe Motherboard)
  HW Address: XX:XX:XX:XX:XX:XX
         MTU: 1500
     Gateway: 192.168.0.1 (Technicolor CH USA)
              2a02:8071:480:500:5a23:8cff:fe1f:f1a2 (Technicolor CH USA)
              fe80::5a23:8cff:fe1f:f1a2 (Technicolor CH USA)
     Address: 192.168.0.2
              2a02:8071:480:500:ca60:ff:fec2:bc95
              fe80::ca60:ff:fec2:bc95
         DNS: 192.168.0.1
              2a02:8071:480:500:5a23:8cff:fe1f:f1a2
/etc/resolv.conf 

nameserver 192.168.0.1
nameserver 2a02:8071:480:500:5a23:8cff:fe1f:f1a2
ip addr show eth0

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2a02:8071:480:500:ca60:ff:fec2:bc95/0 scope global 
       valid_lft 1209563sec preferred_lft 604763sec
    inet6 fe80::ca60:ff:fec2:bc95/64 scope link 
       valid_lft forever preferred_lft forever

ipv4 ping is okay but ipv6 not :

ping6 golem.de
PING golem.de(golem.de) 56 data bytes
From hal8000 icmp_seq=1 Destination unreachable: Address unreachable
From hal8000 icmp_seq=2 Destination unreachable: Address unreachable
ip -4 route
default via 192.168.0.1 dev eth0  proto static 
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.2 

I don't have "ip -6 route" before my change. however I manually added the one I thougt is needed, via this manual


sudo ip -6 route add 2a02::/3 via 2a02:8071:480:500::bc95

which leads to:

ip -6 route

2a02:8071:480:500::/64 dev eth0  proto kernel  metric 256  expires 1209586sec
2000::/3 via 2a02:8071:480:500::bc95 dev eth0  metric 1024 
fe80::/64 dev eth0  proto kernel  metric 256 
default dev eth0  proto kernel  metric 256 
default via 2a02:8071:480:500:5a23:8cff:fe1f:f1a2 dev eth0  proto static  metric 1024 
default via fe80::5a23:8cff:fe1f:f1a2 dev eth0  proto ra  metric 1024  expires 1786sec hoplimit 64

and a the working ping6 :

ping6 golem.de
PING golem.de(golem.de) 56 data bytes
64 bytes from golem.de: icmp_seq=1 ttl=54 time=39.9 ms
64 bytes from golem.de: icmp_seq=2 ttl=54 time=47.2 ms
64 bytes from golem.de: icmp_seq=3 ttl=54 time=37.6 ms

Is this a bug or are we supposed to add that ipv6 route manually ? That route is defined implicitly by /etc/systemd/network/wired.network, no ?

Offline

#2 2015-04-10 14:10:36

tuxfusion
Member
Registered: 2007-12-31
Posts: 98

Re: Systemd-networkd not setting ipv6 route

I just rebooted, the manual route is gone of course:

ip -6 route

2a02:8071:480:500:ca60:ff:fec2:bc95 dev eth0  proto kernel  metric 256 
2a02:8071:480:500::/64 dev eth0  proto kernel  metric 256  expires 1209579sec
fe80::/64 dev eth0  proto kernel  metric 256 
default via fe80::5a23:8cff:fe1f:f1a2 dev eth0  proto ra  metric 1024  expires 1779sec hoplimit 64

But now both ipv4 and ipv6 still work ...  strange

Last edited by tuxfusion (2015-04-10 14:11:21)

Offline

Board footer

Powered by FluxBB