In this latest installment of the Exploring the Network series, Sam Smallman explains the fundamentals of IP addresses and subnetting.
In my previous article, The Postcard (OSC), I showed you the possibilities of Open Sound Control, and used an analogy that OSC is like writing a postcard. Much like writing a postcard, OSC is classified as a Layer 6 or Presentation Layer entity, it is transport independent, which means it has no idea how it should be sent. In this article, we will explore some of the necessary components we need to send our OSC message (postcard) using the Internet Protocol suite (IP suite). This is a set of communication protocols – they may not be something you are familiar with, but they are certainly something you have been using often. Most commonly, we use them for sending email, visiting webpages, and streaming Netflix. They are the postmen to our postcard. The method by which our postcard gets from A to B. Otherwise known as UDP (User Datagram Protocol) and TCP (Transmission Control Protocol).
To build a richer analogy, we would describe the world that our postmen and postcards live in as a network, a world that is as large as the amount of devices connected to it. Geographically, it could span the extent of our globe and be connected by many means, wired or wireless. But how do we identify which device is which, and where it is located?
So, let’s do some talking! Pinging is part of another protocol (ICMP, if you’re interested) within the Internet Protocol suite, dedicated to sending error and operational messages. It’s important to us because it’s one of the easiest and quickest ways you can send a message to a device on the network and receive a response back. Pinging operates by sending an “echo request” to a target device and then waits for an “echo reply”. Firstly, it allows us to see whether we can talk to another device, simply, before trying any clever stuff. Secondly, it allows us to calculate the round trip time taken between sending a message to the destination device and receiving an echo reply. This allows us to judge whether the connection is any good. If we’re receiving no response, we know there is a problem, which will most likely be because the devices are not on the same network or, rarely, a firewall blocking the echo request.
There are variety of applications you can use to ping another device, most notably Command Prompt on a Windows computer and – as in the example below – Terminal on macOS, both of which use the same command to start pinging:
When a device can’t ping another – and not because of a firewall blocking the echo request – our two devices are most likely in different networks. This could be due to an air gap; a cable has been pulled out or sawn through. Or, it could be due to subnetting.
Referring back to our previous analogy, subnetting would be the equivalent of dividing up our world of postmen delivering postcards into counties or states. Except, in the real world, cross county or state communication is possible, but within the realms of networking it is less so. A device which sits within a different subnet from another will not be able to talk to the other directly.
Using our default IP ranges with our default subnet mask, our devices can have an IP address that sits with the range of 10.101.0.1 – 10.101.255.254.
Sometimes, subnet masks are written in slash syntax such as “/16” or “/24”. This syntax makes much more sense when we have seen a subnet mask in 32bit binary format as the number following the “/” is the total number of 1’s within the subnet mask.
Yes it can! Many of our devices support an option to “obtain an IP automatically” which uses a protocol called Dynamic Host Configuration Protocol. DHCP works hand in hand with the Internet Protocol suite and works by a device acting as a DHCP server that dynamically distributes network configurations, such as IP addresses and subnet masks to devices that request them. When a device requests network configuration and finds no DHCP server, it will fall back to an IP range we call Automatic Link Local: 169.254.0.0 – 169.254.255.255. So, now when you come to a Net3 Gateway with an IP address within this range, you will know that the Gateway has been set up to request an IP address via DHCP and the Gateway has been unable to find a DHCP server. The most likely cause is that your primary console acting as a DHCP server is offline.
A port number is used to identify specific services provided by your devices on the network. Using our analogy for the last time, if we were to describe an IP address as an address to a block of flats [apartment block], a port number would be the postboxes [mailboxes] that sit at the bottom of the building. These can be communally shared and represent a specific service that our applications on our devices can read and write data to and from. For example, port 80 is the “postbox” for HTTP, a protocol that is the foundation of data communication for the World Wide Web. All of the web browsers we use to view the internet, such as Chrome, Safari and Firefox all read and write data with port (postbox) 80. ACN, a protocol we use to distribute DMX data, uses port 5568 and most of our devices, such as Net3 DMX Gateways, will be listening to that port number. As with IP addresses, port numbers are administered by IANA and the numbers range from 1 – 65535. Port numbers 1 – 1024 are reserved for special purposes and everything above 1025 is free game – although be aware that other applications using different network services could be using any of those ports.
This is a lot to take in and we have just about scratched the surface. So, let me try and sum up without blowing your mind any more.
IP address = an address to identify and locate a device within a network, much the same as your home address.
Subnet = a portion of a network, similar to the relationship of a county or state to a country.
Subnet mask = a set of rules, or “title deeds,” that dictate the size and boundaries of a subnet and is applied to an IP address.
Network = a group of two or more devices that are linked together.
As always, if you have any questions, you can email me at sam.smallman@etcconnect.com.