Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Apr 2016 09:58:23 +0000 (UTC)
From:      "M. V." <bored_to_death85@yahoo.com>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Assigning same ip address to different interfaces with different FIBs
Message-ID:  <118390227.3958522.1461146303528.JavaMail.yahoo@mail.yahoo.com>
References:  <118390227.3958522.1461146303528.JavaMail.yahoo.ref@mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello guys,
I have a problem with having multiple FIBs in FreeBSD-9.2. I've already setup 4 FIBs in kernel, and everything is OK. I assigned each interface to one FIB and I can add routes to any of FIBs I want, and everything works fine.But my problem is, I want to assign same IP address to multiple interfaces. for example:
interface em1 (in FIB-1) : 100.100.100.1/24interface em2 (in FIB-2) : 100.100.100.1/24
this should work, bacause I want each FIB's interfaces and routes to be completely separate from other FIBs' interfaces and routes. for this I do:# sysctl net.add_addr_allfibs = 0
# ifconfig em1 fib 1# ifconfig em2 fib 2# setfib 1 ifconfig em1 100.100.100.1/24# setfib 2 ifconfig em2 100.100.100.1/24
but this doesn't work as expected, and 100.100.100.0/24 route is only being added to FIB-1 (second IP assignment command doesn't work, though it returns no error).# setfib 1 netstat -rn ==> this fib has 100.100.100.0/24 entry added in it# setfib 2 netstat -rn ==> nothing is added here.

Is there any way I can do this in FreeBSD?
Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?118390227.3958522.1461146303528.JavaMail.yahoo>