From owner-freebsd-net@freebsd.org Sun Dec 25 14:38:28 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E78ECC907A4 for ; Sun, 25 Dec 2016 14:38:28 +0000 (UTC) (envelope-from jdison16@yahoo.com) Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F70F6A6 for ; Sun, 25 Dec 2016 14:38:28 +0000 (UTC) (envelope-from jdison16@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1482676706; bh=UhgRccKpLTa/jO01Ir/HKpLbOinyujOvL9OU2QvorkI=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=SQV0Z5oeF7y4ycuW0acnea7WIq/Xg08ZWfQzJj5D0fqS0UtDfKYFjD7UFvEyv1EAFy9neGM6RuNLNl4S7XbaLG84EpHDClSt7ek29cvX/mKctWFBvUGpLiuqFDCOnAdbrX1exk55lpGm9n56XOcOGst7Lb57Pu8CpFxEuyK4Jzqw6Ny6akSsshJ96xxle+LJSHSYqrL6xAzICZstAYwgWcMiQNG3NvtvzywIdGiQo+s21F3TWO3L8EmMXVAGHuzs/pAWGYVKS4to/tEgwEb0QPu2Lxja2PIeMChiKuXZmc8+dQQljCGQLfQJHZAdfr7A4rSV2XrecfCKmVpGWLQR7A== Received: from [98.139.215.142] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 25 Dec 2016 14:38:26 -0000 Received: from [98.139.212.199] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 25 Dec 2016 14:38:26 -0000 Received: from [127.0.0.1] by omp1008.mail.bf1.yahoo.com with NNFMP; 25 Dec 2016 14:38:26 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 559944.66041.bm@omp1008.mail.bf1.yahoo.com X-YMail-OSG: 1rUoVQwVM1lvNDl_gps97wz7RSFs9iBuVGmMs3h8U28SzpXJgnzhmIcHHA805FW nBAjgt_ZUpd4NDpYJwcMSoIYI1xKyZBE53ugvDXkOOfB9T1LQG0cpcis77F0Jmje1lictR7BomIg SqYQtBjmyLOCTRgAZPHDFwKbFCluvLQ627ZxgmPOAgdnj50FUWLvXU7O17aLvOuct4l6cd_6m8x_ niSvbcDxzH4WCFvE6xl4aqe6xnZ40E0qqztBI2zA0c.3pK.E2QuV66XXrNwFmhryFOGemCjPkS_2 27LCJz4sZvI0NRw5eIX548_oPfketDOOqZ149.AKgp10Gls8FC8PlZ9QUJGszAazl2s60RB3wH9r t1RpEhzxFNyTxB6Y5KaO8TurX2fHMyYTT.piyCsgpmDsklVrIcUNCB23jGEMJE.8Os._0mJs4ynw V1JQ8GbrzbTgbsXFwr16aLALc4e_cXE2pFLFr6sjzn.K8XQO8fcUOXbDtmJYXSjMgBMe2EOKFU2I- Received: from jws400081.mail.bf2.yahoo.com by sendmailws140.mail.bf1.yahoo.com; Sun, 25 Dec 2016 14:38:26 +0000; 1482676706.136 Date: Sun, 25 Dec 2016 14:38:25 +0000 (UTC) From: John Dison Reply-To: John Dison To: "freebsd-net@freebsd.org" Cc: "hrs@FreeBSD.org" 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> Subject: Fw: How to configure another loopback device? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Dec 2016 14:38:29 -0000 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).