# VRF-like mechanism



## qadmos (Dec 12, 2009)

Let's just say you want to use FreeBSD as a router. Is there anyway to implement virtual routing and forwarding (VRF) as is available on many commercial routers, ie a mechanism that implements several independant routing instances in a single box ?  

I'm not sure this is available so far. I've thought maybe using jails but i'm not sure as jails are a bit obscure to me yet...

So VRF on freebsd : is that possible as of now ?


----------



## DutchDaemon (Dec 12, 2009)

Are you looking for something like FIB?
setfib(1), setfib(2)

Jails can have virtual network stacks (see http://forums.freebsd.org/showthread.php?t=9006), so I guess implementing different routing set-ups should be possible there.


----------



## aragon (Dec 12, 2009)

qadmos said:
			
		

> So VRF on freebsd : is that possible as of now ?


Sort of.  There's setfib(2) now that lets you have multiple routing tables, which sounds like all you're after, but in the grander scheme there is vimage that is much more elaborate and still under development.  Partially implemented in FreeBSD 8.0 right now though.  I haven't played with it yet...


----------



## qadmos (Dec 18, 2009)

Hey there guys,

thanks for your input !

so if i understand correctly there's no genuine VRF-like mechanisms present so far but the bricks to build something vaguely similar-ish to it are there.

Ideally what i would have liked to have is the possibility of several independant routing tables in the kernel. 

I guess i need to explore your two suggestions deeper.


----------



## DutchDaemon (Dec 19, 2009)

I don't think FIBs are 'vaguely similar-ish', but actually the core of VRF.

http://en.wikipedia.org/wiki/VRF:


> VRF may be implemented in a network device by distinct routing tables known as forwarding information bases (*FIBs*), one per VRF. Alternatively, a network device may have the ability to configure different virtual routers, where each one has its own *FIB* that is not accessible to any other virtual router instance on the same device.


----------



## qadmos (Dec 19, 2009)

Thanks but i know what a VRF and a FIB and a RIB all are... The point being that there is no *directly implemented VRF* mechanisms but only *tools* (setfib or jail) to *approximate* what exists on *commecial routers*.

The pontificating tone was kind of pointless specially since i was refering to the *tool* _setfib_ not the concept of a *FIB*  :OOO


----------



## aragon (Dec 19, 2009)

Well, thing is, you're seeking the implementation of something that is not rigidly defined.  Is VRF a standard?  Is there an RFC defining its behavior?  Without that, it's unlikely anyone else will implement exactly what you're familiar with on another platform.

FWIW, based on Wikipedia's notion of VRF, FreeBSD's vimage will be much more powerful (when it's complete, at least).


----------



## DutchDaemon (Dec 19, 2009)

Well, excuse me for not knowing your entire technical history and routing experience on the basis of two vaguely worded posts. Talk about a pontificating tone, jeez. I'll go help someone else.


----------

