What Everybody Ought to Know About IP Addressing

We will be looking at and explaining IP Addressing, MAC Addressing (Physical Address), Subnets, and Subnet Masks. Communication using Ethernet usually revolves around the Open Systems Interconnection model (OSI model). This model was made for computing systems to communicate without regard for the underlying internal structure and technology.


IP Addressing Analogy

Think of it like sending a letter:
You write the message on paper – This is like the protocol that the system will be using. The protocol is like the language that the two devices will be communicating.
IP Addressing 001-min
Sign it at the bottom of the paper – This signature is like a MAC address for the system. It will uniquely identify you.
IP Addressing 002-min
Put it into an envelope and address it (Also return address) – This address is like the IP address for the system. It lets everyone know the location that the letter is going and returning.
IP Addressing 003-min
Stamp, and put it in the mail – This is like the physical cable that we will be using. The scheduled pickup, sorting, routing, etc. to get your letter to the sender is now out of your hands.
This is similar to the OSI model. The layers within the model will communicate with each other to ensure that the information will get to the designation without error.

IP Address – IP Addressing

An IP (Internet Protocol) Address is a user-defined numeric label assigned to a device on an Ethernet network that identifies the network and node. An IP address is a 32-bit address that is normally grouped into 4 bytes for ease of communication and understanding. Example: 192.168.1.1
You can look up your current address by going to the following url:
http://whatismyipaddress.com/

MAC Address – IP Addressing

The MAC (Media Access Control) Address is also called the physical address. This is part of the unique identification on an Ethernet network. The MAC address is a 48-bit address that is normally grouped into 6 bytes for ease of communication and understanding. Example: 00:02:A1:BC:72:33
Here is a URL link to find your MAC address on your computer:
http://www.wikihow.com/Find-the-MAC-Address-of-Your-Computer
Devices use their hardware addresses to communicate with each other within the OSI model.

Ethernet networks support many different types of protocols, including TCP/IP. In the industrial environment, you will often hear of EtherNet/IP, Modbus TCP, Profinet, etc. are all part of TCP/IP.

There are a defined number of IP addresses that have been defined as private IP addresses. These addresses are not allocated to any specific organization and anyone can use these without approval. Choose the one with the range that will fit your application.

Class Private IP Addresses
A 10.0.0.0 – 10.255.255.255
B 172.16.0.0 – 172.31.255.255
C 192.168.0.0 – 192.168.255.255
Subnet Mask – IP Addressing

A subnet mask is an address that enables distinction between networks. It is used to divide the network into smaller units called Subnets. This is beneficial when the office communications are separate from the plant floor communications. It adds a level of security and enhances maintenance and upgrade options.
A subnet mask is a 32-bit address that is normally grouped into 4 bytes. This is the same as the IP address because we compare the IP addresses with the subnet mask to determine if they can communicate directly with one another. If not then the communication must happen through a router to get to the destination. The subnet mask must match for communications to happen.

Example:
Compare the following Modbus TCP addresses and see if they are on the same subnet:
Modbus TCP Address 1: 192.168.1.3
Modbus TCP Address 2: 192.168.0.10
Subnet Mask: 255.255.255.0
IP Addressing 070-min
Convert these decimal values to their binary equivalent:
(You can do this by using your windows calculator in programmer mode. View | Programmer or Alt + 3)
Windows Calculator Program Mode
Modbus TCP Address 1:
11000000.10101000.00000001.00000011
Modbus TCP Address 2:
11000000.10101000.00000000.00001010
Subnet Mask:
11111111.11111111.11111111.00000000
Same Subnet Compare:
11111111.11111111.1111111x.00000000
If the subnet mask has a ‘1’ then compare the two addresses and see if they are similar. In our example there is a difference, so the two devices will not communicate. You must change the subnet mask on the entire system or IP address.
IP Addressing 080-min
Let’s now change the IP address on Address 2.
Modbus TCP Address 1: 192.168.1.3
Modbus TCP Address 2: 192.168.1.10
Subnet Mask: 255.255.255.0
IP Addressing 090-min
Convert these decimal values to their binary equivalent:
Modbus TCP Address 1:
11000000.10101000.00000001.00000011
Modbus TCP Address 2:
11000000.10101000.00000001.00001010
Subnet Mask:
11111111.11111111.11111111.00000000
Same Subnet Compare:
11111111.11111111.11111111.00000000
We can now communicate successfully.
PLC Ethernet

Troubleshooting Ethernet Network – IP Addressing

Troubleshooting your Ethernet network is easy by using a free product called Wireshark. https://www.wireshark.org/
This software will monitor and display your Ethernet traffic. Highlighting different communication protocols, you can quickly see your communication in action. Introduction to Wireshark Video gives a good overview of what is possible and shows what to look for on your network.
Ethernet Wire Shark

IP Address selection on your network must be unique. You cannot have two addresses the same. As a general rule, only those addresses within the same subnet will communicate with each other without the need for a router.

Watch on YouTube: What Everybody Ought to Know About IP Addressing


If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.


1 thought on “What Everybody Ought to Know About IP Addressing”

  1. Email from Martha:

    Assisting users of accautomation.ca to monitor their website

    Hello,
    I wanted to thank you for pointing me to wireshark.org/ on your page here: accautomation.ca/what-everybody-ought-to-know-about-ip-addressing/
    I was not aware of how important it is to monitor my site and you got me to do that! After some research, I found this super cool really free alternative mobile app. What these guys do is turn my phone into a monitor, so I get an instant message if my site is down. https://play.google.com/store/apps/details?id=com.freewebsitemonitor
    I think this is a really cool approach, and it saves me the money I paid for the monitoring in the past. They promise a forever-free app, so I thought since you got me to the first course, I would return the favor, so you can share this app on your page.
    Martha

    Reply

Leave a Reply to garrys Cancel reply