All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] please guide me ...with regard to multipath dynamic routing in case of link failure
@ 2005-02-07 14:52 Pankaj Agarwal
  2005-02-08 12:55 ` [LARTC] please guide me ...with regard to multipath dynamic routing Nguyen Dinh Nam
  0 siblings, 1 reply; 2+ messages in thread
From: Pankaj Agarwal @ 2005-02-07 14:52 UTC (permalink / raw)
  To: lartc

Hi,

There's some very silly mistake i've done in my configuration. I did by 
reading material on web. I'm enclosing my configuration script below. The 
problem is its not routing the trafic from other interface in case the first 
interface is down....which should be the wright case. Kindly please guide me 
what i can do to make it  work..dynamically.. Also there is a very common 
situation which many of you might have face...the interface which is gateway 
for my device is my local router interface...and there's almost no chance of 
that's being down ever...How can one configure ip route to consider the ISP 
ends IP as the gateway when deciding on link status...

Thanks,

Pankaj Agarwal

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~The Script~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh
#script written by Pankaj Agarwal <pankaj@netedgecomputing.com>
#defining location of ip binary
IP=/sbin/ip
#flushing all the IP/Routing cache
echo "removing old rules"
$IP rule del prio 50 table main
$IP rule del prio 201 from 61.11.104.0/24 table 201
$IP rule del prio 202 from 220.227.153.48/28 table 202
$IP rule del prio 222 table 222
echo "flushing tables"
$IP route flush table 201
$IP route flush table 202
$IP route flush table 222
echo "removing tables"
$IP route del table 201
$IP route del table 202
$IP route del table 222
#setting loop interface
$IP link set lo up
$IP addr flush dev lo
$IP addr add 127.0.0.1/8 brd + dev lo
#setting up the private device
$IP link set eth1 up
$IP addr flush dev eth1
$IP addr add 192.168.2.5/24 brd + dev eth1
$IP rule add prio 50 table main
$IP route del default table main
#setting up the public devices
$IP link set eth0 up
$IP addr flush dev eth0
$IP addr add 61.11.104.63/24 brd 61.11.104.255 dev eth0
$IP link set eth2 up
$IP addr flush dev eth2
$IP addr add 220.227.153.61/28 brd 220.227.153.63 dev eth2
#configuring route
$IP rule add prio 222 table 222
$IP route add default table 222 proto static nexthop via 61.11.104.1 dev
eth0 weight 1 nexthop via 220.227.153.51 dev eth2 weight 3
#configuring for static routes for one connection
$IP rule add prio 201 from 61.11.104.0/24 table 201
$IP route add default via 61.11.104.1 dev eth0 src 61.11.104.63 proto static
table 201
$IP route append prohibit default table 201 metric 1 proto static
$IP rule add prio 202 from 220.227.153.48/28 table 202
$IP route add default via 220.227.153.51 dev eth2 src 220.227.153.61 proto
static table 202
$IP route append prohibit default table 202 metric 1 proto static
$IP route flush cache
while : ; do
/bin/ping -c 1 220.227.153.51 >> /dev/null
/bin/ping -c 1 61.11.104.1 >>/dev/nyll
sleep 60
done

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] please guide me ...with regard to multipath dynamic routing
  2005-02-07 14:52 [LARTC] please guide me ...with regard to multipath dynamic routing in case of link failure Pankaj Agarwal
@ 2005-02-08 12:55 ` Nguyen Dinh Nam
  0 siblings, 0 replies; 2+ messages in thread
From: Nguyen Dinh Nam @ 2005-02-08 12:55 UTC (permalink / raw)
  To: lartc

So you have to write a daemon to ping the remote gateway, and if ping 
fails, the daemon will remove that nexthop from the multipath route. The 
dead gateway detection patch can't help you in this case.
That's why I created this project, download and run it, and everything 
solved, it's lack of documentation, so you're welcome to write it in the 
Wiki.
http://selab.edu.ms/twiki/bin/view/Networking/RoutesKeeperProject

Pankaj Agarwal wrote:

> Hi,
>
> There's some very silly mistake i've done in my configuration. I did 
> by reading material on web. I'm enclosing my configuration script 
> below. The problem is its not routing the trafic from other interface 
> in case the first interface is down....which should be the wright 
> case. Kindly please guide me what i can do to make it  
> work..dynamically.. Also there is a very common situation which many 
> of you might have face...the interface which is gateway for my device 
> is my local router interface...and there's almost no chance of that's 
> being down ever...How can one configure ip route to consider the ISP 
> ends IP as the gateway when deciding on link status...
>
> Thanks,
>
> Pankaj Agarwal


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-08 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-07 14:52 [LARTC] please guide me ...with regard to multipath dynamic routing in case of link failure Pankaj Agarwal
2005-02-08 12:55 ` [LARTC] please guide me ...with regard to multipath dynamic routing Nguyen Dinh Nam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.