Is any way to have same IP addr in multiple net ifs with multiple FIBs?
Rozhuk Ivan <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.net |
|---|---|
| Message-ID | <[email protected]> |
Hi! I am trying make work where FBSD can ping/connect few servers that have same IP but different VLANs. Now works only for last added IP addr. Setup: net.inet.tcp.bind_all_fibs="0" net.inet.udp.bind_all_fibs="0" net.inet.raw.bind_all_fibs="0" + sysctl net.fibs=5 sysctl net.inet.tcp.bind_all_fibs=0 ifconfig vlan1001 create ifconfig vlan1001 vlan 1001 vlandev lan0 ifconfig vlan1001 172.16.0.31/24 fib 1 ifconfig vlan1002 create ifconfig vlan1002 vlan 1002 vlandev lan0 ifconfig vlan1002 172.16.0.31/24 fib 2 # ifconfig lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384 options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 groups: lo nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> lan0: flags=1008b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 options=880028<VLAN_MTU,JUMBO_MTU,LINKSTATE,HWSTATS> ether 00:23:34:12:99:00 inet 172.16.0.30 netmask 0xffffff00 broadcast 172.16.0.255 inet6 fe80::223:34ff:fe12:9900%lan0 prefixlen 64 scopeid 0x2 media: Ethernet autoselect (10Gbase-T <full-duplex>) status: active nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> vlan1001: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 options=80000<LINKSTATE> ether 00:23:34:12:99:00 inet 172.16.0.31 netmask 0xffffff00 broadcast 172.16.0.255 groups: vlan vlan: 1001 vlanproto: 802.1q vlanpcp: 0 parent interface: lan0 fib: 1 media: Ethernet autoselect (10Gbase-T <full-duplex>) status: active nd6 options=9<PERFORMNUD,IFDISABLED> vlan1002: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 options=80000<LINKSTATE> ether 00:23:34:12:99:00 inet 172.16.0.31 netmask 0xffffff00 broadcast 172.16.0.255 groups: vlan vlan: 1002 vlanproto: 802.1q vlanpcp: 0 parent interface: lan0 fib: 2 media: Ethernet autoselect (10Gbase-T <full-duplex>) status: active nd6 options=9<PERFORMNUD,IFDISABLED> # setfib 1 netstat -nr Routing tables (fib: 1) Internet: Destination Gateway Flags Netif Expire 172.16.0.0/24 link#3 U vlan1001 172.16.0.31 link#1 UHS lo0 # setfib 2 netstat -nr Routing tables (fib: 2) Internet: Destination Gateway Flags Netif Expire 172.16.0.0/24 link#4 U vlan1002 172.16.0.31 link#1 UHS lo0 setfib 1 ping 172.16.0.209 - DOES NOT WORK! But icmp reply packets received on proper net if. setfib 2 ping 172.16.0.209 - WORK! It only work if vlan1001 and vlan1002 have different IP addrs. Is any way to get it work with same IP addr? Can PF do setfib() for incomming packets on selected netif?