<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=2854636358152850&amp;ev=PageView&amp;noscript=1">

So what is an IP Address?

And why should you care?

In this post I discuss one of the most fundamental concepts of information technology, IP Addresses! And you know what, we're gonna have some fun doing it!

 

In this insightful post you are going to learn.

  • What is an IP Address?
  • What is a Sub-Net
  • What is the Domain Name System (DNS)
  • What is the Dynamic Host Configuration Protocol (DHCP)
  • What is a Static and Dynamic IP Address
  • And much more!

Now to some of you this may seem like techie, nerd stuff. If that's you that's ok!

IP Addresses

Ah, the good ole' IP address, this is where our journey begins. There is a saying, that the network of 1,000 nodes begins with a single IP address.

So it makes sense to define what an IP address is and to do that you need to understand a thing called binary. Now before you freak out, binary is not a scary thing after all its just ones and zeros!

Binary is how computers talk, in the world of computing, things are 1's and 0's literally! This is because computers process commands with a processor that evaluates a series of 1's and 0's to determine how it will function.

These 1's and 0's are called bits and an IP address is composed of 32 of them! Now, bits are conveniently grouped into bytes. A byte is a group of 8 bits. Each bit in a byte has a value so if you add up the bits in an 8-bit byte you will get a value. An example of this "bit register" is described in the image below!

IP-Bit-Registers

So as you can see, you add these bits up and viola you have a number. Now an IP address consists of 32-bits divided into 4-octets, or sets, of 8-bits. Anyone remember what 8 bits are called?

If you said a byte give yourself a cookie cause God knows I don't need to eat any more cookies...
If you add up the 8-bits for each of the octets and you separate each octet with a "." you have an IP Address!

IP addresses are everywhere and if you are going to get anywhere in the new Building Automation System field you need to understand IP Addresses.

How are you going to troubleshoot a BAS network if you don't understand the most fundamental addressing scheme your devices are using to communicate?

I've seen so many folks that don't understand the concept of sub-netting spend hours on troubleshooting only to realize that the address their device had was on a different sub-net!

So, you need to care, you need to know this stuff!

So you now know what IP addresses are, see that wasn't that bad, now we are going to discuss three more important IP concepts sub-netting, the Domain Name System and the Dynamic Host Configuration Protocol.

Sub-netting

I'm going to go so much deeper into this in the next article in this series but this is a critical concept you need to understand!

So here we go, sub-netting in 500 words or less!

Man, I sat at my desk for 10 minutes thinking how can I cram this topic into 500 words or less. So here we go, hopefully I stay coherent!

Sub-netting is where you take a network and divide it into smaller networks. Now to really get this we've got to understand the concept of binary math. Hopefully you read the IP Address section...

Well if you remember the bit positions are factors of 2 right! So if you have 8 bits you can have 256 or 2^8.

You also remember that an IP address has 32 bits right? You better! You just read it!

IP-Bit-Registers

Seriously though, an IP address has 32 bits. In the world of sub-netting we take some of those bits and assign them as host bits and the rest as network bits. If this made you say um what? Don't worry when I was studying for my CCNA this was the area most folks seemed to have trouble with!

So if I wanted a sub-network that had 250 hosts or computers then I would need at least 8 bits for the host since 2^8 = 256. Now as we will discuss in the next post of the series each subnet has a default gateway IP address and a broadcast address so this naturally takes away two IP addresses. This leaves you with (2^8)-2 =254. In sub-netting, this would be called a /24 network because 24 of the bits belong to the network and 8 bits belong to the host.

When you subnet you cut a portion of the network off for yourself. So a 192.168.1.x /24 network means that everything in the x is a host on the 192.168.1 network and a 192.168.2.x /24 network means everything that sits on the 192.168.2 network. If a device on network 1 wanted to take to network 2 it wouldn't be able to without routing (another topic we will cover later).

IP controls are all the rage, honestly, I'm not completely sold on them yet. With some of the software, I'm seeing I'm hoping that will change in the very near future.

However, the fact is lighting is going IP, controls are going IP, and you're about to be living in an IP world whether you like it or not. The excuse of that just being techie stuff won't work anymore.

You will need to at a minimum understand what an IP address is, how sub-nets are calculated, and how IP addresses are assigned. If you don't learn this you will lose your relevancy. It may not happen right away but it will happen. I'm not trying to be doom and gloom, just trying to be real with you!

You will need to at a minimum understand what an IP address is, how sub-nets are calculated, and how IP addresses are assigned. If you don't learn this you will lose your relevancy. It may not happen right away but it will happen. I'm not trying to be doom and gloom, just trying to be real with you!

