All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg <lego12239@yandex.ru>
To: netdev@vger.kernel.org
Subject: ipv6 ::1 and lo dev
Date: Wed, 18 Aug 2021 19:59:19 +0300	[thread overview]
Message-ID: <20210818165919.GA24787@legohost> (raw)

  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)

             reply	other threads:[~2021-08-18 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 16:59 Oleg [this message]
2021-08-18 17:47 ` ipv6 ::1 and lo dev Thorsten Glaser
2021-08-18 20:17   ` Willy Tarreau
2021-08-18 21:15     ` Stephen Hemminger
2021-08-19  9:16   ` Oleg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818165919.GA24787@legohost \
    --to=lego12239@yandex.ru \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.