01.02.2020 21:26, Andrei Borzenkov пишет:
IPv6 does not use address prefix to decide whether address is on link or
not. IPv6 host only considers prefixes marked with on-link flag. Which
means it is entirely valid to have *no* IPv6 address that belongs to
"local network" and still send packets directly if destination prefix is
marked as on-link.
...
My understanding is that Linux translates on-link prefixes into "network
route" on corresponding device. Like
Note that interface address prefix is actually redundant (at least on
Linux) with IPv4 as well.
ha1:~ # ip -4 a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
inet 10.0.2.21/24 scope global enp0s3
valid_lft forever preferred_lft forever
3: enp0s4: mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
inet 192.168.1.1/32 scope global noprefixroute enp0s4
valid_lft forever preferred_lft forever
ha1:~ # ip -4 r
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.21
192.168.1.0/24 dev enp0s4 proto static scope link src 192.168.1.1
ha1:~ # ping 10.0.2.2
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=255 time=0.723 ms
^C
--- 10.0.2.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.723/0.723/0.723/0.000 ms
ha1:~ # ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1.07 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.877 ms
^C
--- 192.168.1.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.877/0.975/1.074/0.098 ms
ha1:~ #
It is entirely valid to have 32 address prefix on broadcast interface
and still be able to directly communicate with another systems on this
broadcast medium on this without going via router. Because at the end it
is routing table that decides.
--
To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse+owner@opensuse.org