Networking Basics

Learning Objectives

  • Explain how a computer network connects hosts and links so systems can exchange data.
  • Classify network scope and distinguish a VPN's logical connectivity from its security configuration.
  • Compare star, bus, ring, and mesh connectivity without assuming topology guarantees resilience.
  • Distinguish the roles of Ethernet switches, IP routers, and network interfaces.
  • Compare the seven-layer OSI reference model with a common four-layer Internet model.
  • Explain the different scope of IP addresses and link-layer addresses.
  • Interpret IPv4/IPv6 notation, an IPv4 CIDR prefix, and common NAT behavior.
  • Summarize what HTTP, DNS, DHCP, TCP, UDP, ARP, FTP, SMTP, POP3, and IMAP provide.

An introduction to network scope, connectivity, layer models, addressing, subnetting, routing, and common Internet protocols.

Computer Network

A computer network is a group of connected devices and links that exchange data according to communication protocols. Networks can provide communication and shared services; they may use wired, wireless, or mixed media.

1. Types of Networks

Names such as LAN and WAN describe scope and interconnection, but exact size boundaries and ownership are not universal technical cutoffs.

  • LAN (Local Area Network): Connects devices over a limited local scope, such as a home, office, or campus network. Its speed, ownership, and security depend on the equipment, service, and configuration.

  • WAN (Wide Area Network): Connects networks or sites over a broader geographic scope, often using services and infrastructure from multiple providers. It is not inherently slower or less secure than a LAN; those properties depend on the actual links and controls.

  • WLAN (Wireless LAN): A LAN whose local links use wireless technologies such as Wi-Fi. A WLAN may also connect to wired networks through an access point or bridge.

  • MAN (Metropolitan Area Network): A term sometimes used for a network spanning a metropolitan area. The label describes scope broadly; it does not prescribe one medium, owner, or performance level.

  • VPN (Virtual Private Network): A logical private connection carried over another network. VPN technologies can use encryption and authentication, but a VPN label alone does not guarantee security; protocol choice, configuration, endpoints, and access policy matter.

The simulation below animates a marker along one fixed illustrative route from sender to receiver.

Packet Switching

How data travels across a network from source to destination.

Sender (PC)192.168.1.5
Local Router
ISP Router
Internet Backbone
Receiver (Server)203.0.113.10
DATA
Status: Idle
Protocol: TCP/IP

Simulation scope

The animation demonstrates hop order only. It does not calculate routes or model packet headers, link addressing, congestion, loss, acknowledgments, or TCP/IP protocol behavior. Its fixed path and successful-delivery status are illustrative.

2. Network Topologies

Topology describes how nodes and links are arranged physically or logically. The resulting failure behavior depends on the actual graph, devices, link redundancy, and any routing or protection mechanism.

  • Star: Endpoints connect through a central hub, switch, or access device. A failed endpoint link isolates that endpoint; failure of the central device affects endpoints that depend on it. Redundant devices or links can change the outcome.

  • Bus: Nodes share a common communication path in a bus arrangement. The medium and access protocol determine how transmissions are shared; a break or termination fault can affect many nodes. This is a topology description, not a claim about current industrial-network prevalence.

  • Ring: Links form a closed logical cycle. Traffic direction and recovery depend on the ring protocol and implementation; redundant rings can reroute around some failures.

  • Mesh: A full mesh connects each node to every other node; a partial mesh connects selected node pairs. An alternate path exists only where links create one, and traffic uses it only if routing or protection selects it. Cost and resilience depend on the specific design.

Topology shows connectivity, not guaranteed recovery

The figure compares link connectivity. A remaining path can support recovery only when the devices and routing or protection behavior use it.

A star network shows one endpoint isolated by a failed link and all endpoints depending on the central switch. A partial mesh shows an alternate path remaining after one link fails.

3. Network Hardware Devices

