0

I have a vserver with 16.04. with two 64 IPv6 subnets assigned.

I'm trying to get a random IPv6 address with SLAAC for communication with external servers.

This is my /etc/network/interfaces

auto ens3
iface ens3 inet dhcp
iface ens3 inet6 auto

However I do not get a IPv6 address. This is the ouput of ip a ip -6 a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1
   inet6 ::1/128 scope host valid_lft forever preferred_lft forever

2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
   inet6 fe80::5054:a1ff:fe87:f16f/64 scope link valid_lft forever preferred_lft forever

I can add IPv6 addresses manually though with

sudo ip -6 addr add [NEW_ADDRESS]/64 dev ens3

Which gives me the following output of ip -6 a and a working IPv6 address

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1
   inet6 ::1/128 scope host valid_lft forever preferred_lft forever

2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
   inet6 [NEW_ADDRESS]/64 scope global valid_lft forever preferred_lft forever
   inet6 fe80::5054:a1ff:fe87:f16f/64 scope link valid_lft forever preferred_lft forever

This is the output of sudo sysctl -a | grep net.ipv6.conf | grep -i ens3:

net.ipv6.conf.ens3.accept_dad = 1
net.ipv6.conf.ens3.accept_ra = 2
net.ipv6.conf.ens3.accept_ra_defrtr = 1
net.ipv6.conf.ens3.accept_ra_from_local = 0
net.ipv6.conf.ens3.accept_ra_min_hop_limit = 1
net.ipv6.conf.ens3.accept_ra_mtu = 1
net.ipv6.conf.ens3.accept_ra_pinfo = 1
net.ipv6.conf.ens3.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.ens3.accept_ra_rtr_pref = 1
net.ipv6.conf.ens3.accept_redirects = 1
net.ipv6.conf.ens3.accept_source_route = 0
net.ipv6.conf.ens3.autoconf = 1
net.ipv6.conf.ens3.dad_transmits = 1
net.ipv6.conf.ens3.disable_ipv6 = 0
net.ipv6.conf.ens3.force_mld_version = 0
net.ipv6.conf.ens3.force_tllao = 0
net.ipv6.conf.ens3.forwarding = 0
net.ipv6.conf.ens3.hop_limit = 64
net.ipv6.conf.ens3.ignore_routes_with_linkdown = 0
net.ipv6.conf.ens3.max_addresses = 16
net.ipv6.conf.ens3.max_desync_factor = 600
net.ipv6.conf.ens3.mc_forwarding = 0
net.ipv6.conf.ens3.mldv1_unsolicited_report_interval = 10000
net.ipv6.conf.ens3.mldv2_unsolicited_report_interval = 1000
net.ipv6.conf.ens3.mtu = 1500
net.ipv6.conf.ens3.ndisc_notify = 0
net.ipv6.conf.ens3.proxy_ndp = 0
net.ipv6.conf.ens3.regen_max_retry = 3
net.ipv6.conf.ens3.router_probe_interval = 60
net.ipv6.conf.ens3.router_solicitation_delay = 1
net.ipv6.conf.ens3.router_solicitation_interval = 4
net.ipv6.conf.ens3.router_solicitations = 3
net.ipv6.conf.ens3.suppress_frag_ndisc = 1
net.ipv6.conf.ens3.temp_prefered_lft = 86400
net.ipv6.conf.ens3.temp_valid_lft = 604800
net.ipv6.conf.ens3.use_oif_addrs_only = 0
net.ipv6.conf.ens3.use_tempaddr = 0
8
  • SLAAC works because the router (usually the default gateway) send out Router Advertisements (RAs) with the Autoconf flag set on a routed /64 prefix. Are you sure that the router is doing that? Oct 4, 2016 at 10:32
  • How can I check for RAs? Is there another method to generate a random IPv6 without SLAAC?
    – Khmtrav
    Oct 4, 2016 at 11:10
  • You can check with tools like wireshark and tcpdump. You could write your own scripts to generate random addresses, but nothing as easy as SLAAC... Oct 4, 2016 at 12:18
  • There are router advertisements (sorry for bad formatting): 00:01:00.262677 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) fe80::1 > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 24 hop limit 64, Flags [none], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s source link-address option (1), length 8 (1): 00:00:5e:00:02:02 0x0000: 0000 5e00 0202
    – Khmtrav
    Oct 4, 2016 at 13:28
  • 3
    The router needs to be fixed. Contact your provider. Oct 4, 2016 at 21:42

0

You must log in to answer this question.

Browse other questions tagged .