Curious Minds

Clear answers to science and history questions

Networking Basics Cheat Sheet for Beginners

· 6 min read · Science

Networking basics involve connecting computers together to share resources and data using a set of standardized rules called protocols. Most people mistake the IP address for a permanent physical ID, but it is actually a logical address that can change depending on which network you join.

Rule of thumb: Think of the MAC address as your device's social security number and the IP address as your current mailing address.

Core Hardware Components

A network starts with physical devices that move data from one point to another. The Network Interface Card (NIC) is the hardware inside your computer that allows it to connect to a network. Every NIC has a unique Media Access Control (MAC) address burned into it at the factory. This address consists of six groups of two hexadecimal digits. Because the MAC address is permanent, it identifies the specific piece of hardware regardless of where it is plugged in.

Switches and hubs are the central points where devices on a local network meet. A hub is a basic device that sends incoming data to every single port, which creates unnecessary traffic and slows down the network. A switch is smarter. It learns which MAC address is connected to which port and sends data only to the intended recipient. This reduces collisions and increases the overall speed of the local area network (LAN).

Routers connect different networks together, such as connecting your home LAN to the wider internet. While a switch moves data within a single network, a router directs data between networks. It uses an IP address to determine the best path for a packet of data to travel. Most home routers are actually three devices in one: a router, a switch, and a wireless access point. This combined device manages your local traffic and provides the gateway to the external world.

IP Addressing and Subnets

Internet Protocol (IP) addresses are the logical identifiers for devices on a network. There are two main versions: IPv4 and IPv6. IPv4 addresses look like four numbers separated by dots, such as 192.168.1.1. Each number ranges from 0 to 255. Because the world ran out of unique IPv4 addresses, IPv6 was created. IPv6 addresses are much longer and use hexadecimal characters separated by colons, allowing for a nearly infinite number of unique addresses.

You will encounter public and private IP addresses. A public IP is assigned by your Internet Service Provider (ISP) and is visible to the entire internet. A private IP is assigned by your router to devices inside your home. This is why multiple devices in one house can all have the address 192.168.1.x but still have one single public IP for the outside world. The router uses Network Address Translation (NAT) to keep track of which internal device requested which piece of external data.

Subnetting is the process of dividing a large network into smaller, manageable pieces. A subnet mask, such as 255.255.255.0, tells the device which part of the IP address refers to the network and which part refers to the specific host. If two devices have the same network portion in their IP addresses, they can communicate directly. If they differ, the device knows it must send the data to the default gateway, which is usually the router, to reach the destination.

The OSI Model Layers

The Open Systems Interconnection (OSI) model is a conceptual framework used to understand how data moves through a network. It consists of seven layers. Layer 1 is the Physical Layer, which covers the actual hardware like cables, fiber optics, and radio waves. If a cable is unplugged, the failure is at Layer 1.

Layer 2 is the Data Link Layer. This is where MAC addresses operate and where switches function. It handles the physical framing of data. Layer 3 is the Network Layer, where IP addresses live and routers make decisions. This layer is responsible for routing packets across different networks to reach the correct destination.

Layer 4 is the Transport Layer, which manages the reliability of the connection. This is where you find TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). TCP is connection-oriented, meaning it checks if the data arrived and asks for a resend if it did not. UDP is connectionless, sending data as fast as possible without checking for errors, which is why it is used for live video streaming and gaming.

Layers 5, 6, and 7 handle the higher-level functions. The Session Layer (Layer 5) manages the start and end of a conversation between two devices. The Presentation Layer (Layer 6) translates data into a format the application can understand, handling encryption and compression. Finally, the Application Layer (Layer 7) is what you interact with, such as your web browser using HTTP or your email client using SMTP.

Common Network Protocols

Protocols are the rules that allow different devices to speak the same language. HTTP (Hypertext Transfer Protocol) is used for loading web pages. HTTPS is the secure version, which encrypts the data using SSL or TLS to prevent people from stealing your passwords or credit card numbers while they travel across the wire.

DNS (Domain Name System) acts as the phonebook of the internet. Humans remember names like google.com, but computers only understand IP addresses like 142.250.190.46. When you type a URL into your browser, your computer asks a DNS server for the corresponding IP address. If the DNS server is down, you cannot reach websites by name, even if the websites themselves are still online.

DHCP (Dynamic Host Configuration Protocol) is the system that automatically assigns IP addresses to devices when they join a network. Without DHCP, you would have to manually enter an IP address, subnet mask, and gateway into every phone and laptop you own. DHCP ensures that no two devices on the same network are assigned the same IP address, which would cause an IP conflict and knock both devices offline.

FTP (File Transfer Protocol) is used for moving files between a client and a server. While older, it is still used for updating website files. SSH (Secure Shell) is used for securely logging into a remote computer's command line. It encrypts the connection so that administrative commands cannot be intercepted by attackers on the same network.

Testing and Troubleshooting

When a network fails, you can use built-in software tools to find the break. The ping command is the first step. It sends a small packet of data to an IP address and waits for a response. If you ping your router (e.g., ping 192.168.1.1) and get a response, your local connection is working. If you can ping the router but cannot ping a public site like 8.8.8.8, the problem is likely with your ISP or the router's connection to the internet.

Tracert (or traceroute) shows you the exact path a packet takes to reach its destination. It lists every router (hop) the data passes through. If the trace stops at a specific IP address, that is where the connection is failing. This helps you determine if the lag is happening inside your house, at your ISP, or at the destination server's end.

Ipconfig (on Windows) or ifconfig/ip addr (on Linux/Mac) shows your current network settings. Check this to see if you have a valid IP address. If your IP starts with 169.254.x.x, it means your device could not reach the DHCP server and assigned itself an APIPA (Automatic Private IP Addressing) address. This is a clear sign that your device is not communicating with the router.

To fix common connectivity issues, follow these steps in order. First, check the physical layer by ensuring cables are seated firmly. Second, restart the router to clear the DHCP table and refresh the connection. Third, flush your DNS cache using the command prompt to remove old or incorrect IP mappings. Finally, check if a firewall or antivirus software is blocking the specific port required by your application, such as port 80 for HTTP or port 443 for HTTPS.

In this article
  1. Core Hardware Components
  2. IP Addressing and Subnets
  3. The OSI Model Layers
  4. Common Network Protocols
  5. Testing and Troubleshooting