I have a setup with Computer A being directly tied to the router via a LAN cable and Computer B being connected via wifi.

This is the output of Computer As ip addr command:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 70:85:c2:cc:c2:4d brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic noprefixroute enp8s0
       valid_lft 568337sec preferred_lft 568337sec
    inet6 2a02:8109:9cc0:3090:a99a:ec1e:b598:facd/128 scope global dynamic noprefixroute 
       valid_lft 568305sec preferred_lft 568305sec
    inet6 2a02:8109:9cc0:3090:7b53:da6c:4e19:580c/64 scope global dynamic noprefixroute 
       valid_lft 86399sec preferred_lft 43199sec
    inet6 fe80::3c15:8b76:5ba7:4f87/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Using the ip route get command it seems to me that all packages I send from the computer have src set to 2a02:8109:9cc0:3090:a99a:ec1e:b598:facd (the /128 address). I have multiple questions to understand this output.

  1. Why is this address chosen as src?
  2. Why do I have two scope global addresses in the first place?
  3. Why does one of the IPv6 addresses say the network part is /128 (allthough the network part is /64, the router clearly only fixes the first 64 bits.)
  4. Finally, why can't I connect to the last scope local address from Computer B, even though they are on the same network? (Would it work if both where connected to the same switch via LAN or both would be connected via wifi?)

1 Answer 1

  1. See e.g. the address selection description on Wikipedia:

The preference selection algorithm published in RFC 6724 selects the most appropriate address to use in communications with a particular destination. [...] The default configuration places preference on IPv6 usage, and selects destination addresses within the smallest possible scope, so that link-local communication is preferred over globally routed paths when otherwise equally suitable.

As /128 is a smaller scope than /64, for any external IPv6 address, always your /128 will be chosen.

  1. Something is misconfigured on your system. Only you can find out.

  2. Because the interface got an /128 address either through SLAAC or DHCPv6. If you debug (2), you'll also see who assigns this address.

  3. You will need a link-local destination address on this link (and probably the only choice is the one on your router).

  • Thank you. Do you have any tips on how I could start to debug 2./3.? How do I find out who is assigning these routes? I'm running Manjaro Linux.
    – Lochend
    Oct 5, 2021 at 21:53
  • (1) Bring down link, verify addresses are gone (or delete manually), start Wireshark on link, bring up link again, watch IPv6 address negotiation. Could be a misconfiguration of the router, of the computer, or both. (2) I am not familiar with Manjaro Linux, so first think I'd do is google how Manjaro does network settings (network manager? Something else?) (3) Look at settings in your router. (4) Look at what info the router gets from your ISP.
    – dirkt
    Oct 6, 2021 at 4:53
  • I did what you suggested. The router advertises the correct prefix and tells me to use "Managed Address Configuration" via its flag. Afterwards an address is assigned via DHCP. This is the address that then (for some reason) has the /128 netmask in my address table. I do not know why it is configured as /128 or where the other /64 is coming from. Manjaro uses NetworkManager.
    – Lochend
    Oct 6, 2021 at 15:07
  • I need to see the Wireshark log for this, potentially with other logs on your machine. Sorry, remote debugging on a Q&A site is hard, it's not something that works well.
    – dirkt
    Oct 6, 2021 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.