Set custom Gateway on DHCP leases

I'd like to set a custom Gateway to a device, so I tried to use it /etc/config/dhcp

config host
        option name 'AndroidVitor'
        option dns '1'
        option mac '48:51:69:xx:xx:xx'
        option ip '192.168.2.160'
        option netmask '255.255.255.0'
        option gateway '192.168.2.2'

Even with option gateway specifying another gateway, my devices only get the default gateway 192.168.2.1!

Is it possible to change it?

config host
        option name 'AndroidVitor'
        option dns '1'
        option mac '48:51:69:xx:xx:xx'
        option ip '192.168.2.160'
	    option tag 'tag1'

config tag 'tag1'
        option dhcp_option '3,192.168.2.2'

https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#client_classifying_and_individual_options

6 Likes

Thanks! It worked

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.