All of lore.kernel.org
 help / color / mirror / Atom feed
* ipv6 ::1 and lo dev
@ 2021-08-18 16:59 Oleg
  2021-08-18 17:47 ` Thorsten Glaser
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg @ 2021-08-18 16:59 UTC (permalink / raw)
  To: netdev

  Hello.

I try to replace ::1/128 ipv6 address on lo dev with ::1/112 to
access more than 1 address(like with ipv4 127.0.0.1/8). But i get
worked only address which is set on the dev. For example:

~# ip a show dev lo
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 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
~# ping -c1 -w1 127.0.0.2
PING 127.0.0.2 (127.0.0.2) 56(84) bytes of data.
64 bytes from 127.0.0.2: icmp_seq=1 ttl=64 time=0.095 ms

--- 127.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.095/0.095/0.095/0.000 ms

~# ping -c1 -w1 ::2
PING ::2(::2) 56 data bytes

--- ::2 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Replace ::1/128 with ::1/112 and try again:

~# ip -6 a flush dev lo
~# ip -6 a add dev lo local ::1/112 scope host
~# ip a show dev lo
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 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/112 scope host 
       valid_lft forever preferred_lft forever
~# ping -c1 -w1 ::2
PING ::2(::2) 56 data bytes

--- ::2 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

So, this don't work. How can i get the same behaviour for ipv6
loopback addresses as with ipv4?

Thanks!

-- 
Олег Неманов (Oleg Nemanov)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-19  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 16:59 ipv6 ::1 and lo dev Oleg
2021-08-18 17:47 ` Thorsten Glaser
2021-08-18 20:17   ` Willy Tarreau
2021-08-18 21:15     ` Stephen Hemminger
2021-08-19  9:16   ` Oleg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.