2
I'm running a home server inside my NATed LAN, which is connected to the Internet through a D-link DIR-652 home router. I have specified the necessary port forwards at the router settings and have everything working.
However, recently I had some downtime because the DHCP server on the router had changed the server's private IP address on its own, and the forwards etc. stopped working. To prevent any trouble in future, I decided to make the server's private IP address static. It works sweet and there seems to be no problems in practice, but I'm troubled with one thing: how does the router know the static address, now that it doesn't assign it by itself through DHCP? How do routers generally know, is it just specified by hand in the routing table or is there some protocol that hosts who know their own address use to broadcast it to everyone else?
Is there any chance that my router "forgets" my server's IP address, causing downtime again? Do I have to configure the routing table to ensure that it won't break in the future?
Allright, so the router just gets the info from the IP packets sent form the server. Hypothetically speaking, what if there weren't any outbound traffic from the server for a long time? – GolDDranks – 2013-10-01T21:04:36.580
Not sure if that makes a difference. If it was assigned an IP address through DHCP, it would be on a fixed lease, meaning that the IP address assigned to it would likely be released after a given time period (of inactivity). Because you have assigned an IP address statically, this shouldn't be an issue. – Yass – 2013-10-01T21:07:12.743