From nobody Tue Jun 21 17:26:22 2022 X-Original-To: freebsd-net@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 D2E2F85E089 for ; Tue, 21 Jun 2022 17:26:43 +0000 (UTC) (envelope-from leeb@ratnaling.org) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LSD2p6nh6z3nG3 for ; Tue, 21 Jun 2022 17:26:42 +0000 (UTC) (envelope-from leeb@ratnaling.org) Received: by mail-pl1-x630.google.com with SMTP id y6so13153358plg.0 for ; Tue, 21 Jun 2022 10:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ratnaling-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=MP++b1z5UfiuVr9T2YvwWRft8cvBZQiyuIImayL/dtE=; b=qDSpeXNdYTdY9BlCosSeUd2B1AJsKDe9ha9puibKb/iA4Azou6pjiwsyFTUP5qPsm8 NCDkAYeyk1uW1gg3MTI/pxB6vPcgrp+xz9CSBTQyONa67yg96REtn1qH7Zw2Ent22FUN rT4GiWafQw+QP1l/2xIVtec3dad1A1ogDNv8eVPe1n2l8BJjwv5bgQWy5SfKpAgj8kK9 A/SG67adcbH7tOMRnWps/tIlcgfXpXrFl7PC56W9M4NxGkLGFYV32xfe/2t/C6Fd/CDo cRRfytnpdv7HUcm3T5h5PBxK2rTPhsiKarwPSoOL7N422xFWTB2So4bwFGQdjAgzbdd6 6FOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=MP++b1z5UfiuVr9T2YvwWRft8cvBZQiyuIImayL/dtE=; b=XrsQTxybu47cBVb6rMTMtcF2vlJ6MmA2l+6e47n1ik1LvHQmAj37EgHVZgvbjDlug0 /PWWr5TUfSXmFQlkrYXijAngz7pMY6uxsr7bFRjLRtYCfNyPmSbPnwQB7ok1x6Lve70R A2hBNJtQBksS6PtdUzy75nQdZItUXlESdzwZv84DojzevVeeJXEMunnqYDddu25FLOu5 jDlOs6Ln2dwfm8r7jwdP2t36+D34+cqNiismes/vPOSzJ468oifQYQTzxIqpxdcz2mBq Jxl1lUjqvNVdoiUNYNZVnflYnMbF8Q8/P8D8++9kDVP+kpcR3qvbWnZk0yEWdeagDWUp AX5Q== X-Gm-Message-State: AJIora+RMjVWuSTFsPbmZ/tXDT58LQ5bv6xo276wPHLIXPzZrrbCPP8X m/J0BNcjeIuwq/pqGFhcnX8yEjK8kImrIhWj4KGBu2t0sG/JONHB X-Google-Smtp-Source: AGRyM1ur5S2Jrf0CFQ+MkCEz797Ro1bzGdGJVs8srCS/S+simzT8JkqBgmfmzcvvMcybKRQnB1NMrFd1AE9MEiDh+h8= X-Received: by 2002:a17:90b:4b02:b0:1e2:ff51:272a with SMTP id lx2-20020a17090b4b0200b001e2ff51272amr33787466pjb.56.1655832395387; Tue, 21 Jun 2022 10:26:35 -0700 (PDT) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 References: <6B824787-2D1D-4811-8EB3-0C59E253DBE3@lassitu.de> In-Reply-To: <6B824787-2D1D-4811-8EB3-0C59E253DBE3@lassitu.de> From: Lee Brown Date: Tue, 21 Jun 2022 10:26:22 -0700 Message-ID: Subject: Re: fib 1 DHCP and RA default route To: freebsd-net Content-Type: multipart/alternative; boundary="000000000000bc301705e1f885a8" X-Rspamd-Queue-Id: 4LSD2p6nh6z3nG3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ratnaling-org.20210112.gappssmtp.com header.s=20210112 header.b=qDSpeXNd; dmarc=none; spf=pass (mx1.freebsd.org: domain of leeb@ratnaling.org designates 2607:f8b0:4864:20::630 as permitted sender) smtp.mailfrom=leeb@ratnaling.org X-Spamd-Result: default: False [-1.43 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.949]; R_DKIM_ALLOW(-0.20)[ratnaling-org.20210112.gappssmtp.com:s=20210112]; NEURAL_HAM_LONG(-0.98)[-0.984]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; DMARC_NA(0.00)[ratnaling.org]; RCPT_COUNT_ONE(0.00)[1]; URI_COUNT_ODD(1.00)[1]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[ratnaling-org.20210112.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::630:from]; HTTP_TO_IP(1.00)[]; MLMMJ_DEST(0.00)[freebsd-net]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000bc301705e1f885a8 Content-Type: text/plain; charset="UTF-8" On Tue, Jun 21, 2022 at 10:11 AM Stefan Bethke wrote: > I'm setting up a new router that has both an ADSL/PPPoE and a cable modem > upstream. I've configured mpd5 for the PPPoE connection, and I'd like to > have the cable modem provide a second, independent connection through FIB 1 > over igb2. > > rc.conf (partially): > ifconfig_igb2_descr="Cable Modem" > ifconfig_igb2="DHCP fib 1" > ifconfig_igb2_ipv6="inet6 accept_rtadv defaultif" > > gateway_enable="YES" > ipv6_gateway_enable="YES" > pf_enable="YES" > > dhclient_flags="-b" > dhcp6c_enable="YES" > dhcp6c_interfaces="igb2" > dhcp6c_fib=1 > > I think this should be sufficient to receive both an IPv4 and IPv6 address > and a default route, however, neither one is added. When I manually add > them, they are removed after a while. > > $ ifconfig igb2 > igb2: flags=8863 metric 0 mtu 1500 > description: Cable Modem > > options=4e527bb > ether 00:0d:b9:xx:xx:62 > inet6 fe80::20d:b9ff:fe58:5262%igb2 prefixlen 64 scopeid 0x3 > inet6 2a02:8108:0:90:xxxx:8eb4:28c2:6315 prefixlen 128 > inet 31.16.xxx.4 netmask 0xffffff00 broadcast 31.16.xxx.255 > fib: 1 > media: Ethernet autoselect (1000baseT ) > status: active > nd6 options=8023 > > $ setfib 1 netstat -rnfinet > Routing tables (fib: 1) > > Internet: > Destination Gateway Flags Netif Expire > 31.16.xxx.0/24 link#3 U igb2 > 31.16.xxx.4 link#3 UHS lo0 > 127.0.0.1 link#4 UHS lo0 > > $ setfib 1 netstat -rnfinet6 > Routing tables (fib: 1) > > Internet6: > Destination Gateway Flags > Netif Expire > ::/96 ::1 UGRS > lo0 > ::1 link#4 UHS > lo0 > ::ffff:0.0.0.0/96 ::1 UGRS > lo0 > 2a02:8108:0:90:xxxx:8eb4:28c2:6315 link#3 UHS > lo0 > 2a02:8108:xxxx:9d00::/64 link#17 U > br103 > 2a02:8108:xxxx:9d00:0:ff:fe00:367 link#17 UHS > lo0 > fe80::/10 ::1 UGRS > lo0 > fe80::%igb2/64 link#3 U > igb2 > fe80::20d:b9ff:fe58:5262%igb2 link#3 UHS > lo0 > ff02::/16 ::1 UGRS > lo0 > > > For IPv6, I thought that setting defaultif would make the kernel add the > default route when an appropriate RA is received, and on my old router, > that was working; I can't seem to see what difference I have in the config, > apart from using FIB 1 instead of the default. > > And for IPv4, I see that I get the default router through DHCP, but > somehow /sbin/dhclient-script is not adding a default route. If I add it > manually, it will be removed eventually. > > Any suggestions? > > > Stefan > > -- > Stefan Bethke Fon +49 151 14070811 > > I had a similar issue, no IPv6, but wanted DHCP to populate FIB 1 as FIB 0 was being adjusted by quagga. I just hacked the /etc/dhclient-enter-hooks and /etc/dhclient-exit-hooks to do the work as I couldn't find the correct place to place "fib 1" and have it work. The enter hook is looking for the interface and REBOOT or BOUND and ${old_routers} != ${new_routers} to delete the route with -fib 1. The exit hook is the same but adds the route with -fib 1 --000000000000bc301705e1f885a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Tue, Jun 21, 2022= at 10:11 AM Stefan Bethke <stb@lassit= u.de> wrote:
I'm setting up a new router that has both an ADSL/PPPoE and a cable= modem upstream. I've configured mpd5 for the PPPoE connection, and I&#= 39;d like to have the cable modem provide a second, independent connection = through FIB 1 over igb2.

