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

Re: Network routing on multi-homed system



I changed the gateway lines to include the whole network, so, i.e.,

post-up ip route add 172.1.1.62/32 dev eth1 src 172.1.1.41 table external

became

post-up ip route add 172.1.1.32/27 dev eth1 src 172.1.1.41 table external

and everything starting working great. Thanks! :)

--
Isaac Freeman - Systems Administrator
IBM SmartCloud Managed Backup
isaac@us.ibm.com
919-254-0245

Inactive hide details for Pascal Hambourg ---08/02/2014 02:45:20 PM---Hello, Isaac Freeman a écrit :Pascal Hambourg ---08/02/2014 02:45:20 PM---Hello, Isaac Freeman a écrit :

From: Pascal Hambourg <pascal@plouf.fr.eu.org>
To: debian-user@lists.debian.org,
Cc: Isaac Freeman/Raleigh/IBM@IBMUS
Date: 08/02/2014 02:45 PM
Subject: Re: Network routing on multi-homed system





Hello,

Isaac Freeman a écrit :
>
> iface eth1 inet static
> address 172.1.1.40
> netmask 255.255.255.224
>
> # routing
> post-up ip route add 172.1.1.62/32 dev eth1 src 172.1.1.40 table external
> post-up ip route add default via 172.1.1.62 table external
> post-up ip rule add from 172.1.1.40 table external
> post-down ip rule del from 172.1.1.40 table external

IMO, your special routing is broken. Not all packets with the given
source address should be sent to the gateway, but only packets with a
destination address outside the LAN. Packets with a destination address
inside the LAN should be sent directly.

Either route the LAN prefix using the main table :

post-up ip rule add to 172.1.1.32/27 table main

(to be created after thus inserted before the "from" rule)
or add a direct route for the prefix in the special table :

post-up ip route add 172.1.1.32/27 dev eth1 table external

Same for both interfaces and servers.

Note : the routes to the gateways should not be necessary.



Reply to: