Answered

Setting static IP addresses


Userlevel 5
Badge +10

[To avoid any confusion: this is about static IP addresses, not reserved IP addresses!]

Is it possible to set/unset static IP addresses within Sonos devices?

The reason I ask is that I have just been checking in my router to see what internal IP addresses are currently in use, and I find that one of my Sonos devices out of a total of eleven has an IP address which is not within my DHCP range. It’s actually permanently on an IP address that I have (for many years) had statically assigned to another device.

What I would like to do is to stop it from using that IP address, and get it to request an IP address via DHCP - in my assigned DHCP range - like the other ten devices do.

Note that this device is one of four in my system that are connected via Ethernet to my network.

[As above, this is the distinction between static and reserved IP addresses: To set a reserved IP address, you configure your router’s DHCP server to recognise a device’s MAC address and always give it a specific IP address within the DHCP range. To set a static IP address you configure the device itself to always use the same IP address which is outside the DHCP range that the router allocates. It means that the device never uses DHCP to get an IP address.]

icon

Best answer by Ken_Griffiths 11 April 2024, 14:25

View original

43 replies

Userlevel 7
Badge +18

Hi @Kumar 

I remember @Corry P recently questioning the need for such reservations for Sonos….

Recently? It was 3 years ago! And, to be fair, I have since updated my Troubleshooting Sonos on WiFi article to include address reservation.

Having said that, I haven’t bothered/needed to do it on my own network, probably because I am not using a ISP-supplied router - it certainly seems to help some users, though.

There isn’t a way for a user to set a static IP address within the Sonos hardware/software. Note some (not all) routers can set a reserved IP address, both within and outside the address range that a user has set for use by the DHCP server.. my suggestion is to check your routers configuration pages and change the assigned address accordingly - even consider a factory reset of the router if you think there maybe a fault (but that’s entirely at your own risk).

Userlevel 5
Badge +10

Thanks - it’s not possible to “unassign” a statically set IP address from within the router, because the router has no control over that address. It appears in the router’s Device table only because it sees traffic to and from the device, and not because it has any control over the address.

But, having said that, you jogged my memory that I had changed that device from being wi-fi connected to being Ethernet connected and had not rebooted the router since - so although everything was working OK, the router’s internal device table seemed to be corrupted.

Having rebooted the router, I now have 11 devices in my router’s DHCP table, which means I can finish the task of adding all of their addresses as “reserved” - by adding the last one of the eleven. Hopefully that will contribute to the network’s long-term stability (which to date has not been great).

Thanks again - a solution without needing to factory reset the router!

Userlevel 7
Badge +18

Hi @Kumar

My article was updated almost exactly one year ago. And, for the record, I do not question the need for IP reservation with Sonos - it’s a good idea. In fact, it’s a better idea for Sonos than it is for most other devices.

I’m not saying everyone should rush to it - but, if you see certain issues on a regular basis (and I’m thinking of rooms going missing from the app, in particular) it is a good idea to do so - there certainly aren’t any downsides if it is done correctly (the DHCP pool should be altered so as not to include any reserved IPs in it’s range).

I hope this helps.

Userlevel 7
Badge +18

Hi @Kumar

So, a glitch after doing all this for all MAC addresses. Things are working but the IP reservations are being ignored, and for kit with reserved addresses outside the pool, the router is still handing out addresses starting with the beginning of the pool.

Is this then a router that needs reservations to be done from within the pool? If so, expanding the pool back to its original size may be all that is needed to be done?

I suppose that could be possible, but I wouldn’t have thought so - it’s not the way my router works, if that helps?

Did you reboot every device after changing the pool? You may want to turn the router and all client devices off, then turn the router on, wait for it to boot, then start turning on all the other devices.

Further to the above, I turned on Sonos units, all with IP addresses now assigned from outside the pool, after first seeing how things are minus Sonos.

Some Sonos units have been correctly given the assigned addresses from outside the pool, others have been given those from within the pool, although their MAC is shown in the list of reservations outside the pool, in the router UI.

As far as I can see, what is happening for Sonos kit is randomly different divided into the two cases above.

In the little testing done, all Sonos kit is working fine.

At this point I would either a) contact the provider of the router to find out how it should work, or b) just buy a third-party router that does what it’s told to do and replace the current one. Though, depending on your connection type, you may need to turn your current router towards modem duties only instead.

Hopefully rebooting everything will help (though given that some Sonos devices are taking the reserved addresses and some are not, it seems questionable).

I’m glad to hear it’s all still working!

 

Userlevel 5
Badge +10

