Jump to content

Question about forcing a router to release and renew it's IP address after losing power for any amount of time?

Hi guys,

I currently have my modem set to bridge mode. This means that my Router handles everything and the modem is just there to give it the WAN IP information. 

However, after a blackout or anything similar, the Router gets back it's default LAN IP Address (192.168.x.x). I have to either wait for the router to renew it's IP address (when the DHCP lease ends, which is 3 days apparently) or manually go into it's software and release/renew myself. 

I have a Linksys WRT310N router. How would I make it stop taking it's default IP address (the 192.168.x.x one) and automatically get the information from the Modem when power loss occurs so that I do not have to do it manually?

Sometimes I am not at home and others want to use the internet when this occurs but beyond that it is more so a convenience thing. Could I turn down the lease duration? Maybe turn off the LAN IP entirely so that it defaults to getting the information from the modem? Or something similar?

Thanks,
Vitalius

† Christian Member †

For my pertinent links to guides, reviews, and anything similar, go here, and look under the spoiler labeled such. A brief history of Unix and it's relation to OS X by Builder.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

You can change the DHCP lease time.  Right before the lease ends, the two devices will make contact and if the device is still there the lease will be renewed, so whatever length the lease is the renewal should be pretty much transparent...

 

DHCP also lets you set reserved IP addresses, so you could set one aside on the DHCP server side for your router, and in your router change it from automatically obtaining your IP to always use the one of your choice, which is reserved in the DHCP server.  Sorry if my sentence structure is terrible, I need some sleep.

Link to comment
Share on other sites

Link to post
Share on other sites

You can change the DHCP lease time.  Right before the lease ends, the two devices will make contact and if the device is still there the lease will be renewed, so whatever length the lease is the renewal should be pretty much transparent...

 

DHCP also lets you set reserved IP addresses, so you could set one aside on the DHCP server side for your router, and in your router change it from automatically obtaining your IP to always use the one of your choice, which is reserved in the DHCP server.  Sorry if my sentence structure is terrible, I need some sleep.

It is cool Glenwing, but I cannot (I think) do what you suggested about reserving the IP in the DHCP server.

The Router gets the IP/gateway from the Modem which gets it from the ISP. It is dynamic, so it changes from time to time. Reserving a DHCP IP Address would only last so long and I think that would trade one problem for another. 

I will search the settings for shortening the renewal time. Does setting a very lease time have any detrimental effects to internet traffic? Not sure what renewing a lease does to a connection, so I am just curious. I would imagine it would create a minor hiccup, and if the renewal time is very short, it would be a pretty consistent and possibly noticeable hiccup, but I am not sure.

Thanks for the quick response.

† Christian Member †

For my pertinent links to guides, reviews, and anything similar, go here, and look under the spoiler labeled such. A brief history of Unix and it's relation to OS X by Builder.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Well, you have an external IP and an internal IP.  Every device has its own internal IP address, which is assigned by your router's DHCP server.  When those go to your ISP though they are all on the same external IP address.  If you mean renewing the dynamic IP that you get from your ISP... then we are talking about two different things.  But your external IP that you get from your ISP does not go past your modem, and that isn't assigned through DHCP.  Your devices are assigned a different IP from the one that goes between your residence and your ISP.

 

Just to get things straightened out, which connection is the problem here?  Your modem connecting to your ISP, your router connecting to your modem, or your devices connecting to your router?  Also, is your modem just a modem, or is it a modem/router combo (basically, does it have more than one LAN port on the back)

Link to comment
Share on other sites

Link to post
Share on other sites

It is cool Glenwing, but I cannot (I think) do what you suggested about reserving the IP in the DHCP server.

The Router gets the IP/gateway from the Modem which gets it from the ISP. It is dynamic, so it changes from time to time. Reserving a DHCP IP Address would only last so long and I think that would trade one problem for another. 

I will search the settings for shortening the renewal time. Does setting a very lease time have any detrimental effects to internet traffic? Not sure what renewing a lease does to a connection, so I am just curious. I would imagine it would create a minor hiccup, and if the renewal time is very short, it would be a pretty consistent and possibly noticeable hiccup, but I am not sure.

Thanks for the quick response.

 

Ok I am assuming you either have a cablemodem/router(with coaxial connection) or a DSL modem/router which you have bridged. How it works is that the modem just translates the DSL/coaxial signal into ethernet frames and nothing else thus you get an IP from your ISP. If or when the power to the modem breaks it restarts the adjency with your ISP usually takes about 30 sec to a minute before it can establish it again due to the distance, latency and the syn/ack process.

 

I think what is happening is that your router restarts faster than your modem can establish a connection with the ISP thus giving the router a failsafe private IP(dont know why this even exsists, but oh well). There is no way around this than to release the IP and renew it when the adjency from the modem to the ISP is reestablished, hope this answer was to some help.

 

//D-tail

Harr, darr and a couple of....... plastic earings?

 

LTC Wallet: LMiWdifKAN546FjyRspfhmfBWidyRPeEUK

Link to comment
Share on other sites

Link to post
Share on other sites

Well, you have an external IP and an internal IP.  Every device has its own internal IP address, which is assigned by your router's DHCP server.  When those go to your ISP though they are all on the same external IP address.  If you mean renewing the dynamic IP that you get from your ISP... then we are talking about two different things.  But your external IP that you get from your ISP does not go past your modem, and that isn't assigned through DHCP.  Your devices are assigned a different IP from the one that goes between your residence and your ISP.

 

Just to get things straightened out, which connection is the problem here?  Your modem connecting to your ISP, your router connecting to your modem, or your devices connecting to your router?  Also, is your modem just a modem, or is it a modem/router combo (basically, does it have more than one LAN port on the back)

 

Ah, my bad. I was not clear. The IP Address of where the Router gets the internet connection is what is not changing, not the IP Address of the Router itself.

My modem has a single LAN port on the back but can handle multiple connections if that LAN port is connected to a switch. I know and understand the external/internal IP structure and the difference between WAN and LAN (respectively to the IPs), mostly. 

When the Modem is not in Bridge mode, the Router shows the Internet Connection IP Address (Not the Router's IP Address, but the IP Address of where the Router gets it's internet from, basically) as 192.168.2.1 because that is the default LAN IP address of the Modem and that is where the Router gets the internet connection from.

When the Modem is in Bridge mode, the Router shows the internet Connection IP Address as 75.X.X.X (the 75 never changes, the rest do) as that is my WAN IP Address. 

However, after a power outage, if I check the IP Address of the Internet Connection for the Router, it says the 192.168.2.1 IP address and if I release/renew it, it shows the 75.X.X.X IP Address. 

That is the problem. My Router uses the Modem's default IP Address after a power outage instead of acknowledging that it is in Bridge mode and taking the WAN IP and Gateway as it's own connnection, bypassing the Modem.

Ok I am assuming you either have a cablemodem/router(with coaxial connection) or a DSL modem/router which you have bridged. How it works is that the modem just translates the DSL/coaxial signal into ethernet frames and nothing else thus you get an IP from your ISP. If or when the power to the modem breaks it restarts the adjency with your ISP usually takes about 30 sec to a minute before it can establish it again due to the distance, latency and the syn/ack process.

 

I think what is happening is that your router restarts faster than your modem can establish a connection with the ISP thus giving the router a failsafe private IP(dont know why this even exsists, but oh well). There is no way around this than to release the IP and renew it when the adjency from the modem to the ISP is reestablished, hope this answer was to some help.

 

//D-tail

DSL Modem/Router

That makes sense. Then I will just make the Lease duration shorter to force a release/renew. So long as that does not have any adverse affects on my connection.

† Christian Member †

For my pertinent links to guides, reviews, and anything similar, go here, and look under the spoiler labeled such. A brief history of Unix and it's relation to OS X by Builder.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Ah, my bad. I was not clear. The IP Address of where the Router gets the internet connection is what is not changing, not the IP Address of the Router itself.

My modem has a single LAN port on the back but can handle multiple connections if that LAN port is connected to a switch. I know and understand the external/internal IP structure and the difference between WAN and LAN (respectively to the IPs), mostly.

When the Modem is not in Bridge mode, the Router shows the Internet Connection IP Address (Not the Router's IP Address, but the IP Address of where the Router gets it's internet from, basically) as 192.168.2.1 because that is the default LAN IP address of the Modem and that is where the Router gets the internet connection from.

When the Modem is in Bridge mode, the Router shows the internet Connection IP Address as 75.X.X.X (the 75 never changes, the rest do) as that is my WAN IP Address.

However, after a power outage, if I check the IP Address of the Internet Connection for the Router, it says the 192.168.2.1 IP address and if I release/renew it, it shows the 75.X.X.X IP Address.

That is the problem. My Router uses the Modem's default IP Address after a power outage instead of acknowledging that it is in Bridge mode and taking the WAN IP and Gateway as it's own connnection, bypassing the Modem.

DSL Modem/Router

That makes sense. Then I will just make the Lease duration shorter to force a release/renew. So long as that does not have any adverse affects on my connection.

I don't know if the UI is the same as the WRT54GL, but let's assume it's similar.

If you go to the status tab on your router menu, it should have release/renew buttons at the bottom.

15" MBP TB

AMD 5800X | Gigabyte Aorus Master | EVGA 2060 KO Ultra | Define 7 || Blade Server: Intel 3570k | GD65 | Corsair C70 | 13TB

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know if the UI is the same as the WRT54GL, but let's assume it's similar.

If you go to the status tab on your router menu, it should have release/renew buttons at the bottom.

Yep, that is what I use to fix it. I was looking for a more automated and permanent solution. Thanks though.

 

 

It shouldn't, the lease renewal is more of an extension.  There should be no interruption whatsoever.

Thanks Glenwing. That should be simple.

† Christian Member †

For my pertinent links to guides, reviews, and anything similar, go here, and look under the spoiler labeled such. A brief history of Unix and it's relation to OS X by Builder.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Yep, that is what I use to fix it. I was looking for a more automated and permanent solution. Thanks though.

Thanks Glenwing. That should be simple.

Oh, ok. It should fix it's self, but if they turn on at the same time, that's when you run into things like this.

I'd suggest getting a UPS.

15" MBP TB

AMD 5800X | Gigabyte Aorus Master | EVGA 2060 KO Ultra | Define 7 || Blade Server: Intel 3570k | GD65 | Corsair C70 | 13TB

Link to comment
Share on other sites

Link to post
Share on other sites

Oh, ok. It should fix it's self, but if they turn on at the same time, that's when you run into things like this.

I'd suggest getting a UPS.

Yeah, I have considered it, but that much money for such a minor problem? Eh. Lowest priority for me.

† Christian Member †

For my pertinent links to guides, reviews, and anything similar, go here, and look under the spoiler labeled such. A brief history of Unix and it's relation to OS X by Builder.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 6 years later...

You can change the DHCP lease time.  Right before the lease ends, the two devices will make contact and if the device is still there the lease will be renewed, so whatever length the lease is the renewal should be pretty much transparent.... 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×