From nobody Mon Jan 24 17:35:03 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3E13C197B534 for ; Mon, 24 Jan 2022 17:35:22 +0000 (UTC) (envelope-from 76nemo76@gmx.ch) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JjHF53Q27z3rsV for ; Mon, 24 Jan 2022 17:35:21 +0000 (UTC) (envelope-from 76nemo76@gmx.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1643045713; bh=sktQE22kcsUvYQkmUK/lNT6KJktoo038hmGVoEIyMJs=; h=X-UI-Sender-Class:Date:From:To:Subject; b=NEWE+V6b8kR7touhgXB/W6VIqLA6R3WMDZIGo7f09YLGk4cI7x8lTJY/PxbwraO5R R0RJHBtovzE57tJ600yqi7zFAmN8iIoLhdgX2IsRdIhdScp42fAGb+O6ppDIQP+h2v d7xPT1BcwevTpeXFj3iF5D6/d2Uss3SrlrdoYAW4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from cervin ([85.195.219.254]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MCbEf-1n2wJG2ukl-009d1b for ; Mon, 24 Jan 2022 18:35:13 +0100 Date: Mon, 24 Jan 2022 18:35:03 +0100 From: Pierre Dupond <76nemo76@gmx.ch> To: "freebsd-questions@FreeBSD.org" Subject: Freebsd, Vlan, IPv6 and FIB Message-ID: <20220124183503.41ccbff1@cervin> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:2Z31FIrxMrDD7BY+C5baihpbSS8x7IKA4PNiXePAFD4kAhofAEI MBcdc2zKbAfVoJ0+4N8y6JrnqOTGf1Gj76TiKsU9/6o7q0Fm0l72k+BXDemoSXLzaum75YR eUDvb1yMnxsSSHNwtQwEIHDbqUzO2RAFMLBzYjC7HTzkgIIY7yQH2EHntvXtp8HMbDp+LpU +cJcHIyeW3urg7pusVdBQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:YaVEQhbQCyM=:TqafAgrt2P9xgzgsUTu/VB Z3nw/wDxOOzUNFA4EOe4wHo3fLiGMfipI2OLzos6izzFJNWPazuYJJd9+EVqZ3bKHYa1xRgHv WoKYZlcH33iAEj+mjGwOs4asEU80Gc9KEolkwpd38uZzG/qaAS3qi7DHmJF2l8QL3qh2iFq0q ghK0lwsWAGR3753x2+V1uVVTCplW5rjHaUaRBw3TnxiroSvUV7Fz+i9yB5VMKl4lBi1bALdD5 AxnuyHdSpyfWnWge34YP5yiL0zJitIir8SNzHxnFYRLqtzds86kNL21qXN0K41j/58iLmML49 lDbyHByTT4DmE88rHtiIZ2aHg1uua5PcuDK3YkZ/wK8mAFBaQ2qvEYy/6HOdPRCwEOIWE1mVE gZrUVxIMa3yUwoQLOc36gTaCgTSn+izvZKNGC+omC2NmccbIU156BMHPd/fngYS+Ocs7KZ1lp QorqD2bpH12fLPReLuiki2t8Icc7FP7jGhyikpvF6Rm42dBZpIUtuv9BCc5ajKk17Nk2HzQYl Yhy1grmZS3mWGvuZy7Gd1sRZEd+cdrPbOPaZbOkpuOI7b/b5X4YvFqXs37dEy63w51JYGgamM tSH4kCJSnRVGOpSe4jhh4Y8i2g5FgnCd01AfJWPqPfIyUAaBCXCYiHRa0n9rTTgeVlgPs97qo 4EapDvL5sjvs9Ovu2/guaqTlbQ2SMff0nXcKu1w2UyyseXwQWwU4/3GEfOLucePuXRP9EF4kf ucL2hm+EzPaPE8RxcH4h+GO5G3WhmM/wPUZ5KnzeJXbx6YJx+/sFpA9hsIFIBS/M0l3m7MYHq LShG8BhHcj2C2+fxSyntd59ARwU/edm5MgMw2XSMCdLI/MrNPeOPUvB6npIZPcVPGSdyr4eel KvY2k5hSObMVQo/vq4DUdmLpaQkTAtrqwVbXZrOY0oNdDe2/owLQ7kqDvepwCBPdh4afD6h3S FoVFjyP3oNHOB8I1VTJlNBYjBKDSO1EJstIaxQor8Mb5hHgmSrRoDqNTcQwukEKqvJ7PbV2iQ g6rrFt2mc0Xzkl0MVQW6iuDIzxcuRwwDOYvOiU0e4q1hMyiIk0wiD+MyoQ9rkvfwynDQcd2F9 dzzCLEvP/hrDRA= X-Rspamd-Queue-Id: 4JjHF53Q27z3rsV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=NEWE+V6b; dmarc=pass (policy=none) header.from=gmx.ch; spf=pass (mx1.freebsd.org: domain of 76nemo76@gmx.ch designates 212.227.15.15 as permitted sender) smtp.mailfrom=76nemo76@gmx.ch X-Spamd-Result: default: False [-4.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmx.ch]; R_SPF_ALLOW(-0.20)[+ip4:212.227.15.0/25]; RWL_MAILSPIKE_EXCELLENT(0.00)[212.227.15.15:from]; DKIM_TRACE(0.00)[gmx.net:+]; DMARC_POLICY_ALLOW(-0.50)[gmx.ch,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmx.ch]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.15.15:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_LOW(-1.00)[gmx.net:dkim]; TO_DN_EQ_ADDR_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi All, I want to configure a network interface with two vlans. Each VLAN is connected to a different router. The first vlan has the interface name "igb1.10" the second the interface name "igb1.40". Two IPv4 address and at least 2 IPv6 address should be set on each VLAN interface. One IPv6 address is in a non routable network with prefix "fd4f:bd4e:6d27:cafe" or "fd4f:bd4e:6d27:40" depending on the interface and the second address use an IPv6 public routable prefix (from two different providers). No automatic distribution of IPv6 address is used in these networks (all the address are static). After that, I plan to add two more temporary public address with a random suffix (and with privacy extension). Since I should specify a default router for each interface, I have envisaged to use the "fib" functionality of the "ifconfig" command. So far so good but I have not succeeded to configure a such scheme in the file "/etc/rc.conf" and my trials to configure it in the file "/etc/rc.local" were more or less unsuccessful. Does somebody has an idea on how to achieve a such configuration? Thanks for your help, Best regards Here is an attempt to start a configuration in the file "/etc/rc.conf" --------------------------------------------rc.conf file------------------------------------------------ cat rc.conf # minimal rc.conf # please set hostname and ip configuration # hostname="xxxx" rtsold_enable="YES" defaultrouter="172.16.0.5" ifconfig_igb0="inet 192.168.88.11/24" ifconfig_igb0_ipv6="inet6 accept_rtadv" #Define the VLAN were the Sourire machine are located. ifconfig_igb1="up" vlans_igb1="10 40" ifconfig_igb1_10="inet 172.16.0.11/23" ifconfig_igb1_40="inet 192.168.40.11/24" # #IPv6 # #ipv6_defaultrouter="fd4f:bd4e:6d27:cafe::f003" ifconfig_igb1_40_ipv6="inet6 aaaa:aaaa:aaaa:cafe:19e5::12 prefixlen 64" ifconfig_igb1_10_ipv6="inet6 aaaa:aaaa:bbbb:cafe:19e5::12 prefixlen 64" #The use of an alias on the VLAN interface name does not work! #ifconfig_igb1_10_ipv6_alias0="inet6 fd4f:bd4e:6d27:cafe:19e5::12 prefixlen 64" zfs_enable="YES" sshd_enable="YES" sendmail_enable="NONE" # existing rc.conf #sendmail_enable="NONE" #hostid_enable="NO" --------------------------------------------------------sysctl.conf--------------------------------------------- # $FreeBSD$ # # This file is read when going to multi-user and its contents piped thru # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. # # Uncomment this to prevent users from seeing information about processes that # are being run under another UID. #security.bsd.see_other_uids=0 # enable the privacy extensions net.inet6.ip6.use_tempaddr=1 # prefer the privacy addresses net.inet6.ip6.prefer_tempaddr=1