[LARTC] Newbie question

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 28, 2002 at 01:31:36PM +0100, Arthur van Leeuwen wrote:
> > Yep: by adding the rule:
> > ip rule add from 172.16.1.0/24 table isp1
> > everything *WILL* go to table isp1.
> Bzt. Every packet with a source address matching 172.16.1.0 will have
> table isp1 searched first. If no route comes up for it the packet will still
> be routed according to table main.
Yes, but that table contains a default route.
And since the gateway is accessible, it ends there...
> > In my experience everything even local traffic that matches the rule
> > will go to the isp1 table, and hence will be routed to the gateway.
> Local traffic should not be routed over this host anyway. The only thing
> that will break is traffic from this host to the local network.
If you have a local ip in that network (172.16.1.0/24), and connect to
that local ip...
> > Use a normal routing table for isp1:
> > For instance:
> > ip route add 172.16.1.0/24 dev {right device} scope link
> > to make sure that you can still route back to 172.16.1.0...
> This is good advice. Very good advice. It makes for a much clearer
> configuration.
It is not only clear, but also necessary in this case.
Because the next line is a default route...
Ehhh, unless the machine is not link local to 172.16.1.0/24...
> > Anyway: tcpdumping all of your interfaces will make you clear what is
> > actually happenning.
> Not always. Besides, the information you need is in the routing tables...
> why not look at that instead and try to figure out what should happen?
> 
> (Ofcourse, this will not show programs sneakily changing the TOS of a
> connection... but still... the information can be found in the routing
> tables, if you count the cache as a routing table as well... :))
Allright, if you are experencied, you only have to do ip route get....
But to become experienced you need to know what is going on.
> > Thinking about it: it only contains a default route, which means, it
> > only knows that it should route to that default gateway.
> > The default is I guess some sort of end point in a routing table.
> Any route is an endpoint. Once a route has been found, the routing algorithm
> will quit searching, and just route out that route. This has interesting
Unless the gateway is considered dead, and an alternate route exists...
> consequences, as the first thing searched is always the cache... and you can
> even manipulate *that* by hand. >:)
Interesting side effects as in, "hey, it suddenly does not work
anymore!". :)

-- 
<ard@telegraafnet.nl> Telegraaf Elektronische Media  http://wwwijzer.nl
http://leerquoten.monster.org/ http://www.faqs.org/rfcs/rfc1855.html 
Let your government know you value your freedom. Sign the petition:
http://petition.eurolinux.org/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux