3

I have a VM (hosted by OVH) which has several IPs:

  • the first one is given by OVH, one per machine, and can change (when we reset the machine for instance)
  • the other ones are failover IPs, purchased to be the IPs used for inbound and outbound traffic, they won't change.

I'm new to Netplan, and I am trying to configure it so that my machine can be reached by one of the failover IP, and go out with these IPs too.

The first step is OK:

  • I add a new /etc/netplan/51-failover.yaml
  • I put this configuration :
network:
  version: 2
  vlans:
    veth0:
      id: 0
      link: ens3
      dhcp4: no
      addresses: [fail.over.i.p/24]
  • netplan generate config && netplan apply

Result: when ssh ubuntu@fail.over.i.p, it works

But whatismyip.com reveals that my outbound comes as the first IP.

I tried to directly put the failover IPs directly into the original 50-cloud-init.yaml Netplan configuration file, but it makes the machine unreachable, I have to reset it:

network:
  version: 2
  ethernets:
    ens3:
      dhcp4: no
      addresses: [fail.over.i.p/24]
      match:
        macaddress: "aa:bb:cc:dd:ee:ff"
      set-name: ens3

Do you see what I am missing?

Thanks

frinux
  • 2,052
  • 6
  • 26
  • 47
  • check your default route, it's likely the one added by dhcp, use "ip route" for that. You may want to remove dhcp completely and set ups static ip instead. Put output of "ip addr" and "ip route" here, it seems your public ip is using VLAN:0 that's probably why it's not working – Pavel Niedoba Nov 04 '19 at 11:10

0 Answers0