How do I get a new IP with DHCP?

I would think I need to release my IP, get a new MAC address, and get a new IP. I don't know how to do any of these things. I can't find a command to release my IP, and macchanger doesn't work.

You're root, you don't need sudo.

Did you wget the file first?


How I do it -

killall -SIGUSR2 udhcpc

Reboot router

If the documentation I linked is wrong, what should I follow instead? No, I didn't wget, since I don't think it says to.

That clears up part of the issue, I just need to figure out the MAC address issue now.

There's no sudo in the link you posted.

I guess the guide assumes a certain level of knowledge, like wget:ing the actual script, so you can use it on the device itself.

Okay, thanks. I guess I will try this.

This time you did the wget to download the file, but you saved it into the home directory (~/), not /etc/init.d/ -- you need to move it into the right directory and then execute that command.

Okay, is there an option in wget I should use, or can I just copy it to the right path?

just copy or move the file and you should be fine.

But if you want to know how to use wget in detail, see this page

Do I need to move the whole thing or just the .sh file?

just the sh file.

Okay, I think I got it to work, it says "Edit /etc/rc.local to execute on startup in case the init is too slow:" do you think I need to do this? Also, is there a way to test if it's working / my MAC address changes? Obviously I did the verification commands they said, but that doesn't like actually show that my MAC is different or something.

I don't know the answers to your questions. I'd suggest you try to contact the maintainer of that script to understand more about it.

Ok! I was able to view my current and permanent mac addresses and they are different, so maybe that means it worked? but my IP is the same... I'm going to try I guess deleting my dhcp leasese and trying again? IDK.

Part of this depends on the upstream DHCP server and how it is configured. If the upstream server is from your ISP, and if they link your account in some way (using account login credentials, service address, SIM/IMEI, modem MAC, etc) against a specific IP address, you may not actually get a new IP address.

It is based on MAC I'm pretty sure, my IP changed when I got my new modem.
Edit: I just realized that my modem is not my router, LOL. Yeah, so changing the router MAC probably won't help? IDK.
Edit: Also, I can't figure out the crontab setting thing, I assume I'm in vi trying to edit lines or something? but for some reason I can't enter another line? IDK, I don't know how crontab works.

You'll find out with experimentation, but yes, the modem has a MAC, too, and they may link against that. I know that my cable modem service assigns the IP based on the router's MAC, but that you also must reboot the modem (sometimes several times) in order to enable another router (MAC) to connect to the network (it must clear the previous association, it learns one MAC address will not issue an IP to another device/MAC address until the binding has been cleared).

I figured this out, please ignore this reply.