rc.conf (partially):
ifconfig_igb2_descr=3D"Cable Modem"
ifconfig_igb2=3D"DHCP fib 1"
ifconfig_igb2_ipv6=3D"inet6 accept_rtadv defaultif"

gateway_enable=3D"YES"
ipv6_gateway_enable=3D"YES"
pf_enable=3D"YES"

dhclient_flags=3D"-b"
dhcp6c_enable=3D"YES"
dhcp6c_interfaces=3D"igb2"
dhcp6c_fib=3D1

I think this should be sufficient to receive both an IPv4 and IPv6 address = and a default route, however, neither one is added. When I manually add the= m, they are removed after a while.

$ ifconfig igb2
igb2: flags=3D8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 m= tu 1500
=C2=A0 =C2=A0 =C2=A0 =C2=A0 description: Cable Modem
=C2=A0 =C2=A0 =C2=A0 =C2=A0 options=3D4e527bb<RXCSUM,TXCSUM,VLAN_MTU,VLA= N_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_MAGIC,VLAN_HWFILTER,VLA= N_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,NOMAP>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ether 00:0d:b9:xx:xx:62
=C2=A0 =C2=A0 =C2=A0 =C2=A0 inet6 fe80::20d:b9ff:fe58:5262%igb2 prefixlen 6= 4 scopeid 0x3
=C2=A0 =C2=A0 =C2=A0 =C2=A0 inet6 2a02:8108:0:90:xxxx:8eb4:28c2:6315 prefix= len 128
=C2=A0 =C2=A0 =C2=A0 =C2=A0 inet 31.16.xxx.4 netmask 0xffffff00 broadcast 3= 1.16.xxx.255
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fib: 1
=C2=A0 =C2=A0 =C2=A0 =C2=A0 media: Ethernet autoselect (1000baseT <full-= duplex>)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 status: active
=C2=A0 =C2=A0 =C2=A0 =C2=A0 nd6 options=3D8023<PERFORMNUD,ACCEPT_RTADV,A= UTO_LINKLOCAL,DEFAULTIF>

