Fixed IP

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
Today a lot of audio gear (music servers, headless PCs, Squeezebox, Sonos) are remote controlled.
No, not by a IR remote (the ones you have to point) but a iSomeThing, smartphone, etc. in other words over the (W)LAN ( (wireless) home network ).

As you can understand, each device in a network most have a unique IP address pretty much like each telephone number must be unique.
This is in general done by the router using DHCP (Dynamic Host Configuration Protocol)
Next time you power up a device it in general gets the same address.
This is because the router memorizes it. But is does so for a limited time.
This period is called the lease. If this period is expired a new IP address is generated.

Most of the time you can refer to a device in the network by name.
But not all of the time. Often you are forced to use an IP number.

Al of a sudden your remote won't find your music server anymore.
This is because the lease has expired.
In this case a fixed IP address is very convenient.
If you use port forwarding (assessing a device in the LAN over internet), it is a must.

Most devices allow you to set a fixed IP address on the device it self.
If this device is off for a prolonged period, it might happen that DHCP assigns this IP address to another device. On power on, you have two devices with the same IP address in your network. As usual, it takes a whole weekend only to find out that an IP conflict is the cause of your network problems.

If you set the fixed IP on the router, DHCP knows this address is reserved for a specific device so it won't be assigned to any other device.
This is done by coupling the IP address to the MAC (Media Access Control ) address of the network card of the device. Each network card has a unique hardware address.
If a device has wired and a wireless network connection, it will also have 2 different MAC's. DHCP will assign 2 different IP addresses to them.

Best practice is to use a fixed IP only when needed.
If needed set it on the router.
If you do have to set in on the device, use a number outside the range normally used by DHCP.

a bit more on networking: http://www.thewelltemperedcomputer.com/Network/Router.htm
 

Jinjuku

New Member
Apr 18, 2011
228
4
0
Another option...

Since people are on this forum they are most likely of a technical nature:

You can use a DHCP implementation that will serve up MAC address IP reservations. If your device can only do DHCP you can setup the DHCP server to reserve an IP address for a MAC address.

Alternately you can run DNS and let the device register a DNS name with its' IP lease. You can always get to it by name regardless of IP.
 

FrantzM

Member Sponsor & WBF Founding Member
Apr 20, 2010
6,455
29
405
Hi

While we're on it .. Most people use the address range 192.168.x.0 ... Where "x" is usually 0 or 1.. The value for "x" however can be anything between 0 and 254 .. I would suggest to set your router/DHCP server to use a value for x that is not "0" or "1" .. One like 23 or 58 or 113 ... then your IP addressing range becomes 192.168.23.0 or 192.168.58.0 or 192.168.113.0 ... The reason is for VPN . If you're at a friend and he/she/they use the same 192,168.0.0 as you have in your house it can be very difficult* to reach your home network or PCs through VPN ...
Somewhat geeky but once you do it .. it will prove to be useful very quickly ...
 

amirm

Banned
Apr 2, 2010
15,813
38
0
Seattle, WA
That is a very good suggestion Frantz. Without the networks being distinct, routing doesn't work.
 

Phelonious Ponk

New Member
Jun 30, 2010
8,677
23
0
Is this a Windows thing? Probably a stupid, tech-naive question, but I wonder because I've never come up against it in any form, even when adding devices. The device just finds the network and asks if I'd like to connect. "Sure," I say, and it's done. And it stays that way. I must say, if I wake up some morning, and my "lease" has run out, and one of my networked devices has changed addresses and cut itself off from network functionality with no input from me, that will be pretty irritating. Why, on earth, would permanent addresses not be the default?

Tim
 

FrantzM

Member Sponsor & WBF Founding Member
Apr 20, 2010
6,455
29
405
PP

