Networking Fundamentals & Configuration
Module 8 · Networking & Security

Networking Fundamentals & Configuration

The OSI and TCP/IP models, frames vs. packets, DNS/DHCP, and where network configuration actually lives on disk.

The OSI Model

The OSI model is a 7-layer conceptual framework for how network communication happens, from physical signaling up to the application itself. Linux+ questions typically test recognition of the layer, not deep protocol internals:

LayerNameDeals with
7ApplicationThe protocol the actual software speaks — HTTP, DNS, SSH
6PresentationData formatting, encryption, compression
5SessionEstablishing, managing, and tearing down connections
4TransportEnd-to-end delivery — TCP (reliable) and UDP (fast, no guarantee)
3NetworkLogical addressing and routing — IP addresses
2Data LinkPhysical addressing on a local segment — MAC addresses, switches
1PhysicalThe actual bits on the wire, fiber, or radio signal

The TCP/IP suite is the practical, 4-layer model the real internet actually runs on, which maps loosely onto OSI:

TCP/IP layerRoughly maps to OSI
ApplicationLayers 5-7
TransportLayer 4
InternetLayer 3
Link (Network Access)Layers 1-2
⚠️ Common Pitfall: Frame vs. Packet: Know the Layer

A frame is the Layer 2 (Data Link) unit of data — it carries MAC addresses and exists only within a single local network segment. A packet is the Layer 3 (Network) unit — it carries IP addresses and is what actually gets routed between networks. A router forwards packets between networks; a switch forwards frames within one.


Network Identities and Devices

IdentityWhat it is
MAC addressA hardware-burned, Layer 2 address unique to a network interface
IP addressA Layer 3, logical address assigned to an interface — can change, unlike a MAC address
HostnameA human-readable name for a device on the network
DeviceRole
SwitchForwards frames between devices on the same local network, based on MAC address
RouterForwards packets between different networks, based on IP address
NICThe physical interface connecting a host to the network
Access pointBridges wireless clients onto a wired network

DNS and DHCP

DNS (Domain Name System) resolves human-readable hostnames into IP addresses. DHCP (Dynamic Host Configuration Protocol) automatically assigns an IP address, subnet mask, gateway, and DNS servers to a device joining the network, instead of requiring manual static configuration.

Common well-known ports (0-1023 is the reserved “well-known” range):

PortService
22SSH
53DNS
67/68DHCP
80HTTP
443HTTPS
25SMTP (email)

Viewing and Configuring Network Settings

TaskCommand
View current IP addressing configuration (modern)ip addr show (short: ip a)
The now-deprecated legacy equivalentifconfig — replaced by ip on virtually every modern distribution
View/manage routing tableip route (replaces the legacy route)
⚠️ Common Pitfall: ifconfig Is Deprecated — Use ip

The net-tools package (ifconfig, route, netstat, arp) is no longer installed by default on most modern distributions, replaced by the iproute2 suite (ip, ss). The exam expects you to recognize ip addr/ip route as the current standard, with ifconfig/route as legacy commands you might still encounter on older systems.

Where network configuration actually lives (this varies more than almost anything else across distro families):

File / directoryPurposeDistro family
/etc/sysconfig/network-scripts/ (or NetworkManager profiles)Per-interface configuration filesRHEL/Rocky/AlmaLinux/Fedora
/etc/netplan/*.yamlDeclarative network configuration, rendered into NetworkManager or systemd-networkdUbuntu (modern)
/etc/network/interfacesLegacy interface configurationDebian, older Ubuntu
/etc/sysconfig/network or /etc/hostnameWhether networking is enabled at boot, hostname, default gatewayRHEL-family
/etc/dhcp/dhclient.confDHCP client-side configuration optionsMost distros running dhclient
/etc/resolv.confWhich DNS servers to query (often managed automatically by DHCP or NetworkManager now, rather than hand-edited)
/etc/nsswitch.confDefines the order in which name resolution sources are checked (e.g., local /etc/hosts file before DNS) via its hosts: line

🧠 Knowledge Check

1. What's the key difference between a frame and a packet?

2. You're troubleshooting on a modern distribution and want current IP configuration. Which command should you reach for?

3. A workstation resolves 'myhost' from its local /etc/hosts file before ever querying DNS. Which file controls that lookup order?


What’s Next

Lesson 2 puts these fundamentals to work with the actual tools you’ll use to test and troubleshoot connectivity.