Lan Interface via wireless dhcp from static address

Is there any instruction on how to connect via dhcp? My old firmware allowed me to connect via dhcp and easily change ip address with a specified mac address. When I attempt to change the lan interface to the modem to use dhcp, the connection will no longer even allow me to access the luci, which seems odd since I should still be connected to the router even if the modem refuses my new mac address.

1 Like

What are you trying to accomplish?

The LAN should almost always be set as a static IP. And usually, the router will have a DHCP server enabled such that your client devices can request an address via DHCP (the DHCP server then issues a lease on an IP address along with the gateway and dns information). This is the default configuration.

Your devices will usually also be set to use DHCP to obtain their address. It is the default for most devices these days.

The WAN is set to be a DHCP client which will request an address from an upstream server. If your ISP has given you a static IP address, you will have documentation about the correct IP address, gateway, and subnet mask.

3 Likes

I'm confused about why you don't understand what I'm trying to accomplish. I'd like to be able to use the clone/specify mac address function to change my existing IP. My router, a a7 tplink's firmware specified that the lan/connecting portion to the internet was running under a dhcp as a default configuration before changing to openwrt. I never changed or had reason to change that portion before. Changing my client devices mac address via dhcp will, afaik, grant me a new IP on the local network but will not change my external IP address.

because you're asking about how to connect via DHCP and you are setting your router's LAN to DHCP client....

This is very different, but not clear as to what you want... are you trying to clone the MAC address from a previous router to a new one? Most likely this would be for the WAN, not the LAN.

Yes, this is true. What are you trying to change -- internal addresses of your devices on the LAN, or your external IP address?

3 Likes

I feel like I've said it a couple times but I want to be able to change my external IP address yes. In tp-links firmware this was accomplished by setting the modem facing connection to dhcp and specifying a new mac address.

If this is what you wanted to do, your subject should have been something like "How can I change the MAC address of the WAN interface" which might have made the whole thing more clear. Nothing in your original post made it clear that you were simply interested in a MAC address override.

That said... you can do this via the LuCI interface or the command line...
LuCI: Network > Interfaes > [click edit for the interface of interest, likely your WAN] > Advanced Settings > Override MAC address

You can alternatively edit the [wan dev] option macadam field directly in the /etc/config/network file.

I still don't know why you did this... you shouldn't be changing the LAN in most situations.

To be clear, it is the DHCP server upstream that is issuing a lease for a different IP address based on the MAC address... you are not actually changing the IP address, you are changing the MAC address. The DHCP server just happens to give you a different IP address.

2 Likes

What exactly is the "LAN interface to the modem"? Do you mean the WAN interface? It's set to DHCP client by default.

1 Like