Not a Window thing, rather a networking thing. Your home network is connected to the greater Internet through a router (most of the time). The router is often combined with what your ISP offers be it cable, DSL or fiber. It is also very common to buy one of these wireless routers. When youconnect a PC to your route, the router gives it an IP address.. Now they can talk.
once they talk, you can log in the router.
In the router there is usually a way/tab to access the DHCP function . This function is what allows the router to give/lease an IP address to the devices on your network. That is where you can modify, the range of IP addresses. What Ip address goes to what device, the length of leases, etc.
it is there that you change the range of address to that odd number I mentioned earlier. In all likelihood your friend (like 99.99% of the people with Home Routers) would have left the DHCP in its default mode ( 192.168.0.0) or (192.168.1.0) .. You can then access your home network via VPN. If your Home IP address range is the same as his/her the network will not communicate. By changing that single number you allow yourself more flexibility ... More and more people are using VPNs. They are now relatively easy to setup and allow one to be truly connected to his/her home network wherever you are and that very securely.
Your devices will still be given an IP address and the whole thing will be as transparent as it was before .. Only you increase your chance of connecting to your home network via VPN thousandfold ...
We are deep into networking now but if that can be used ... Why not ? :)
 

Phelonious Ponk

New Member
Jun 30, 2010
8,677
23
0
PP

Not a Window thing, rather a networking thing. Your home network is connected to the greater Internet through a router (most of the time). The router is often combined with what your ISP offers be it cable, DSL or fiber. It is also very common to buy one of these wireless routers. When youconnect a PC to your route, the router gives it an IP address.. Now they can talk.
once they talk, you can log in the router.
In the router there is usually a way/tab to access the DHCP function . This function is what allows the router to give/lease an IP address to the devices on your network. That is where you can modify, the range of IP addresses. What Ip address goes to what device, the length of leases, etc.
it is there that you change the range of address to that odd number I mentioned earlier. In all likelihood your friend (like 99.99% of the people with Home Routers) would have left the DHCP in its default mode ( 192.168.0.0) or (192.168.1.0) .. You can then access your home network via VPN. If your Home IP address range is the same as his/her the network will not communicate. By changing that single number you allow yourself more flexibility ... More and more people are using VPNs. They are now relatively easy to setup and allow one to be truly connected to his/her home network wherever you are and that very securely.
Your devices will still be given an IP address and the whole thing will be as transparent as it was before .. Only you increase your chance of connecting to your home network via VPN thousandfold ...
We are deep into networking now but if that can be used ... Why not ? :)

Sounds cool, though I don't currently have any need to connect into my home network remotely. I was asking because it sounded as if you were saying that something has a limited time before the network automatically gives it a new address, and you can no longer connect that device without getting into network settings and fiddling about (the technical term). I've never experienced this in several years of running apple laptops on a network, so I wonder if it was a Windows thing. More likely it is a thing that OSX takes care of automatically unless you want to get in there and fiddle with it.

Tim
 

FrantzM

Member Sponsor & WBF Founding Member
Apr 20, 2010
6,455
29
405
Hi

Well it is not an OSX or Windows thing, It is a software client that is part of most if not all modern operating systems that they be Windows, Linux, Unix, FreeBSD or OSx. DHCP is a true client server protocol. The client resides in your computer and the server in the router. The router acts as a DHCP server . When the device is "introduced" on the network, it sends a request for an IP address through its DHCP client software ..the verbiage is almost literally: " I am such and such device of xyzABDEz mac address. I need to work at the IP level on this network can you please lease me an IP address? ".. The server then replies with the IP address and you can browse be seen, exist on that IP network. If the DHCP doesn't provide you with an IP address you have to enter it yourself in the device ... and you need to know the address in use on the network as well as the outer address and other stuff ...DHCP does much more than leases IP address, It also tells you through which device you go to the Internet, the servers that translate URL to IP addresses and other stuff but you get the gist ...
 

vinylphilemag

WBF Founding Member
Apr 30, 2010
810
1
328
56
Kelowna, BC
www.vinylphilemag.com
Adding to what Franz said, when your lease expires (or gets close to expiration), your computer (the client) automatically requests a lease renewal. The DHCP server renews your lease, letting you use the same IP address without interruption. That's why you notice no interruption: you're automatically given a new address--the new address just happens to be the same as your old one, to minimise the disruption you mention.
 

