Linux load balancer ping redirect to other interface | Unix Linux Forums | IP Networking

  Go Back    


IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum.

Linux load balancer ping redirect to other interface

IP Networking


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-04-2013
hadinetcat hadinetcat is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 1 January 2014, 2:10 PM EST
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Linux load balancer ping redirect to other interface

Im configuring centos with load balance with ip route and ip rule

Code:
Eth0 192.168.1.5
Eth1 192.168.5.128
[root@host1 testscripts]# ip route
192.168.5.0/24 dev eth1  scope link  src 192.168.5.128
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.5
169.254.0.0/16 dev eth1  scope link 
[root@host1 testscripts]# ip route show table wan2
default via 192.168.5.2 dev eth1  src 192.168.5.128
[root@host1 testscripts]# ip route show table wan1
default via 192.168.1.1 dev eth0  src 192.168.1.5
[root@host1 testscripts]# ip rule show
0:      from all lookup 255
32762:  from 192.168.5.128 lookup wan2
32763:  from all to 192.168.1.5 lookup wan1
32765:  from 192.168.1.5 lookup wan1
32766:  from all lookup main
32767:  from all lookup default

But the problem here when I use
Code:
ping –I 192.168.1.5 www.google.com

The ping it goes to the second interface,
If the second interface is down its stick there..
What to do to fix this issue

Last edited by jim mcnamara; 03-04-2013 at 03:31 PM..
Sponsored Links
    #2  
Old 03-04-2013
hicksd8 hicksd8 is offline Forum Advisor  
Registered User
 
Join Date: Feb 2012
Last Activity: 30 September 2014, 3:47 PM EDT
Location: Cornwall, UK
Posts: 818
Thanks: 43
Thanked 154 Times in 139 Posts
I'm not an expert on this product but I might write a few things that might help.

With this form of load balancing (sometimes called clustering), each real node has a fixed ip address that doesn't ever move. These are the REAL ip addresses. There is a VIP (virtual ip address) that all the clients use that is the address which, in the event of a failure, switches from one real box to the other. The clients aren't aware of the real IP addresses, only the virtual one.

I also notice that Centos users often configure a 'director' service on a third separate machine but I don't believe this is mandatory.

Hope that helps. Perhaps a Centos expert will contribute to this thread.

Anyway, you need to configure a VIP. Search Google if you need help.

Pinging one of the real ip's will only ever get a response from that particular box.
Sponsored Links
    #3  
Old 03-04-2013
hadinetcat hadinetcat is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 1 January 2014, 2:10 PM EST
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
problem is solved

The problem is solved.
resolv.conf was pointing to second interface dns ip. Thatís why packets travels to second interface .
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
piranha load balancer failover robo UNIX for Advanced & Expert Users 0 11-23-2011 02:54 PM
What is the Best Load Balancer for Linux? aixlover Red Hat 1 03-23-2011 10:14 AM
hacmp ip load balancer failover itik AIX 0 06-26-2008 12:52 AM
Load Balancer EltonSky Programming 5 08-30-2006 08:43 PM



All times are GMT -4. The time now is 01:59 AM.