Introduction to Computing

Chapter 9
Networks, Internet, and Industrial Connectivity

Bachelor Program in Mechatronics Engineering
Introduction to Computing   •   Bachelor

Networks, Internet, and Industrial Connectivity

Introduction

Modern mechatronic systems rarely operate as isolated machines. A robot receives production instructions from a supervisory computer, sensors report process conditions to a controller, controllers exchange status with neighboring devices, and cloud services may store maintenance data. These activities depend on communication networks: organized systems of devices, transmission media, addressing rules, and protocols that allow information to move reliably and securely.

For a mechatronics engineer, networking is not limited to connecting office computers. It includes real-time industrial Ethernet, wireless sensor networks, machine-to-machine communication, Internet of Things (IoT) platforms, web services, and cybersecurity. Network design affects response time, availability, safety, maintainability, and total cost.

This chapter develops the concepts required to understand and design such systems. It begins with network architectures and protocol layers, then examines addressing, routing, client–server and publish–subscribe communication, web technologies, wireless communication, APIs, and industrial connectivity.

Learning Objectives

By the end of this chapter, you should be able to:

  1. Explain common network architectures, topologies, and protocol layers.
  2. Distinguish frames, packets, segments, addresses, and ports.
  3. Describe IPv4 and IPv6 addressing, subnetting, routing, and name resolution.
  4. Compare client–server and publish–subscribe communication models.
  5. Explain the roles of HTTP, HTTPS, DNS, TCP, UDP, and APIs.
  6. Compare important wireless and industrial communication technologies.
  7. Select communication approaches for automation and IoT applications.
  8. Analyze latency, bandwidth, reliability, interoperability, and security trade-offs.

1. Networks as Engineered Systems

A network consists of end devices, intermediate devices, communication links, protocols, and operational policies. End devices include sensors, programmable logic controllers (PLCs), robots, computers, cameras, and cloud servers. Switches connect devices within a local network, whereas routers connect different networks. Access points provide wireless connectivity, and gateways translate between dissimilar protocols or address domains.

A network topology describes how devices are physically or logically connected. A star topology connects each device to a central switch. It is common in Ethernet because a failed cable usually affects only one device, although failure of the central switch can affect the whole segment. A bus topology shares one communication medium; it is simple but can suffer from collisions and a single-point cable failure. A ring provides an alternative path in some industrial systems. Mesh topologies provide redundancy through multiple paths, but require more cabling, configuration, and routing logic.

Network performance is multidimensional. Bandwidth is the maximum rate at which a link can carry data, normally expressed in bits per second. Throughput is the useful rate actually delivered after protocol overhead, congestion, retransmissions, and processing limitations. Latency is the elapsed time between transmission and reception. Jitter is variation in latency. Availability is the proportion of time that the service is operational.

For a data transfer of size S bits completed in time T seconds, the average throughput is:

R = S ÷ T

Here, R is throughput in bit/s, S is successfully delivered data in bits, and T is elapsed time in seconds. This expression is an average measurement, not a guarantee of instantaneous rate. It should not be confused with link bandwidth. For example, transferring 8 Mbit in 1 s gives R = 8 Mbit/s, even if the physical link is rated at 100 Mbit/s.

A useful first-order estimate of transmission delay is:

ttrans = L ÷ C

where t_trans is transmission time in seconds, L is frame length in bits, and C is link capacity in bit/s. This estimate excludes propagation, queuing, processing, and retransmission delays. A 12,000-bit frame on a 100 Mbit/s link has a transmission time of 0.00012 s, or 120 μs.

2. Protocol Layers and Encapsulation

A protocol is a defined set of rules for communication. It specifies message formats, timing, addressing, error handling, and permitted actions. Layered architectures divide communication into functions so that one layer can change without redesigning every other layer.

The seven-layer OSI reference model contains, from lowest to highest, physical, data link, network, transport, session, presentation, and application layers. In practical Internet engineering, the TCP/IP model is more common. Its link layer corresponds broadly to OSI physical and data-link functions; the Internet layer provides IP; the transport layer provides TCP or UDP; and the application layer includes protocols such as HTTP, DNS, MQTT, and OPC UA.

