# source based routing and ip rule show

## quickshiftin

i have 2 modems at my small office and im trying to setup source based policy routing.

ive read a little bit and think i have the gist of it, however im running into a strange problem

that isnt related to my routing configuration at all (my hunch).

ive configured the kernel on my router for policy routing as shown

    IP: advanced router 

          Choose IP: FIB lookup algorithm (choose FIB_HASH if unsure) (FIB_HASH)  --->

   IP: policy routing

after compiling, updating grub.conf (moving image to /boot of course) and reboot; the ip rule command shows nothing

kingfisher linux # ip rule show

kingfisher linux #

after performing the same process on another machine (that isnt going to be doing any routing) the default rules are shown 

sentineldev php5 # ip rule show

0:      from all lookup local

32765:  from 10.0.0.1 lookup extra

32766:  from all lookup main

32767:  from all lookup default

this is what i expect as its what ive seen in several documents ive read.

im having issues getting source based routing to work on the former machine i mentioned, but i think it has to do with something other than the rules im trying to create because ip rule doesnt even show me the default rules once ive installed the policy routing database.

can someone steer me in the right direction on this, or suggest looking into something that i might have missed.  im new to ip layer administration   :Confused: 

thanks,

~quickshiftin`

----------

## shimitar

For "ip source routing", i hit this topic some time ago. I wrote a small howto which is beyond the scope of what you need, (its for using OpenVPN to get out from a proxy) BUT the last couple of paragraphs contains instructions and some description on how i set up my ip source routing using iproute2.

http://gentoo-wiki.com/HOWTO_DNAT_SNAT_OpenVPN_iproute2:_routing_setup

----------

## quickshiftin

 *shimitar wrote:*   

> For "ip source routing", i hit this topic some time ago. I wrote a small howto which is beyond the scope of what you need...
> 
> 

 

thats a nice article; i will definately use it as a resource when getting my configuration dialed in.

however, im trying to determine why there are no rules showing after i have installed the RPDB.  The default rules should be shown; yet when i run

ip rule show

it is as if i have run it on a machine without an RPDB.  i see nothing in /var/log/messages

and i really have no way (or dont know of a way) to track down the problem, since the kernel configuration is there.

what i need to know is, is there something that could be conflicting w/ the ip rules.  im running shorewall, but ive tried booting the machine w/o starting up shorewall.  plus the other machine that i successfully installed policy routing on had shorewall installed as well.

~quickshiftin`

----------

