Are you static or dynamic? (phone book part II)

Or should I say is your computer's ipaddress static or dynamic. Static means it is hard coded in the system files on a system. Dynamic means you get the ipaddress for a dhcp (dynamic host configuration protocol)  server or the like and it could change at any time. We said in the last article that all computing devices (assuming they are connected to a network) have an internet telephone number or ipaddress. What I did not discuss was how you get that address.

To make things more interesting your router actually has two or more ipaddresses. One is for the internet which is usually dynamic unless you have paid for a static ipaddress through your internet provider and one is for being the gateway (where to point to for accessing the internet) for your local area network is static.  To make things easier, I will only talk about ipaddressing withing a local area network for now.



Your local router usually comes with a standard ipaddress for the local network. You can change it, but it is usually not need to be changed. That gateway address will be some variation of 192.168.1.1 for example. No other system can use that address without causing problems. It is like two people who say they have the same phone number. If you call it, who will answer?  So you want to make sure all ipaddresses are different. That is where dynamic ipaddresses come into play, when your desktop accesses the network  router which usually acts as the dhcp server (if properly set up) will assign you that is your computer an ipaddress. In fact, it will keep a list and make sure everyone getting a dynamic ip address are not conflicting.

But, you are going to need systems that do not change their ipaddress for stability purposes. This is especially true in the case for routers, servers, printers, and etc.  Your router for a network that can have up to over 240 ipaddresses to deal with will set aside at least 100 addresses that are not used for dynamic addresses. That way the dhcp server does not  try to duplicate already static addresses.


Some routers may only allow only 50 dynamic ipaddresses or internet telephone numbers. Just depends on how it is set up. So what do you get with a dynamic ipaddress? You get the ipaddress of course. You are told what the gateway is, What computer will act as a telephone operator (aka dns - domain name server) to look up computer names and translate them into ipaddresses, what your network is, and etc. All that happens in a moments notice. Your system is known to use dhcp in this situation. A linux network configuration file for a system that used dhcp is very simple. For example from the file /etc/network/interfaces you might see:

auto eth0
iface eth0 inet dhcp

or from the gui you might see:
 
 
 

Which means take your network card know as eth0 (short for ethernet0) is set up automatically to start and then get the ipaddress via dhcp. For static system, it gets a little more involved since a static addressed system does not get any information from the dhcp server. In the file /etc/network/interfaces you might see:

                      auto eth0
                      iface eth0 inet static
                      address 192.168.1.31
                      network 192.168.1.0
                      netmask 255.255.255.0
                      broadcast 192.168.1.255
                      gateway 192.168.1.1

or you might see from the gui:



There is the gateway and the other things I mentioned is needed. Every operating system is different so will not see exactly the same thing but it should be similar in some way. In most cases if everything is working DO NOT CHANGE ANYTHING! That is especially true in a business environment.  All this just for an internet telephone number aka ipaddress.  Your router can keep your ipaddress list both static and dynamic, but it would be a good thing to keep a list of all the information on the static ipaddressed systems, in case you need to set them up again. Also keeps you from duplicating addresses  and avoid a lot of headaches. Worked in an environment of over two thousand systems. You want to have that list.

As I said in the last article,  you may want to segregate the ipaddresses for your equipment. For example:

192.168.1.1 - 192.168.1.30 would be for routers.
192.168.1.31 - 192.168.1.75 could be for servers.
192.168.1.90 - 192.168.1.99 could be for printers,
192.168.1.100 - 192.168.1.254 would be everything else. 
Easier to tell which equipment has failed by ipaddress. You know where to access the equipment in a hurry.

One other configuration I just want to briefly mention is that based on the mac address, any system can either be allowed in or prevented from getting an ipaddress on the net.  Good reason to be extra nice to network administrators. Probably enough about ipaddresses for a while.

Comments

Popular posts from this blog

Guiless?

MSOffice vs Libreoffice

Raspberry pi zero.