Online admissions open for the SEO, Web Development and Networking & Security courses. Enquire for the next batch.

Networking Basics: How Computer Networks Work

4 min read Updated By the SkillNewton team

What is computer networking?

Computer networking is the practice of connecting devices so they can exchange data using shared rules called protocols. A network combines hardware such as switches, routers, cables and Wi-Fi access points with addressing (IP and MAC addresses) and services such as DNS and DHCP. Knowing these building blocks lets you design, troubleshoot and secure networks in homes, offices and data centres.

The core components of a network

Every network, from a home Wi-Fi setup to a campus with thousands of users, is built from the same small set of parts. Learn what each one does and most network diagrams start to make sense.

ComponentWhat it doesEveryday example
Network interface card (NIC)Connects a device to the network and holds its MAC addressThe Ethernet port or Wi-Fi chip in a laptop
SwitchForwards frames between devices on the same local network using MAC addressesA 24-port switch in an office rack
RouterMoves packets between different networks using IP addressesThe broadband router linking your home to your ISP
Access pointBridges wireless clients onto the wired networkA ceiling-mounted Wi-Fi unit in an office corridor
FirewallAllows or blocks traffic according to a security policyA perimeter firewall between the office and the internet
MediaCarries the signalCopper Cat6 cable, fibre or radio waves

Types of networks

  • LAN (local area network): devices in one building or floor, usually joined by switches.
  • WLAN: a wireless LAN that uses Wi-Fi standards such as Wi-Fi 6 and Wi-Fi 7.
  • WAN (wide area network): links sites across cities or countries; the internet is the largest WAN.
  • VPN (virtual private network): an encrypted tunnel that carries private traffic across a public network.

A small business in Pune might run one LAN per floor, connect its branch office through a VPN over the internet, and reach cloud services across a WAN link provided by its ISP.

IP addressing and a worked subnetting example

An IPv4 address such as 192.168.10.25 has 32 bits written as four octets. The prefix length, for example /24, tells you how many bits identify the network; the remaining bits identify hosts. IPv6 uses 128-bit addresses such as 2001:db8::1 and is increasingly common, so learn both.

Suppose you must split 192.168.10.0/24 into four equal subnets. Borrowing two host bits gives /26, a subnet mask of 255.255.255.192. Each subnet has 64 addresses: one network address, one broadcast address and 62 usable hosts.

SubnetNetwork addressUsable host rangeBroadcast address
First192.168.10.0/26192.168.10.1 to 192.168.10.62192.168.10.63
Second192.168.10.64/26192.168.10.65 to 192.168.10.126192.168.10.127
Third192.168.10.128/26192.168.10.129 to 192.168.10.190192.168.10.191
Fourth192.168.10.192/26192.168.10.193 to 192.168.10.254192.168.10.255

Private addresses, NAT and the default gateway

Some IPv4 ranges are reserved for private use and are never routed on the public internet: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Your home and office devices almost certainly use one of these ranges.

When a device with a private address talks to a public server, the edge router performs Network Address Translation (NAT). It swaps the private source address for its own public address and tracks each conversation in a translation table, so replies find their way back to the right laptop or phone.

The default gateway is the router address a host uses for any destination outside its own subnet. In the /26 example above, hosts in the first subnet might use 192.168.10.1 as their gateway. A wrong gateway is a classic fault: the device can reach neighbours on the same switch but nothing beyond it.

Where IPv6 fits

IPv6 removes the need for NAT in most designs because the address space is vast. Hosts usually configure themselves through SLAAC or DHCPv6, and a typical LAN uses a /64 prefix. Many mobile and broadband networks in India already hand out IPv6 addresses, so check yours with ip -6 a.

MAC addresses, ARP, DHCP and DNS

A MAC address is a 48-bit hardware identifier used inside a local network. When a host knows an IP address but not the matching MAC address, it sends an ARP broadcast asking who owns that IP, and the owner replies.

DHCP hands out IP addresses, the subnet mask, the default gateway and DNS servers automatically, so you do not configure every laptop by hand. DNS translates names such as skillnewton.com into IP addresses. When a website fails to load but an IP address responds, DNS is often the culprit.

What happens when you open a website

  1. Your laptop gets an IP address, gateway and DNS server from DHCP.
  2. It asks the DNS server for the IP address of the site.
  3. It sees the destination is on another network, so it sends the packet to the default gateway, using ARP to find the gateway MAC address.
  4. Routers forward the packet hop by hop across the internet.
  5. TCP sets up a connection, TLS encrypts it and HTTP requests the page.

Each step maps to a layer of the OSI reference model, and the transport details are covered in our guide to the TCP/IP suite.

Tools to practise with

You can practise most fundamentals on one computer. Cisco Packet Tracer simulates switches and routers, Wireshark lets you inspect packets on your own network, and built-in commands show your addressing and connectivity.

ip a
ping -c 4 192.168.1.1
traceroute skillnewton.com
dig skillnewton.com

If you want a structured path that builds from these commands to multi-router topologies, SkillNewton's online Networking & Security course is project-based and runs from fundamentals to advanced work, with practice done on your own machine or in virtual lab tools such as Packet Tracer.

Common mistakes

  • Counting the network and broadcast addresses as usable hosts when subnetting.
  • Confusing a switch, which works with MAC addresses, with a router, which works with IP addresses.
  • Blaming the internet connection when the real fault is a wrong DNS server or gateway.
  • Skipping IPv6 because IPv4 seems sufficient for home labs.
  • Memorising port numbers and layer names without capturing real traffic to see them in action.

Frequently asked questions

Do I need maths to learn subnetting?

Only basic binary and powers of two. Once you practise the block size method on a few examples, most subnetting questions take under a minute.

Is networking still relevant with cloud computing?

Yes. Cloud platforms use virtual networks, subnets, route tables and firewalls that follow the same principles as physical networks.

Should I start with networking or Linux?

Start with networking basics, then add Linux command-line skills early, because most network and security tools run on Linux.

What should I learn after the basics?

Move on to routing and switching, then security, or follow a structured networking and security learning path online.

Want to Learn This Properly?

The Online Networking & Security Course turns guides like this into practised skills, with projects on real websites.

WhatsApp Call Us Now