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 A
s 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 127.0.0.1/8 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 192.168.0.130/24 brd 192.168.0.255 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.
- Why is this address chosen as src?
- Why do I have two
scope global
addresses in the first place? - 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 first64
bits.) - 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?)