Files
go-alived/etc/config.unicast.yaml
T
loveuer 00eba85e39
Release / Build darwin-amd64 (push) Has been cancelled
Release / Build linux-amd64 (push) Has been cancelled
Release / Build darwin-arm64 (push) Has been cancelled
Release / Build linux-arm64 (push) Has been cancelled
Release / Create Release (push) Has been cancelled
feat: add VRRP unicast peer support for macvlan and restricted network environments
- Add unicast_src_ip and unicast_peers config fields
- NewUnicastSocket binds to source IP for proper packet reception
- SendTo() sends VRRP advertisements directly to peer IPs
- Receive loop filters packets from non-peer sources in unicast mode
- Backward compatible: multicast mode used when unicast_peers is empty
- Add unicast config example (etc/config.unicast.yaml)
- Update README with unicast documentation and examples
2026-06-07 13:14:17 +08:00

32 lines
1.1 KiB
YAML

global:
router_id: "node1"
vrrp_instances:
# Example: VRRP with unicast peers for macvlan environments
# In macvlan networks, multicast between sub-interfaces of the same
# parent interface does not work. Use unicast to send VRRP advertisements
# directly to peer IP addresses.
- name: "VI_1"
interface: "eth0"
state: "BACKUP"
virtual_router_id: 51
priority: 100
advert_interval: 1
auth_type: "PASS"
auth_pass: "secret123"
virtual_ips:
- "192.168.1.100/24"
# Unicast source IP: the local IP address to use for sending VRRP packets.
# If omitted, the interface's primary IPv4 address is used automatically.
unicast_src_ip: "192.168.1.10"
# Unicast peer list: IP addresses of the other VRRP nodes.
# When configured, VRRP advertisements are sent directly to these IPs
# instead of using multicast (224.0.0.18).
# On each node, list the OTHER nodes' IPs here (not your own).
unicast_peers:
- "192.168.1.11"
# Add more peers for setups with more than two nodes:
# - "192.168.1.12"