When an application sends information, each layer may add control information. Application data become a transport-layer segment or datagram, which is carried inside an IP packet, which is carried inside a link-layer frame. At the receiving device, the process is reversed. This is called encapsulation and decapsulation.

Important terms include:

  • A bit is a binary value.
  • A byte contains eight bits.
  • A frame is a link-layer data unit.
  • A packet is commonly an IP-layer data unit.
  • A segment is a TCP transport-layer data unit.
  • A datagram commonly refers to a UDP data unit.
  • A port identifies an application endpoint within a host.
  • A socket is a software communication endpoint, commonly identified by an IP address and port.

Layering promotes interoperability, but it also introduces overhead and sometimes hides important timing behavior. Industrial engineers must therefore understand both the logical protocol model and the physical behavior of the equipment.

3. Ethernet, Switching, and Local Networks

Ethernet is the dominant wired local-area networking technology. Each network interface has a link-layer MAC address. Ethernet switches learn which MAC addresses are reachable through each port and forward frames only where necessary. Unlike early shared Ethernet, switched full-duplex Ethernet normally avoids collisions.

A virtual local-area network (VLAN) logically separates traffic on shared switching infrastructure. VLANs can isolate production controls, office computers, cameras, and guest devices. A router or Layer 3 switch is required for communication between VLANs. Segmentation reduces broadcast traffic and limits the spread of faults or attacks, but it is not a complete security solution.

Industrial Ethernet systems may use standard Ethernet hardware while imposing stricter timing and device-behavior rules. Examples include EtherNet/IP, PROFINET, EtherCAT, Modbus TCP, and the Ethernet-based portion of OPC UA architectures. These systems differ in scheduling, diagnostics, configuration, synchronization, and real-time guarantees.

4. Addressing, Subnetting, and Routing

4.1 IP addressing

An IP address identifies an interface within an IP network. IPv4 uses 32 bits and is usually written as four decimal octets, such as 192.168.10.25. IPv6 uses 128 bits and is written in hexadecimal groups, such as 2001:db8::25. IPv6 provides a much larger address space and includes mechanisms designed for efficient hierarchical addressing and autoconfiguration.

An IPv4 address is interpreted together with a subnet mask or prefix length. In CIDR notation, 192.168.10.25/24 means that the first 24 bits identify the network and the remaining 8 bits identify host addresses. For a conventional IPv4 subnet with h host bits, the number of usable host addresses is:

Nhost = 2h − 2

The subtraction reserves the all-zero host value for the network address and the all-one host value for the broadcast address. This rule applies to ordinary IPv4 subnets, not to special cases such as /31 point-to-point links or /32 host routes. A /24 network has h = 8 and therefore 2^8 − 2 = 254 conventional usable host addresses.

4.2 Worked subnetting example

Suppose an automation cell uses 192.168.40.0/26. A /26 prefix leaves h = 6 host bits. Therefore:

Nhost = 26 − 2 = 62

The block size is 64 addresses. The network address is 192.168.40.0, the usable range is 192.168.40.1 through 192.168.40.62, and the broadcast address is 192.168.40.63. The next /26 subnet begins at 192.168.40.64. Correct subnet planning prevents duplicate addresses and leaves capacity for expansion.

4.3 Routing

A router forwards packets between networks. It examines the destination IP address and selects the most specific matching route. A routing table may contain directly connected networks, statically configured routes, and routes learned through dynamic protocols. The default route is used when no more specific route exists.

Routing separates logical networks, but it can add latency and create points of failure. Industrial networks often use carefully controlled static routes or redundant routing architectures because predictable behavior is more important than automatic adaptation. Network Address Translation (NAT) allows many private IPv4 devices to share a public address, but it can complicate direct device-to-device communication and remote maintenance.

DNS translates human-readable names into IP addresses. DHCP can automatically assign addresses and configuration parameters. In critical industrial systems, address allocation should be documented, monitored, and protected against unauthorized DHCP or DNS services.

5. Transport and Application Protocols

TCP provides connection-oriented, ordered, and reliable byte-stream delivery. It uses sequence numbers, acknowledgements, flow control, and retransmission. TCP is appropriate when complete and correctly ordered data are more important than minimum delay, such as web transactions and configuration transfers.

