Jump to content

Introduction to IP Addresses and Networking


Bryon Sol

937 views

Maybe you are new to Ethernet Networking or maybe you’ve been doing it for a while and you know how to get it to work but fumble most of the time before getting it right.  Either way, this blog is intended to give a basic understanding of Ethernet networking.  We won’t get into more advanced topics like VLANs and DMZ, and if you haven’t even heard those terms, that’s fine.  

This is meant as a beginners guide.  So let’s get to it.

Firstly, let’s talk about your address.  No, I don’t mean your city and state or even your country.  But instead your IP ADDRESS!  IP is just the abbreviation for Internet Protocol.  Your IP Address is where your PC lives on the network.  It’s as simple as that.  What’s more complicated is that there are different networks.  For people new to networking, we think that everything these days is internet connected, but that’s just not true, and honestly we probably don’t want everything directly connected to the Internet, that would make things more vulnerable than they need to be.  But for now let’s start with your company’s network and the internet so we can explain what happens on that type of network.

Let’s pretend instead of your PC being a computer, let’s imagine that you are a student starting mid-semester at a new school.  When you arrive at school on your first day, you wouldn’t just walk in and sit down at any desk.  You are aware that people probably have assigned seats so you would ask the teacher where you could sit right?  
 

image.png.2989510a759a7dba920de3a4846289a1.png

Well your PC does the same thing on a company network.  When it arrives it asks for a “seat” from the teacher.  In this case the seat is an IP address and the teacher is a device on the network called the DHCP Server.  When you connect your PC to a network via WiFi or a company wired network, you are almost always using DHCP (Dynamic Host Control Protocol) to be provided an IP Address so that you don’t conflict with other computers on the network.

image.png.8ff42b4d891601241fc673ce5b32d6cb.png

 

Okay, great.  So you have an address, you know where you are.  But – do you know how to get a message to someone else?  If they are in your classroom with you (to extend the metaphor), you don’t need any help getting them the message.  You just talk to them directly.  This is because they are part of your SUBNET.  Because of what’s called the Subnet Mask, our PC can know who it can talk to without any help.  We can communicate with all of the PCs and devices that are on our same Subnet.  But if someone is outside of our subnet we need help passing the message along.  The device which passes the message along is called the Gateway.

image.png.c15e069341ce664ef77b84aa0847dfc7.png

 

A common IP address used on home networks and sometimes small networks will be something that looks like 192.168.0.X where X changes for each device.  The typical subnet mask used along with this IP address is 255.255.255.0.  To keep this simple, just understand that the 4 numbers of the IP address mate up with the 4 numbers in the subnet mask.  So:
-    192 mates with the first 255
-    168 mates with the second 255
-    0 mates with the third 255
-    X mates with the 0 at the end

And at the simplest level.  If you see 255, this tells you that the numbers MUST match for communication to work without needing someone to help.  So if both devices have a subnet of 255.255.255.0 then all 3 first numbers in their IP addresses must be the same or the two devices won’t talk to each other without someone helping.

You can think of it kind of like this, an IP Address has four parts: Town.School.Classroom.Seat
As far as Subnet mask is concerned, if the Subnet Mask says 255=the number must match, 0=doesn’t matter for communication.  There’s a lot more to this, but we are trying to keep this simple.

Therefore if we had subnet of 255.255.255.0 it indicates that Towns must match, Schools must match and Classroom must match.  Then for example 192.168.0.100 can talk to 192.168.0.22.  But 192.168.0.100 can’t talk to 192.168.1.22 because their third octet (classroom) doesn’t match.  

You can find a much more detailed description here of how this works if you’d like to read it.
https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/tcpip-addressing-and-subnetting

Great, so we are starting to understand the terms.  IP address is our specific location, subnet mask is who we can talk to without help, and Gateway is the helper to talk to people outside our classroom.  What about if we know someone’s name, but not their address?  How do we talk to them?  That’s where DNS servers come into play.  Think of the DNS server like a phone book.  If you know someone’s name you can look up their number.

When you connect to a company network, typically the “Obtain an IP Address automatically” box is checked.  Then the DHCP server will give you ALL of the information on this page.  It will give you an IP Address, an appropriate subnet mask, the address of the Gateway and a couple of possible DNS servers to use, so when you want to get to http://www.gibsonengineering.com you can find out the address.  
 

image.png.394c329d397625fd59f3ab2724f3eb97.png

And when you want to send information to Gibson Engineering, you will give that information to the Gateway device and it will pass it along for you.  So overall things kind of look like this, where the Gateway is allowing the connection to the internet – in this picture imagine the cloud as the internet.

image.png.bbd300f27a51efc487400ae8389451e6.png

 

Okay, so that takes care of the company network and getting internet access.  But what about my industrial network?

Well here’s the trick - we want to keep them separate!  If my company network has 172.16.20.X addressing then we can use 192.168.0.X addressing.  But if it uses 192.168.X.X already, then I want to pick something different.  Why?  Because we don’t want confusion.  

Remember my analogy of Town.School.Classroom.Seat?  Well in the USA there are 88 towns named Washington.  There are 399 instances of schools named Lincoln in the USA.  Even if we have two separate network cards in the PC we are using, if the towns and schools are the same, how does the software I’m using know where to send the message?  Having two network cards in a PC actually allows me to communicate on two separate networks simultaneously, but if they are both using the same addressing scheme then it still won’t work.  However, subnetting will often allow things to be very close and not cause conflicts.


For instance, my company network could be using 192.168.0.X addresses with a subnet of 255.255.255.0 but if I wanted to, I could set up all my PLCs and HMIs and barcode readers and cameras and other industrial devices on 192.168.1.X addresses and if my subnet for that card is 255.255.255.0 then there are no conflicts.  This is why Mitsubishi choses to default to 192.168.3.X IP Addresses for their devices because they know that most likely this won’t interfere with most company networks by default.
So in the end, I’m often setting up my computer to look something like this:


image.png.1ee985744dd52a321b3a5038fb370a07.png

 

To summarize, we usually have two separate networks in Industrial Automation.  Our machine network and our company network.  They must have two different numbering schemes to prevent conflicting addresses, and the IP addresses and subnet masks must match for things to be able to communicate.

Quick checklist for troubleshooting connection problems:
1)    Do you know the IP address of the device you want to talk to? i.e. 192.168.3.18
2)    Is your IP address in the same range? i.e. 192.168.3.X anything other than 18
3)    Do your subnet masks match?
4)    Is your IP address unique?  Is something trying to use the same address?

If all of the above looks correct, it’s often a cabling problem or a conflict with some other software such as Firewalls or Antivirus software preventing the software from talking.
As networks get more complicated and security becomes a bigger concern, there will always be things not covered by this article.  But with a good general understanding of how networks work, you can usually solve most networking issues.
 

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...