Summary: | setfib does not add the default gateway to the second routing table. | ||
---|---|---|---|
Product: | Base System | Reporter: | Vladyslav V. Prodan <admin> |
Component: | bin | Assignee: | freebsd-net (Nobody) <net> |
Status: | New --- | ||
Severity: | Affects Only Me | CC: | zarychtam |
Priority: | --- | ||
Version: | 14.1-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Vladyslav V. Prodan
2024-11-13 23:47:09 UTC
root@vb-12-3:~ # uname -a FreeBSD vb-12-3.3 12.3-STABLE FreeBSD 12.3-STABLE #0 r372168M: Thu Jun 23 09:30: 29 EEST 2022 root@vb-12-3:/usr/obj/usr/src/amd64.amd64/sys/universal-12-3 a md64 (In reply to Vladyslav V. Prodan from comment #0) What is the setting of the sysctl knob "net.add_addr_allfibs"? Perhaps you can try to assign the route this way: # route add -net 192.168.77.0/24 -iface em2 -fib 1 # route add default 192.168.77.2 -fib 1 If interface em2 should or could be moved to fib 1, then a similar effect could still be achievable with the following: # ifconfig em2 inet 192.168.77.104/24 fib 1 # route add default 192.168.77.2 -fib 1 (In reply to Marek Zarychta from comment #2) Thank you, it helped. root@vb-14-1:~ # ifconfig em2 inet 192.168.77.104/24 fib 1 up root@vb-14-1:~ # ifconfig em2 em2: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 15 00 options=48505bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM ,TSO4,LRO,VLAN_HWFILTER,VLAN_HWTSO,HWSTATS,MEXTPG> ether 08:00:27:33:a3:63 inet 192.168.77.104 netmask 0xffffff00 broadcast 192.168.77.255 inet6 fe80::a00:27ff:fe33:a363%em2 prefixlen 64 scopeid 0x3 fib: 1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> root@vb-14-1:~ # route add default 192.168.77.2 -fib 1 add net default: gateway 192.168.77.2 fib 1 root@vb-14-1:~ # netstat -rnF 1 Routing tables (fib: 1) Internet: Destination Gateway Flags Netif Expire default 192.168.77.2 UGS em2 127.0.0.1 link#5 UHS lo0 192.168.77.0/24 link#3 U em2 192.168.77.104 link#5 UHS lo0 Internet6: Destination Gateway Flags Netif Exp ire ::/96 link#5 URS lo0 ::1 link#5 UHS lo0 ::ffff:0.0.0.0/96 link#5 URS lo0 fe80::%lo0/10 link#5 URS lo0 ff02::/16 link#5 URS lo0 But! for ipv6 addresses to appear in fib 1, you need to reboot the system... |