UDP is connectionless and has lower protocol overhead. It does not itself guarantee delivery, ordering, or duplicate suppression. UDP is useful when an application can tolerate loss or implements its own reliability, as in certain streaming, discovery, and real-time systems. Selecting UDP does not automatically make a system real-time; scheduling, network load, device processing, and application design remain important.

HTTP is an application protocol used by the web and many APIs. HTTPS is HTTP protected by Transport Layer Security (TLS), providing encryption, server authentication, and integrity protection when correctly configured. Common HTTP methods include GET for retrieval, POST for submitting or creating a subordinate resource, PUT for replacement or idempotent update, and DELETE for removal. HTTP status codes communicate outcomes, such as 200 for success, 404 for a missing resource, and 500 for a server-side error.

An API is a defined interface through which software requests data or services. A REST-style API commonly uses HTTP resources and representations such as JSON. APIs should specify authentication, authorization, input validation, error responses, versioning, rate limits, and data formats. Industrial applications may expose equipment data through HTTP APIs, OPC UA services, or message brokers.

6. Communication Models

6.1 Client–server

In a client–server model, a client initiates a request and a server provides a response or service. A browser requesting a dashboard, or a PLC requesting a recipe from a database server, illustrates this model. It is easy to understand and supports centralized access control and data management. However, the server can become a bottleneck or single point of failure. Industrial systems often address this through redundancy, local fallbacks, caching, and carefully defined timeout behavior.

6.2 Publish–subscribe

In publish–subscribe communication, publishers send messages to named topics rather than directly addressing subscribers. A broker receives messages and distributes them to clients subscribed to matching topics. MQTT is a widely used lightweight publish–subscribe protocol. It supports quality-of-service levels, retained messages, and last-will notifications, although these features must be configured with an understanding of their operational consequences.

For example, a temperature sensor may publish to factory/line3/oven1/temperature. A historian, alarm service, and dashboard can independently subscribe. This decouples producers from consumers and makes systems extensible. It also introduces broker dependence, topic-governance challenges, and the risk of stale retained data being mistaken for current data.

The two models are complementary. A machine configuration request may use client–server interaction, while continuous measurements and alarms may use publish–subscribe messaging.

7. Wireless Communication

Wireless systems transmit information through radio waves rather than a guided cable. Important design variables include frequency, channel width, transmit power, antenna characteristics, path loss, interference, modulation, coding, security, and battery life.

Wi-Fi provides high data rates and convenient local connectivity, but performance varies with distance, obstacles, interference, contention, and roaming. Bluetooth Low Energy is suitable for short-range, low-power devices. IEEE 802.15.4-based technologies, including many mesh-oriented systems, support low-power sensing. Cellular networks provide wide-area coverage and managed mobility; technologies such as LTE-M and NB-IoT are designed for many low-data-rate IoT applications. Time-sensitive industrial wireless systems require especially careful assessment of latency, reliability, coexistence, and failure behavior.

The received signal generally decreases with distance and obstruction. A link budget compares available transmitted power and antenna gains with path loss, cable losses, receiver sensitivity, and a design margin. Exact propagation depends on the environment, so a theoretical estimate should be validated by site surveys and measurements. Wireless is a shared medium: encryption protects content, but it does not eliminate interference or guarantee availability.

Best practices include using authenticated encryption, changing default credentials, separating control and guest traffic, planning channels, mounting antennas correctly, monitoring signal quality, and defining a safe local behavior when communication is lost. Safety-critical stop functions should not depend solely on an ordinary wireless link unless the complete system is specifically engineered and certified for that use.

8. Industrial and IoT Connectivity

Industrial communication has distinctive requirements. A factory network may contain three broad levels:

  1. Field level: sensors, actuators, drives, and instruments.
  2. Control level: PLCs, distributed control systems, and robot controllers.
  3. Supervisory and enterprise level: SCADA, historians, manufacturing execution systems, analytics, and business applications.

Data should not move freely between all levels. Industrial architectures commonly use zones and conduits, firewalls, demilitarized zones, secure remote-access gateways, and tightly controlled data flows. The Purdue model is a useful conceptual aid, although modern architectures increasingly use zero-trust principles, edge computing, and software-defined segmentation rather than relying only on fixed layers.

Common technologies include:

