Multiple default gateways Maas_2.6

Hello Guys,

I’ve been trying to figure out how to set multiple gateways in maas but I can’t get it right if Someone can explain how to configure Multiple default gateway in maas would appreciate the help Thanks.

Netplan example
routes:
- to: 0.0.0.0/0
via: 9.0.0.1
metric: 100
and I get
routes:
- to: 0.0.0.0/32 <------ cant get it to be 0
via: 9.0.0.1
metric: 100

Hello rafise,

What would be the motivation behind having multiple default gateways ?
Have you attempted to setup your metrics to define the priority of your gateways ?
Why not use static routing in instead to defined your secondary gateways ?

Best regards,

Hello fguitton,

I’m trying to test OpenStack on a multi VLAN deployment (4) vlan to be specific.
No, I have not set up the priority of your gateways.
not sure how to set up static routing in instead to defined secondary gateways.

All I’m doing under Static Routes I adding the gateway of the subnet and the destination to a none rouble vlan 0.0.0.0/24 . So when the deployment completes all should be set to 0.0.0.24 but the documents in netplan say 0.0.0.0/0 which cant be set at the maas, this is why I’m asking if someone can explain how to configure multi-gateway.

Multiple gateways in 2.6 works out of the box. For example, if you have 2 interfaces in different subnets in the same machine, and each subnet has a gateway, MAAS will configure the default gateways for each subnet.

If you want to select which of those have the default routes, you can do so with:

maas session interface set-default-gateway {interface_id} link_id=10

Thanks Ill give it a try.

HI, I have done some more testing so, maas configure 3 nic’s each with there own gateway but when the traffic try to go back out to a specific subset it does not work by looking at the netplan examples the configurations that maas put in does look a bit different for some reason.
Maas configurations should not have these settings (via, to, metric)?

Netplan example
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
addresses:
- 9.0.0.9/24
- 10.0.0.10/24
- 11.0.0.11/24
#gateway4: # unset, since we configure routes below
routes:
- to: 0.0.0.0/0
via: 9.0.0.1
metric: 100
- to: 0.0.0.0/0
via: 10.0.0.1
metric: 100
- to: 0.0.0.0/0
via: 11.0.0.1
metric: 100

MAAS config

network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 172.16.1.22/16
gateway4: 172.16.0.1
nameservers:
search: [mydomain.internal]
addresses: [172.16.1.2, 172.16.1.1]
eth1:
addresses:
- 172.19.3.235/24
gateway4: 172.19.3.1
nameservers:
addresses: [195.50.xxx.xxx,195.50.xxx.xxx]