Unit 1: Basics of Networking

ECE128 — Introduction To Iot Networking Protocols 10 min read

I. Networking Fundamentals

Computer networking is the organized exchange of digital information between devices through physical or wireless media. Its governing principle is that communication requires a sender, receiver, message, transmission medium, agreed rules, and sufficient signal quality. Modern networking developed from early telephone and computer systems into interconnected Internet-based networks.

  • Defining elements: A complete communication system contains a source, destination, message, channel, encoder, decoder, and protocol.
  • Digital representation: Data is commonly represented as bits, where one bit is either 0 or 1; eight bits form one byte.
  • Performance measures: Important measures include bandwidth in bits per second, delay in seconds, throughput in bits per second, jitter in seconds, and packet-loss rate.
  • Reliability assumption: Noise, interference, congestion, and failures can affect delivery, so networks require error detection, retransmission, routing, and flow control.
  • Layering convention: Complex communication tasks are divided into layers so that each layer provides services to the layer above it.

II. Data Communication

A. Data communication

Data communication is the transfer of data between two or more devices through a transmission medium using defined encoding and timing rules.

  • Basic components: The sender produces data, the transmitter converts it into signals, the medium carries the signal, the receiver reconstructs it, and the destination consumes it.
  • Signal form: A bit stream may be carried as voltage changes in copper, light pulses in fiber, or electromagnetic waves in radio communication.
  • Direction of transfer: Simplex permits one-way communication, such as a keyboard-to-computer link; half-duplex permits alternate directions, such as a walkie-talkie; full-duplex permits simultaneous directions, such as a telephone call.
  • Timing: Asynchronous communication sends characters with start and stop bits, while synchronous communication sends larger frames according to shared timing.
  • Data rate: If 1,000 bits are transmitted in 0.5 seconds, the rate is 1,000 / 0.5 = 2,000 bit/s.
  • Quality criteria: Effective communication should provide delivery to the correct destination, accuracy without corruption, timely arrival, and acceptable variation in delay.

III. Communication Networks

A. Communication networks

A communication network is a collection of connected nodes and links that enables devices to exchange data and share resources.

  • Nodes and links: Nodes include computers, sensors, routers, and gateways; links include copper cables, optical fiber, and wireless radio paths.
  • Point-to-point connection: A dedicated link connects exactly two devices, as in a leased fiber connection between two routers.
  • Multipoint connection: Several devices share one medium, as in a traditional bus network or a wireless channel.
  • Switching: Circuit switching reserves a path for a session, whereas packet switching divides data into packets that may be forwarded independently.
  • Addressing: An address identifies a destination, such as an IPv4 address 192.168.1.10 or a MAC address assigned to a network interface.
  • Network services: Networks support web access, file transfer, voice calls, sensor reporting, remote control, and resource sharing.

IV. Protocols and Protocol Architecture

A. Protocols and protocol architecture

A protocol is a set of rules governing message format, meaning, timing, ordering, and actions taken when communication succeeds or fails.

  • Syntax: Syntax defines the structure of a message; an IPv4 header, for example, contains fields such as source address, destination address, and time-to-live.
  • Semantics: Semantics define the meaning of fields and operations, such as interpreting an acknowledgment as confirmation of successful reception.
  • Timing: Timing determines when data may be sent, how long a receiver waits, and when retransmission occurs after a timeout.
  • Protocol architecture: Related protocols are organized into layers; HTTP uses TCP, TCP uses IP, and IP uses a link-layer protocol such as Ethernet or Wi-Fi.
  • Encapsulation: Each layer adds control information. An application message becomes a transport segment, an IP packet, a link-layer frame, and finally a sequence of physical signals.
  • Interoperability: Standards such as IEEE 802.11 for Wi-Fi and IETF TCP/IP specifications allow equipment from different manufacturers to communicate.

V. Transmission Impairments

A. Transmission impairments

Transmission impairments are physical effects that change a signal as it travels, potentially causing incorrectly received bits.

  • Attenuation: Signal strength decreases with distance and is measured in decibels. A receiver may need amplification or regeneration when a cable run becomes long.
  • Distortion: Different frequency components can experience different delays or attenuation, changing the shape of a transmitted pulse.
  • Noise: Unwanted energy may come from thermal noise, crosstalk, impulse noise, or electromagnetic interference.
  • Signal-to-noise ratio: The ratio is commonly expressed as SNR(dB) = 10 log10(Psignal / Pnoise), where Psignal and Pnoise are signal and noise power.
  • Bit errors: A corrupted signal can turn a transmitted 1 into a received 0; parity bits, checksums, and cyclic redundancy checks detect many such errors.
  • Mitigation: Shielding, shorter links, fiber optics, modulation adjustments, forward error correction, and retransmission improve communication quality.

VI. Layered Architecture of Computer Networks

A. Layered architecture of computer networks

Layered architecture divides networking into functional levels, allowing one layer to change internally while preserving the service expected by adjacent layers.

  • Service relationship: A layer provides services upward and uses services below; an application need not control the electrical details of a fiber link.
  • Peer communication: Each layer logically communicates with its corresponding layer on another device through protocol data units.
  • Encapsulation process: Data receives a transport header, network header, and link header before transmission; the receiver removes these headers in reverse order.
  • Advantages: Layering simplifies design, supports modular testing, encourages standardization, and allows technologies such as Ethernet and Wi-Fi to share Internet-layer protocols.
  • Cost: Headers introduce overhead, and strict separation can cause duplicated functions or inefficient interactions between layers.
  • Practical example: A browser can use HTTPS without knowing whether packets travel through Wi-Fi, cellular radio, or wired Ethernet.

VII. Network Types

A. Network types