TechnologyTypical strengthImportant consideration
Modbus RTU/TCPSimple and widely supportedLimited semantics and security in the basic protocol
PROFINETIntegrated industrial Ethernet and diagnosticsRequires compatible engineering and device profiles
EtherNet/IPBroad automation ecosystemPerformance depends on network design and traffic class
EtherCATEfficient cyclic motion and I/O communicationSpecialized topology and engineering practices
OPC UARich information modeling and interoperabilityConfiguration and security require discipline
MQTTLightweight publish–subscribe telemetryBroker, topic, and message-lifecycle governance
CAN/CANopenRobust embedded and vehicle/automation communicationLimited payload and network-scale constraints

IoT architectures commonly include devices, an edge or gateway layer, network transport, platform services, applications, and management functions. Edge computing processes data near the machine, reducing bandwidth and latency and allowing operation during cloud disconnection. Cloud systems provide scalable storage, fleet analytics, and remote access, but introduce dependence on connectivity, account security, data governance, and service availability.

Time synchronization is important when correlating events. Network Time Protocol (NTP) can provide practical clock synchronization, while Precision Time Protocol (PTP) can achieve much tighter synchronization in suitable networks and devices. Synchronized clocks improve diagnosis, but they do not by themselves make a control loop deterministic.

9. Security, Safety, and Governance

Network security protects confidentiality, integrity, and availability. Industrial engineering adds safety, reliability, and maintainability. The consequences of a cyberattack may include unsafe motion, environmental release, product loss, or prolonged shutdown.

A defense-in-depth strategy uses multiple controls: asset inventories, secure configuration, network segmentation, least privilege, multifactor authentication, patch management, backups, logging, anomaly detection, incident response, and tested recovery. Every device should have a defined owner and lifecycle. Unsupported operating systems and undocumented remote-access accounts are persistent risks.

Security controls must respect operational constraints. Patching a production controller without testing can cause downtime; refusing all updates creates long-term vulnerability. A risk-based process should assess the asset, threat, consequence, exposure, compensating controls, and maintenance window. Standards and guidance such as IEC 62443, ISO/IEC 27001, NIST cybersecurity guidance, and applicable national data-protection laws provide useful governance frameworks. Requirements vary by jurisdiction and industry, so engineers must consult current authoritative sources rather than assuming that one standard satisfies every obligation.

Privacy also matters. Cameras, worker identifiers, location data, and production records can be personal or commercially sensitive. Data minimization, retention limits, access control, and transparent monitoring policies should be considered during system design.

10. Illustrative Case: Connected Packaging Cell

Background

A packaging cell contains a PLC, servo drives, barcode scanner, safety controller, operator panel, energy meter, and production database. Management wants dashboards showing production rate, downtime, energy use, and maintenance indicators.

Problem

The existing cell uses a flat network. The operator panel communicates with the PLC, but an unmanaged wireless router also connects a maintenance laptop and an office computer. Addresses are undocumented, occasional broadcast storms interrupt operation, and the database polls the PLC every second. Engineers want remote access without exposing the controller directly to the Internet.

Analysis

The cell combines real-time control, supervisory visualization, and enterprise reporting. These functions have different requirements. The motion and safety systems need predictable local communication. Dashboard data can tolerate seconds of delay. Direct Internet exposure would increase risk, while uncontrolled polling increases traffic and PLC workload.

Approach and solution

The design team creates separate VLANs for control, supervisory devices, and authorized maintenance access. A managed industrial switch replaces the unmanaged switch and provides diagnostics, port restrictions, and traffic statistics. The PLC and drives retain fixed, documented addresses; a DHCP reservation scheme is used only for suitable noncritical devices.

A local gateway reads selected production variables and publishes normalized measurements to an MQTT broker in a protected industrial demilitarized zone. The broker forwards approved data to the historian. The database no longer polls every PLC tag. The dashboard uses a read-only API. Remote maintenance uses a VPN with multifactor authentication, time-limited accounts, logging, and approval. Safety functions remain local and do not depend on cloud connectivity.

Firewall rules permit only required flows. The gateway validates data ranges, timestamps measurements, buffers data during temporary broker outages, and reports stale-data status explicitly. Network Time Protocol synchronizes ordinary devices, while the control network uses the timing method required by its motion system.

Outcome

The architecture reduces unnecessary traffic, isolates office systems, improves diagnosis, and allows reporting to continue without giving the database direct control access. The design also makes failure behavior explicit: if the broker or cloud service fails, production control continues locally and buffered data are forwarded later.

Learning points

The case illustrates that connectivity is an architectural decision rather than merely a cable or protocol choice. Segmentation, data ownership, timing requirements, failure modes, security, and maintainability must be considered together. A technically functional network can still be unsuitable if it permits unsafe control, lacks documentation, or cannot be recovered after failure.

11. Design Method and Best Practices

A disciplined connectivity design can follow these steps:

  1. Identify devices, data flows, owners, and safety functions.
  2. Classify traffic by latency, bandwidth, reliability, and direction.
  3. Select physical media and protocols compatible with the environment.
  4. Create an addressing, naming, and time-synchronization plan.
  5. Segment networks according to trust and operational function.
  6. Define authentication, authorization, encryption, and update procedures.
  7. Specify behavior during loss of power, link, server, broker, or cloud service.
  8. Test normal performance, peak load, recovery, and cybersecurity controls.
  9. Document configurations, dependencies, versions, and maintenance responsibilities.
  10. Monitor the system and periodically review whether assumptions remain valid.

A protocol should be selected because its semantics and performance fit the application, not because it is fashionable. Engineers should distinguish deterministic control traffic from noncritical telemetry, use meaningful data models, avoid excessive polling, validate units and timestamps, and expose only the minimum required API operations.

12. Contemporary Developments

Current industrial networks increasingly combine operational technology with information technology. Industrial edge platforms run containers, analytics, protocol converters, and machine-learning inference near equipment. Digital twins use networked data to represent assets and processes, but their usefulness depends on data quality, time alignment, model validity, and secure identity management.

Artificial intelligence can detect unusual vibration, energy consumption, or network traffic. However, an AI model does not replace physical safeguards or deterministic control logic. False alarms, concept drift, adversarial inputs, and undocumented model updates must be managed. AI systems should provide traceable data sources, confidence information, and a safe response when the model is uncertain.

IPv6 adoption, private cellular networks, time-sensitive networking, zero-trust architectures, and improved industrial information models are important developments. Their value depends on the complete operational context, including legacy equipment, skills, certification, procurement, and lifecycle support.

Chapter Summary

Networks provide the communication foundation for modern mechatronic and industrial systems. Their behavior depends on topology, media, addressing, switching, routing, transport protocols, application protocols, and operational policies. Layered models explain encapsulation and interoperability, while performance analysis must distinguish bandwidth, throughput, latency, jitter, and availability.

IPv4 and IPv6 addresses identify interfaces, subnetting organizes networks, and routers forward packets between them. TCP emphasizes reliable ordered delivery, whereas UDP provides lower overhead without inherent reliability. HTTP and HTTPS support web services, DNS maps names to addresses, and APIs provide structured software interfaces.

Client–server communication is direct and centralized; publish–subscribe communication decouples producers and consumers through topics and brokers. Wireless technologies provide mobility and flexible installation but require attention to interference, propagation, security, and failure behavior. Industrial and IoT systems must integrate real-time control, supervisory monitoring, enterprise analytics, and secure gateways without allowing uncontrolled access.

Effective designs apply segmentation, least privilege, redundancy where justified, explicit failure modes, accurate documentation, lifecycle management, and defense in depth. Connectivity should improve the process while preserving safety, maintainability, and operational resilience.

Key Terms

Protocol: A set of rules governing communication between devices or software components.

Topology: The physical or logical arrangement of network nodes and links.

Bandwidth: The maximum data-carrying capacity of a communication link.

Throughput: The useful data rate actually delivered over a network.

Latency: The time required for data to travel from source to destination.

Jitter: Variation in packet or message latency.

Encapsulation: The process of adding layer-specific control information to data.

MAC address: A link-layer identifier associated with a network interface.

IP address: A logical address used to identify an interface in an IP network.

Subnet: A logically divided portion of an IP network.

Router: A device that forwards packets between different networks.

Port: A transport-layer identifier for an application endpoint.

TCP: A connection-oriented transport protocol providing ordered, reliable delivery.

UDP: A connectionless transport protocol with low overhead and no inherent delivery guarantee.

