[clug] A Routing problem

Stephen Hodgman steve at namsys.com.au
Thu Oct 21 00:42:37 GMT 2004


Thanks for the assistance.  I figured it would be possible somehow.  I 
can now apply that to my end of the system.
I need to find out if the "ip" command applies to the solaris box at the 
other end of the link.
Thanks again for the help.

Rod Tunks wrote:

> Yup,
> thats no problem.  You setup different routing tables based on source 
> address/device. This way each interface can see a completely different 
> set of routes.  We have a router here with 6 ethernet interfaces of 
> which 2 are feeds out of the building used for different purposes.
>
> Routing is done based on both source and dest addresses.
>
> Here's a quick cut and paste example :-
>
> # specify anything from 192.168.76.0/24 uses the new table called 
> privateip
> ip rule add from 192.168.76.0/24 table privateip
>
> #Set up the routes for this table.
> ip route add default via 192.168.99.1 dev eth5 table privateip
> ip route add 192.168.76.0/26 dev eth4 src 192.168.76.1 table privateip
> ip route add 192.168.76.208/28 via 192.168.0.2 dev eth2 table privateip
> ip route add 192.168.76.192/28 dev eth3 src 192.168.76.193 table 
> privateip
> <snip> and so on.
>
> You need to create the new table entry (ie 501) and optionally give it 
> a name for each routing table you need. In your case three tables may 
> be overkill but it gives you the most flexability if your networks are 
> perpetually in a state of flux (like ours)
>
> We had some issues with arp due to our rather weird lan setup and 
> found  echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter was needed as 
> well. YMMV
>
> Very low end hardware will cope with this kind of set up no problems 
> at all. Our 6 port box is a PIII with 4 x 100M lans and 2 x 2M+ feeds 
> out of the building and doesnt raise a sweat. Gotta love linux routers!
>
> The linux advanced routing & traffic control howto covers this quite 
> well.
>
> Cheers
> -Rod
> (from next door)
>
> -----------------------------------------------------
> This email may contain traces of nuts and/or caffeine
>
>
> Stephen Hodgman wrote:
>
>> I have a question regarding routing.  I have a linux system with 
>> three interfaces say eth0, eth1 & eth2
>>
>> On eth0 is network 123.123.123.0/24 (say)
>> I want traffic entering eth1, destined for 123.123.123.0/24 to be 
>> routed to eth0 - always
>> I want traffic entering from eth2 destined for 123.123.123.0/24 to be 
>> routed to eth2 - always
>> The reason is that there is a route either way but I only want one 
>> device to route directly.
>>
>> Can this be done?  It seems to require routing tables based on source 
>> address/interface.
>> I would appreciate knowing how this can be done.
>> TIA.
>>

-- 
Steve Hodgman
Ph: +61 2 6285 3460
Fax: +61 2 6285 3459
Mobile:	+61 407 182 355
steve at namsys.com.au
------------------------
This message and its attachments contain confidential information and may also contain legally privileged information. This message is intended solely for the named addressee. If you are not the addressee indicated in this message or have received this message in error, you may not copy or deliver any part of this message or its attachments to anyone or use any part of this message or its attachments. Instead, you should permanently delete this message and its attachments (and all copies) from your system and kindly notify the sender by reply e-mail. Any content of this message and its attachments that does not relate to the official business of Namadgi Systems must be taken not to have been sent or endorsed by the company or its management.
------------------------



More information about the linux mailing list