Domain Name System

So how does your computer know what IP address to use when you type a domain name into your web browser. Let's see this real quick.

If I go into my command prompt and I type the command "tracert", which stands for trace route, and the uniform resource locator (URL) of Google I will see one of the IP address of Google and the route through the internet to Google's server.

Tracert

We can see that Google has an IP address of 172.217.4.196. Something was able to tell my computer that the www.google.com has an address of 172.217.4.196, how did this happen?

This magic was brought to you by a technology called the Domain Name System. According to Microsoft the Domain Name System is a system for naming computers and network services that is organized into a hierarchy of domains. What does this even mean?

Well as we said, IP addresses are used to communicate between networks. We have a problem though, telling someone to go to 172.217.4.196 isn't quite a memorable as saying going to Google.Com. Therefore a system was created to take that Domain Name of Google.Com and automatically translate it to an IP address.

When you enter a domain address your computer will look at a file called the hosts file to see if that domain name has an IP Address. If that entry doesn't exist then your computer will connect to a DNS server that has a list of domain names.

The domain name system is a hierarchical system with Domain roots forming a tree. You can see this in the image below.

We are almost done with this concept. The final point you need to realize is that each DNS server has a list of domains within its area of authority, called a zone. Your domain request will continue to move up the tree of domain servers until the address is found. Eventually either the address will be returned to your machine or your machine will receive an error detailing out that the domain could not be found.

Your domain request will continue to move up the tree of domain servers until the address is found. Eventually either the address will be returned to your machine or your machine will receive an error detailing out that the domain could not be found.

When you want to use a name instead of an IP address for your building automation system server, which I recommend, by the way, you need to make sure that you have the DNS server IP address entered in the building automation system server. You can do this by clicking on:

Control Panel -> Network Connections -> Right Click on Your Network Interface and select Properties -> Click on Internet Protocol Version 4 (TCP/ IPv4) and Properties and fill out the preferred DNS server.
DNS Setup

Also make sure this is set in your BAS!

Dynamic Host Configuration Protocol

Are you ready to live dynamically! Sorry, I couldn't help myself, I've been listening to one too many motivational podcasts lately!

If you've made it the far you might be thinking ok, this is good stuff but what if my device is given an IP address automatically?

Well first off, I highly suggest that all building automation supervisory devices and servers have static IP addresses. However, if this is not the case then you need to use a technology called Dynamic Host Configuration Protocol.

Network address using the DHCP protocol

DHCP utilizes a DHCP server to manage a pool of IP addresses and then to issue these IP Addresses to devices. In the BAS world you often have two options to utilize a static IP address or to utilize a Dynamic or DHCP generated address.

DHCPDISCOVER

In the wild world of networking your device when connected to the network will issue a DHCP Discover request.

DHCPOFFER

The DHCP Server will receive this request and 1 of 2 things will happen.

1) The server will issue a random IP address or the next IP Address in the pool

2) The server will issue an IP Address to the device based on an entry that states this device should always receive this IP Address.

DHCPREQUEST

The device will receive the IP Address issued in the DHCPOFFER, the device now can say, hellz ya, I like this IP Address and respond to the server telling it to setup the connection. This is called a DHCPREQUEST.

DHCPACK

The server does its job and when it is done, it sends out a DHCPACK

Devices are given an IP address for a period of time. This time period is called a lease, a lease can either be permanent or time-based.  You can see the lease on the IP address as well as the static portion (shown by the preferred text!)

Command Prompt DHCP Lease

Once my lease gets close to expiring my computer will ask for a lease renewal. This will restart the lease period.

This is one of the most fundamental aspects of IP addressing and I seriously don't understand how anyone could have a career in building automation and not know how DHCP works. It is so core to IP addressing functionality that if you didn't read that section. Stop, stop right now and go back and read it.

Don't worry, I'll be here when your finished!

BAM!

We are done, in this short little post you learned:

  • What IP addresses are and how they are created
  • Why subnets are critical for BAS networks
  • What DNS is and why you should care
  • How DHCP works

In my next post for this topic we will be discussing what a network is where we deeply unpack the topic of Sub-netting, Switching, Packets, and ARP (no, not the old folks discount group!).

Now it's Your Turn!

Paste in the comments below what else you would like to learn about IP communications! The most interesting comment will be chosen as a topic for a future post!

 

Phil Zito

Written by Phil Zito

Want to be a guest on the Podcast?

 

BE A GUEST