How to advertise different gateway ip via DHCP in OpenWRT?

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

In general, you need to configure the DHCP option with code 3 (router). (A list of all options can be found in )

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


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

  1. In command line

    uci add_list dhcp.lan.dhcp_option=”3,″
    uci commit dhcp

  2. In Web LuCI

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


The click “Save & Apply”.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *