From nobody Thu Apr 14 13:49:26 2022 X-Original-To: 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 3FD451B4B74D for ; Thu, 14 Apr 2022 13:49:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KfLRV0DnRz4j61 for ; Thu, 14 Apr 2022 13:49:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD935216D4 for ; Thu, 14 Apr 2022 13:49:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 23EDnPSD037842 for ; Thu, 14 Apr 2022 13:49:25 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23EDnP3X037841 for net@FreeBSD.org; Thu, 14 Apr 2022 13:49:25 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 255264] Unable to add default route for fib Date: Thu, 14 Apr 2022 13:49:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pinkfluid@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649944166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XzqdOKHxlYZdpiqWgEIwnUlwSJ0mUOgTdZCBuQcIMOU=; b=qHyEc0b2YRDIPYPmhECO0Xi7uE00kIf7tfk2u7gRSdkskQNBf1dAafXsIcPSc8XvkcjmQ5 seB+dw3+hzbQHIray/E9iRP6ipBZfYotpVUlQaA0oxK350c2i72fXm4jWyrgaN/P7Uq4cP h9g3I0Ae1i3RnutzZhGuUMkJ36VpQADd8L45D2haeEZxFZCipcdslJ0UkYmVE31UuQY42y ZoEcQ5MiPe3ygsa7ZlHi/FMh+3qy9F5IKHvTJ9jrPQ/h//XMfmcVvhv77Eq+XMjdBbwDfD a75c5A9PwrD568qcm4O515xvw5baMpAP/HoGdfA0nUApkbtBUVXHAVLkmPtqZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649944166; a=rsa-sha256; cv=none; b=xfrxKUkMaxORjtCwA3h4K0NZZB7ecAoe2S64Hb2F8eb5+7WMoag4t2hh5GMnBBkaswu9Ff sLna5GrOTS+R5oP4c7H6ZVElY3bQ5FNrf608V5gqez7AMHH4b2+uRR/YPcb5wbga+9Ap2s 2puDAzs0M2QeKXp+I7Pm7+Pd61TyKNN0xLWWdeBL6EWZb9J+Fn8cZkW5JrEkJ7F1hE2cWU qca5XU3jve182qkKuE9wCNkb0U2rBzBRIIanNpU8J2t6heohjJrj0nv629MocUDLTe2+UB hSAbeDPos20r5trGr05GEuXf/BcHKkraIhGR5N+T1HYxiBOGO/FBp7p87QAfSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255264 Mitja Horvat changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinkfluid@gmail.com --- Comment #6 from Mitja Horvat --- I'm running 13.1-RC3 and it looks like I'm experiencing exactly the same problem, except that the "net.add_addr_allfibs=3D1" did not fix my issue. My problem seems to be somehow related to the interface carrier. What I'm experiencing is that adding a default route to FIB 1 fails until carrier is detected on the interface (configuring the route via rc.conf fai= led, while adding it manually over SSH always succeeded). What I'm trying to do is to add an alternate default route that would go through 192.168.1.1 on re0. The default gateway for FIB 0 is on a VLAN interface (the XX.XXX.192.0 network below, hidden because it's a public IP), which has no issues. I did confirm this behavior by using the following rc.local file: #!/bin/sh set -x while ! setfib 1 netstat -rn | grep -q default do setfib 1 netstat -rn4 ifconfig re0 | grep -E 're0|inet|media:' setfib 1 route add default 192.168.1.1 -fib 1 sleep 0.5 done It basically tries to set the default route in a loop until it succeeds whi= le showing the re0 interface status and routes in FIB 1. This is an abridged output of the script above, but it shows that the `setf= ib 1 route add default 192.168.1.1` command fails until carrier is detected on t= he interface. Apr 14 15:21:14 marin kernel: Internet: Apr 14 15:21:14 marin kernel: Destination Gateway Flags= =20=20=20=20 Netif Expire Apr 14 15:21:14 marin kernel: XX.XXX.192.0/18 link#4 U=20=20= =20=20=20=20=20=20 vlan2 Apr 14 15:21:14 marin kernel: 127.0.0.1 link#2 UH=20= =20=20=20=20=20=20=20=20 lo0 Apr 14 15:21:14 marin kernel: 127.1.0.1 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:14 marin kernel: 127.1.0.2 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:14 marin kernel: 192.168.1.0/24 link#1 U=20=20= =20=20=20=20=20=20=20=20 re0 Apr 14 15:21:14 marin kernel: 192.168.10.0/24 link#5 U=20=20= =20=20=20=20=20=20=20=20 wg0 Apr 14 15:21:14 marin kernel: + ifconfig re0 Apr 14 15:21:14 marin kernel: + grep -E 're0|inet|media:' Apr 14 15:21:14 marin kernel: re0: flags=3D8843 metric 0 mtu 1500 Apr 14 15:21:14 marin kernel: inet 192.168.1.2 netmask 0xffffff00 broadca= st 192.168.1.255 Apr 14 15:21:14 marin kernel: media: Ethernet autoselect (none) Apr 14 15:21:14 marin kernel: + setfib 1 route add default 192.168.1.1 -fib= 1 Apr 14 15:21:14 marin kernel: route: writing to routing socket: Network is unreachable Apr 14 15:21:14 marin kernel: add net default: gateway 192.168.1.1 fib 1: Network is unreachable Apr 14 15:21:14 marin kernel: + sleep 0.5 Apr 14 15:21:14 marin kernel: + setfib 1 netstat -rn Apr 14 15:21:14 marin kernel: + grep -q default Apr 14 15:21:14 marin kernel: + setfib 1 netstat -rn4 Apr 14 15:21:14 marin kernel: Routing tables (fib: 1) Apr 14 15:21:14 marin kernel:=20 Apr 14 15:21:14 marin kernel: Internet: Apr 14 15:21:14 marin kernel: Destination Gateway Flags= =20=20=20=20 Netif Expire Apr 14 15:21:14 marin kernel: XX.XXX.192.0/18 link#4 U=20=20= =20=20=20=20=20=20 vlan2 Apr 14 15:21:14 marin kernel: 127.0.0.1 link#2 UH=20= =20=20=20=20=20=20=20=20 lo0 Apr 14 15:21:14 marin kernel: 127.1.0.1 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:14 marin kernel: 127.1.0.2 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:14 marin kernel: 192.168.1.0/24 link#1 U=20=20= =20=20=20=20=20=20=20=20 re0 Apr 14 15:21:14 marin kernel: 192.168.10.0/24 link#5 U=20=20= =20=20=20=20=20=20=20=20 wg0 Apr 14 15:21:14 marin kernel: + ifconfig re0 Apr 14 15:21:14 marin kernel: + grep -E 're0|inet|media:' Apr 14 15:21:14 marin kernel: re0: flags=3D8843 metric 0 mtu 1500 Apr 14 15:21:14 marin kernel: inet 192.168.1.2 netmask 0xffffff00 broadca= st 192.168.1.255 Apr 14 15:21:14 marin kernel: media: Ethernet autoselect (none) Apr 14 15:21:14 marin kernel: + setfib 1 route add default 192.168.1.1 -fib= 1 Apr 14 15:21:14 marin kernel: route: writing to routing socket: Network is unreachable Apr 14 15:21:14 marin kernel: add net default: gateway 192.168.1.1 fib 1: Network is unreachable Apr 14 15:21:14 marin kernel: + sleep 0.5 Apr 14 15:21:15 marin kernel: + setfib 1 netstat -rn Apr 14 15:21:15 marin kernel: + grep -q default Apr 14 15:21:15 marin kernel: + setfib 1 netstat -rn4 Apr 14 15:21:15 marin kernel: Routing tables (fib: 1) Apr 14 15:21:15 marin kernel:=20 Apr 14 15:21:15 marin kernel: Internet: Apr 14 15:21:15 marin kernel: Destination Gateway Flags= =20=20=20=20 Netif Expire Apr 14 15:21:15 marin kernel: XX.XXX.192.0/18 link#4 U=20=20= =20=20=20=20=20=20 vlan2 Apr 14 15:21:15 marin kernel: 127.0.0.1 link#2 UH=20= =20=20=20=20=20=20=20=20 lo0 Apr 14 15:21:15 marin kernel: 127.1.0.1 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:15 marin kernel: 127.1.0.2 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:15 marin kernel: 192.168.1.0/24 link#1 U=20=20= =20=20=20=20=20=20=20=20 re0 Apr 14 15:21:15 marin kernel: 192.168.10.0/24 link#5 U=20=20= =20=20=20=20=20=20=20=20 wg0 Apr 14 15:21:15 marin kernel: + ifconfig re0 Apr 14 15:21:15 marin kernel: + grep -E 're0|inet|media:' Apr 14 15:21:15 marin kernel: re0: flags=3D8843 metric 0 mtu 1500 Apr 14 15:21:15 marin kernel: inet 192.168.1.2 netmask 0xffffff00 broadca= st 192.168.1.255 Apr 14 15:21:15 marin kernel: media: Ethernet autoselect (none) Apr 14 15:21:15 marin kernel: + setfib 1 route add default 192.168.1.1 -fib= 1 Apr 14 15:21:15 marin kernel: route: writing to routing socket: Network is unreachable Apr 14 15:21:15 marin kernel: add net default: gateway 192.168.1.1 fib 1: Network is unreachable Apr 14 15:21:15 marin kernel: + sleep 0.5 Apr 14 15:21:15 marin kernel: + setfib 1 netstat -rn Apr 14 15:21:15 marin kernel: + grep -q default Apr 14 15:21:15 marin kernel: + setfib 1 netstat -rn4 Apr 14 15:21:15 marin kernel: Routing tables (fib: 1) Apr 14 15:21:15 marin kernel:=20 Apr 14 15:21:15 marin kernel: Internet: Apr 14 15:21:15 marin kernel: Destination Gateway Flags= =20=20=20=20 Netif Expire Apr 14 15:21:15 marin kernel: XX.XXX.192.0/18 link#4 U=20=20= =20=20=20=20=20=20 vlan2 Apr 14 15:21:15 marin kernel: 127.0.0.1 link#2 UH=20= =20=20=20=20=20=20=20=20 lo0 Apr 14 15:21:15 marin kernel: 127.1.0.1 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:15 marin kernel: 127.1.0.2 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:15 marin kernel: 192.168.1.0/24 link#1 U=20=20= =20=20=20=20=20=20=20=20 re0 Apr 14 15:21:15 marin kernel: 192.168.10.0/24 link#5 U=20=20= =20=20=20=20=20=20=20=20 wg0 Apr 14 15:21:15 marin kernel: + ifconfig re0 Apr 14 15:21:15 marin kernel: + grep -E 're0|inet|media:' Apr 14 15:21:15 marin kernel: re0: flags=3D8843 metric 0 mtu 1500 Apr 14 15:21:15 marin kernel: inet 192.168.1.2 netmask 0xffffff00 broadca= st 192.168.1.255 Apr 14 15:21:15 marin kernel: media: Ethernet autoselect (none) Apr 14 15:21:15 marin kernel: + setfib 1 route add default 192.168.1.1 -fib= 1 Apr 14 15:21:15 marin kernel: route: writing to routing socket: Network is unreachable Apr 14 15:21:15 marin kernel: add net default: gateway 192.168.1.1 fib 1: Network is unreachable Apr 14 15:21:15 marin kernel: + sleep 0.5 Apr 14 15:21:16 marin kernel: + setfib 1 netstat -rn Apr 14 15:21:16 marin kernel: + grep -q default Apr 14 15:21:16 marin kernel: + setfib 1 netstat -rn4 Apr 14 15:21:16 marin kernel: Routing tables (fib: 1) Apr 14 15:21:16 marin kernel:=20 Apr 14 15:21:16 marin kernel: Internet: Apr 14 15:21:16 marin kernel: Destination Gateway Flags= =20=20=20=20 Netif Expire Apr 14 15:21:16 marin kernel: XX.XXX.192.0/18 link#4 U=20=20= =20=20=20=20=20=20 vlan2 Apr 14 15:21:16 marin kernel: 127.0.0.1 link#2 UH=20= =20=20=20=20=20=20=20=20 lo0 Apr 14 15:21:16 marin kernel: 127.1.0.1 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:16 marin kernel: 127.1.0.2 link#3 UH=20= =20=20=20=20=20=20=20=20 lo1 Apr 14 15:21:16 marin kernel: 192.168.1.0/24 link#1 U=20=20= =20=20=20=20=20=20=20=20 re0 Apr 14 15:21:16 marin kernel: 192.168.10.0/24 link#5 U=20=20= =20=20=20=20=20=20=20=20 wg0 Apr 14 15:21:16 marin kernel: + ifconfig re0 Apr 14 15:21:16 marin kernel: + grep -E 're0|inet|media:' Apr 14 15:21:16 marin kernel: re0: flags=3D8843 metric 0 mtu 1500 Apr 14 15:21:16 marin kernel: inet 192.168.1.2 netmask 0xffffff00 broadca= st 192.168.1.255 Apr 14 15:21:16 marin kernel: media: Ethernet autoselect (1000baseT ) Apr 14 15:21:16 marin kernel: + setfib 1 route add default 192.168.1.1 -fib= 1 Apr 14 15:21:16 marin kernel: add net default: gateway 192.168.1.1 fib 1 Apr 14 15:21:16 marin kernel: + sleep 0.5 Apr 14 15:21:16 marin kernel: + setfib 1 netstat -rn Apr 14 15:21:16 marin kernel: + grep -q default Apr 14 15:21:16 marin kernel: + echo . Apr 14 15:21:16 marin kernel: . Apr 14 15:21:16 marin kernel: + _return=3D0 Apr 14 15:21:16 marin kernel: + [ 0 -ne 0 ] Apr 14 15:21:16 marin kernel: + return 0 Apr 14 15:21:16 marin kernel: + _run_rc_postcmd Apr 14 15:21:16 marin kernel: + [ -n '' ] Apr 14 15:21:16 marin kernel: + return 0 Apr 14 15:21:16 marin syslogd: last message repeated 1 times I have set the following sysctls: - net.add_addr_allfibs=3D1 - net.fibs=3D2 What I have tried so far without any luck: - disabling pf - moving net.fibs=3D2 from /etc/sysctl.conf to /boot/loader.conf - using netwait (it's started after routing) The script above certainly works but I would like to understand what's the = core issue behind this and at this point I'm out of ideas. Any hint or help woul= d be really appreciated. --=20 You are receiving this mail because: You are the assignee for the bug.=