It seems that outside of network professionals, the terms “static IP” and “reserved IP” are somewhat - but incorrectly so - interchangeable.

 

Corry - that is exactly the reason why I explained in the OP the distinction between the two terms that I believe network professionals use. I have been involved in threads here before where the people contributing did not appear to understand the difference.

As stated above, my router can’t facilitate Reserved IP addresses outside the DHCP range - the User Interface provides the user with no way to configure them, because Sonos devices can do nothing other than make a request via DHCP.

And yes, there is indeed the save button you refer to at the bottom of the page. Also, MAC address formatting uses all caps and colons as separators as was done in Apple. So just copy/paste should work, one IP reservation at a time.

Userlevel 7
Badge +18

Hi @Kumar 

It’s strange, but it looks like you have to enter both the current IP and the new, desired IP, as well as the MAC.

Thanks, that was very helpful. However why do you say the quoted? The first IP address in the box is 192.168.1.1 and is greyed out, so nothing to be done there, I presume.

192.168.0.1 is most likely the IP address of your router. I believe it’s in there just to show you the expected format. You don’t want to use 192.168.0.1.

Having said that, I see now that neither of the top two entries have a * next to them, which would suggest you don’t need to fill either in. Leaving as is (which is technically blank as the text there now is grey rather than black) is probably the thing to do.

Colons! I should have though of that!

I hope this helps.

Userlevel 7
Badge +18

Hi @Kumar

Ironically, my router stopped giving me internet later that day. I found that if I connected my ISP-provided router to my fiber-ethernet converter, that worked, so I ended up configuring it to have static IPs (for non-Sonos devices, but that’s not particularly relevant) and found that unlike my TP-Link router and like yours, I had to reserve IPs that were within the DHCP pool range. As I hadn’t recorded my MAC addresses, it was a bit of a pain to figure out what was what.

So, it does indeed depend on the brand of router whether or not you can reserve IP addresses inside or outside the pool range. It doesn’t help when it comes to providing advice, unfortunately. There is another, related thread where the difference between reserved IPs and static IPs is explained well:

When I called my ISP the next day, there was a bit of a queue, so as I waited, I tried my TP-Link again and it worked, so I hung up and got rid of the ISP router again.

And there is, I think, in a nutshell, the very problem. Each router handles this issue slightly differently, which makes it somewhat challenging to write a definitive ‘do it this way’ article.

I’ve recently been struggling with both a StarLink device, and a T-Mobile 5G device, neither of which even provide the opportunity for access to the DHCP table in order to allow reserved IP addresses. I suspect they think they know better than the average consumer. And they may, but it’s frustrating for those of us who are (slightly) non average. 

Userlevel 7
Badge +18

Hi @Kumar

If you look at it from the client device’s side, it makes sense - when you use reserved IPs, the client device is still using DHCP, therefore it makes sense that the IP comes from the DHCP pool. When you set Static IPs, you turn off DHCP in the client’s settings - DHCP is not used and therefore neither should the pool be used.

On the router side, reserved IPs are reserved - they are only handed out to the associated MAC address and are not handed out to any others. Like booking a particular reserved table in a restaurant, if someone else shows up and asks for a table, they don’t get that one.

I thought otherwise; indeed the Apple utility insisted that this be done

I guess you just have to meet the expectations of whoever wrote the code for each particular company/device.

 

I’m glad to hear it’s all still working!

 

So am I!

You want the ISP router to be doing nothing other than providing an internet connection (assuming the TP Link router can’t do this on it’s own).

Learning a new skill can be rewarding, however - and not just in terms of improving your network.

 

Thank you. I am sure the TP Link can connect to the net and I can throw away the ISP router, but I suspect the ISP staff will have to involved in some tinkering so I don’t want to go down that road, also because in future if it isn't their router that gives any trouble, that gang will throw up its hands.

Yes new skills are good to have and I am much better off after Sonos use for ten years. Ten years ago all I knew was how to apply mains power to routers! But for now, with Sonos working fine as is all other kit, I shall leave well alone.

Thanks again.

Userlevel 7
Badge +22

I’d question the need too but there are enough posts here to convince me it is a viable first step to network troubleshooting. Takes a few minutes to do on your own and no playing phone tag with support.

With my old all-in-one router I was not seeing issues, updated to a much better router and dedicated WiFi APs and was seeing issues until I set them.

I once used a router that bragged it would not assign duplicate IP addresses. Ha! Evidently it had a short memory. Fortunately, it also supported reservations.

I reserve all regular network clients, SONOS or not.

