[FUG-BR] RES: RES: RES: Ajuda com CARP

2009-05-11 Por tôpico Ricardo Augusto de Souza
Alguem pode me ajudar a setar o carp do segundo Server ( Ajax) como backup?

Ajax# ifconfig carp2 vhid 1 advskew 100 pass fw_cmt123 200.143.111.113 netmask 
255.255.255.240 up

carp2: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 200.143.111.113 netmask 0xfff0
carp: MASTER vhid 1 advbase 1 advskew 100


Tinha q estar como BACKUP ali.

;((


-Mensagem original-
De: freebsd-boun...@fug.com.br [mailto:freebsd-boun...@fug.com.br] Em nome de 
Ricardo Augusto de Souza
Enviada em: sexta-feira, 8 de maio de 2009 14:00
Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR)
Assunto: [FUG-BR] RES: RES: Ajuda com CARP

O que eu notei agora é quee ambos os servers o status do carp0 esta como MASTER.

Trinity# ifconfig carp0
carp0: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 200.143.111.113 netmask 0xfff0
carp: MASTER vhid 1 advbase 1 advskew 0
Trinity#

Ajax# ifconfig  carp0
carp0: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 200.143.111.113 netmask 0xfff0
carp: MASTER vhid 1 advbase 1 advskew 100
Ajax#

Eu achei que setando o advskew maior ele subiria como  BACKUP.

Veja o carp1:

Trinity# ifconfig  carp1
carp1: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 10.100.0.119 netmask 0xff00
carp: MASTER vhid 2 advbase 1 advskew 0
Trinity#

Ajax# ifconfig carp1
carp1: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 10.100.0.119 netmask 0xff00
carp: BACKUP vhid 2 advbase 1 advskew 100
Ajax#

O Carp1 aparentemente esta OK.

Alguem pode me dar um help?

Valeu

-Mensagem original-
De: freebsd-boun...@fug.com.br [mailto:freebsd-boun...@fug.com.br] Em nome de 
Ricardo Augusto de Souza
Enviada em: sexta-feira, 8 de maio de 2009 10:57
Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR)
Assunto: [FUG-BR] RES: Ajuda com CARP

Consegui fazer funcionar o CARP+pfsync com a seguinte conf ( Ipv4 foram 
alterados ):

Trinity:
cloned_interfaces=carp0 carp1
network_interfaces=lo0 bce0 bce1 pfsync0 em0 em1 em2 em3
ifconfig_bce1=inet 10.100.0.125  netmask 255.255.255.0
ifconfig_carp1=up 10.100.0.119/24 vhid 2 pass fw_cmt123
ifconfig_bce0=inet 200.143.111.111 netmask 255.255.255.240
ifconfig_carp0=up 200.143.111.113/28 vhid 1 pass fw_cmt123
ifconfig_em3=inet 10.1.1.1 netmask 255.255.255.0
ifconfig_pfsync0=up syncif em3

Trinity# sysctl -a|grep carp
net.inet.ip.same_prefix_carp_only: 0
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Trinity#

Ajax:

cloned_interfaces=carp0 carp1
network_interfaces=lo0 bce0 bce1 pfsync0 em0 em1 em2 em3
ifconfig_bce0=inet 200.143.111.112  netmask 255.255.255.240
ifconfig_carp0=up 200.143.111.113/28 vhid 1 advskew 10 pass fw_cmt123
ifconfig_bce1=inet 10.100.0.124  netmask 255.255.255.0
ifconfig_carp1=up 10.100.0.119/24 vhid 2 advskew 10 pass fw_cmt123
ifconfig_pfsync0=up syncif em3
ifconfig_em3=inet 10.1.1.2 netmask 255.255.255.0

Ajax# sysctl -a | grep carp
6carp0: promiscuous mode enabled
6carp0: promiscuous mode disabled
net.inet.ip.same_prefix_carp_only: 0
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Ajax#


NO PF.conf tive que liberar as conexões na interface real ( no caso da bce0 ( 
ext_if ).

Neste cenário, a Trinity é a MASTER e o Ajax o BACKUP ( advskew maior, certo ), 
no entanto, monitorando a interface bce0 em ambos os servidores e pingando o IP 
externo do carp (200.143.111.113 ) os pacotes chegam em ambos servidores.

Trinity# tcpdump -i bce0 -n 'src host 189.57.57.57'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bce0, link-type EN10MB (Ethernet), capture size 96 bytes
10:41:53.244939 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 0, length 64
10:41:54.247977 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 1, length 64
10:41:55.257514 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 2, length 64
10:41:56.267556 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 3, length 64
10:41:57.279997 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 4, length 64
10:41:58.286911 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 5, length 64
10:41:59.296871 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 6, length 64
10:42:00.306318 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 7, length 64
10:42:01.316047 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 8, length 64
10:42:02.328597 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 9, length 64
10:42:03.381118 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 10, length 64
10:42:04.345474 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 11, length 64
10:42:05.355074 IP 

[FUG-BR] RES: RES: RES: Ajuda com CARP

2009-05-11 Por tôpico Ricardo Augusto de Souza
Alguem ai sabe como forço um carp a subir como backup?

Já inverti nas maquinas, agora o Ajax é máster e Trinity o backup.
Só que o carp externo sobe como master em ambos.



-Mensagem original-
De: freebsd-boun...@fug.com.br [mailto:freebsd-boun...@fug.com.br] Em nome de 
Ricardo Augusto de Souza
Enviada em: sexta-feira, 8 de maio de 2009 14:00
Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR)
Assunto: [FUG-BR] RES: RES: Ajuda com CARP

