How add 2 gateways in DHCP server?


(Af Straga) #1

Hi!

How add 2 gw in DHCP server?

WBR, Straga


(Artem Fedai) #2

Hi @Af_Straga please try and let us know the results:

db dhcp show
db dhcp setprop eth1 DhcpGatewayIP 10.1.1.1,10.1.1.2 
signal-event nethserver-dnsmasq-update

(Filippo Carletti) #3

Do you need that clients receive two default gateways instead of one?
Could you try to set them like this?

db dhcp setprop enp0s3 DhcpGatewayIP 1.2.3.4,5.6.7.8

Substitute enp0s3 with your interface (you could press TAB to auto-complete) and the two comma-separated ip addresses.
Then

service dnsmasq restart

Please, let me know, as we could relax the interface validation.

UPDATE: I tested it and it works as expected.


(Alessio Fattorini) #4

@Af_Straga could you explain whare are the use cases for having 2 gateways?


(Af Straga) #5

Thank you! happy New Year!