Re: iproute2 complex routing help

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

 



Jeremy Domingue wrote:
> 
> I was wondering if anyone could provide me with some help in getting a complex
> route working using the iproute2 package.

I'll give it a shot...

> I have 2 subnets on the same physical network, 208.245.109.0/24 and
> 63.236.247.0/24. I have a router (Cisco 3640) that has 2 ethernet adapters, one
> on each subnet (208.245.109.1 & 63.236.247.1). My linux box has 2 ethernet
> cards, and like the router, one on each subnet (addresses 208.245.109.10 &
> 63.236.247.10).

If they're on the same physical network, why not just us IP aliasing and
forgo the dual NICs?  Unless you're going for high availability, dual
NICs on one physical network doesn't buy you anything that I can think
of.

> The problem that I'm having is that if I use the 63.236.247.10 address as the
> source to send traffic to a host on the 208.245.109.0 subnet, it is using the
> default (208.245.109.0) route, when it should in fact be going to the gateway on
> the 63.236.247.0 subnet (63.236.247.1). Also, the vice-versa is true.
> 
> I've been messing with the routes trying to correct this behavior, but I am
> completely lost...

May I ask why you want to send it via the router when the box has a
direct path to each subnet?  Since the box knows that it is connected to
both networks, it will try and send out over the shortest path to the
destination.  In this case, the default rule would be to send it out
over the NIC already on that network and bypass the router completely.

> I am using the 2.2.17 kernel, with (I believe) all the appropriate kernel
> options enabled for iproute2.

Set up a rule for source routing from 63.236.247.10 to lookup a specific
table,
and another for source routing frm 208.245.109.10 to lookup a different
table.  Then specify the default route for each table to go out the
other ethernet device and that the packets should be sent to the
appropriate gateway address.

-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux