Why did the address of my NAS changed?

Networking & security

So far my NAS' IP address ended with x.x.x.158, and today i couldnt find it with that address.

After some debug it turned out it got a new address that ends with 159. What couldve caused this?

My nas didnt change, my router didnt change, there are no new devices, nothing.

Posted Aug 11, 2023, 7:36 PM UTC

139
BmanUltima•

Is it statically set or on DHCP?

1
InsertDisc11OP•

Id say DHCP, ive had the nas for 2 years or so, and this is the first time it has happened

1
BmanUltima•

Give it a static address that's not in the DHCP range then.

1
UserName_4Numbers•

You say? It either is or it isn't. Log into DSM, go the Network section, and look.

1
stupidcatname•

The DHCP service has no obligation to assign a device the same address unless specifically told to (if supported). Static the address. I'm more surprised it took 2 years for this to happen (unless the renewal lease time was 2 years with no power outtage).

1
InsertDisc11OP•

I'm more surprised it took 2 years for this to happen

yes its DHCP and yes it ran buttery smooth for 2 years. and yes thats why im surprised cause 2 years is long enough that multiple power outages happened, new devices connected, visitors came, their devices connected etc. etc.

but i guess the average nas redditor is too thick to realize that was the reason i kept repeating the "2 years it ran fine" line. youre the second person in this whole thread to be surprised on that. anyways thank you for a great answer (theres not a lot sadly)

1
OwnSchedule2124•

Your router have it a new address. This is normal for certain situations such as being turned off for a day or two.

In your router find something like “DHCP reservation “. Allocate a reserved address for the DS and problem solved.

1
InsertDisc11OP•

but the router wasnt turned off at all! also ive had the nas for 2 years or so and this is the first time something like this happens.

ill look into the setting though ty

1
sploittastic•

A lot of times if a device is online when a DHCP lease is expiring it will renew the lease and be issued the same address.

Many routers will let you select a DHCP lease and make it permanent using a "dhcp reservation" or "static dhcp lease". Your other option is to manually set an IP on the nas that is outside of the lease range.

1
purepersistence•

The best solution is probably as mentioned - figure out how to reserve the IP on your router. Alternatively, you can configure the network settings in DSM to just set a static address instead of getting one from DHCP, assuming you know a range of IPs your router will not assign and thereby create a conflict by assigning the same address to some other device.

1
dish_rag•

If it’s DHCP, it’s totally up to your DHCP server (probably your router) on why the IP was changed. Either pin your IP (DHCP reservation, fixed ip, etc… whatever your nomenclature is on your DHCP server) or set a static IP address.

1
InsertDisc11OP•

but ive had the nas for 2 years or so and this is the first time this happened. is that possible? for years (power outages, turning off router etc) its static, then suddenly it changes without anything (router was not touched)

1
dish_rag•

Doesn’t matter, it’s up to your DHCP server. You need to ask them and not on the Synology subreddit. But regardless, this is exactly why you should pin your DHCP IP address, because it can change.

1
InsertDisc11OP•

well yes, thats why i asked if this is possible. but i guess people cant ask here without getting downvoted, holy fuck reddit is stupid.

1
vmhomeboy•

You asked, people answered correctly and then you questioned their answer even though you clearly don't understand how network addressing works. Listen to the people who are trying to help you and learn from what they're saying.

1
brentb636•

"Is that possible" ? Well, if you believe your eyes, it's possible , obviously. That's what the "D" in DHCP stands for. "Dynamic" .

1
InsertDisc11OP•

damn, no need to be that condescending :)

its just interest that for years it worked, then suddenly it changes without any change in the full system. thats why i was surprised!

1
brentb636•

Unless a device has a static IP address, it could change every time the lease is renewed . I suppose that if your router is screwed up or was auto updated, even the static list could get screwed up.

1
MagmaJctAZ•

People are getting nasty because they are telling you it's dynamic, and subject to change. Then you come across as puzzled it hasn't changed in two years, but now it has changed.

The router tries to remember the MAC address and the last IP address assigned. So most of the time the hosts will get the same address.

But sometimes a new device gets added, or some other event occurs, and suddenly things change.

I suppose if you want to learn more about the algorithms involved in DHCP you can look for white papers on the subject.

1
dotjzzz•

its just interest that for years it worked

And? Nobody said it'll never get the same IP. It's just not guaranteed.

then suddenly it changes without any change

That's how "Dynamic" works. What's your point?

1
EmpyrealistDS1019+ | DS923+ | DS218•

Yes, its absolutely possible.

Its typically unlikely to change because of the way that DHCP operates on a "reservation" system (it tries to renew the same address), but its not guaranteed, and its not infallible. Its all about timing and how reservation requests are processed.

If you need the IP to always be the same, then you need to configure a proper static/manual reservation based on the MAC address. Anything less is always at risk.

