[wicked-devel] wickedd-dhcp6 DHCP6-PD lease obtained, but default route is not set. where should it be fixed/configured?
I've an external interface, eth0, configured for both IPv4 & IPv6 dhcp service. cat /etc/sysconfig/network/ifcfg-eth0 STARTMODE='auto' BOOTPROTO='dhcp' BROADCAST='' IPADDR='' NETMASK='' NETWORK='' NM_CONTROLLED='no' REMOTE_IPADDR='' IPV6INIT='yes' IPV6_AUTOCONF='no' DHCLIENT6_MODE='managed' DHCLIENT_SET_DEFAULT_ROUTE='yes' cat ifsysctl-eth0 net.ipv6.conf.eth0.disable_ipv6 = 0 net.ipv6.conf.eth0.autoconf = 0 net.ipv6.conf.eth0.forwarding = 1 net.ipv6.conf.eth0.accept_ra = 2 After system boot both IP addresses are up. IPv4 is fully functional. IPv6 is configured on the intfc, but the 'net is not accessible via IPv6 ping6 -c1 google.com Network is not reachable Only one default route is set - IPv4, ip -4 route show | grep default default via 11.22.33.44 dev eth0 ip -6 route show | grep default (empty) A manual route addition ip route add ::/0 via 2602:xx:xx:xx:xx::1 dev eth0 fixes the problem ip -6 route show | grep default default via 2602:xx:xx:xx:xx::1 dev eth0 metric 1024 pref medium ping6 -c1 google.com PING google.com(nuq04s29-in-x0e.1e100.net) 56 data bytes 64 bytes from nuq04s29-in-x0e.1e100.net: icmp_seq=1 ttl=55 time=26.7 ms --- google.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 26.777/26.777/26.777/0.000 ms Where in wicked setup should this default IPv6 route addition be correctly configured? Adding to /etc/init.d/after.local, launched via /etc/systemd/system/after.local is an option. Preferably, it should be config'd in wicked/network-specific config. The route should not be added until after the DHCP6 query is made, the lease is retrieved, and the IP address assigned to the up, eth0 interface. -- To unsubscribe, e-mail: wicked-devel+unsubscribe@opensuse.org To contact the owner, e-mail: wicked-devel+owner@opensuse.org
Am 17.08.2015 um 23:31 schrieb PGNd:
I've an external interface, eth0, configured for both IPv4 & IPv6 dhcp service.
cat /etc/sysconfig/network/ifcfg-eth0 STARTMODE='auto' BOOTPROTO='dhcp' BROADCAST='' IPADDR='' NETMASK='' NETWORK='' NM_CONTROLLED='no' REMOTE_IPADDR='' IPV6INIT='yes' IPV6_AUTOCONF='no' DHCLIENT6_MODE='managed' DHCLIENT_SET_DEFAULT_ROUTE='yes' cat ifsysctl-eth0 net.ipv6.conf.eth0.disable_ipv6 = 0 net.ipv6.conf.eth0.autoconf = 0 net.ipv6.conf.eth0.forwarding = 1 net.ipv6.conf.eth0.accept_ra = 2
After system boot both IP addresses are up.
IPv4 is fully functional.
IPv6 is configured on the intfc, but the 'net is not accessible via IPv6
ping6 -c1 google.com Network is not reachable
Only one default route is set - IPv4,
ip -4 route show | grep default default via 11.22.33.44 dev eth0 ip -6 route show | grep default (empty)
A manual route addition
ip route add ::/0 via 2602:xx:xx:xx:xx::1 dev eth0
fixes the problem
ip -6 route show | grep default default via 2602:xx:xx:xx:xx::1 dev eth0 metric 1024 pref medium ping6 -c1 google.com PING google.com(nuq04s29-in-x0e.1e100.net) 56 data bytes 64 bytes from nuq04s29-in-x0e.1e100.net: icmp_seq=1 ttl=55 time=26.7 ms
--- google.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 26.777/26.777/26.777/0.000 ms
Where in wicked setup should this default IPv6 route addition be correctly configured?
Adding to /etc/init.d/after.local, launched via /etc/systemd/system/after.local is an option. Preferably, it should be config'd in wicked/network-specific config.
The route should not be added until after the DHCP6 query is made, the lease is retrieved, and the IP address assigned to the up, eth0 interface.
No. DHCPv6 has nothing to do with routing, there are no route options defined for DHCPv6 at all. The default route is set to the fe80:: address of the router sending an router advertisement (RA) with AdvDefaultLifetime > 0, not to any global address (what breaks some IPv6 mechanisms). When forwarding is 1, accept_ra = 2 and accept_ra_defrtr = 1 permits to configure a default route. All this happens in the kernel. Verify, that net.ipv6.conf.eth0.accept_ra, ... are properly set. Install radvd, and look with radvdump whether an RA arrives. You can put them also to /etc/sysctl.d/some.conf. Apropos DHCP6-PD: wicked is currently not requesting any prefix, but normal (non-temporary) address leases or info only. PD functionality is unfortunately not complete (apply PD's to the other interfaces or put into some pool) and not yet exposed/not configurable yet. For test purposes: the protocol side is implemented and this patch will cause to send a prefix request: diff --git a/src/dhcp6/device.c b/src/dhcp6/device.c index ad39ea2..1414735 100644 --- a/src/dhcp6/device.c +++ b/src/dhcp6/device.c @@ -1001,6 +1001,7 @@ ni_dhcp6_acquire(ni_dhcp6_device_t *dev, const ni_dhcp6_request_t *req, char **e ni_dhcp6_ia_t *ia = ni_dhcp6_ia_na_new(dev->iaid); ni_dhcp6_ia_set_default_lifetimes(ia, config->lease_time); ni_dhcp6_ia_list_append(&config->ia_list, ia); + ni_dhcp6_ia_list_append(&config->ia_list, ni_dhcp6_ia_pd_new(dev->iaid)); } else { /* TODO: Merge multiple ia's of same type into one? * for tests we take it as is -- at the moment */ Sorry for the late answer. Seems I've overlooked this email. Gruesse / Regards, Marius Tomaschewski <mt@suse.de>, <mt@suse.com> -- SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg), Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: wicked-devel+unsubscribe@opensuse.org To contact the owner, e-mail: wicked-devel+owner@opensuse.org
participants (2)
-
Marius Tomaschewski
-
PGNd