$ setfib 1 netstat -rnfinet
Routing tables (fib: 1)

Internet:
Destination=C2=A0 =C2=A0 =C2=A0 =C2=A0 Gateway=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 Flags=C2=A0 =C2=A0 =C2=A0Netif Expire
31.16.xxx.0/24=C2=A0 =C2=A0 =C2=A0link#3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0U=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 igb2
31.16.xxx.4=C2=A0 =C2=A0 =C2=A0 =C2=A0 link#3=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0UHS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lo0
127.0.0.1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 link#4=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0UHS=C2=A0 =C2=A0 =C2=A0 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 =C2=A0 =C2=A0lo0
ff02::/16=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0::1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0UGRS=C2=A0 =C2=A0 =C2=A0 = =C2=A0 lo0


For IPv6, I thought that setting defaultif would make the kernel add the de= fault route when an appropriate RA is received, and on my old router, that = was working; I can't seem to see what difference I have in the config, = apart from using FIB 1 instead of the default.

And for IPv4, I see that I get the default router through DHCP, but somehow= /sbin/dhclient-script is not adding a default route. If I add it manually,= it will be removed eventually.

Any suggestions?


Stefan

--
Stefan Bethke <stb@l= assitu.de>=C2=A0 =C2=A0Fon +49 151 14070811

I had a similar issue, no IPv6, but wanted DHCP = to populate FIB 1 as FIB 0 was being adjusted by quagga.

=
I just hacked the /etc/dhclient-enter-hooks and /etc/dhclient-exit-hooks=20 to do the work as I couldn't find the correct place to place "fib = 1" and have it work.
The enter hook is looking for the inter= face and REBOOT or BOUND and ${old_routers} !=3D ${new_routers} to delete t= he route with -fib 1.=C2=A0 The exit hook is the same but adds the route wi= th -fib 1
=C2=A0
--000000000000bc301705e1f885a8--