Steve Williams

Site Founder, Site Owner, Administrator
a dumb question, but how long does a lease last? I ask because just like Tim I use a Mac and have never experienced an expiration of a lease, nor do I feel the need to access my computer from another location
 

FrantzM

Member Sponsor & WBF Founding Member
Apr 20, 2010
6,455
29
405
a dumb question, but how long does a lease last? I ask because just like Tim I use a Mac and have never experienced an expiration of a lease, nor do I feel the need to access my computer from another location

Far from dumb as the lenght of the lease is a subject of debate in security circles.... The answer is : it depends... In networking it is good practice to minimize network traffic. So if you know a machine resides on a network for days it makes no sense to constantly requesting IP addresses and other information every hour ..For most routers beween an hour and 24 hours.. even permanent for a given mac address ...


By the way an expiration of the lease will not be visible by most users.. As soon as the expiration time is reached , the DHCP client in your PC request (usually) the same address. The DHCP may or may not grant it the same address. When the DHCP server replies it provides the computer with all information pertinent to it reaching the Internet (assuming that is the purpose of the particular network) and you wouldn't notice that ... This communications is fairly fast:a few bytes are exchanged and that is it ... Most often this exchange occurs at the beginning of the session .. You can observe it sometimes on wireless network when you see on the little icon the wording "acquiring IP address" then it says "connected!" .. the transaction is done and the lease is usually for a day when you log off the network the DHCP servers /router knows it ... Next time you reconnect, your DHCP client request the same IP and is granted an IP address, usually the same but could be any IP in the range allowed by the DHCP settings in the router ...

Getting connected to your home network is not only for Road Warriors. One may simply need a file which is on NAS connected only to the home network. This has become very easy these days with the new relatively inexpensive Routers/Firewall or you can use Windows own VPN ...
 

amirm

Banned
Apr 2, 2010
15,813
38
0
Seattle, WA
a dumb question, but how long does a lease last? I ask because just like Tim I use a Mac and have never experienced an expiration of a lease, nor do I feel the need to access my computer from another location
Let me see if I can up level the discussion. What we are talking about here is akin to valves adjusting dynamically in your car engine if you have variable cam timing. It is the internal mechanism that makes your engine run. If you have variable cam engine, it would work transparently whether it is in a Civic or Mercedes.

By the same token, all of these are internal Internet Protocols (IP) that are defined for all devices in the universe which like to talk over IP protocol, whether they are PCs, Macs, TVs, game consoles, etc. There is no innovation here either. They all do the same thing. To wit, no PC user has ever seen a message saying "their lease is expired." If your lease expires, and it is not renewed for whatever reason, your lose your connectivity both locally at home and to the outside. The symptoms then would be a machine that can't get on a network. Not some error message telling about an expired lease. I am sure this has happened to as many Mac users as it has happened to a PC user as the failure usually is in your router as it is the master which assigns these addresses to devices.
 

About us

  • What’s Best Forum is THE forum for high end audio, product reviews, advice and sharing experiences on the best of everything else. This is THE place where audiophiles and audio companies discuss vintage, contemporary and new audio products, music servers, music streamers, computer audio, digital-to-analog converters, turntables, phono stages, cartridges, reel-to-reel tape machines, speakers, headphones and tube and solid-state amplification. Founded in 2010 What’s Best Forum invites intelligent and courteous people of all interests and backgrounds to describe and discuss the best of everything. From beginners to life-long hobbyists to industry professionals, we enjoy learning about new things and meeting new people, and participating in spirited debates.

Quick Navigation

User Menu

Steve Williams
Site Founder | Site Owner | Administrator
Ron Resnick
Site Co-Owner | Administrator
Julian (The Fixer)
Website Build | Marketing Managersing