In industrial Ethernet, what are the differences between hubs, switches, and routers?

 Industrial Ethernet has become quite prevalent in current automation control systems. As integral components of Ethernet, switches, routers, and hubs play crucial roles in industrial networks. Among them, industrial switches are the most widely used. Industrial switches can be divided into two categories: unmanaged switches and managed switches. Unmanaged switches function similarly to conventional switches, while managed switches support various network protocols, and some even incorporate routing capabilities. Hubs are less commonly used and are only employed in certain situations where network communication packets need to be captured. In today's article, we will provide a detailed introduction to these three network components.



  1. Hub

A hub is a network device that operates at the physical layer (Layer 1 of the OSI network reference model), transmitting data in a broadcast manner. In other words, it mirrors the received data to all of its ports. Data transmission is non-directed, meaning that all devices connected to its ports receive the data. The broadcast transmission of data by hubs can easily lead to network storms and waste the limited network bandwidth. Additionally, due to all ports being able to receive data, hubs have low security, so this type of component is rarely used. However, in certain special situations, such as when capturing network communication packets, hubs may be utilized.

  1. Switch

A switch is a network device that operates at the data link layer (Layer 2 of the OSI network reference model). As mentioned earlier, industrial switches include unmanaged and managed types. When referring to switches without specific designation, it usually means unmanaged switches. Typically, data forwarding occurs in a port-to-port manner. Switches forward data based on MAC addresses, maintaining a MAC address table internally that records the correspondence between ports and MAC addresses. When a packet is received, the switch analyzes the MAC address in the packet and then sends it to the corresponding port according to the MAC address table. During the initial power-up phase when the MAC address table is incomplete, switches broadcast data. Throughout communication, the MAC address table is continuously updated in response to network connectivity changes.

Commercial switches are not recommended for use in industrial Ethernet; industrial switches should be used instead. Taking PROFINET as an example, it has the following requirements for switches:

  • Industrial grade
  • Support for Gigabit speed and full-duplex communication
  • Support for IEEE 802.1q (VLAN tagging protocol) and IEEE 802.1p (priority protocol)
  • Support for VLAN ID 0 packet passthrough

Note: Although unmanaged switches do not support VLAN segmentation, they should support the forwarding of VLAN packets.

Siemens SCLANCE X00/X100/XC100 unmanaged switches meet the requirements of PROFINET for switches, as follows:

  • Industrial-grade switches with all ports operating at speeds exceeding Gigabit. Support for auto-negotiation (speed, half-duplex/full-duplex mode) and auto-crossover (straight-through or crossover cable)
  • Support for IEEE 802.1p priority standard
  • VLAN ID 0 for PROFINET RT (real-time) data. X00/X100/XC100 series switches fully support the forwarding of VLAN ID 0 packets. In some switches, VLAN ID 0 may be considered illegal data and dropped.

Managed switches in industrial networks may operate at either Layer 2 (data link layer) or Layer 3 (network layer), depending on the product. Compared to unmanaged switches, managed switches have stronger network management capabilities and support more protocols, such as:

  • LLDP (Link Layer Discovery Protocol) for supporting network topology structure packets
  • SNMP (Simple Network Management Protocol) for managing devices on the network
  • Web server protocol
  • Redundancy management protocol
  • VLAN segmentation, supporting VLAN routing between VLANs
  • Network information diagnosis

A typical application of managed switches in PROFINET networks is the assignment of device names through topology structure, enabling maintenance-free device replacement. Every PROFINET I/O device must be assigned a device name before it can function properly. By using managed switches and setting up port topology structure, even when replacing new devices, PROFINT I/O controllers automatically assign device names to the new devices, achieving maintenance-free operation.

The appearance of Siemens' new generation managed switch, Scalance XB208, is shown in the following figure:



Layer 2 switches only forward data within the same subnet. According to the TCP/IP protocol, communication between different subnets cannot occur directly; to enable communication between subnets, a router (or Layer 3 switch) must be used.

  1. Router

A router is a network device that operates at the network layer (Layer 3 of the OSI network reference model). It consists of two network segments, each connecting to a different subnet, thereby facilitating communication between subnets. Routers have two types of ports: LAN ports for connecting to local area networks and WAN ports for connecting to wide area networks (or another subnet). For example, the appearance of TP-Link's TL-R483G industrial-grade router is shown in the following figure:



Similar to switches, routers also maintain a table internally known as a routing table, which maps ports to devices. However, unlike switches, routing tables are based on IP addresses. When a device within a subnet sends data to an IP address outside of that subnet, it sends the data to the router (using the gateway address). The router then forwards the packet to the appropriate subnet.

Routers support a wider range of network protocols (such as TCP/IP, DHCP, ICMP, NAT, PPPoE, SNTP, HTTP, DNS, H.323, SIP, DDNS, etc., depending on the product) and possess stronger network management capabilities. Some routers also feature functionalities like firewalls, VPNs, making them essential components of upper-level management systems in factories (such as MES).

Alright, that's all for now regarding hubs, switches, and routers in industrial networks.

Related Article Links:

What are the differences between managed and unmanaged switches?