Newbie question - RPDB, policy routing etc...
Hello all,
I am going through the LARTC howto to understand how the iproute2 works. But some concepts like Policy Routing, RPDB etc are not clear to me. I am pretty new to iproute, beeing using route command for long...
From what I understand
1. rules (ip rule) tell how to select packets for routing and route (ip route) tell where to route the selected packets.
2. A collection of rules is RPDB
3. Policy routing is routing using rules.
4. rules can specify a packet on various parameters, like source dest, fwmark, interface etc...
5. route can tell only dst interface or next hop.
I am sure I am missing some thing. I read and reread the howto and man pages, but it's still some what hazy.
The original requirement with which I started off is this:
I have a lan, with full public IPs, which normally access Internet. I want to route one subnet of that lan via my linux box (for removal of obnoxious content for children) Normally the lan is connected to net via 2 cisco box. I have configured the cisco boxen to send packets to my linux box, from and to. Now I just have to route them properly in my box.
My linux box has 2 ips, 192.168.60.1 and 192.168.50.1, both cisco boxes have corresponding 50.2 and 60.2 address, and I can ping both cisco boxes. cisco boxes has normal public ips also.
The network dig is as follows:
[ client ] [cisco 1 ] [linux ] [cisco 2 ]
[100.100.100.100]<->[100.100.100.101] [192.168.60.1]<->[192.168.60.2]
[192.168.50.2 ]<->[192.168.50.1]
[100.100.101.100]<-> [Internet]
I hope my dig is legible. This is what I want to do. I would much appreciate if some one can give a clear picture as to how iproute works.
thanks and regards,
raj
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Greetings Rajkumar,
: I am going through the LARTC howto to understand how the iproute2 : works. But some concepts like Policy Routing, RPDB etc are not clear : to me. I am pretty new to iproute, beeing using route command for : long...
:
: From what I understand
:
: 1. rules (ip rule) tell how to select packets for routing and route (ip : route) tell where to route the selected packets.
Rules can do a few different things:
- most significantly, a rule (in the RPDB) can select a routing table based on the characteristics of the packet
- a rule can rewrite the source addresses on (outbound) packets
- a rule can be of type blackhole (effectively drop), prohibit (ICMP prohibit) or unreachable (ICMP unreachable)
: 2. A collection of rules is RPDB
The collection of rules is the routing policy database (RPDB).
: 3. Policy routing is routing using rules.
In linux-think, yes, policy routing requires the use of rules (RPDB).
In more general terms, policy routing is a technique of routing based on characteristics of a packet other than the destination address, which is the only selection criteria in conventional routing systems.
: 4. rules can specify a packet on various parameters, like source dest, : fwmark, interface etc...
True enough. I have written a little bit about the RPDB [0], but you may find that Matthew Marsh's policy routing book is a good resource [1]. And if you need a crash course in how linux selects a route [2].
: 5. route can tell only dst interface or next hop.
[ diagram and description snipped ]
: I hope my dig is legible. This is what I want to do. I would much : appreciate if some one can give a clear picture as to how iproute : works.
I tried to understand what you were trying to do, but found myself confused. Perhaps you don't need policy routing? Anyway, best of luck...try describing the problem again, and maybe it'll be more obvious to me (and others?) next time around.
-Martin
[0] http://linux-ip.net/html/routing-rpdb.html
http://linux-ip.net/html/ch-routing.html
[1] http://www.policyrouting.org/
[2] http://linux-ip.net/html/routing-selection.html
Signature · 5 lines
Martin A. Brown --- SecurePipe, Inc. --- [email protected] _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/