This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hot standby issue - both mac's active ?

In a labsetup i'm trying to build a hot-standby configuration using two vphere 4.1 esx servers. I'm also use the ASG8 vmware image to deploy the gateway.

First of all i installed both ASG servers on one ESX. The hot-standby configuration works perfectly. Both machines get a net virtual mac adress en when I shutdown the master, de slave automaticaly kicks in. Both ASG's are active and only the master responds to request. ( I dont know how this actually works, but it seems to work ok. ) 

When I move the slave ASG to another ESX server, problems begins. I have a client linux box on every ESX. When only the master ASG is running both clients are able to ping the master ASG. But when I startup the slave ASG, the client of the ESX on wich the slave is running stops receiving reply on the pings it is sending. The client on on same ESX as the master still receives reply on a ping. 

How is this possible ? Both ESXs are connected to a Netgear switch. I think it has something to do with the duplicate mac adressen en ip's 

Can anybody help me ?


This thread was automatically locked due to age.
  • Hi,

    this is probably an VMWare issue. Seems like VMware has some logic within the virtual switch, not to forward packets for MAC addresses which belong to a running virtual machine.

    Either try to fix this within VMware, maybe some advanced virtual switch settings, or disable the virtual MAC address usage on both nodes via command line "cc set ha advanced virtual_mac 0".

    Cheers
     Ulrich
  • I run 2 asg's in a HA setup on separate hosts.

    I have set the virtual asg's to use a dedicated nic card on each host for the HA uplink.  These are then connected via a crossover cable and all is working fine.

    It sounds like both asg's are thinking they are the masters as they cannot detect a slave device.
  • In de HA configuration is still clearly that one is the master and one is the slave. So the HA link works fine. I use a dedicated vlan for tha HA connection between de master and slave. 

    I think da_marlin's sugestion is in the right direction. Maybe the packets wont leave the ESX to the fysical switch. I have the plan to use a decicated nic for the uplink and test the configuration again. In this case alle packets must travel through the fysical switch. I will report my result tomorrow. 

    Still I can't figure out how the fail-over concept works. I always thought that te mac address needs te be unique on one network. Otherwise strange things will happen. (like this [:$]). What is the nics state of the ASG when is is running in slave-mode ? The nic isn't down. Can anybody explain to me how this concept works ?

    Grtz
    Ipas
  • Did some testing yesterday and it turns out to be some kind of bug in the virtual switch. The virtual switch doesn't forward the packets if a virtual machine is connected to that switch with the same mac address. There is an option in the virtual switch called 'Mac changes wich got some effect, but not the effect I want. 

    Disabling the virtual mac address ussing 'cc set ha advanced virtual_mac 0' does solve the problem. 

    Another workaround is to connect the ASG to a dedicated switch with a dedicated physical nic. In this case all traffic to other nodes must travel to a psysical switch, even if the VM is located on the same ESX. 

    grtz
    ipas
  • I have got the exact same issue here.

    Two ESXi's each running an ASG in HA - and various clients.
    Clients on the ESXi running ASG slave are unable to ping the ASG master.

    Problem is:
    1: One of the ESXis only has a single NIC - so no dedicated vswitch.
    2: My WAN IPs are DHCP assigned - so virtual MACs on WAN are needed to take over the IPs.

    Any ideas?
    Could I set the same MAC address in VMWare on the WAN interfaces? (Two on each ASG). Or would this break something in VMWare?
    Perhaps someone with VMWare knowledge knows of a trick to fix it within the vswitch?

    BTW: HA is running just fine over a dedicated VLAN, MTU set to 1500 on HA NICs.

    Best regards
    Martin
  • Well,

    It seems that the Ipas is right: ESX(i) vSwitch does not play nice with the identical virtual MAC addresses used by Astaro HA.
    Once the passive ASG is up and running, the virtual MACs are stored in the MAC table of the vSwitch - and even though the passive ASG does not respond on the MACs, the switch will not pass traffic destined for these MACs to the vSwitch where the active ASG resides.

    Since I needed seamless MAC address takeover on the WAN side - but also needed different MAC addresses on the two ASG's LANs, I had to take a diffrent route than Ipas.

    I disabled the virtual HA MACs, but manually set identical MACs on the two ASG's WAN interfaces.
    Different LAN MACs enabled my virtual machines residing on the same vSwitch as the passive ASG to communicate with the active ASG residing on another vSwitch.
    And identical WAN MACs ensured that my ISP would allow the DHCP assigned WAN IP address to be used by another ASG, in case of failover.
    (The identical WAN MACs didn't cause any problems since these interfaces only communicate with external DSL/fiber devices - not other VMs).

    So in short: My recipe for running two ASGs in HA on different VMWare ESXi hosts.

    • Use the ASG VMWare Images and change adapters to E1000 for best performance.
    • Set MTU on HA interface to 1500 with the command "cc set ha advanced mtu 1500" in Astaro CLI, to prevent use of jumbo frames. (Will not work)
    • Use a dedicated VLAN in ESXi for the two ASG HA interfaces.
    • Disable vitual HA MACs with the command: "cc set ha advanced virtual_mac 0" in Astaro CLI to ensure that VMs residing on same vSwitch as the passive ASG can communicate with the active ASG on other vSwitch.
    • If WAN has DHCP assigned IP address from ISP - set identical MAC address on the two ASG's WAN adapters by editing Virtual Machine settings in ESXi. 
      Note: This requires editing the .vmx file for the VMs and setting "ethernet0.ignoreMACAddressConflict = "TRUE"" for the adapters used for WAN (replace ethernet0 with relevant number for interface).


    That was more or less it.

    I have tested a couple of failovers with success.
    DHCP lease on WAN is kept - and LAN clients only drop a single ping during failover.

    Best regards
    Martin
  • Well Martin,

    Interesting approach to this problem.  I sure will test this myself to probably save one physical nic.  [8-)]

    If I get this straight; the vswitch will send the packets to a phsyical switch in case of a duplicate mac address, only if the mac address is 'hard' configured one the WAN addapter. 

    Grtz
    Ipas
  • Well Martin,

    Interesting approach to this problem.  I sure will test this myself to probably save one physical nic.  [8-)]

    If I get this straight; the vswitch will send the packets to a phsyical switch in case of a duplicate mac address, only if the mac address is 'hard' configured one the WAN addapter. 

    Grtz
    Ipas


    Hi Ipas,

    On the WAN adapters it also works with the Astaro Virtual HA MACs - in fact I would prefer this.
    I think that the point that there is no communication with the WAN interfaces from VMs within the vSwitches - only from "outside" physical equipment. 

    The problem only occurs when a VM tries to communicate with a duplicate MAC address from within the vSwitch where the (passive) duplicate MAC address resides.

    So if it was possible I would prefer to use the HA MACs on WAN - and different "physical" MACs on LAN.

    But I don't think this kind of granular control is available in the Astaro CLI?

    Best regards
    Martin
  • Martin,

    I have tested your solution, and this works. I configured the (dhcp) WAN adapter of the master with the same manual mac address as the slave. Other adapters has automatic mac addresses configured in vmware client. 
    Also tested the failover and this seems to work ok. 
    I also had to configure de HA adapter to MTU 1500. Otherwise the sync got errors. 

    Grtz
    Ipas
  • Martin,

    I also had to configure de HA adapter to MTU 1500. Otherwise the sync got errors. 

    Grtz
    Ipas


    Hi Ipas,

    Good to hear that it works for you.
    I actually have some sync errors a couple of times a day, but if your setup works it is probably unrelated to fiddling with the WAN MAC addresses.
    (Perhaps because I run the ASGs on dissimilar hardware?)

    Regards
    Martin