Jun 27 02:58:10 nn systemd: Started LVS and VRRP High Availability Monitor. # 启动LVS和VRRP HA监测服务 Jun 27 02:58:10 nn Keepalived_healthcheckers[11285]: Opening file '/etc/keepalived/keepalived.conf'. # 读取ka配置文件 Jun 27 02:58:10 nn Keepalived_vrrp[11286]: Registering Kernel netlink reflector # ka使用Linux内核netlink创建与ka进程的通信 # netlink是用户进程与内核的IP网络配置之间的通信接口,同时它也可以作为内核内部与多个用户空间进程之 # 间的消息传输系统.基于netlink,用户进程和内核之间的通信支持全双工、组播、异步,像一台纯软件实现的“虚拟机三层交换机”,从这一点可感受到Linux内核有多强大!
Jun 27 02:58:10 nn Keepalived_vrrp[11286]: Registering Kernel netlink command channel Jun 27 02:58:10 nn Keepalived_vrrp[11286]: Registering gratuitous ARP shared channel Jun 27 02:58:10 nn Keepalived_vrrp[11286]: Opening file '/etc/keepalived/keepalived.conf'. Jun 27 02:58:10 nn Keepalived_vrrp[11286]: VRRP_Instance(VI_1) removing protocol VIPs. Jun 27 02:58:10 nn Keepalived_vrrp[11286]: Using LinkWatch kernel netlink reflector... Jun 27 02:58:10 nn Keepalived_vrrp[11286]: VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)] Jun 27 02:58:11 nn Keepalived_vrrp[11286]: VRRP_Instance(VI_1) Transition to MASTER STATE Jun 27 02:58:12 nn Keepalived_vrrp[11286]: VRRP_Instance(VI_1) Entering MASTER STATE # 通过VRRP协议和ka的配置文件,将这台server选为master角色
Jun 27 02:58:12 nn Keepalived_vrrp[11286]: VRRP_Instance(VI_1) setting protocol VIPs. # eth0网口上设置VIP Jun 27 02:58:12 nn Keepalived_vrrp[11286]: Sending gratuitous ARP on eth0 for192.168.1.10 # 在eth0发送ARP广播,对外问下192.168.1.10有没有机器在使用 Jun 27 02:58:12 nn Keepalived_vrrp[11286]: VRRP_Instance(VI_1) Sending/queueing gratuitous ARPs on eth0 for192.168.88.10 Jun 27 02:58:12 nn Keepalived_vrrp[11286]: Sending gratuitous ARP on eth0 for192.168.1.10 Jun 27 02:58:12 nn Keepalived_vrrp[11286]: Sending gratuitous ARP on eth0 for192.168.1.10 Jun 27 02:58:12 nn Keepalived_vrrp[11286]: Sending gratuitous ARP on eth0 for192.168.1.10 Jun 27 02:58:12 nn Keepalived_vrrp[11286]: Sending gratuitous ARP on eth0 for192.168.1.10
备机的message:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Jun 27 03:25:23 dn2 systemd: Starting LVS and VRRP High Availability Monitor... Jun 27 03:25:23 dn2 Keepalived[11248]: Starting Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa32f2 Jun 27 03:25:23 dn2 Keepalived[11248]: Opening file '/etc/keepalived/keepalived.conf'. Jun 27 03:25:23 dn2 systemd: PID file /var/run/keepalived.pid not readable (yet?) after start. Jun 27 03:25:23 dn2 Keepalived[11249]: Starting Healthcheck child process, pid=11250 Jun 27 03:25:23 dn2 Keepalived[11249]: Starting VRRP child process, pid=11251 Jun 27 03:25:23 dn2 systemd: Started LVS and VRRP High Availability Monitor. Jun 27 03:25:23 dn2 Keepalived_healthcheckers[11250]: Opening file '/etc/keepalived/keepalived.conf'. Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: Registering Kernel netlink reflector Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: Registering Kernel netlink command channel Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: Registering gratuitous ARP shared channel Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: Opening file '/etc/keepalived/keepalived.conf'. Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: VRRP_Instance(VI_1) removing protocol VIPs. Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: Using LinkWatch kernel netlink reflector... Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: VRRP_Instance(VI_1) Entering BACKUP STATE # 备机进入BACKUP状态 Jun 27 03:25:23 dn2 Keepalived_vrrp[11251]: VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]