LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2013, 10:16 AM   #1
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
ucarp - how determine which server is active?


When 2 servers share an ip with ucarp, how an I see which one is active?
I'm running mysql-5.6 on two Centos 6 servers.
Mysql is configured master-master, and ucarp is used for failover. This works fine.
But sometimes I want to know which server is active, can't see how to check that?
'ifconfig' only shows each servers "own" adress, not the virtual ip.
'netstat' doesn't give any hint.
 
Old 09-11-2013, 02:40 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,897

Rep: Reputation: 164Reputation: 164
The "ifconfig" should give a clue. If one of two server show like following, that is active. The IP address of interface is virtual and the interface has a alias name.

eth1:ucarp Link encap:Ethernet HWaddr 00:0c:29:5b:d8:03
inet addr:172.17.0.74 Bcast:172.17.15.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 
Old 09-13-2013, 03:23 AM   #3
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
Thanks, but as I wrote:
"'ifconfig' only shows each servers "own" adress, not the virtual ip."
 
Old 09-13-2013, 02:42 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,897

Rep: Reputation: 164Reputation: 164
Do you configure VIP_INTERFACE="eth0:0" option?
 
Old 10-07-2013, 04:20 AM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
Sorry for late reply.
No, I have not configured eth0:0

I tried adding
"VIP_INTERFACE="eth0:0"
"BIND_INTERFACE="eth0:0"
to the config file, but ifconfig still shows nothing.
I had hoped I could use the simple default config but I guess I have to add configuration for eth0:0 and change startup.
 
Old 10-07-2013, 04:27 AM   #6
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
Found it!
Instead of using "ifconfig" i tried "ip addr", this command shows the carp address on eth0!
Code:
# ip addr
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 172.17.1.12/24 brd 172.17.1.255 scope global eth0
    inet 172.17.1.9/32 scope global eth0
    inet6 fe80::216:3eff:fe30:bb98/64 scope link 
       valid_lft forever preferred_lft forever
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
UCARP IP address failover creates multiple masters duffrecords Linux - Software 3 04-13-2012 02:11 AM
how do i determine the mail server im using? eleara Linux - Server 4 04-30-2008 05:37 AM
Determine whether there are active sessions from CLI mpmackenna Linux - Newbie 3 10-04-2007 10:04 AM
determine active terminal michal017 Linux - Software 4 06-14-2007 12:11 AM
How do you determine how much AC for a server room? BrianK General 4 10-03-2006 10:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration