Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Dec 2016 14:38:25 +0000 (UTC)
From:      John Dison <jdison16@yahoo.com>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Cc:        "hrs@FreeBSD.org" <hrs@FreeBSD.org>
Subject:   Fw: How to configure another loopback device?
Message-ID:  <788296467.1718144.1482676705910@mail.yahoo.com>
In-Reply-To: <1821478968.1639587.1482657592713@mail.yahoo.com>
References:  <20161224.205457.537205546150309741.hrs@allbsd.org> <31938292.1421737.1482589536048@mail.yahoo.com> <252311393.1502179.1482604113540@mail.yahoo.com> <20161225.065934.1192800130496756773.hrs@allbsd.org> <1821478968.1639587.1482657592713@mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
jd> > Does adding ifconfig_lo0="inet 127.0.0.1/8" to /etc/rc.conf work?

jd>
jd> Yes, adding ifconfig_lo0="inet 127.0.0.1/8" helps indeed.
jd>
jd> Interesting is that if I also add ifconfig_lo0_ipv6="inet6 ::1/128"
jd> then ::1/128 will be on lo1.  If I do not add that line, it will be on lo0.
jd>
jd> Looks weird but that workaround work.  Thanks.

> Here are the reasons:
>
> - 127.0.0.1/8 will be configured on lo0 in rc.d scripts if
>    ifconfig_lo0 is missing after processing ifconfig_IF and before
>    doing ifconfig_IF_alias*.
>
> - You cannot manually configure ::1/128 because it is configured by
>   the kernel when a loopback interface becomes "up".  If you have an
>    ifconfig_lo1 and no ifconfig_lo0, ifconfig_lo1 will be processed
>   and make lo1 "up" first.


Okay, I see.  Thanks for the explanation.
Also one more thing which looks strange: if I use 
ifconfig_lo1_ipv6="inet6 auto_linklocal", then ipv6 aliases on lo1 are configured correctly, but there is no link-local address.  If I exclude this line from rc.conf, then no ipv6 aliases are configured at all (only ipv4).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?788296467.1718144.1482676705910>