problems with vmac : vmac interface go down
michel calame <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
I have tested keepalived vrrp 1.2.19 installed on centos 7.1 with vmac
to make it work I have to put these lines in /etc/sysctl.conf :
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.arp_ignore=1
when the physical interface go down on the first node (I make shutdown
on the switch) the second node become master.
then when the the physical interface go up again, the first node become
master again. but I can't ping virtual address because
the vmac interface (named vrrp1 and vrrp2 in my case) still be down :
[root@dell840 ~]# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode
DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state
DOWN mode DEFAULT qlen 1000
link/ether 00:18:8b:fd:98:be brd ff:ff:ff:ff:ff:ff
3: ens2: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 00:1b:21:4e:8a:00 brd ff:ff:ff:ff:ff:ff
4: ens2.201@ens2: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500
qdisc noqueue state UP mode DEFAULT
link/ether 00:1b:21:4e:8a:00 brd ff:ff:ff:ff:ff:ff
18: vrrp1@ens2: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN
mode DEFAULT
link/ether 00:00:5e:00:01:33 brd ff:ff:ff:ff:ff:ff
19: [email protected]: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state
DOWN mode DEFAULT
link/ether 00:00:5e:00:01:34 brd ff:ff:ff:ff:ff:ff
I have to do
ip link set dev vrrp1 up
ip link set dev vrrp2 up
to ping work again....
I have added these two lines in a notify_master script
without these two line all is ok as long as the physical interface don't
go down (I can stop and start keepalived, I can play with priority and
master/slave work like it did...)
her is my final configuration :
vrrp_instance VI_1 {
state MASTER
interface ens2
use_vmac vrrp1
vmac_xmit_base
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
172.16.128.123
}
notify_master "/usr/sbin/ip link set dev vrrp1 up"
}
vrrp_instance VI_2 {
state MASTER
interface ens2.201
use_vmac vrrp2
vmac_xmit_base
virtual_router_id 52
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.201.100
}
notify_master "/usr/sbin/ip link set dev vrrp2 up"
}
------------------------------------------------------------------------------