e376 Some problems with CARP - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Firewalls

Firewalls IPFW, PF, IPF (but not limited) related discussion

Reply
 
Thread Tools Display Modes
  #1  
Old November 17th, 2008, 10:30
sibdoma sibdoma is offline
Junior Member
 
Join Date: Nov 2008
Location: Ukraine, Dnepropetrovsk
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Some problems with CARP

I'm using CARP on FreeBSD 7.1-PRERELEASE.
Code:
sysctl net.inet.carp
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 1
net.inet.carp.suppress_preempt: 0
And I have some common IP addresses on different vlan's.
I cant use carpdev option on FreeBSD, so, first, i have to appoint ip addresses to my vlan-interfaces.
Finally I have working version of CARP
HOST 1
Code:
ifconfig carp0
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: MASTER vhid 1 advbase 1 advskew 0

ifconfig carp1
carp1: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: BACKUP vhid 2 advbase 1 advskew 100
HOST 2
Code:
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: BACKUP vhid 1 advbase 1 advskew 100

carp1: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: MASTER vhid 2 advbase 1 advskew 0
But, dmesg of Host 1 is
Code:
arp: --------- is using my IP address 172.17.5.1 on vlan2!
similar, dmesg of host 2.

Is that normal? or i did something wrong?

Last edited by sibdoma; November 17th, 2008 at 13:02.
Reply With Quote
  #2  
Old November 17th, 2008, 11:16
squirL squirL is offline
Junior Member
 
Join Date: Nov 2008
Location: Ukraine, Kyiv
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by sibdoma View Post
I'm using CARP on FreeBSD 7.1-PRERELEASE.
Code:
sysctl net.inet.carp
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 1
net.inet.carp.suppress_preempt: 0
And I have some common IP addresses on different vlan's.
I cant use carpdev option on FreeBSD, so, first, i have to appoint ip addresses to my vlan-interfaces.
Finally I have working version of CARP
HOST 1
Code:
ifconfig carp0
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: MASTER vhid 1 advbase 1 advskew 0

ifconfig carp1
carp1: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: BACKUP vhid 2 advbase 1 advskew 100
HOST 2
Code:
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: BACKUP vhid 1 advbase 1 advskew 100

carp1: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: BACKUP vhid 2 advbase 1 advskew 100
But, dmesg of Host 1 is
Code:
arp: --------- is using my IP address 172.17.5.1 on vlan2!
similar, dmesg of host 2.

Is that normal? or i did something wrong?
what have u set same adresses (172.17.5.1) on both carp interfaces for??
carp0 must differ from carp1
Reply With Quote
  #3  
Old November 17th, 2008, 11:49
sibdoma sibdoma is offline
Junior Member
 
Join Date: Nov 2008
Location: Ukraine, Dnepropetrovsk
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For arpbalancing.
From man
Code:
 First the carp interfaces on host A are configured.  The advskew of 100
     on the second virtual host means that its advertisements will be sent out
     slightly less frequently.

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

     The configuration for host B is identical, except the advskew is on vir-
     tual host 1 rather than virtual host 2.

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

     Finally, the ARP balancing feature must be enabled on both hosts:

           sysctl net.inet.carp.arpbalance=1
Reply With Quote
  #4  
Old November 17th, 2008, 12:13
squirL squirL is offline
Junior Member
 
Join Date: Nov 2008
Location: Ukraine, Kyiv
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

nice please, look to the man once more.
Code:
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: BACKUP vhid 1 advbase 1 advskew 100

carp1: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 172.17.5.1 netmask 0xffffff00
        carp: BACKUP vhid 2 advbase 1 advskew 100
u set the same advskew on both interfaces. i think - it's incorrect. try to set one to 0 for carp1 (host B)

PS: we can discuss your problem in russian using ICQ
__________________
freebsd setup is like sex - it's frightful but only for the first time ;)
Reply With Quote
  #5  
Old November 17th, 2008, 13:07
sibdoma sibdoma is offline
Junior Member
 
Join Date: Nov 2008
Location: Ukraine, Dnepropetrovsk
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by squirL View Post
nice please, look to the man once more.

u set the same advskew on both interfaces. i think - it's incorrect. try to set one to 0 for carp1 (host B)

PS: we can discuss your problem in russian using ICQ
Sorry, I made a mistake when copying. Fixed...
Reply With Quote
  #6  
Old November 20th, 2008, 12:18
sibdoma sibdoma is offline
Junior Member
 
Join Date: Nov 2008
Location: Ukraine, Dnepropetrovsk
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The problem is solved. Thanks to squirL for help.
vlan interfaces and carp interfaces have to have different IP from one subnet, BUT NOT yhe same IP.
Example,

vlan2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MU LTICAST> metric 0 mtu 1500
options=3<RXCSUM,TXCSUM>
ether 00:30:48:d2:12:07
inet 172.17.5.253 netmask 0xffffff00 broadcast 172.17.5.255

and

carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
inet 172.17.5.1 netmask 0xffffff00
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
carp ipbalance ? feillex General 4 November 22nd, 2008 18:08
Problems vermaden Feedback 5 November 16th, 2008 22:36


All times are GMT +1. The time now is 01:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0