# Multiple routing tables, jails, and setfib



## astounding (Mar 14, 2013)

Hi,

So I'm finally getting around to trying out setfib and running multiple routing tables. However, I noticed one behavior I need to avoid, bypass, or work around.

For example, say I have a machine with 2 network interfaces, re0 and re1, with re0 a part of the default FIB 0 and re1 a member of FIB 1:


```
# ifconfig re0 inet 10.0.0.2/24
# route add default 10.0.0.1
```


```
# ifconfig re1 inet 10.1.0.2/24 fib 1
# setfib 1 route add default 10.1.0.1
```

For reasons I don't care to discuss, I am looking for a way to COMPLETELY separate these two routing tables such that even a DIRECTLY connected network like 10.0.0.0/24 will NOT have a route with FIB 1 (and likewise 10.1.0.0/24 will NOT have a route in FIB 0).

Is there any way to do this?  It appears that ifconfig always creates a local link route within ALL FIBs on the machine.  Sure, I can attempt a hack like this:


```
# setfib 0 route delete 10.1.0.0/24
# setfib 1 route delete 10.0.0.0/24
```

That doesn't quite work and results in odd behavior.

The goal is for this:

```
# setfib 1 traceroute 10.0.0.1
```

...to have to traverse an EXTERNAL device or devices/network path even though the IP is on the same host.  Yes, a little weird, but I require that behavior (i.e. no localhost routing between the FIBs unless I add it explicitly).

Ideas?  Suggestions?

Thanks!

Aaron out.


----------



## konneka (May 21, 2013)

I have the same problem. I found that every FIB uses a FIB(0) ARP table. I tried the solution at  http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/167947, but didn't succeed. 

Is there any way to use FIBs (rtables) sep*a*rately? 

Thanks,

Regards,

--KONNEKA--


----------

