my colleagues got into an unpleasant situation where one of two dedicated servers, running vmware esxi 6.0, rented from a datacenter lost its network connectivity. the datacenter/internet-facing interface is down, hours later, during regular working day, the hosting provider did not react and resolve the problem. maybe the network card died, maybe switch port misbehaves or someone just unplugged wrong network cable. fortunately there was a cable connecting both servers – vm0 that lost connection to the datacenter’s network and vm1 that worked just fine:
24h later after the outage i decided to make use of the cable connecting both boxes to give again vm0 and its guest internet access. quick googling told me that vmware itself cannot bridge two network ports. on the other hand i already know from own experience it’s possible to set up linux based layer2 openvpn endpoint on esxi, so there should be no problem just bridging two virtual network cards connected to two physical interfaces.
- have separate vswitches associated with each of the physical network interfaces you want to bridge
- change the properties of both vswitches, for both allow edit vswitch security properties and accept promiscuous mode, mac address changed and forget transmits:
- create a vm that will be connected to both vswitches, set linux on it
- under linux – set up bridging between the two network interfaces. in case of debian i had to:
- apt-get install bridge-utils
- put in the /etc/netwrork/interfaces:
auto ens192 iface ens192 inet manual auto ens224 iface ens224 inet manual auto br0 iface br0 inet static # ip address that address that i'll use to access the bridging vm address 188.8.131.52/24 gateway 184.108.40.206 dns-nameservers 220.127.116.11 bridge_ports ens192 ens224 bridge_fd 9 bridge_hello 2 bridge_maxage 12 bridge_stp off
infamous datacenter is Swedish iPeer, part of cygate / telia. based on that experience – i dont recommend them.