All Sonos kit and associated devices like the NAS are reserved, but the router still seems to ignore some of these reservations, as it seems to do for the TP link devices with reserved addresses on the network. But everything seems to be hanging together and working fine, so I guess for now this is a problem that does not need a solution.

Some routers support a limited number of reservations. 

That does not look to be the cause of the eccentric behaviour here, I checked. But if it all hangs together, eccentricities are ok  I guess.

No it wasn’t, not that it matters, but it was in the last 12 months. The troubleshooting article is three years old. 

I am hesitating to do this because the interface to the ISP supplied router is a lot clunkier than the Apple utility was, but one of these days I think I will get down to this. 

What helped is a refresh via your troubleshooting article. My present worry is if I break something in the ISP router while trying to reserve IP addresses, starting with altering the pool to allow reserved addresses to be outside it, getting things back on track will be a headache, given the not so hot customer support from the ISP. 

Userlevel 7
Badge +18

Hi @Kumar

Yeah, I hear you - just how easy it is to reserve IPs depends heavily on the router’s software. I’ve have had issues doing so in the past, but mostly just due to a bad UI. Good UIs make it easy, whereas bad ones may require you to start copy and pasting MAC addresses.

Say, for example, your DHCP pool is 192.168.0.2 - 192.168.0.254. You’d want to change that to 192.168.0.20 - 192.168.0.254, assuming you have less than around 20 devices to reserve for. Reboot everything. Go back into IP reservation settings, and start reserving addresses in the 192.168.0.2 - 192.168.0.19 range. Save changes, and reboot everything again. That should be all you need to do. Again, if you have doubts, don’t try unless you are seeing recurring issues.

Please feel free to post screenshots of your IP reservation setting page, assuming it’s in English - I’ll be happy to look and advise from there.

I hope this helps.

, if you have doubts, don’t try unless you are seeing recurring issues

Please feel free to post screenshots of your IP reservation setting page, assuming it’s in English - I’ll be happy to look and advise from there.

I hope this helps.

Although I may hold off dabbling taking the first advice in the quoted above, I will still take the opportunity of taking the offered help, referencing screen shots below, from the ISP router UI:

 

 

 

In the first shot, as far as I can see I should just change the last digit of the start of the pool  from 2 to 50 if I want to reserve about 45 addresses. What I don’t see is a save button once I do that, so perhaps that isn't even needed for the change to take effect.

The third shot is of what pops up when Add is clicked in the second shot. There is a save button here, but what I don’t see is a place to name the unit that has the MAC address for which the IP address being reserved has to be entered. Presently, in the DHCP list, the router seems to get names like Sonos ZP, or WDMyCloud on its own. 

There seem to be no way to populate the address box except via cut/paste of the MAC addresses.

Userlevel 7
Badge +18

Hi @Kumar

In the first shot, as far as I can see I should just change the last digit of the start of the pool  from 2 to 50 if I want to reserve about 45 addresses. What I don’t see is a save button once I do that, so perhaps that isn't even needed for the change to take effect.

Yes - change the 2 to a 50. I would expect to see a save button, however - are you sure it’s not all the way down at the bottom? One way to find out would be to change it, then leave that page, then return to it - if it shows the updated value, all is good.

The third shot is of what pops up when Add is clicked in the second shot. There is a save button here, but what I don’t see is a place to name the unit that has the MAC address for which the IP address being reserved has to be entered. Presently, in the DHCP list, the router seems to get names like Sonos ZP, or WDMyCloud on its own. 

There seem to be no way to populate the address box except via cut/paste of the MAC addresses.

Yup - this is exactly what I was expecting to see from an ISP router. You will need to find the MAC address for each Sonos device and paste it into the form there. The router is not interested in what each device is called - it just goes by the MAC address and IP address. Better routers give you a list of devices and you just select one and enter the desired address, job done.

It’s strange, but it looks like you have to enter both the current IP and the new, desired IP, as well as the MAC. You’ll probably need to go to the Connected Devices/Clients list to get those. Note that the MAC address is the same as the serial number with the last character removed - this may help you identify devices, but you may also just want to use the data in the About My Sonos System page in the Sonos app instead.

Subnet mask should be left as prompted - 255.255.255.0/24

I recommend testing with one device first - if it goes well, do the rest (or some more and check again).

I hope this helps.

Edit: you may need to experiment with MAC formatting - sometimes hyphens are required between each pair of characters. I would like to think it would show you the expected format in the connected devices list.

Userlevel 7
Badge +22

It is usually best to set the Sonos IPs outside the DHCP address window as if set inside it some other device could beat Sonos to the desired IP address and then the Sonos would get a random address.

Reply