1
mjrengaw•

You should always set a manual IP address for you NAS. It should be easily done on the admin panel of your router. You want a manually assigned IP or IP reservation (some routers call it different things) and not a static IP. A static IP is something different and is not needed in this case.

1
SussyRedditorBalls•

did you assign it through the NAS or the router? If you didn't set a static IP I'm surprised it didn't change more often.

Maybe if another device joined your network it got bumped up a network.

1
InsertDisc11OP•

If you didn't set a static IP I'm surprised it didn't change more often.

nope, i didnt. and thats why im surprised too! thats why i kept repeating it ran buttery smooth for 2 years, but apparently others too thick to realize that.

especially cause 2 year is a big enough timespan that every occasion happened before. new devices connecting, visitors devices connecting, etc etc.

1
ScubaCaribe•

Imagine owning a NAS with no prior knowledge of static reservations lol

1
cgsur•

I have one.

Get a NAS, everything is easy peasy, lol.

Still learning, reason I got in thread, because I need to learn more about DHCP.

1
jack_hudson2001DS920+•

simple, reserve an ip that you want on the dhcp server the router.

1
NoLateArrivals•

A little story about setting up a network (home style):

You have a range from xxx.xxx.xxx.2 up to xxx.255. xxx.1 is the router. The router is (usually) running the DHCP server - this is the engine that decides which device is getting which IP address.

Think about which devices will be always on your network. For these devices you reserve a range within the IP range. You then take this range out of the dynamic range for the DHCP server. For example you reserve xxx.2 - xxx.99 for the devices that will always be on the network.

xxx.100 - xxx.199 could be the dynamic DHCP range. These are 100 slots for devices that pop up, but disappear again. The rest of the range put aside for later - for example for setting up a VPN, if you are honing your network skills.

All devices that are always on the network now receive a static IP from the first range, and for easier administration they get a speaking name, to easily identify them. You can create a table somewhere for your network bookkeeping.

Doing so will avoid surprises by getting an important IP address reassigned accidentally.

1
AnduriII•

I even got further and assigned the xxx.1-.9 for backbone (Router, Switch, access points), .10-.199 for dynamic devices, .200-.209 for vpn & servers and .210-.250 for IoT & homeautomation devices (Homeassistant & shellys). Everything outside of the .10-.199 range has a fixed ip in the dhcp reserved

1
TreacherousClutter•

To find out for sure you could try to find the DHCP server logs on your router and the DHCP client logs on your NAS. It could be that the lease on that address expired on the router, or that the NAS released it for some reason.

The Wikipedia page for DHCP should help you with interpreting the logs, but if you’re still curious RFC 2131 is the main document that defines the protocol, and section 4.4.5 goes into detail on expiration.

The default DHCP pool on most home routers is at least 100 addresses, so it can seem quite stable, but as others have pointed out it’s a safe bet that addresses will eventually change on a normal home network.

1
incompetent_retard•

What probably happened is the NAS at halfway through the lease time (or the end of the lease time ) tried to request / confirm it could keep the IP. That timed out for some reason and then the NAS went back to the Discover, Offer, Request, Acknowledge process with DHCP.

What everyone else suggests is best. Either set a static IP on your NAS, or reserve an IP on your router.

This would also be a good time to look at using hostnames or DNS. Then it doesn’t matter if the IP changes, because you always go to \syno-nas<share name> instead of an IP

1
sploittastic•

I'm really disappointed in the amount of people downvoting OP for having questions about how DHCP works. Get a life guys.

1
dotjzzz•

And? OP repeats "but it worked for two years" like no tomorrow and that's not downvote worthy?

How about you get a life?

1†
tribak•

Can I have a life too?

1
MrMeseekssss•

You are an idiot.

1
InsertDisc11OP•

its fine. this is how reddit is. ive visited a ton of subreddits but so far this ones the most toxic. they still helped, so fuck it, but holy shit im not coming back here ever.

but thank you! im actually trying to learn to not answer to stupid people, and this thread really tests me ahah.

1
xmowx•

Thank you. It was very exhausting to read your endless “but, but, but two years” comments when you’ve got the answer to your question on first reply to your post 🤦‍♂️

1
InsertDisc11OP•

Why did you read it then?

1
xmowx•

Why are you still here?

1
bartoqueDS920+•

Don't set a static ip. If you move or get a new ISP, you would not be the first to have a nas stuck in a completely different network ip range.

So use DHCP, but on the router set the entry for tje nas to reserve the same IP for that device only.

So you would have the best of both worlds. Always the same IP, but still dynamic, so when you would put the device into another network, for example when moving, it would still pivk a new IP automatically instead of needi g to jump through hoops mode1 resetting the nas to reset its network configuration...

So look at the router a d learn how to use it to make the DHCP assigned IP persistent.

1