Use_vmac keepalived causing interfaces to disconnect

Ahoy ahoy friends.
I was able to built up my desired setup, my x86 device as master router, and my Raspberry Pi 4 at another location for backup.
Almost everything works as expected, unfortunately there are still some DHCP issues, but i hope to solve that soon.
Now i'd like to talk about the use_vmac issue i am experiencing. To be honest i'd like to use a virtual mac for the WAN facing devices. The reason is: I got ISP routers and both OpenWrt devices are connected to them. I can only provide port forwarding when i specifiy a MAC address, so i have to use a MAC address that stays the same, even if the other device dies. So i think using virtual MAC addresses would be a good choice, or at least some custom MAC address.

Unfortunately, when i do so, the devices on the specific interfaces keeps connecting and disconnecting. When i remove use_vmac again, it works.

What's the issue here? Unfortunately keepalived is a documentation nightmare.
This guide here https://openwrt.org/docs/guide-user/network/high-availability is unfortunately missing some important details.

That's how it looks like, my .1100 interfaces on master and backup router use "use_vmac" and that's what happens.

Sat Aug 21 10:37:05 2021 user.notice mwan3track[3926]: Interface wanb (bonding-i0.1100) is connecting
Sat Aug 21 10:37:05 2021 user.info mwan3track[3926]: Lost 4 ping(s) on interface wanb (bonding-i0.1100). Current score: 9
Sat Aug 21 10:37:19 2021 user.info mwan3track[3926]: Check (ping) failed for target "8.8.4.4" on interface wanb (bonding-i0.1100). Current score: 10
Sat Aug 21 10:37:23 2021 user.info mwan3track[3926]: Check (ping) failed for target "8.8.8.8" on interface wanb (bonding-i0.1100). Current score: 10
Sat Aug 21 10:37:27 2021 user.info mwan3track[3926]: Check (ping) failed for target "208.67.222.222" on interface wanb (bonding-i0.1100). Current score: 10
Sat Aug 21 10:37:42 2021 user.info mwan3track[3926]: Check (ping) failed for target "8.8.4.4" on interface wanb (bonding-i0.1100). Current score: 10
Sat Aug 21 10:37:46 2021 user.info mwan3track[3926]: Check (ping) failed for target "8.8.8.8" on interface wanb (bonding-i0.1100). Current score: 10
Sat Aug 21 10:37:50 2021 user.info mwan3track[3926]: Check (ping) failed for target "208.67.222.222" on interface wanb (bonding-i0.1100). Current score: 10
Sat Aug 21 10:37:54 2021 user.info mwan3track[3926]: Check (ping) failed for target "208.67.220.220" on interface wanb (bonding-i0.1100). Current score: 10
Sat Aug 21 10:37:54 2021 user.notice mwan3track[3926]: Interface wanb (bonding-i0.1100) is disconnecting

The specific part from my backup router:

vrrp_instance E2 {
  state BACKUP
  interface eth0.1100
  virtual_router_id 51
  use_vmac
  vmac_xmit_base
  priority 99
  advert_int 1
  virtual_ipaddress {
    192.168.154.4/24
  }
  virtual_routes {
    src 192.168.154.4 to 0.0.0.0/0 via 192.168.154.1 dev eth0.1100 metric 5
  }
  authentication {
    auth_type PASS
    auth_pass SECRET
  }
  nopreempt
}

And master router:

vrrp_instance E2 {
  state BACKUP
  interface bonding-i0.1100
  virtual_router_id 51
  use_vmac
  vmac_xmit_base
  priority 100
  advert_int 1
  virtual_ipaddress {
    192.168.154.4/24
  }
  virtual_routes {
    src 192.168.154.4 to 0.0.0.0/0 via 192.168.154.1 dev bonding-i0.1100 metric 5
  }
  authentication {
    auth_type PASS
    auth_pass SECRET
  }
  preempt
}


I hope someone might help :slight_smile: Thanks in advance!

I had a cursive look at that guide a while ago and it mostly seemed ok... (is plenty good enough for someone who knows what they are doing to get up and running)

as with other semi-complex stuff ( radius, asterisk, etc ) it really helps if you know the service inside out on a full distro...

I suggest you setup two minimal debian vms's and a fake isp and client vm and test vrrp with a full distro... if the issue's you have are not present there then you know it's likely something with the openwrt layers...

Thanks a lot for your hint. I did so and i was able to find the issue. Unfortunately i don't know how to solve this problem. Somehow it's mwan3 what is bringing the interface down which uses "use_vmac", without mwan3 it works fine.

1 Like

that was a likely probability...

create an issue in the packages repo... they may have an override or something for this...

if not the necessary mods may be minimal...

(you may wish to add a small section at the base of the wiki guide describing those options also seeing as you found it inadequate)

1 Like