Devices implement different functions at the link and Internet layers. Product boundaries can combine several of these roles.

  • Ethernet switch (bridge): Connects devices within a bridged LAN or VLAN. It learns source MAC addresses and uses a forwarding table to send frames toward the destination link. Broadcast and unknown-destination frames may be flooded within the configured VLAN; a switch does not always send a frame only to one port.

  • IP router: Forwards IP packets between networks using the destination IP prefix and forwarding information derived from routes. Route selection is handled by routing and forwarding mechanisms; a router does not independently calculate an end-to-end Internet path for every packet.

  • Modem: Modulates and demodulates signals for a communications medium, such as a cable or telephone service. Signal formats depend on the access technology; the term does not mean that every network link carries analog signals.

  • Network interface: Hardware or software that lets a host use a network link. Ethernet interfaces use link-layer addresses such as MAC addresses, which may be factory-assigned, locally administered, virtual, or changed by configuration; they are not guaranteed to be permanent identifiers for a person or device.

4. The OSI Model and TCP/IP Model

Layer models group communication functions to help describe protocol responsibilities. The OSI reference model defines seven layers. Internet protocol stacks are often taught using four broad layers. The correspondence is useful for orientation, but it is not a strict one-to-one mapping for every protocol.

4.1 The 7-Layer OSI (Open Systems Interconnection) Model

  • 7. Application: Protocol services used by applications, such as HTTP, DNS, and email protocols.
  • 6. Presentation: Describes data representation and syntax. Encryption may be provided by protocols that do not fit neatly in one OSI layer.
  • 5. Session: Describes dialogue and session coordination; Internet applications may handle these functions in different ways.
  • 4. Transport: Provides communication between application endpoints. TCP supplies a reliable ordered byte stream; UDP supplies datagrams without delivery or duplicate-protection guarantees. Ports identify transport endpoints.
  • 3. Network: Provides logical addressing and packet forwarding across networks. IP routers forward using destination prefixes and routes.
  • 2. Data Link: Provides communication over a local link using that link's frame and address rules, such as Ethernet MAC addressing.
  • 1. Physical: Carries symbols or bits through a medium such as copper, optical fiber, or radio.

4.2 The 4-Layer TCP/IP Model

One common four-layer Internet view groups functions as follows:

  • Application: Application-level protocols and data representation, broadly corresponding to OSI layers 5–7.
  • Transport: Host-to-host application communication, including TCP and UDP, broadly corresponding to OSI layer 4.
  • Internet: IP addressing and forwarding between networks, broadly corresponding to OSI layer 3.
  • Link: Delivery over an attached link and its medium, broadly corresponding to OSI layers 1–2.
OSI and Internet models group network functions differently

Layer correspondence is approximate. Protocols and implementations can span or divide responsibilities differently from this teaching diagram.

Seven OSI layers are compared with four Internet-model layers: application groups OSI layers 5 through 7, transport aligns broadly with 4, Internet with 3, and link with 1 and 2.

IP Address

An IP address is a network-layer address assigned to an interface for use by an IP protocol. Routers use destination addresses and route information to forward packets. An address may be configured statically or dynamically and is not necessarily globally reachable.

MAC Address

A MAC address is a link-layer address used by technologies such as Ethernet to identify a sender or recipient on a local link. It is not an IP address and is not necessarily fixed or globally unique in every configuration.

Subnetting

Subnetting divides an IP address block into smaller prefixes. Prefix boundaries support address assignment and routing decisions; they do not by themselves improve performance or enforce security. Network configuration and policy determine those outcomes.

IP endpoints stay the same while Ethernet addresses change by link

In this two-link example with no NAT, the source and destination IP addresses remain the same. Each Ethernet frame uses addresses for the devices on that local link; ARP resolves an IPv4 next hop on Ethernet.

A packet from 192.0.2.10 to 198.51.100.20 crosses a router. The first Ethernet frame addresses Host A to the router; the second addresses the router to Host B.

5. IP Addressing, Subnetting, and NAT

5.1 IPv4 vs. IPv6

  • IPv4: A 32-bit address written as four decimal octets (for example, 192.0.2.10). The format has 232 possible bit patterns; some blocks have special uses, and available public allocation is limited.

  • IPv6: A 128-bit address written as up to eight hexadecimal groups separated by colons. Leading zeroes may be omitted and consecutive zero groups may be compressed (for example, the documentation address 2001:db8::10). IPv6 provides a much larger address space than IPv4, not an infinite one.

