Static IP vs. MAC reservations: what’s the diff?

Posted on
Wed May 06, 2020 12:18 pm
Doctor Q offline
Posts: 67
Joined: Feb 18, 2020

Static IP vs. MAC reservations: what’s the diff?

While waiting for my new Ubiquiti Dream Machine to replace the aging but intrepid Apple Airport Time Capsule, I was wondering about something that I’ve never found an answer to. Since the Airport’s DHCP range is 10.0.1.2-200, I’ve been setting a static IP for everything that will let me, with computers/servers at .201-219, home entertainment on .220-239, cameras .240-250, etc. I let DHCP take care of devices like phones and anything else that I can’t set a static IP for. Other people say to set a reservation for a device’s MAC address in the router. I know Fing keeps track of devices with the MAC address and that it’s consistent, but when the IP is fixed what difference does it make? Opinions welcome.

Chuck

Posted on
Wed May 06, 2020 2:31 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Static IP vs. MAC reservations: what’s the diff?

You really shouldn't ever use Static IP addresses. They're a legacy from the days when routers weren't smart enough to do reservations. One of the major problems with static IP addresses is that it's very easy to mess up and assign a static IP in the same range that the router is using for DHCP. Also, using static IPs means you need to change IP addresses in a bunch of places, rather than one (the router). And some devices don't have an option for Static IPs. So, just use DHCP Reservations for everything. And that's really easy with the UniFi controller software.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed May 06, 2020 10:02 pm
Doctor Q offline
Posts: 67
Joined: Feb 18, 2020

Re: Static IP vs. MAC reservations: what’s the diff?

Thanks @FlyingDiver, that makes perfect sense and sounds like a time saver. Making a shopping list for Ubiquiti switches as we speak


Sent from my iPad using Tapatalk

Posted on
Thu May 07, 2020 8:46 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Static IP vs. MAC reservations: what’s the diff?

may I chip in with a contrarian view.

I have everything that is hardwired installed in the house on fixed IP numbers, ie switches AP, servers, raspberries, cameras, printers etc. I have reserved the range 1..150 for fixed IP numbers.
In at least 2 of my plugins it needs the ip # of devices, and changing that when ever DHCP decides to change an IP number is an additional hassle.
Also looking at an IP number ,I know what kind of device it is.

One issue you should be aware of in the UNIFI controller world: if you assign a fixed IP number to a MAC number and later want to reuse that one for another MAC number you get a non descriptive error message " can not assign ip number" you need to first :"forget" the old device in "insights" and then choose a long time window to look for the old device

Karl

Posted on
Thu May 07, 2020 8:50 am
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Static IP vs. MAC reservations: what’s the diff?

kw123 wrote:
may I chip in with a contrarian view.

I have everything that is hardwired installed in the house on fixed IP numbers, ie switches AP, servers, raspberries, cameras, printers etc. I have reserved the range 1..150 for fixed IP numbers.
In at least 2 of my plugins it needs the ip # of devices, and changing that when ever DHCP decides to change an IP number is an additional hassle.
Also looking at an IP number ,I know what kind of device it is.

One issue you should be aware of in the UNIFI controller world: if you assign a fixed IP number to a MAC number and later want to reuse that one for another MAC number you get a non descriptive error message " can not assign ip number" you need to first :"forget" the old device in "insights" and then choose a long time window to look for the old device

Karl


You're confusing "Fixed IP" with "Static IP". A static IP is set in the device, not the router/DHCP server. You're using DHCP reservations in the DHCP server to assign a fixed IP, which is the correct way to do it. I do DHCP reservations for all fixed devices in the house. The exception is mobile devices and computers.

I do find it annoying that the UniFi controller won't let me assign fixed IPs (DHCP reservations) to the UniFi devices themselves...

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu May 07, 2020 9:29 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Static IP vs. MAC reservations: what’s the diff?

Yeah, @FlyingDriver is spot on -- using DHCP reservations is the proper way to do this. A few other benefits he didn't mention:

* If you must change IP ranges for any reason (e.g. a new Router has restrictions or a different default), you have to go to every device and configure it manually. Sometimes, this means you will have to factory reset it since you won't be able to access it over the network without some work such as setting up temporary networks, etc.
* If you mess up and assign two static (on the device) IP addresses that are the same, it can be very hard to track down; done in the router you should be able to find the issue fairly easily if it even allows you to do the duplicate assignment in the first place
* Although rare, there are devices which don't support static IP addresses (more commonly they are there but buried somewhere in hard to find settings); the router can still assign these a fixed IP address
* Maybe best, you don't have to look up how to set a static ip EVERY SINGLE TIME you do it in Linux. :-) In my defense on this one, there seems to be about 2000 different ways depending upon the distribution packages installed.

Adam

Posted on
Thu May 07, 2020 11:01 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Static IP vs. MAC reservations: what’s the diff?

You guys got me thinking now.

At work I have 7 VLANs with the top 30-50 addresses reserved for static IPs.

So yes, I have somewhere around 300+ devices set with STATIC IPs.

Only about 10 are done with DHCP Reservations, but your logic makes complete sense.


Sent from my iPhone using Tapatalk Pro

Posted on
Thu May 07, 2020 11:42 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Static IP vs. MAC reservations: what’s the diff?

Centrally managed IP assignments is (almost) always better than trying to manage IPs directly on every device.

Many (MANY) years ago when I was managing a large network at NASA, before DHCP, managing hundreds of IP addresses was a HUGE pita. Shared spreadsheets that were laughably out of date, odd errors when two devices ended up with the same IP, etc. It was a mess. DHCP came in and helped, but reservations (aka manual or static allocation) were still not widely supported. It helped, because only servers and printers needed static IPs. Now, with the ability to manage reservations in the DHCP server (in this case, the router) itself, it's significantly easier.

As I look back, I would have never envisioned that I'd have 50+ devices in my house needing IP addresses...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu May 07, 2020 3:39 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Static IP vs. MAC reservations: what’s the diff?

thanks for the correction, yes setting to fixed/static on the DHCP is what I do. (actually unifi calls it static)

as for >>I do find it annoying that the UniFi controller won't let me assign fixed IPs (DHCP reservations) to the UniFi devices themselves...<< this is for a unifi switch
Screen Shot 2020-05-07 at 16.33.38.png
Screen Shot 2020-05-07 at 16.33.38.png (28.37 KiB) Viewed 2053 times

This is not what you mean w "won't let me assign fixed IPs..."?

Karl

Posted on
Thu May 07, 2020 3:44 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Static IP vs. MAC reservations: what’s the diff?

Karl, that screenshot is still a Static IP, assigned on the device (albeit via the controller).

It’s not a DHCP reservation.


Sent from my iPhone using Tapatalk Pro

Posted on
Thu May 07, 2020 4:06 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Static IP vs. MAC reservations: what’s the diff?

again thanks for the correction.. But it is fine with me, I can set it on the controller .

For CLIENTS the network screen looks very similar (w/o gateway, dns..) and there it is called fixed IP address, I guess that is DHCP config.
While the other network screen for unifi DEVICES looks like that sets the parameters to configure the unifi devices directly. But it is still on the controller

Always happy to learn something new

Karl

Posted on
Thu May 07, 2020 4:07 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Static IP vs. MAC reservations: what’s the diff?

Yeah, UniFi never actually uses the term "DHCP reservation", at least not in the controller UI. But that's what it's doing for client devices.
Attachments
Screen Shot 2020-05-07 at 6.05.54 PM.png
Screen Shot 2020-05-07 at 6.05.54 PM.png (35.41 KiB) Viewed 2061 times

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu May 07, 2020 4:09 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Static IP vs. MAC reservations: what’s the diff?

kw123 wrote:
But it is still on the controller


Because the controller software is the only UI for all the UniFi devices. So to set the static IP, that's where you do it.

I expect they have a good technical reason for insisting that the UniFi devices use static vs fixed IP addresses. Probably has to do with firmware upgrades and such.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu May 07, 2020 7:36 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Static IP vs. MAC reservations: what’s the diff?

Just to pile on, one regret I have with the UniFi devices is that you can't set MDNS names through the UI. Last I checked, it required shell commands and IIRC, they wouldn't necessarily survive a firmware update. Invariably, I have to look up IP addresses in the controller because I can't remember them off-hand. For example, I run an NTP server on my network--I can't usually remember its IP address off the top of my head, but I could easily remember `ntp`.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu May 07, 2020 7:48 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Static IP vs. MAC reservations: what’s the diff?

You could run a local DNS server. I do that on my Synology box.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 4 guests