This is the first part of a series of articles on what automation engineers need to know about Ethernet and TCP/IP. This article focuses on two key terms: collision and broadcast domains.
In the last fifty years or so, our society has become increasingly complex and with that, our language has gotten increasingly sophisticated. In bygone eras, they didn’t have this problem. No-one talked about slugging percentage and weighted earned run average in the Babe Ruth era. How many drivers could really describe what torque means for their car? The same goes for BMI (Body Mass Index) – we know it should be lower but not really what it is. These kinds of terms get thrown around but are almost unexplainable by the average man or woman on the street.
We have terms like these in industrial automation. Now that Ethernet is the standard for link-layer communications on the factory floor, there are a lot of IT terms that us factory floor people aren’t accustomed to. Two of the terms that you’ll hear used but probably can’t define well are collision domain and broadcast domain.
Before getting to work on those terms, let’s do a refresher on the main types of factory floor network equipment and how they work:
Hub – A device that connects Ethernet devices together as if they were on the same cable. Any message arriving on any port is re-transmitted out of every other port just as if the device had transmitted it on a shared cable. A collision occurs when devices on two ports of a hub transmit concurrently. Hubs are never (should be never) used anymore with our EtherNet/IP, PROFINET IO, and Modbus TCP networks.
Switch – A device that receives a message on a port and forwards it to the port where the destination device is located. Switches operate at Layer 2 – the Network layer – and forward based on the 48-bit MAC (Media Access Controller) address. We often connect individual EtherNet/IP, PROFINET IO and Modbus TCP devices to the ports of a switch. Sometimes linear segments are created by daisy-chaining devices off a single port of a switch.
Router – A device that also forwards messages like a switch but at a different layer. Routers operate at Layer 3 – the Network layer – and forward devices based on the IP address.
Today’s terms are broadcast domain and collision domain. Let’s start with the broadcast domain. The broadcast domain is the set of network devices that receive Ethernet broadcast messages generated by the Address Resolution Protocol (ARP) and other protocols in the TCP/IP suite. Each Ethernet port on a router is an Ethernet network, and all the devices in that network comprise a broadcast domain. Generally, if you don’t have VLAN (Virtual LANs), you can just count the number of Ethernet ports on a router to get the number of broadcast domains. For example, there are two Ethernet ports on this router and two broadcast domains in the following figure:
Now if you have a few VLANS defined, the VLANS form their own broadcast domain (VLANs will be discussed in a future article). Each of the three VLANs in the following figure forms a broadcast domain and there are two other broadcast domains, one on each side of the router. There is a total of five broadcast domains. Each broadcast domain is identified by color. The black circles on each side of the router are part of all the other broadcast domains on that side of the router. For example, the red broadcast domain consists of the devices in VLAN 10 plus switches 1 and 2. The purple broadcast domain consists of everything on the right side of the router except for the device in VLAN 30.
A collision domain, on the other hand, is the part of the network where two messages might collide. In Ethernet, devices that transmit in a collision domain must listen and repeat traffic that is aborted due to multiple devices attempting simultaneous message transmit. When that happens, those devices must wait some random time and try again. On networks with many devices in a collision domain, the ability of a device to send a message can be severely restricted. There are 18 collision domains in the following figure (each red line and red circle is a collision domain):
Note that devices that are connected directly to a switch or a router form a two-device collision domain. Those devices each have two wire pairs: one for transmit and one for receive. The transmit of each one is connected to the receiver of the other. When these devices operate in Full-Duplex (they don’t always, as I’ll discuss in a future article), there can’t be a collision, but they still form a collision domain. With a hub, on the other hand, all devices are essentially on the same, flat network, and all devices connected to the hub are on the same collision domain.
Now that we understand broadcast domains and collision domains, another article this series will discuss Full-Duplex and Half-Duplex communications.