O que eu notei agora é quee ambos os servers o status do carp0 esta como MASTER.

Trinity# ifconfig carp0
carp0: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 200.143.111.113 netmask 0xfff0
carp: MASTER vhid 1 advbase 1 advskew 0
Trinity#

Ajax# ifconfig  carp0
carp0: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 200.143.111.113 netmask 0xfff0
carp: MASTER vhid 1 advbase 1 advskew 100
Ajax#

Eu achei que setando o advskew maior ele subiria como  BACKUP.

Veja o carp1:

Trinity# ifconfig  carp1
carp1: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 10.100.0.119 netmask 0xff00
carp: MASTER vhid 2 advbase 1 advskew 0
Trinity#

Ajax# ifconfig carp1
carp1: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 10.100.0.119 netmask 0xff00
carp: BACKUP vhid 2 advbase 1 advskew 100
Ajax#

O Carp1 aparentemente esta OK.

Alguem pode me dar um help?

Valeu

-Mensagem original-
De: freebsd-boun...@fug.com.br [mailto:freebsd-boun...@fug.com.br] Em nome de 
Ricardo Augusto de Souza
Enviada em: sexta-feira, 8 de maio de 2009 10:57
Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR)
Assunto: [FUG-BR] RES: Ajuda com CARP

Consegui fazer funcionar o CARP+pfsync com a seguinte conf ( Ipv4 foram 
alterados ):

Trinity:
cloned_interfaces=carp0 carp1
network_interfaces=lo0 bce0 bce1 pfsync0 em0 em1 em2 em3
ifconfig_bce1=inet 10.100.0.125  netmask 255.255.255.0
ifconfig_carp1=up 10.100.0.119/24 vhid 2 pass fw_cmt123
ifconfig_bce0=inet 200.143.111.111 netmask 255.255.255.240
ifconfig_carp0=up 200.143.111.113/28 vhid 1 pass fw_cmt123
ifconfig_em3=inet 10.1.1.1 netmask 255.255.255.0
ifconfig_pfsync0=up syncif em3

Trinity# sysctl -a|grep carp
net.inet.ip.same_prefix_carp_only: 0
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Trinity#

Ajax:

cloned_interfaces=carp0 carp1
network_interfaces=lo0 bce0 bce1 pfsync0 em0 em1 em2 em3
ifconfig_bce0=inet 200.143.111.112  netmask 255.255.255.240
ifconfig_carp0=up 200.143.111.113/28 vhid 1 advskew 10 pass fw_cmt123
ifconfig_bce1=inet 10.100.0.124  netmask 255.255.255.0
ifconfig_carp1=up 10.100.0.119/24 vhid 2 advskew 10 pass fw_cmt123
ifconfig_pfsync0=up syncif em3
ifconfig_em3=inet 10.1.1.2 netmask 255.255.255.0

Ajax# sysctl -a | grep carp
6carp0: promiscuous mode enabled
6carp0: promiscuous mode disabled
net.inet.ip.same_prefix_carp_only: 0
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Ajax#


NO PF.conf tive que liberar as conexões na interface real ( no caso da bce0 ( 
ext_if ).

Neste cenário, a Trinity é a MASTER e o Ajax o BACKUP ( advskew maior, certo ), 
no entanto, monitorando a interface bce0 em ambos os servidores e pingando o IP 
externo do carp (200.143.111.113 ) os pacotes chegam em ambos servidores.

Trinity# tcpdump -i bce0 -n 'src host 189.57.57.57'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bce0, link-type EN10MB (Ethernet), capture size 96 bytes
10:41:53.244939 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 0, length 64
10:41:54.247977 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 1, length 64
10:41:55.257514 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 2, length 64
10:41:56.267556 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 3, length 64
10:41:57.279997 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 4, length 64
10:41:58.286911 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 5, length 64
10:41:59.296871 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 6, length 64
10:42:00.306318 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 7, length 64
10:42:01.316047 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 8, length 64
10:42:02.328597 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 9, length 64
10:42:03.381118 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 10, length 64
10:42:04.345474 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 11, length 64
10:42:05.355074 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 12, length 64
10:42:06.364768 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 13, length 64
10:42:07.374496 IP 

[FUG-BR] RES: RES: RES: Ajuda com CARP

2009-05-11 Por tôpico Ricardo Augusto de Souza
Alguem ai sabe como forço o carp a subir como backup?


-Mensagem original-
De: freebsd-boun...@fug.com.br [mailto:freebsd-boun...@fug.com.br] Em nome de 
Ricardo Augusto de Souza
Enviada em: sexta-feira, 8 de maio de 2009 14:00
Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR)
Assunto: [FUG-BR] RES: RES: Ajuda com CARP

