B4. Network Standards and Protocols
| Level | Foundation and Intermediate (with a step towards Advanced: application protocols) |
| Prerequisites | B1 OSI model, B3 Protection of data |
| Study time | About 10 hours (4 h reading and video, 6 h hands-on) |
| Source | Teach-the-Teachers fiche B4 |
| Next topics | B5 Essentials · B6 Attacks · B11 Penetration testing |
Why this matters
Computers made by different companies, running different software, in different countries, can talk to each other because they all follow the same protocols and standards. Attackers know these rules very well and look for places where the rules are weak, old or badly implemented:
- protocols that send passwords in plain text (Telnet, FTP, HTTP),
- protocols that trust whoever answers first (ARP, DHCP, classic DNS),
- protocols whose handshake can be abused (the TCP SYN flood).
Defenders use the same knowledge to read network traffic, write firewall rules, detect anomalies and choose secure alternatives. If you want to scan a network, read a packet capture, configure a firewall or understand an incident report, you need to know the main protocols and their port numbers by heart.
Learning objectives
Foundation. After this topic you can:
- Explain what a network protocol and a network standard are, and the difference between them.
- Name some media and protocols at the physical and data link layers.
- Name the basic network components and their function.
Intermediate. In addition you can:
- Explain the main protocols of the network layer (IP, ICMP) and the transport layer (TCP, UDP).
- Explain what an IP address is, including private versus public addresses and NAT.
- Explain the logic of routing: how a packet finds its way across the Internet.
Towards Advanced. You can also explain the main application-layer protocols (DNS, HTTP/HTTPS, SMTP, DHCP, SSH, FTP), their secure alternatives and how protocols are abused in attacks.
Foundation: protocols, standards and components
Protocol versus standard
- A protocol is a set of rules for formatting and processing data: who speaks first, what a message looks like, what to do when something goes wrong. Protocols are like a common language for computers.
- A standard is a formalised protocol (or other specification) that is agreed and published by a recognised body, so that everyone implements it the same way. If protocols are languages, standards are the dictionaries and grammar books.
Important standards bodies:
| Body | Known for |
|---|---|
| IETF (Internet Engineering Task Force) | Internet protocols, published as RFCs (Request for Comments): IP (RFC 791), TCP (RFC 9293), HTTP, DNS, TLS |
| IEEE | Local networks: Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11), port-based access control (802.1X) |
| ISO / IEC | The OSI model, and security management standards such as ISO/IEC 27001 |
| ITU | Telecommunications (mobile networks, with 3GPP) |
| W3C | Web technologies (HTML, CSS) |
Most Internet protocols are open: anyone can read the specification and build an implementation. This is good for security. Many experts can study an open protocol and find its weaknesses, whereas a secret protocol only seems safe until someone reverse-engineers it. In cryptography this idea is known as Kerckhoffs's principle: a system should be secure even if everything about it except the key is public.
Physical and data link layer: media and protocols
| Medium / protocol | Description | Security notes |
|---|---|---|
| Twisted-pair copper (Cat5e/6, RJ45 connector) | The standard office network cable, up to 1–10 Gbit/s over 100 m | Can be tapped with physical access |
| Fibre optic | Light pulses through glass; long distances, very fast | Hard to tap unnoticed |
| Wi-Fi (IEEE 802.11) | Radio, 2.4 / 5 / 6 GHz | Anyone in range can receive; use WPA3 or at least WPA2 with a strong passphrase |
| Ethernet (IEEE 802.3) | The frame format and MAC addressing on wired LANs | MAC addresses can be spoofed |
| ARP | Finds the MAC address belonging to an IP address on the LAN | No authentication, so ARP spoofing is possible |
| Bluetooth, 4G/5G | Short-range and mobile radio | Pairing and SIM security matter |
Basic network components
| Component | Function | OSI layer |
|---|---|---|
| Network interface card (NIC) | Connects a device to the network; has a MAC address | 1–2 |
| Switch | Connects devices within a LAN and forwards frames to the right port based on MAC address | 2 |
| Router | Connects different networks and forwards packets based on IP address | 3 |
| Wireless access point | Connects Wi-Fi devices to the wired network | 1–2 |
| Modem | Converts signals for the provider's line (cable, DSL, fibre) | 1 |
| Firewall | Allows or blocks traffic based on rules | 3–7 |
Your home "router" is usually all of these in one box: a modem, router, switch, Wi-Fi access point, firewall and DHCP server together. Networks are often described by size: a LAN (Local Area Network, a home or office) and a WAN (Wide Area Network, connecting sites; the Internet is the biggest WAN).
Intermediate: network and transport layer
IP addresses
An IP address identifies a device (more precisely, a network interface) on a network, so that packets can be delivered to it.
- IPv4 addresses are 32 bits, written as four bytes:
192.168.1.20. That gives about 4.3 billion addresses, which is not enough for today's Internet. - IPv6 addresses are 128 bits, written in hex:
2001:db8:85a3::8a2e:370:7334. That is enough for every device imaginable.
An address has a network part and a host part. The subnet mask or prefix length says where the split is: in 192.168.1.20/24, the first 24 bits (192.168.1) are the network and .20 is the host.
Private and public addresses. Some IPv4 ranges are reserved for private networks and are not routed on the Internet (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Your home router uses NAT (Network Address Translation) to let all your private devices share one public IP address from your provider. As a side effect, NAT blocks unsolicited incoming connections, but it is not a replacement for a firewall.
Other important addresses: 127.0.0.1 (localhost, your own machine), and the default gateway, the router to which your device sends everything that is not on the local network.
DHCP (Dynamic Host Configuration Protocol) automatically gives devices an IP address, subnet mask, gateway and DNS server when they join a network.
ICMP
ICMP carries error and diagnostic messages for IP. ping uses ICMP echo request/reply to test whether a host is reachable, and traceroute (Windows: tracert) uses the time exceeded messages to list the routers on the way. Firewalls often limit ICMP because it is useful for reconnaissance and has been used in floods.
Routing: how a packet crosses the Internet
Routing is selecting a path for traffic across networks. Every router keeps a routing table: "for destination network X, send to next hop Y via interface Z". A router does not know the full path. It only knows the best next step, like signposts on a road. Each hop moves the packet closer, and every hop decreases the packet's TTL (time to live) by one, so that packets cannot loop forever.
Routers learn routes from routing protocols:
- inside an organisation: for example OSPF (Open Shortest Path First);
- between the roughly 75,000+ independent networks (autonomous systems) that form the Internet: BGP (Border Gateway Protocol).
BGP is built on trust between networks. A wrong or malicious BGP announcement can redirect or black-hole large parts of the Internet (BGP hijacking). RPKI (Resource Public Key Infrastructure) is being rolled out to make route announcements verifiable.
Transport layer: TCP and UDP
The transport layer builds on the network layer. IP delivers to a machine; TCP and UDP deliver to a process on that machine, identified by a port number (0–65535). A connection is identified by the combination of source IP, source port, destination IP, destination port and protocol.
- TCP is connection-oriented and reliable: three-way handshake, sequence numbers, acknowledgements, retransmission.
- UDP is connectionless and fast: no handshake, no delivery guarantee.
See B1 for a full comparison.
Well-known ports (learn these)
| Port | Protocol | Purpose | Secure? |
|---|---|---|---|
| 20/21 | FTP | File transfer | ❌ plain text; use SFTP (22) or FTPS |
| 22 | SSH / SFTP | Remote shell, secure file transfer | ✅ |
| 23 | Telnet | Remote shell | ❌ plain text; use SSH |
| 25 | SMTP | Sending e-mail between servers | ⚠️ add STARTTLS, SPF, DKIM and DMARC |
| 53 | DNS | Name resolution (UDP, and TCP for large answers) | ⚠️ add DNSSEC; DNS over HTTPS/TLS for privacy |
| 67/68 | DHCP | Automatic IP configuration | ⚠️ rogue DHCP servers; use DHCP snooping |
| 80 | HTTP | Web | ❌ plain text; use HTTPS |
| 443 | HTTPS | Web over TLS (and HTTP/3 over UDP 443) | ✅ |
| 143 / 993 | IMAP / IMAPS | Reading e-mail | Use 993 (TLS) |
| 161 | SNMP | Network management | ⚠️ v1/v2c use plain-text "community strings"; use v3 |
| 3389 | RDP | Windows Remote Desktop | ⚠️ never expose directly to the Internet; use a VPN and MFA |
Towards Advanced: application protocols and attacks
What happens when you watch a video on YouTube
- DHCP gave your laptop an IP address, gateway and DNS server when you joined the Wi-Fi.
- DNS translates
www.youtube.cominto an IP address. Without DNS you would have to remember IP addresses. - ARP finds the MAC address of your default gateway.
- TCP (or QUIC over UDP) sets up a connection to port 443.
- TLS sets up encryption and checks the server's certificate (see B8).
- HTTP requests the page and the video segments.
- IP carries every packet, hop by hop, across routers selected by BGP and internal routing protocols.
Protocols as attack targets
| Attack | Protocol abused | Idea |
|---|---|---|
| SYN flood | TCP | Send many SYNs without completing the handshake, so the server's connection table fills up |
| ARP spoofing | ARP | Answer ARP requests with your own MAC, so traffic flows through you (man-in-the-middle) |
| DNS spoofing / cache poisoning | DNS | Give a false answer so victims go to a fake site |
| DHCP spoofing / starvation | DHCP | Exhaust the address pool, or hand out your own machine as gateway or DNS server |
| DNS / NTP amplification | UDP | Send small queries with the victim's spoofed address; servers send large answers to the victim (DDoS) |
| Credential sniffing | FTP, Telnet, HTTP | Read passwords sent in plain text |
| E-mail spoofing | SMTP | Forge the sender address; countered by SPF, DKIM and DMARC |
In practice
Exercise 1: map your network (Foundation, 30 min)
- Run
ipconfig /all(Windows) orip addrandip route(Linux). Note your IP address, subnet mask or prefix, default gateway and DNS server. Is your address private or public? - Visit a "what is my IP" page. Compare: this is your public address after NAT.
- Run
tracert 1.1.1.1(Windows) ortraceroute 1.1.1.1. How many hops are there? Which ones belong to your provider?
Exercise 2: watch the protocols (Intermediate, 1 h)
Start a Wireshark capture, then disconnect and reconnect your Wi-Fi and open a website. Stop the capture and use these filters:
| Filter | What you see |
|---|---|
dhcp |
Discover → Offer → Request → ACK (the "DORA" process) |
arp |
"Who has 192.168.1.1? Tell 192.168.1.20" |
dns |
Queries and answers for the site's name |
tcp.flags.syn == 1 |
Starts of TCP handshakes |
tls.handshake |
The TLS handshake, including the server name |
Exercise 3: DNS and HTTP by hand (Intermediate, 30 min)
nslookup -type=MX hva.nlordig MX hva.nlshows which mail servers handle e-mail for a domain. Also try record typesA,AAAA,TXT(look for SPF) andNS.curl -v https://example.comshows the TLS handshake summary and the HTTP request and response headers.
Exercise 4: your first port scan (Intermediate, 30 min)
Install Nmap and scan the host the Nmap project explicitly allows you to scan:
1 | |
Which ports are open, and which services and versions does Nmap detect? Then scan your own laptop (nmap localhost) and explain every open port you find.
⚠️ Scanning systems you do not own or have no written permission for can be illegal and is always considered hostile. Only scan
scanme.nmap.org, your own devices or a lab. See B11.
Exercise 5: unplugged (Foundation, group activity)
Do the CS Unplugged activities Tablets of Stone (why protocols need rules for lost and out-of-order messages) and The Orange Game (routing and deadlock). The PDFs are listed under Handouts.
Tools
| Tool | What you use it for | Cost |
|---|---|---|
| Wireshark | Capture and analyse traffic per protocol | Free, open source |
| Nmap | Discover hosts, open ports and services | Free, open source |
ping, tracert/traceroute, nslookup/dig, curl |
Test reachability, routes, DNS and HTTP | Built in |
| Cisco Packet Tracer | Build and simulate networks (switches, routers, DHCP, DNS) | Free (account) |
| IANA port number registry | Look up which service uses a port | Free |
| RFC Editor | Read the actual protocol standards | Free |
Videos
- 🎬 Network protocols – TechTerms (Foundation)
- 🎬 What is an IP address? – Elegant Themes (Foundation)
- 🎬 Understanding routing – Lesics (Intermediate)
- 🎬 TCP vs UDP compared and explained (CCNA) (Intermediate)
- 🎬 DNS: Domain Name System explained – Simply Explained (Intermediate)
Handouts and reading
- 📄 Tablets of Stone: network protocols – CS Unplugged (PDF)
- 📄 The Orange Game: routing and deadlock – CS Unplugged (PDF)
- 📄 How DNS works (comic)
- 📄 What is DNS? – Cloudflare Learning Center
- 📄 An overview of HTTP – MDN Web Docs
- 📄 OSI model layers and protocols – Guru99
- 🎮 Matching game: map OSI and TCP/IP layers – Educaplay
Literature and courses
- Kurose, J. & Ross, K. Computer Networking: A Top-Down Approach (Pearson): chapters 2 (application layer), 3 (transport) and 4–5 (network layer). Use the free Wireshark labs.
- 🎓 Networking Basics – Cisco Networking Academy (free).
- CyBOK Network Security KA and our summary CyBOK 19.1-3 Network goals, applications and protocols.
Common mistakes
- "A switch and a router are the same." A switch connects devices within a network (MAC addresses); a router connects different networks (IP addresses).
- "NAT is a firewall." NAT happens to block unsolicited inbound connections, but it does not inspect or filter outbound traffic and does not exist in the same way in IPv6.
- "A secret protocol is safer." Security through obscurity breaks as soon as someone reverse-engineers it. Open, reviewed protocols are more trustworthy.
- Forgetting UDP in scans and firewall rules. DNS, SNMP and many IoT services listen on UDP. Attackers don't forget it.
Check yourself
- In your own words: what is the difference between a protocol and a standard?
- Is
172.20.5.10a private or public address? And172.32.0.1? - What does a router do with a packet whose destination is not in its routing table?
- Which protocol would you use instead of Telnet, and why?
- What would happen if DNS stopped working?
- Explain why a DNS amplification attack uses UDP and not TCP.
Answers
1. A protocol is a set of rules for communication; a standard is a protocol or specification formally agreed and published by a recognised body so that all implementations match.
2. 172.20.5.10 is private (inside 172.16.0.0/12, which runs to 172.31.255.255); 172.32.0.1 is public.
3. It sends it to its default route (gateway of last resort) if it has one; otherwise it drops the packet and usually returns an ICMP "destination unreachable".
4. SSH (port 22), because it encrypts the session including the password; Telnet sends everything in plain text.
5. You could still reach servers by IP address, but almost nothing would work for normal users, because names could not be translated into addresses.
6. UDP has no handshake, so the attacker can forge the victim's source address; the server sends its large reply straight to the victim. With TCP the handshake would fail.
Related topics
- B1 OSI model: the layers these protocols belong to.
- B5 Essentials: firewalls, NAC and IPS.
- B6 Attacks: man-in-the-middle and DoS in more detail.