Network types classify networks by geographic scope, ownership, purpose, or physical organization.

  • PAN: A personal area network covers a few meters, such as Bluetooth communication between a phone and wireless earbuds.
  • LAN: A local area network connects devices within a home, laboratory, office, or campus building, commonly using Ethernet or Wi-Fi.
  • MAN: A metropolitan area network can connect multiple sites across a city, such as municipal fiber connecting public buildings.
  • WAN: A wide area network spans countries or continents and uses carrier links, satellite systems, or Internet service-provider infrastructure.
  • Internetwork: An internetwork joins separate networks through routers; the global Internet is the largest example.
  • Topology: Star, bus, ring, mesh, and tree describe how devices and links are arranged, affecting cost, resilience, and management.

VIII. Network Models

A. Network models

A network model is a conceptual framework that assigns communication responsibilities to layers and defines how those layers interact.

  • Reference purpose: Models provide vocabulary for design and troubleshooting; “transport-layer problem” identifies a narrower area than “network failure.”
  • OSI model: The seven layers are Physical, Data Link, Network, Transport, Session, Presentation, and Application.
  • TCP/IP model: The commonly used model contains Link, Internet, Transport, and Application layers, with OSI session and presentation functions usually included in Application.
  • Mapping: OSI Network corresponds broadly to Internet Protocol, while OSI Transport corresponds to TCP or UDP.
  • Encapsulation names: Application data becomes a transport segment or datagram, an IP packet, and a link-layer frame.
  • Operational value: A failed DNS request may involve Application configuration, UDP or TCP transport, IP routing, or a faulty physical link; the model helps isolate the cause.

IX. Local and Global Connectivity

A. Local and global connectivity

Local and global connectivity describe how devices communicate within a limited area and how those local networks reach distant systems.

  • Local connectivity: A switch forwards Ethernet frames inside a LAN using MAC addresses; a wireless access point performs a similar local aggregation for Wi-Fi stations.
  • Default gateway: A host sends traffic outside its subnet to a router, commonly configured as 192.168.1.1 in a small IPv4 network.
  • Routing: Routers examine destination IP addresses and select next hops using routing tables.
  • Global connectivity: Autonomous systems operated by organizations exchange reachability information using systems such as BGP, allowing packets to cross many administrative networks.
  • Name resolution: DNS converts names such as example.com into IP addresses, separating human-friendly naming from packet forwarding.
  • Address translation: Network Address Translation can map private addresses such as 10.0.0.5 to a public address, although it is not itself a replacement for routing or security.

X. Introduction to Wireless Communication Network

A. Introduction to wireless communication network

A wireless communication network transfers information through electromagnetic waves rather than a continuous physical conductor.

  • Radio channel: A transmitter modulates a carrier wave, and the receiver demodulates it to recover data; Wi-Fi commonly operates in the 2.4 GHz and 5 GHz bands.
  • Wireless components: Stations communicate through access points in infrastructure mode, while gateways connect the wireless network to wired or Internet networks.
  • Medium sharing: Because radio is shared, protocols coordinate access using techniques such as carrier sensing, acknowledgments, and collision avoidance.
  • Propagation effects: Reflection, diffraction, absorption, and multipath can produce fading and dead zones; movement may change signal quality rapidly.
  • Security: Authentication and encryption, such as WPA2 or WPA3 for Wi-Fi, protect confidentiality and network access.
  • IoT relevance: Low-power technologies such as IEEE 802.15.4, Zigbee, Bluetooth Low Energy, and LoRaWAN support sensors with small payloads and long battery life.

XI. OSI and IP/TCP Model

A. OSI and IP/TCP model

The OSI and IP/TCP models describe comparable communication functions, but the IP/TCP model reflects the protocol suite used by the Internet.

  • OSI layers: Physical transmits raw signals; Data Link frames local delivery; Network routes packets; Transport provides end-to-end delivery; Session manages dialogs; Presentation handles representation; Application serves user processes.
  • TCP/IP layers: Link handles local transmission, Internet handles addressing and routing, Transport handles process-to-process delivery, and Application contains protocols such as HTTP, DNS, and MQTT.
  • TCP: TCP provides connection-oriented, reliable, ordered byte delivery using sequence numbers, acknowledgments, windows, and congestion control.
  • IP: IP provides best-effort packet delivery using source and destination addresses; it does not guarantee delivery, order, or duplicate suppression.
  • UDP: UDP offers connectionless datagrams with low overhead but no built-in reliability; a DNS query commonly uses UDP port 53.
  • IoT protocol placement: MQTT belongs to the Application layer, normally uses TCP port 1883 or TLS-protected port 8883, and runs over IP networks.

XII. MANET Architecture

A. MANET architecture

A Mobile Ad Hoc Network, or MANET, is a self-configuring wireless network in which mobile nodes communicate without fixed infrastructure.

  • Distributed structure: Each node can act as both host and router; a packet may travel from node A through B and C to reach D.
  • Dynamic topology: Nodes move, links appear or disappear, and routes must adapt to changing radio conditions.
  • Multi-hop forwarding: If two devices are outside direct range, intermediate nodes relay packets, extending communication beyond one wireless hop.
  • Routing approaches: Proactive protocols maintain routes continuously, while reactive protocols discover routes when needed; AODV is a common reactive example.
  • Architecture elements: Mobile nodes contain wireless interfaces, routing software, power systems, and applications; gateways may connect the MANET to the Internet.
  • Constraints: Limited battery power, variable bandwidth, exposed wireless transmissions, unreliable links, and frequent route changes complicate security and quality of service.
  • Applications: MANETs support disaster-response teams, military units, vehicle networks, temporary events, and sensor deployments where infrastructure is unavailable.