[LIP] ip aliasing and loadbalancing with iproute2

"Logu" <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <0a6601c56531$4330c640$140110ac@loguco>
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 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 



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.