Note on using VRRP with Virtual MAC address
=============================================
Alexandre Cassen
July 11th 2012
To reduce takeover impact, some networking environment would require using
VRRP with VMAC address. To reach that goal Keepalived VRRP framework implements
VMAC support by the invocation of 'use_vmac' keyword in configuration file.
Internally, Keepalived code will bring up virtual interfaces, each interface
dedicated to a specific virtual_router. Keepalived uses Linux kernel macvlan
driver to defines thoses interfaces. It is then mandatory to use kernel
compiled with macvlan support.
In addition we can mention that VRRP VMAC will work only with kernel including
the following patch :
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=729e72a10930ef765c11a5a35031ba47f18221c4
By default MACVLAN interface are in VEPA mode which filters out received
packets whose MAC source address matches that of the MACVLAN interface. Setting
MACVLAN interface in private mode will not filter based on source MAC address.
Alternatively, you can specify 'vmac_xmit_base' which will cause the VRRP
messages to be transmitted and received on the underlying interface whilst ARP
will happen from the the VMAC interface.
You may also need to tweak your physical interfaces to play around with well
known ARP issues. If you have issues, try the following configurations :
1) Global configuration
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 1
net.ipv4.conf.all.arp_filter = 0
2) Physical interface configuration
For the physical ethernet interface running VRRP instance use:
net.ipv4.conf.eth0.arp_filter = 1
3) VMAC interface
consider the following VRRP configuration :
vrrp_instance instance1 {
state BACKUP
interface eth0
virtual_router_id 250
use_vmac
vmac_xmit_base # Transmit VRRP adverts over physical interface
priority 150
advert_int 1
virtual_ipaddress {
10.0.0.254
}
}
The 'use_vmac' keyword will drive keepalived code to create a macvlan interface
named 'vrrp.250' (default internal paradigm is vrrp.{virtual_router_id}, you can
override this naming by giving an argument to 'use_vmac' keyword, eg: use_vmac
vrrp250).
you then need to configure interface with :
net.ipv4.conf.vrrp.250.arp_filter = 0
net.ipv4.conf.vrrp.250.accept_local = 1 (this is needed for the address owner case)
net.ipv4.conf.vrrp.250.rp_filter = 0
you can create notify_master script to automate this configuration step for you :
vrrp_instance instance1 {
state BACKUP
interface eth0
virtual_router_id 250
use_vmac
priority 150
advert_int 1
virtual_ipaddress {
10.0.0.254
}
notify_master "/usr/local/bin/vmac_tweak.sh vrrp.250"
}
没有合适的资源?快使用搜索试试~ 我知道了~
keepalived-1.2.18.tar.gz
需积分: 22 37 下载量 19 浏览量
2017-04-10
08:44:57
上传
评论
收藏 323KB GZ 举报
温馨提示
共184个文件
h:60个
c:58个
in:12个
keepalived可以实现所有服务发高可用,这对集群来说将是非常重要的
资源推荐
资源详情
资源评论
收起资源包目录
keepalived-1.2.18.tar.gz (184个子文件)
genhash.1 2KB
keepalived.conf.5 18KB
keepalived.8 3KB
AUTHOR 41B
AUTHOR 39B
vrrp.c 50KB
vrrp_snmp.c 45KB
check_snmp.c 33KB
libipvs.c 30KB
vrrp_scheduler.c 30KB
ipvswrapper.c 27KB
check_http.c 24KB
check_smtp.c 23KB
vrrp_parser.c 18KB
vrrp_netlink.c 17KB
ipwrapper.c 17KB
scheduler.c 17KB
vrrp_data.c 16KB
vrrp_if.c 16KB
smtp.c 15KB
vrrp_print.c 12KB
vrrp_ipaddress.c 12KB
utils.c 11KB
parser.c 10KB
check_data.c 10KB
memory.c 10KB
check_parser.c 9KB
http.c 9KB
main.c 9KB
vrrp_iproute.c 9KB
vrrp_daemon.c 8KB
check_api.c 8KB
check_ssl.c 8KB
snmp.c 8KB
vrrp_sync.c 8KB
check_misc.c 7KB
main.c 7KB
check_daemon.c 7KB
layer4.c 7KB
vrrp_vmac.c 7KB
timer.c 6KB
vrrp_ndisc.c 6KB
vrrp_track.c 6KB
libipvs.c 5KB
signals.c 5KB
vector.c 5KB
vrrp_notify.c 5KB
ssl.c 5KB
global_data.c 4KB
layer4.c 4KB
check_tcp.c 4KB
global_parser.c 4KB
list.c 4KB
vrrp_arp.c 3KB
vrrp_index.c 3KB
vrrp_ipsecah.c 3KB
ip_vs_nl_policy.c 3KB
pidfile.c 3KB
html.c 2KB
notify.c 2KB
daemon.c 2KB
sock.c 2KB
logger.c 2KB
ChangeLog 155KB
ChangeLog 639B
keepalived.conf 3KB
configure 169KB
CONTRIBUTORS 830B
COPYING 18KB
COPYING 18KB
keepalived.conf.fwmark 433B
.gitignore 0B
ip_vs.h 15KB
vrrp.h 12KB
check_data.h 8KB
vrrp_if.h 5KB
check_snmp.h 4KB
vrrp_snmp.h 4KB
scheduler.h 4KB
libipvs.h 4KB
vrrp_ipaddress.h 4KB
check_api.h 3KB
vrrp_track.h 3KB
ipvswrapper.h 3KB
check_http.h 3KB
utils.h 3KB
vrrp_data.h 3KB
smtp.h 3KB
parser.h 3KB
vector.h 2KB
http.h 2KB
main.h 2KB
snmp.h 2KB
vrrp_netlink.h 2KB
vrrp_iproute.h 2KB
vrrp_ipsecah.h 2KB
vrrp_ndisc.h 2KB
memory.h 2KB
list.h 2KB
vrrp_arp.h 2KB
共 184 条
- 1
- 2
资源评论
在京奋斗者
- 粉丝: 2161
- 资源: 102
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功