API: A defined interface through which software requests data or services.

Client–server: A model in which a client requests a service from a server.

Publish–subscribe: A model in which publishers send topic-based messages to subscribers, often through a broker.

VLAN: A logical separation of traffic within switched network infrastructure.

MQTT: A lightweight publish–subscribe messaging protocol commonly used in IoT.

Defense in depth: The use of multiple complementary security and safety controls.

Review Questions

Short Answer Questions

  1. What is the difference between bandwidth and throughput?
  2. What functions are performed by a router?
  3. Why are protocols organized into layers?
  4. State one advantage and one limitation of publish–subscribe communication.
  5. Why is network segmentation useful in an industrial plant?

Long Answer Questions

  1. Explain encapsulation using the TCP/IP model and distinguish a frame, packet, segment, and port.
  2. Compare TCP and UDP and recommend suitable uses for each in a mechatronic system.
  3. Explain IPv4 subnetting and calculate the conventional usable host capacity of a /27 subnet.
  4. Compare client–server and publish–subscribe architectures for an industrial monitoring system.
  5. Describe a defense-in-depth cybersecurity architecture for a connected production cell.

Analytical / Application Questions

  1. A robotic cell contains motion controllers, safety devices, an operator panel, cameras, and a cloud-connected energy monitor. Propose a network segmentation and data-flow architecture, explaining which traffic should remain local and why.
  2. A wireless temperature sensor occasionally reports data several minutes late. Develop a structured diagnosis that considers radio interference, battery state, network congestion, gateway buffering, clock synchronization, and application behavior.
  3. Design an API and publish–subscribe strategy for machine condition monitoring. Specify data fields, topic or resource organization, authentication, failure behavior, timestamp handling, and protection against stale or misleading data.

Multiple Choice Questions with Answers

Question 1

Which device primarily forwards IP packets between different networks?

A. Ethernet hub

B. Router

C. Barcode scanner

D. Wireless antenna

Correct Answer: B. Router

Question 2

A conventional IPv4 /26 subnet provides how many usable host addresses?

A. 32

B. 62

C. 64

D. 126

Correct Answer: B. 62

Question 3

Which protocol provides ordered and reliable byte-stream delivery?

A. UDP

B. IP

C. TCP

D. DNS

Correct Answer: C. TCP

Question 4

In a publish–subscribe system, what normally distributes messages from publishers to subscribers?

A. A broker

B. A subnet mask

C. A MAC address

D. A firewall rule only

Correct Answer: A. A broker

Question 5

What is the principal purpose of HTTPS compared with HTTP?

A. To eliminate all network latency

B. To provide TLS-based protection and authentication

C. To assign IP addresses automatically

D. To replace Ethernet switching

Correct Answer: B. To provide TLS-based protection and authentication

Question 6

Which communication model is most directly represented by a browser requesting a web resource from a server?

A. Peer-to-peer broadcast

B. Client–server

C. Publish–subscribe only

D. Token ring

Correct Answer: B. Client–server

Question 7

What does a VLAN primarily provide?

A. Logical traffic separation within switching infrastructure

B. Automatic encryption of every application

C. Unlimited wireless range

D. Replacement of all routers

Correct Answer: A. Logical traffic separation within switching infrastructure

Question 8

Why is edge computing often useful in industrial IoT systems?

A. It guarantees that sensors never fail

B. It processes data near the equipment and can reduce latency and cloud dependence

C. It removes the need for cybersecurity

D. It converts every protocol into TCP

Correct Answer: B. It processes data near the equipment and can reduce latency and cloud dependence

Question 9

Which statement about UDP is correct?

A. It inherently retransmits every lost packet

B. It guarantees packet ordering

C. It has low overhead but does not inherently guarantee delivery

D. It can only be used on wireless networks

Correct Answer: C. It has low overhead but does not inherently guarantee delivery

Question 10

What is a key reason for keeping safety functions local in a connected production cell?

A. Cloud services always use IPv6

B. Safety behavior should not depend solely on an ordinary external network connection

C. Local controllers cannot communicate digitally

D. Publish–subscribe protocols cannot carry measurements

Correct Answer: B. Safety behavior should not depend solely on an ordinary external network connection

Introduction to Computing
Chapter 9 of 15