Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-11-2013, 10:16 AM
|
#1
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Rep: 
|
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.
|
|
|
09-11-2013, 02:40 PM
|
#2
|
Senior Member
Registered: Apr 2009
Posts: 1,897
Rep: 
|
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
|
|
|
09-13-2013, 03:23 AM
|
#3
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Original Poster
Rep: 
|
Thanks, but as I wrote:
"'ifconfig' only shows each servers "own" adress, not the virtual ip."
|
|
|
09-13-2013, 02:42 PM
|
#4
|
Senior Member
Registered: Apr 2009
Posts: 1,897
Rep: 
|
Do you configure VIP_INTERFACE="eth0:0" option?
|
|
|
10-07-2013, 04:20 AM
|
#5
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Original Poster
Rep: 
|
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.
|
|
|
10-07-2013, 04:27 AM
|
#6
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Original Poster
Rep: 
|
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
|
|
|
All times are GMT -5. The time now is 06:40 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|