Skip to content

Instantly share code, notes, and snippets.

@wolstena
Last active December 16, 2015 10:58
Show Gist options
  • Save wolstena/5423695 to your computer and use it in GitHub Desktop.
Save wolstena/5423695 to your computer and use it in GitHub Desktop.
keepalived debuginf info
vrrp_script varnish_check {
script "/etc/keepalived/poller health"
interval 2
}
vrrp_script promote_check {
script "/etc/keepalived/poller promote"
interval 2
weight 20
}
vrrp_script demote_check {
script "/etc/keepalived/poller demote"
interval 2
weight -20
}
vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 88
priority 150 # 101 on master, 100 on backup
garp_master_delay 10
advert_int 2
authentication {
auth_type PASS
auth_pass 56ZPy04e
}
virtual_ipaddress {
172.16.10.88
}
track_script {
varnish_check
promote_check
demote_check
}
dladm show-linkprop -z c0253ee6-ea74-4646-bada-90485fda4a90 net0
dladm reset-linkprop -z c0253ee6-ea74-4646-bada-90485fda4a90 -p allowed-ips net0
root@keepalive02:~# ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN
link/ether 92:f6:e8:33:4f:5e brd ff:ff:ff:ff:ff:ff
4: eql: <MASTER> mtu 576 qdisc noop state DOWN qlen 5
link/slip
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether c2:9d:69:a1:ea:4a brd ff:ff:ff:ff:ff:ff
inet 172.16.10.87/24 brd 172.16.10.255 scope global eth0
inet 172.16.10.88/32 scope global eth0
inet6 fe80::c09d:69ff:fea1:ea4a/64 scope link tentative dadfailed
valid_lft forever preferred_lft forever
6: tunl0: <NOARP> mtu 1480 qdisc noop state DOWN
link/ipip 0.0.0.0 brd 0.0.0.0
7: sit0: <NOARP> mtu 1480 qdisc noop state DOWN
link/sit 0.0.0.0 brd 0.0.0.0
8: ip6tnl0: <NOARP> mtu 1452 qdisc noop state DOWN
Apr 19 22:31:32 keepalive02 Keepalived_healthcheckers[2136]: Netlink reflector reports IP 172.16.10.87 added
Apr 19 22:31:32 keepalive02 Keepalived_healthcheckers[2136]: Netlink reflector reports IP fe80::c09d:69ff:fea1:ea4a added
Apr 19 22:31:32 keepalive02 Keepalived_healthcheckers[2136]: Registering Kernel netlink reflector
Apr 19 22:31:32 keepalive02 Keepalived_healthcheckers[2136]: Registering Kernel netlink command channel
Apr 19 22:31:32 keepalive02 Keepalived_healthcheckers[2136]: Opening file '/etc/keepalived/keepalived.conf'.
Apr 19 22:31:32 keepalive02 Keepalived_healthcheckers[2136]: Configuration is using : 6378 Bytes
Apr 19 22:31:32 keepalive02 Keepalived_healthcheckers[2136]: Using LinkWatch kernel netlink reflector...
Apr 19 22:31:37 keepalive02 Keepalived_vrrp[2137]: Opening file '/etc/keepalived/keepalived.conf'.
Apr 19 22:31:37 keepalive02 Keepalived_vrrp[2137]: Configuration is using : 65976 Bytes
Apr 19 22:31:37 keepalive02 Keepalived_vrrp[2137]: Using LinkWatch kernel netlink reflector...
Apr 19 22:31:37 keepalive02 Keepalived_vrrp[2137]: VRRP sockpool: [ifindex(5), proto(112), fd(11,12)]
Apr 19 22:31:39 keepalive02 Keepalived_vrrp[2137]: VRRP_Instance(VI_1) Transition to MASTER STATE
Apr 19 22:31:41 keepalive02 Keepalived_vrrp[2137]: VRRP_Instance(VI_1) Entering MASTER STATE
Apr 19 22:31:41 keepalive02 Keepalived_vrrp[2137]: VRRP_Instance(VI_1) setting protocol VIPs.
Apr 19 22:31:41 keepalive02 Keepalived_healthcheckers[2136]: Netlink reflector reports IP 172.16.10.88 added
Apr 19 22:31:41 keepalive02 Keepalived_vrrp[2137]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 172.16.10.88
Apr 19 22:31:51 keepalive02 Keepalived_vrrp[2137]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 172.16.10.88
22:35:49.876146 IP (tos 0xc0, ttl 255, id 728, offset 0, flags [none], proto VRRP (112), length 40)
172.16.10.86 > 224.0.0.18: vrrp 172.16.10.86 > 224.0.0.18: VRRPv2, Advertisement, vrid 88, prio 100, authtype simple, intvl 2s, length 20, addrs: 172.16.10.88 auth "56ZPy04e"
22:35:51.876843 IP (tos 0xc0, ttl 255, id 729, offset 0, flags [none], proto VRRP (112), length 40)
172.16.10.86 > 224.0.0.18: vrrp 172.16.10.86 > 224.0.0.18: VRRPv2, Advertisement, vrid 88, prio 100, authtype simple, intvl 2s, length 20, addrs: 172.16.10.88 auth "56ZPy04e"
22:35:51.877247 IP (tos 0xc0, ttl 255, id 729, offset 0, flags [none], proto VRRP (112), length 40)
172.16.10.86 > 224.0.0.18: vrrp 172.16.10.86 > 224.0.0.18: VRRPv2, Advertisement, vrid 88, prio 100, authtype simple, intvl 2s, length 20, addrs: 172.16.10.88 auth "56ZPy04e"
@wolstena
Copy link
Author

keepalive01 172.16.10.86
keepalive02 172.16.10.87

vip 172.16.10.88

@wolstena
Copy link
Author

Host1

keepalive02.r3live.cbcr3.com -> vrrp.mcast.net IP D=224.0.0.18 S=172.16.10.87 LEN=40, ID=715, TOS=0xc0, TTL=255
? -> (multicast) ETHER Type=010B (LLC/802.3), size=64 bytes
? -> (multicast) Bridge PDU T:2 L:36

Host 2

keepalive01.r3live.cbcr3.com -> vrrp.mcast.net IP D=224.0.0.18 S=172.16.10.86 LEN=40, ID=744, TOS=0xc0, TTL=255
? -> (multicast) Bridge PDU T:2 L:36
? -> (multicast) ETHER Type=010B (LLC/802.3), size=64 bytes

@wolstena
Copy link
Author

Do i need to implement igmp on the switch?

@wolstena
Copy link
Author

enabled ip spoofing in zone. this allowed the ip spoofing to work. but still now multicast. both hosts think they own the ip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment