Date: Sat, 10 Mar 2018 22:01:29 +0000 From: Grzegorz Junka <list1@gjunka.com> To: freebsd-net@freebsd.org Subject: Incorrect route interface Message-ID: <9dd657bc-ad58-f5cb-327a-572a561f1d6b@gjunka.com>
next in thread | raw e-mail | index | archive | help
Hi All, I have 2 NICs, one built-in with two ports em0 and em1 and one PCI card with 4 ports igb0-3. Only em0 is connected to the router. Then igb0 is connected to another system which isn't connected anywhere. FreeBSD somehow insists on directing all traffic through igb0 rather than em0. netstat -rn gives me: Destination Gateway Flags Netif Expire default 10.20.2.1 UGS em0 10.20.0.0/16 link#1 U igb0 10.20.2.14 link#5 UHS lo0 10.20.2.15 link#6 UHS lo0 ... And so on, links 1-6 are then listed similarly to link5 and 6. In rc.conf I have: hostname="some.server.com" ifconfig_em0="inet 10.20.2.14 netmask 255.255.0.0" ifconfig_em1="inet 10.20.2.15 netmask 255.255.0.0" ifconfig_igb0="inet 10.20.2.16 netmask 255.255.0.0" ... defaultrouter="10.20.2.1 -ifp em0" static_routes="lan" route_lan="-net 10.20.0.0/16 -interface em0 -fib 0" In dmesg I am getting warnings: add host 127.0.0.1: gateway lo0 fib 0: route already in the table add net 10.20.0.0: gateway em0 fib 0: route already in the table add net default: gateway 10.20.2.1 Additional inet routing options: gateway=YES. add host ::1: gateway lo0 fib 0: route already in the table ... I actually don't know if all traffic goes through igb0, I assumed so looking at this position in the table: 10.20.0.0/16 link#1 U igb0 Why default 10.20.2.1 UGS em0 10.20.0.0/16 link#1 U igb0 have different interfaces and how can I configure the network to direct all traffic through em0? ping 10.20.2.1 doesn't work, it says: ping: sendto: Host is down Can anyone please help? GregJ
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9dd657bc-ad58-f5cb-327a-572a561f1d6b>