Beginner journey

Networking Basics for Cybersecurity: IP, Ports, DNS and More

You cannot protect a network you do not understand. This part covers the networking ideas that show up in almost every security job, explained with everyday examples.

networkingIP addressportsDNS

IP addresses: the address of a device

Every device on a network gets an IP address. The common version, IPv4, looks like 192.168.1.10: four numbers from 0 to 255 separated by dots.

There are two kinds you must know:

  • Private IPs are used inside homes and offices. Ranges like 10.x.x.x, 172.16.x.x to 172.31.x.x and 192.168.x.x are reserved for private use.
  • Public IPs are what the internet sees. Your home router usually has one public IP, and all your devices share it.

There is also IPv6, which looks like 2001:db8::1. It exists because the world ran out of IPv4 addresses. You will see both in logs.

Subnets in simple words

A subnet is a group of addresses that belong together, like all flats on one floor. You will see notation like 192.168.1.0/24. The /24 means the first 24 bits are the network part, which gives 256 addresses, of which 254 are usable for devices.

Why does this matter for security? Because firewalls rules, scanning scope and incident reports are all written in subnets. If an alert says "traffic from 10.0.5.0/24", you should know that means a whole range, not one machine. Practise with the free subnet calculator on the home page until it feels natural.

Ports and protocols

One device can run many services. Ports tell traffic which service it is meant for. Think of the IP as a building and the port as a flat number.

Common ports to remember:

  • 22 SSH, remote login to Linux servers
  • 53 DNS, name lookups
  • 80 HTTP, unencrypted web
  • 443 HTTPS, encrypted web
  • 3389 RDP, Windows remote desktop
  • 25 and 587 email sending (SMTP)

The two main transport protocols are TCP, which is reliable and connection based (web, email, SSH), and UDP, which is faster and connectionless (DNS lookups, video calls, games). An open port means a service is listening. An open port that should not be open, like RDP exposed to the whole internet, is a classic way attackers get in.

DNS: the internet's phonebook

Humans remember names, computers use numbers. DNS (Domain Name System) translates www.example.com into an IP address.

Attackers love DNS. Phishing sites use lookalike domains such as an extra letter or a different ending. Malware sometimes talks to its controller using DNS. That is why SOC analysts often check DNS logs first when investigating a suspicious laptop. In India, banks moved their websites to the special .bank.in domain, which is a DNS level trust signal. We explain that in our .bank.in guide.

Routers, switches and firewalls

  • Switch: connects devices inside the same local network.
  • Router: connects different networks, for example your home network to your internet provider.
  • Firewall: a gatekeeper that allows or blocks traffic based on rules, like "allow web traffic out, block remote desktop in".
  • NAT (network address translation): lets many private devices share one public IP. It is why your laptop's 192.168.x.x address is not directly reachable from the internet.

Your home WiFi router is usually all of these in one small box. That is a nice place to start learning. Log in to its admin page, look at connected devices, and change the default admin password if nobody did.

How to practise networking safely

  • Run ipconfig (Windows) or ip a (Linux) and find your own IP, subnet and gateway.
  • Run nslookup example.com and see the IP that DNS returns.
  • Install Wireshark and watch your own traffic while you open a website. Our Wireshark basics guide walks you through it.
  • Try the free Cisco Networking Academy courses for structured learning.

Only look at traffic on your own network and devices. Capturing other people's traffic without permission is not okay, legally or ethically. Next, in Part 4, we move to Linux, the operating system you will use most in security work.

Educational content, not legal advice. Check official sources before you rely on it. If you have lost money, call 1930 now. Terms