ip aliasing and loadbalancing with iproute2

Linux Advanced Routing and Traffic Control

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

 



Hi,

We have two internet connections and I would like to loadbalance between the
two using advanced routing.  The gateway machine to my lan has two
interfaces, one connected to lan(eth0) and other to wan (eth1).  The wan
side interface is connected to a switch which is terminated with two
internet connections from two ISPs.

I have added the routes as follows,

   ip route add default scope global nexthop via x.x.x.82 weight 1
nexthop 192.168.1.5 weight 1

I was not able to specify the IP aliased device eth1:bsnl, so i added
without giving the device.  Now the problem I face is, the traffic is not
going through the IP aliased interface (eth1:bsnl). Is there a way to over
come this ?

-----------------------------------------------------------------
[root@rose logu]# ip route show
x.x.x.80/29 dev eth1  proto kernel  scope link  src x.x.x.82
192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.5
172.16.1.0/24 dev eth0  scope link
127.0.0.0/8 dev lo  scope link
default

       nexthop via x.x.x.82 dev eth1 weight 1
       nexthop via 192.168.1.5  dev eth1 weight 1


[root@rose logu]# ip addr show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 100
   link/ether 00:06:5b:38:99:b7 brd ff:ff:ff:ff:ff:ff
   inet 172.16.1.10/24 brd 172.16.1.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
   link/ether 00:06:5b:38:99:b8 brd ff:ff:ff:ff:ff:ff
   inet x.x.x.82/29 brd x.x.x.x scope global eth1
   inet 192.168.1.5/24 brd 192.168.1.255 scope global eth1:bsnl

-----------------------------------------------------------------

Thanks
-logu

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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