Keepalived virtual MAC address, there are some problems, through passing each master, can you give some advice,
System network card MAC address, MAC (card name for eth0), called physical keepalived set virtual MAC called VMAC keepalived VMAC is to use MACVLAN (a virtual network card solution), VMAC corresponding virtual network card name is uvmac1,
System network configuration of IP (172.16.5.246) and keepalived generated VIP (172.16.5.245) in the same network segment,
?
Test results:
Now, the client VIP, ARP request return of MAC is VMAC (expected)
However, ping response of VIP package, return the MAC is a physical MAC (not in line with expectations)
However, the client sends UDP packets, destination MAC with VMAC, UDP reply message, however, return to the MAC, not VMAC, MAC, but physical (not in line with expectations)
I suspect the routing policy problems, then, modified the routing policy, will be VIP message, is routed to the VMAC
IP route add to along/16 dev uvmac1 table 20
IP add rule from 172.16.5.245/32 table 20
Test again:
VIP, client ARP request return of MAC is VMAC (expected)
Ping the VIP package response, return the MAC is VMAC (in line with expectations, it seems the routing strategy effect)
The client sends UDP packet destination MAC with VMAC, UDP reply message, return to the MAC, is still a physical MAC, (why?) is not in line with expectations, what
CodePudding user response:
A useful didn't look at the building