O que eu notei agora é quee ambos os servers o status do carp0 esta como MASTER.

Trinity# ifconfig carp0
carp0: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 200.143.111.113 netmask 0xfff0
carp: MASTER vhid 1 advbase 1 advskew 0
Trinity#

Ajax# ifconfig  carp0
carp0: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 200.143.111.113 netmask 0xfff0
carp: MASTER vhid 1 advbase 1 advskew 100
Ajax#

Eu achei que setando o advskew maior ele subiria como  BACKUP.

Veja o carp1:

Trinity# ifconfig  carp1
carp1: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 10.100.0.119 netmask 0xff00
carp: MASTER vhid 2 advbase 1 advskew 0
Trinity#

Ajax# ifconfig carp1
carp1: flags=49UP,LOOPBACK,RUNNING metric 0 mtu 1500
inet 10.100.0.119 netmask 0xff00
carp: BACKUP vhid 2 advbase 1 advskew 100
Ajax#

O Carp1 aparentemente esta OK.

Alguem pode me dar um help?

Valeu

-Mensagem original-
De: freebsd-boun...@fug.com.br [mailto:freebsd-boun...@fug.com.br] Em nome de 
Ricardo Augusto de Souza
Enviada em: sexta-feira, 8 de maio de 2009 10:57
Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR)
Assunto: [FUG-BR] RES: Ajuda com CARP

Consegui fazer funcionar o CARP+pfsync com a seguinte conf ( Ipv4 foram 
alterados ):

Trinity:
cloned_interfaces=carp0 carp1
network_interfaces=lo0 bce0 bce1 pfsync0 em0 em1 em2 em3
ifconfig_bce1=inet 10.100.0.125  netmask 255.255.255.0
ifconfig_carp1=up 10.100.0.119/24 vhid 2 pass fw_cmt123
ifconfig_bce0=inet 200.143.111.111 netmask 255.255.255.240
ifconfig_carp0=up 200.143.111.113/28 vhid 1 pass fw_cmt123
ifconfig_em3=inet 10.1.1.1 netmask 255.255.255.0
ifconfig_pfsync0=up syncif em3

Trinity# sysctl -a|grep carp
net.inet.ip.same_prefix_carp_only: 0
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Trinity#

Ajax:

cloned_interfaces=carp0 carp1
network_interfaces=lo0 bce0 bce1 pfsync0 em0 em1 em2 em3
ifconfig_bce0=inet 200.143.111.112  netmask 255.255.255.240
ifconfig_carp0=up 200.143.111.113/28 vhid 1 advskew 10 pass fw_cmt123
ifconfig_bce1=inet 10.100.0.124  netmask 255.255.255.0
ifconfig_carp1=up 10.100.0.119/24 vhid 2 advskew 10 pass fw_cmt123
ifconfig_pfsync0=up syncif em3
ifconfig_em3=inet 10.1.1.2 netmask 255.255.255.0

Ajax# sysctl -a | grep carp
6carp0: promiscuous mode enabled
6carp0: promiscuous mode disabled
net.inet.ip.same_prefix_carp_only: 0
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Ajax#


NO PF.conf tive que liberar as conexões na interface real ( no caso da bce0 ( 
ext_if ).

Neste cenário, a Trinity é a MASTER e o Ajax o BACKUP ( advskew maior, certo ), 
no entanto, monitorando a interface bce0 em ambos os servidores e pingando o IP 
externo do carp (200.143.111.113 ) os pacotes chegam em ambos servidores.

Trinity# tcpdump -i bce0 -n 'src host 189.57.57.57'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bce0, link-type EN10MB (Ethernet), capture size 96 bytes
10:41:53.244939 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 0, length 64
10:41:54.247977 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 1, length 64
10:41:55.257514 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 2, length 64
10:41:56.267556 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 3, length 64
10:41:57.279997 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 4, length 64
10:41:58.286911 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 5, length 64
10:41:59.296871 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 6, length 64
10:42:00.306318 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 7, length 64
10:42:01.316047 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 8, length 64
10:42:02.328597 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 9, length 64
10:42:03.381118 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 10, length 64
10:42:04.345474 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 11, length 64
10:42:05.355074 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 12, length 64
10:42:06.364768 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 13, length 64
10:42:07.374496 IP 189.57.57.57  200.143.111.113: ICMP echo request, id 18799, 
seq 14, length 64
10:42:08.416190 IP 189.57.57.57  

Re: [FUG-BR] RES: RES: RES: Ajuda com CARP

2009-05-11 Por tôpico Franklin França
Tenta mudar o valor do servidor master advskew=1 e no outro servidor backup
advskew=2

e verificar se sysctl  *net.inet.carp.preempt: 1 nós dois servidores*
**
*
ok

posta ai o resultado
*--
atenciosamente,

Franklin de França
-
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd