How to advertise different gateway ip via DHCP in OpenWRT?

How to advertise a different router/gateway ip via DHCP in OpenWRT?

asked Sep 14, 2015 by anonymous

1 Answer

 
Best answer

In general, you need to configure the DHCP option with code 3 (router). (A list of all options can be found in http://www.networksorcery.com/enp/protocol/bootp/options.htm )

For example, to advise the gateway IP 192.168.1.2, you will send this option:

"3,192.168.1.2"

Now, for OpenWRT, you have 2 methods to configure it:

  1. In command line

    uci add_list dhcp.lan.dhcp_option="3,192.168.1.2"
    uci commit dhcp

  2. In Web LuCI

In "network" -> "Interfaces" -> "LAN", add this to the "DHCP-Options" field in the "DHCP Server" section:

3,192.168.1.2

The click "Save & Apply".

answered Sep 14, 2015 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...