PDA

View Full Version : Adding a new carp interface


locutus
September 17th, 2009, 09:47
Hi!

I have here two machines in a cluster with 35 carp interfaces each. Now i have to add a new carp interface. Can i do that on the fly, starting on the backup machine with the following commands?

ifconfig carp36 create
ifconfig carp36 inet xxx.xx.xxx.xx/xx vhid 37 advskew 100 pass pass

When this interface is coming up, are there not problems missing the same interface on the master?

Thx

Alex

pbd
September 17th, 2009, 11:24
You can do that. When carp36 will be only at backup machine it will go up and become master. After you create carp36 on primary machine, the master will move to it (if you have net.inet.carp.preempt set to 1).

locutus
September 17th, 2009, 14:03
Will it become master only for this interface? It was also a little bit confusing, when reading the manpage. It says to use different vhid but the same pass on the two physical machines.
When i look into the rc.conf of our two machines, the vhid on both machines are the same.
Sorry, but i am newbie using carp and i didn't found it by google or reading docs.

DutchDaemon
September 17th, 2009, 15:53
What is unclear about the EXAMPLES in carp?


Assume that host A is the preferred master and 192.168.1.x/24 is config-
ured on one physical interface and 192.168.2.y/24 on another. This is
the setup for host A:

ifconfig carp0 create
ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.1/24
ifconfig carp1 create
ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.2.1/24

The setup for host B is identical, but it has a higher advskew:

ifconfig carp0 create
ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24
ifconfig carp1 create
ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24


Same ('corresponding') vhid and pass, different advskew (lower or none on master, any or higher on backup)

mortsmel
September 22nd, 2009, 21:55
its amazing, i followed the how to and my boxes on one of my interfaces are fighting for master and both machines are receiving carp_input: received ttl 1 != 255i on rl0 ...



What is unclear about the EXAMPLES in carp?


Assume that host A is the preferred master and 192.168.1.x/24 is config-
ured on one physical interface and 192.168.2.y/24 on another. This is
the setup for host A:

ifconfig carp0 create
ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.1/24
ifconfig carp1 create
ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.2.1/24

The setup for host B is identical, but it has a higher advskew:

ifconfig carp0 create
ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24
ifconfig carp1 create
ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24


Same ('corresponding') vhid and pass, different advskew (lower or none on master, any or higher on backup)

pbd
September 23rd, 2009, 07:05
Can you post ifconfig output from both machines?