5.2 Subnetting and CIDR Notation

An IPv4 subnet mask marks the prefix bits used for a network block. In CIDR notation, the slash suffix gives the number of leading prefix bits; for example, /24 means 24 prefix bits and 8 remaining host bits in IPv4. Address planning and routing use these boundaries. A worked /26 example appears below.

A /26 prefix divides an IPv4 block into network and host bits

The example uses the documentation-only 192.0.2.0/24 block. A /26 contains 64 addresses; in a conventional IPv4 subnet, the network and broadcast addresses are not assigned to hosts. Point-to-point /31 links have different rules.

For 192.0.2.130 slash 26, the mask is 255.255.255.192, the network is 192.0.2.128, and the broadcast address is 192.0.2.191. The conventional host range is .129 through .190.

5.3 NAT (Network Address Translation)

Network Address Translation (NAT) changes address information as packets cross a network boundary. A common IPv4 configuration also translates transport ports (often called NAPT or PAT), allowing multiple internal address-and-port pairs to share an external IPv4 address. NAT behavior varies; it does not by itself provide a firewall policy or solve IPv4 address scarcity.

6. Essential Network Protocols

A protocol defines message formats and behavior that communicating systems agree to follow. Protocols can be standardized or private, and each protocol provides only the services specified for it.

  • HTTP and HTTPS: HTTP defines request and response semantics used by web services. HTTPS commonly carries HTTP over TLS to protect a connection and authenticate a server when certificates are verified. HTTP/3 carries the same HTTP semantics over QUIC, which uses TLS 1.3; the transport differs by HTTP version.

  • DNS (Domain Name System): A distributed naming system queried for resource records associated with domain names. A and AAAA records can provide IPv4 and IPv6 addresses. A URL contains more than a domain name, and DNS does not translate the entire URL.

  • DHCP (Dynamic Host Configuration Protocol): A client can request an address lease and configuration options such as a subnet mask, router, or DNS server from a DHCP service. Leases expire or renew under protocol rules; networks can instead use static configuration.

  • TCP (Transmission Control Protocol): Provides a reliable, in-order byte stream between endpoints. It uses sequence numbers, acknowledgments, and retransmission to recover from some loss; a connection can still fail, and successful transport does not prove that an application completed its work. HTTP/1.1 and HTTP/2 commonly use TCP.

  • UDP (User Datagram Protocol): Provides datagram delivery with minimal transport mechanisms; delivery, ordering, and duplicate protection are not guaranteed. Applications can add recovery or ordering when needed. UDP is not inherently faster in every use; HTTP/3, for example, uses QUIC over UDP and adds transport features above UDP.

  • ARP (Address Resolution Protocol): For IPv4 over Ethernet, resolves a next-hop protocol address to a local Ethernet address. A host resolves its gateway's address when sending off-link; a router resolves the next hop on its outgoing link. IPv6 uses Neighbor Discovery instead of ARP.

  • FTP (File Transfer Protocol): A client-server protocol for transferring files. The base FTP protocol does not provide transport encryption; use an appropriately secured alternative where confidentiality is required.

  • SMTP, POP3, and IMAP: SMTP is used to submit or relay email. POP3 and IMAP are mailbox-access protocols with different retrieval and synchronization behavior.

Key Takeaways
  • Network labels describe scope or function; neither LAN, WAN, nor VPN by itself guarantees speed, ownership, or security.
  • Topology shows which links connect nodes. Resilience also depends on devices, redundant paths, routing, and protection behavior.
  • Ethernet switches forward frames within a link-layer network; IP routers forward packets between networks using destination prefixes and routes.
  • IP addresses identify IP interfaces and route across networks; link-layer addresses apply on a local link and may change by hop.
  • OSI and Internet layer models group protocol functions differently, and their correspondence is approximate.
  • CIDR prefixes identify address-block boundaries; subnetting alone does not enforce security or improve performance.
  • TCP offers a reliable ordered byte stream; UDP does not guarantee delivery or duplicate protection, though applications can add mechanisms above it.
  • DNS returns resource records, DHCP can lease network configuration, HTTPS uses security protocols such as TLS, and NAT behavior depends on its configuration.