In this guide
- What is networking?
- How a computer network works
- Types of networks
- Network devices and what each one does
- Network topologies
- The OSI model and TCP/IP
- IP addressing basics
- Network protocols and ports
- Wired and wireless networking
- Network security basics
- Basic network troubleshooting
- Networking for beginners: a learning path in order
- Networking terms worth knowing
- FAQ
Networking basics, from the first packet to a working network
Networking basics are the small set of ideas that explain how any two devices exchange data: how a device is addressed, how data is split into packets, how those packets find a path, and how the receiving end puts them back together.
A home Wi-Fi network, an office LAN and the internet itself all run on the same fundamentals, which is why learning them once pays off everywhere.
This guide covers computer networking basics in the order the ideas build on each other, the same networking fundamentals a certification course starts with: what a computer network is, how it works, the types of networks, the devices in them, the OSI and TCP/IP models, IP addressing, the common protocols and ports, wired and wireless links, basic network security, and how to troubleshoot.
Each section links to a full page in this library when you want the detail.
DefinitionWhat is networking?
Computer networking is the practice of connecting two or more devices so they can communicate and share data and resources. A computer network can be two laptops on one cable or millions of networks joined together, which is what the internet is.
The devices, called nodes, can be computers, phones, printers, servers or sensors. The connections between them, called links, can be copper cable, optical fiber or radio. A network is nothing more than nodes, links, and an agreed set of rules for using them.
Those rules are protocols. A protocol defines how data is formatted, addressed, sent, received and acknowledged, so that equipment from different vendors can talk without knowing anything about each other. The internet works because every device on it speaks the same family of protocols, TCP/IP.
What a network is used for comes down to four things:
- Sharing resources: files, printers, storage and one internet connection used by many devices.
- Communication: email, voice, video calls and messaging all ride on the same network.
- Access to services: web applications, databases and cloud platforms reached from anywhere.
- Central management: updates, backups, monitoring and security policy applied to many machines at once.
MechanicsHow a computer network works
Data does not cross a network in one piece. The sender breaks it into small units called packets, each carrying a slice of the data plus a header that says where it came from and where it is going. Packets travel independently, may take different paths, and are reassembled in order at the destination.
Every exchange, from loading a web page to joining a video call, follows the same steps:
- Name to address. The device asks DNS to turn a name such as example.com into an IP address.
- Local or remote. The device compares that address with its own subnet. A local destination is reached directly; anything else is sent to the default gateway.
- Finding the hardware. On the local network, ARP maps the next hop's IP address to its MAC address so the frame can be delivered.
- Switching. A switch reads the destination MAC address and forwards the Ethernet frame out of the one port that leads to it.
- Routing. Each router along the way reads the destination IP address and forwards the packet one hop closer, using its routing table.
- Delivery to the right program. At the destination, the port number hands the data to the right application, and TCP puts the packets back in order and asks again for any that were lost.
Addressing, switching, routing and ports: every other topic in networking is a refinement of one of those four.
Data transmission: who receives it, and in which direction
Two properties of a data transmission come up again and again in computer networking. The first is who receives it:
- Unicast: one sender to one receiver, which is nearly all traffic.
- Broadcast: one sender to every device on the local network, used by ARP and DHCP to find things. Too much broadcast traffic is the reason large networks are split into smaller ones.
- Multicast: one sender to a group that asked for it, used for video streams and routing protocol updates. IGMP is how devices join a group.
The second is direction. A half-duplex link lets one side transmit at a time, like a walkie-talkie; a full-duplex link carries data both ways at once. Switched Ethernet is full duplex, and Wi-Fi is half duplex, which is one reason a cable is faster than radio at the same rated speed.
Where many devices share one medium, a media access control method decides who may transmit next, and on a reliable connection, flow control stops a fast sender from overrunning a slow receiver, which is the job of the TCP window size.
ScopeTypes of networks
Computer networks are usually classified by the area they cover. The names describe scope, not technology, and a single company often runs several of them at once.
| Type | Covers | Typical example |
|---|---|---|
| PAN, personal area network | A few meters around one person | A phone, a watch and earbuds over Bluetooth |
| LAN, local area network | One room, floor or building | An office network on Ethernet switches |
| WLAN, wireless LAN | The same area as a LAN, over radio | Office or home Wi-Fi |
| CAN, campus area network | Several buildings on one site | A university or hospital campus |
| MAN, metropolitan area network | A city or metro region | Metro Ethernet between a company's city offices |
| WAN, wide area network | Countries and continents | Branch offices joined over MPLS or SD-WAN; the internet is the largest WAN |
| VPN, virtual private network | A private network carried over a public one | A remote worker's encrypted tunnel to the office |
A VPN is the odd one out: it is not a physical scope but an encrypted overlay on top of another network. The VPN technologies page compares the ways of building one, and IPsec VPN covers the most common site-to-site form.
HardwareNetwork devices and what each one does
A handful of device types do all the work in a computer network: some connect multiple devices to each other, some connect multiple networks, and some control what may pass. Home and small office equipment often combines several in one box, which is why the roles get confused.
| Device | What it does | Works with |
|---|---|---|
| Network interface card (NIC) | Connects one device to the network and carries its MAC address | Frames |
| Switch | Connects devices inside one network and forwards each frame only to the port that needs it, using its MAC address table | MAC addresses |
| Router | Connects different networks and chooses the path for each packet | IP addresses |
| Wireless access point | Lets Wi-Fi devices join the wired network | Radio and frames |
| Modem | Converts between the provider's line (cable, DSL, fiber) and Ethernet | Signals |
| Firewall | Allows or blocks traffic between networks according to rules | Addresses, ports, applications |
| Load balancer | Spreads incoming connections across several servers | Connections and requests |
| Hub, repeater, bridge | Older devices that repeat or join segments; switches replaced them | Signals and frames |
The two pairs people mix up most have their own pages: modem vs router, and what a load balancer does that a router does not. In a data center the first switch a server meets is usually a top-of-rack switch.
LayoutNetwork topologies
A network topology is the shape of the connections between the devices in a computer network. The physical topology is how the cables run; the logical topology is how the data flows, and the two can differ. The logical vs physical network diagram page shows the difference on one network.
- Star: every device connects to one central switch. It is the layout of nearly every modern LAN, because one failed cable affects one device.
- Mesh: devices connect to many others, giving several paths. Used between routers, in WAN cores and in mesh Wi-Fi.
- Ring: each device connects to two neighbors in a loop. Common in metro and industrial networks.
- Bus: every device shares one cable. Historic, and the reason early Ethernet needed collision detection.
- Hub and spoke: branch sites all connect to one central site, the usual shape of a small company WAN.
- Hybrid: a mix, such as stars joined by a mesh, which is what most real networks are.
ModelsThe OSI model and TCP/IP
The OSI model splits networking into seven layers, each with one job and each relying only on the layer below it.
Nobody builds to it exactly, but everyone uses it as the shared vocabulary: "a layer 2 problem" means switching, "layer 3" means routing, "layer 7" means the application. The TCP/IP model, which the internet actually uses, folds the same work into four layers.
| OSI layer | Job | Examples | TCP/IP layer |
|---|---|---|---|
| 7 Application | What the user's program speaks | HTTP, DNS, SMTP | Application |
| 6 Presentation | Format and encryption of the data | TLS, character encoding | |
| 5 Session | Opening and keeping a conversation | Session setup, RPC | |
| 4 Transport | Delivery between programs, by port | TCP, UDP | Transport |
| 3 Network | Addressing and routing between networks | IP, ICMP, routers | Internet |
| 2 Data link | Delivery on the local network, by MAC address | Ethernet, Wi-Fi, switches, VLANs | Link |
| 1 Physical | Bits on the wire or in the air | Cables, fiber, radio, connectors |
The practical use of the model is troubleshooting from the bottom up: a link light before an IP address, an IP address before a DNS name. The layer 1 page starts at the cable, and the IPv4 header and TCP header pages show layers 3 and 4 field by field.
AddressingIP addressing basics
Every device on a network needs an address. It actually has two: a MAC address burned into the network card, used on the local network, and an IP address assigned by the network, used to reach it from anywhere.
- IPv4 address: 32 bits, written as four numbers such as 192.168.1.20. The supply ran out, which is why private ranges and NAT exist.
- IPv6 address: 128 bits, written in hexadecimal, with enough addresses that NAT is unnecessary.
- Subnet mask: marks which part of the address names the network and which part names the device. A /24, the mask 255.255.255.0, holds 254 usable addresses and is the default in most offices. See what a subnet is and CIDR notation.
- Default gateway: the router a device sends traffic to when the destination is not on its own subnet.
- DHCP: hands out the address, mask, gateway and DNS servers automatically, so nobody types them in. See what DHCP is.
- DNS: turns names into addresses. When it breaks, "the internet is down" even though the network is fine; see DNS not resolving.
- NAT: lets many private addresses share one public address. The private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. See NAT masquerading.
An address that starts with 169.254 means the device asked DHCP for an address and got no answer, which the link-local addresses page explains.
ProtocolsNetwork protocols and ports
Two transport protocols carry almost everything. TCP sets up a connection, numbers every segment, and retransmits what is lost, so it is used where every byte matters.
UDP just sends, with no setup and no retransmission, so it is used where speed matters more than perfection, such as voice, video and DNS lookups. The TCP vs UDP page sets them side by side.
A port number, from 0 to 65,535, identifies the application on a device. The first 1,024 are the well-known ports, reserved for standard services:
| Service | Port | Transport | Used for |
|---|---|---|---|
| SSH | 22 | TCP | Secure remote command line |
| DNS | 53 | UDP and TCP | Resolving names to addresses |
| DHCP | 67 and 68 | UDP | Handing out IP settings |
| HTTP and HTTPS | 80 and 443 | TCP | The web, and most APIs |
| SNMP | 161 | UDP | Monitoring network devices |
| LDAP | 389 | TCP | Directory lookups |
| SMB | 445 | TCP | Windows file sharing |
| RDP | 3389 | TCP | Remote desktop |
Below the transport layer, ICMP carries error and diagnostic messages, which is what ping uses. Between routers, routing protocols such as OSPF and BGP exchange the routes that fill routing tables; static vs dynamic routing explains when a network needs them at all.
LinksWired and wireless networking
Ethernet, standardized as IEEE 802.3, is the wired standard. Copper twisted-pair cable runs up to 100 meters per link and also carries power to phones, cameras and access points through Power over Ethernet, described on the 802.3af page.
Optical fiber covers longer distances and higher speeds; single-mode vs multimode fiber explains which one a given run needs. The standard Ethernet frame carries a payload of up to 1,500 bytes, the MTU, and MTU and fragmentation covers what happens when a packet is larger.
Wi-Fi, standardized as IEEE 802.11, lets devices connect without a cable, replacing it with radio transmission in the 2.4 GHz, 5 GHz and 6 GHz bands.
Wireless is shared and half duplex: every device on a channel takes turns, so a wireless network slows down as it fills up in a way a switched wired network does not. Channel planning matters for that reason, and the 5 GHz channels page lists the ones that are usable.
- Choose wired for anything that stays in one place: desktops, servers, printers, access points themselves.
- Choose wireless for anything that moves, and plan it with enough access points that each one serves a modest number of devices.
SecurityNetwork security basics
A network that carries everything is also the path an attacker uses, so a few controls belong in even the smallest one:
- A firewall at the edge that blocks inbound traffic by default and allows only what is needed. See what a firewall is.
- Segmentation. Separate guests, servers, phones and cameras with VLANs, so one compromised device cannot reach everything.
- Encryption in transit. HTTPS and SSH inside the network, and a VPN for remote access instead of exposing services to the internet. VPN vs proxy explains why a proxy is not a substitute.
- Strong Wi-Fi authentication, WPA2 or WPA3, with a separate guest network.
- Access control on the network devices themselves. Named accounts and central authentication for every switch, router and firewall, instead of one shared password. TACACS+ vs RADIUS compares the two protocols that do it.
- Patching and logging. Network devices need firmware updates like any computer, and their logs belong on a central collector, which is what syslog is for.
The security library takes each of these further.
DiagnosticsBasic network troubleshooting
Most faults are found by checking the layers from the bottom up and stopping at the first one that fails:
- Link. Is the cable in, is the link light on, is the Wi-Fi associated? Rising CRC errors point at a bad cable or port.
- Address. Does the device have an IP address, mask and gateway? ipconfig and ip show them.
- Gateway. Can it ping the default gateway? If not, the problem is local.
- Path. Can it ping an outside address? Ping and traceroute show where the path stops.
- Name. Does the name resolve? If an address works and a name does not, it is DNS.
- Application. Is the port open and the service answering?
When the network is up but slow, separate the two possible causes with packet loss vs latency. The network troubleshooting checklist is the long form of this list, and reading a Wireshark capture is the tool for whatever the checklist cannot explain.
Reading orderNetworking for beginners: a learning path in order
For someone new to the field, these pages in this order cover the networking basics without gaps, and each one takes about ten minutes:
- What a node is, and what a local area network is.
- Subnets, CIDR and the default gateway: how addressing works.
- DHCP and DNS: how a device gets its settings and finds names.
- ARP and the MAC address table: how switching works.
- TCP vs UDP and port numbers: how applications share a link.
- VLANs and inter-VLAN routing: how one network becomes several.
- Routing, then OSPF and BGP.
- VPNs and QoS: connecting sites and protecting voice and video.
GlossaryNetworking terms worth knowing
The networking concepts above lean on a small vocabulary. These are the terms the rest of the networking basics assume you know:
- Protocol: an agreed set of rules for communication between devices, such as IP, TCP or HTTP.
- Bandwidth: the capacity of a link, in bits per second. Throughput is what you actually get.
- Latency: the time a packet takes to cross the network, usually measured as a round trip in milliseconds.
- Packet and frame: the unit of data at layer 3 and at layer 2. A packet travels inside a frame.
- MAC address: the 48-bit hardware address of a network interface, used on the local network.
- Broadcast domain: the set of devices that receive each other's broadcasts; one VLAN is one broadcast domain.
- Gateway: the device that leads out of a network, normally the router.
- Client and server: the device that asks and the device that answers. In a peer-to-peer network every device does both.
- ISP: the internet service provider, whose network connects yours to the rest of the internet.

