- Published on
Network Fundamentals for InfoSec: Devices, Protocols, IP Addressing, and Security Controls
- Authors

- Name
- 0xTrisec
Every attack you will ever investigate travels over a network. A phishing email crosses SMTP, a C2 beacon hides inside HTTPS, a port scan is just a flood of TCP SYN packets. If you cannot read the network, you cannot read the incident.
These are my notes from the networking course, rewritten as a single study guide. I merged the topics that repeated across the lecture slides, corrected a few details I found imprecise while cross-checking, and added the security angle that matters for a future SOC Analyst or Security Engineer.
How to use this guide: Read → Draw → Run the command → Explain it out loud. If you can sketch the diagram from memory and explain it in two sentences, you actually know it.
Table of Contents
- What is a Computer Network?
- Network Types by Scale (PAN, LAN, MAN, WAN)
- Network Devices
- Network Topologies
- Network Cables and Connectors
- IP Addressing
- Network Protocols (TCP, UDP, HTTP, HTTPS, FTP)
- OSI Model vs TCP/IP Model
- Routing vs Switching
- Network Security Basics
- Bandwidth, Throughput, and Latency
- Internet Services
- Essential Network Commands
- Why This Matters for a SOC Analyst
- Common Misconceptions
- Quick Revision Checklist
What is a Computer Network?
A computer network is a set of computers and devices connected together so they can communicate, share resources, and exchange data. A network can be tiny (a phone sharing Wi-Fi with a laptop) or planet-sized (the Internet).
.----------------.
( Internet )
'-------+--------'
|
+-----+-----+
| Router |
+--+--+--+--+
| | |
+--------+ | +--------+
| | |
[Laptop] [Desktop] [Server]
Figure 1: The simplest useful picture of a network. Devices connect to a router, and the router connects the local network to the Internet.
Network Types by Scale
Networks are classified by geographic scope. The bigger the network, the wider the area it covers.
| Type | Full Name | Typical Scope | Example |
|---|---|---|---|
| PAN | Personal Area Network | A few meters around one person | Bluetooth headset, phone hotspot |
| LAN | Local Area Network | A single building or campus | Home Wi-Fi, office, school lab |
| MAN | Metropolitan Area Net. | A city or metro region | University campuses linked across a city |
| WAN | Wide Area Network | Multiple cities, countries, continents | The Internet, corporate links between countries |
+-----------------------------------------------------+
| WAN countries / continents / the Internet |
| +-----------------------------------------------+ |
| | MAN a city or metropolitan area | |
| | +-----------------------------------------+ | |
| | | LAN home / office / campus | | |
| | | +-----------------------------------+ | | |
| | | | PAN Bluetooth, phone hotspot | | | |
| | | +-----------------------------------+ | | |
| | +-----------------------------------------+ | |
| +-----------------------------------------------+ |
+-----------------------------------------------------+
Figure 2: Scope of each network type. Larger network, larger coverage.
Don't confuse scale with medium. Separately from scale, we also describe how devices connect:
| Kind | Medium / Method |
|---|---|
| Wired network | Cables (Ethernet over copper or fiber) |
| Wireless network | Radio waves (Wi-Fi, Bluetooth, cellular) |
| VPN | Not a physical type. It is an encrypted tunnel built on top of another network (usually the Internet) |
Network Devices
Each device has one job. Knowing which OSI layer it works at tells you what information it can "see".
| Device | Function | OSI Layer | Real-world Example |
|---|---|---|---|
| Router | Forwards packets between different networks using IP | Layer 3 | Home router, ISP router |
| Switch | Forwards frames inside one network using MAC addresses | Layer 2 | 24-port access switch |
| Hub | Repeats incoming signal to every port (obsolete) | Layer 1 | Legacy 10 Mbps hub |
| Modem | Converts signals between your LAN and the ISP's medium | Layer 1 / 2 | Cable, DSL, or fiber modem |
| Access Point | Provides Wi-Fi access to wired network | Layer 2 | Ceiling-mounted Wi-Fi AP |
| Repeater | Regenerates a signal to extend its range | Layer 1 | Wi-Fi range extender |
Hub vs Switch vs Router
The three devices most often confused. The key difference is who receives your data.
| Feature | Hub | Switch | Router |
|---|---|---|---|
| Intelligence | None, just repeats bits | Learns MAC addresses | Reads IP addresses, uses routing table |
| Sends data to | All ports | Only the destination port | The next hop toward the destination network |
| Collision domain | One shared by all ports | One per port | One per interface |
| Broadcast domain | One | One (unless VLANs are used) | One per interface (routers stop broadcasts) |
| Security | Easy to sniff | Harder to sniff (not impossible, see ARP spoofing) | Can apply ACLs and NAT |
A Typical Home / Small Office Network
( Internet / ISP )
|
+----+----+
| Modem | <- connects to ISP (cable / DSL / fiber)
+----+----+
|
+----+----+
| Router | <- routing, NAT, DHCP, basic firewall
+----+----+
|
+----+----+
| Switch | <- Layer 2 forwarding by MAC address
+--+--+--++
| | \
Laptop PC Access Point ~~ Wi-Fi ~~ Phone, Tablet
Figure 3: Data flow: Device → Switch → Router → Modem → Internet.
Reality check: the box your ISP gives you is usually an all-in-one device: modem + router + 4-port switch + Wi-Fi access point + DHCP server + NAT + firewall. The functions are separate even when the hardware is shared.
Network Topologies
Topology describes how devices are arranged and connected. There are two views: physical (how cables and devices are actually laid out) and logical (how data actually flows).
BUS STAR
[PC1] [PC2] [PC3] [PC4] [PC1]
| | | | |
==+=======+=======+=======+== [PC4]--- [SWITCH] ---[PC2]
shared backbone cable |
[PC3]
RING MESH (full, 4 nodes)
[A]--------[B] [A]--------[B]
| | | \ / |
| | | \/ |
[D]--------[C] | /\ |
| / \ |
[D]--------[C]
TREE
[Core Switch]
/ \
[Switch 1] [Switch 2]
/ \ / \
[PC1] [PC2] [PC3] [PC4]
Figure 4: The five classic topologies.
| Topology | Description | Advantages | Disadvantages | Where you see it today |
|---|---|---|---|---|
| Bus | All devices share one backbone cable | Cheap, simple | One cable break takes down the segment; collisions | Legacy coax Ethernet |
| Star | Every device connects to a central device | Easy to manage, one bad cable affects one device | Central device is a single point of failure | Almost every modern LAN |
| Ring | Each device connects to exactly two neighbors | Predictable traffic flow | One break can disrupt the ring (unless dual ring) | Token Ring (legacy), FDDI, some metro fiber rings |
| Mesh | Devices connect to many others | Very resilient, multiple paths | Expensive; a full mesh needs n(n-1)/2 links | WAN backbones, Internet core, Wi-Fi mesh |
| Tree | Hierarchy of star networks | Scales well, easy to segment | If the root/core fails, whole branches go down | Campus and enterprise networks |
Full mesh math: 4 nodes need 6 links, 10 nodes need 45, 50 nodes need 1,225. This is why full mesh is rare outside critical backbones.
Network Cables and Connectors
| Cable Type | Medium | Typical Use | Notes |
|---|---|---|---|
| Twisted Pair | Copper | LAN (Cat5e, Cat6, Cat6a) | Max 100 m per segment. Cat5e/Cat6 = 1 Gbps; Cat6 does 10 Gbps only up to about 55 m; Cat6a = 10 Gbps at 100 m |
| Coaxial | Copper | Legacy LANs, cable-TV/cable-broadband | Still used by DOCSIS cable internet, rare in new LANs |
| Fiber Optic | Glass (light) | High speed, long distance, backbones | Immune to electromagnetic interference. Single-mode for long distance (km), multi-mode for short runs (building/campus) |
| Connector | Used With | Looks Like |
|---|---|---|
| RJ45 | Ethernet twisted pair | Wide plastic clip plug (like a fat phone jack) |
| BNC / F-type | Coaxial | Round twist-lock or screw-on |
| SC / LC | Fiber optic | Square (SC) or small duplex (LC) push-pull plug |
IP Addressing
An IP address is a logical address that identifies a device on a network.
| Version | Size | Format | Example | Total Space |
|---|---|---|---|---|
| IPv4 | 32-bit | 4 decimal octets | 192.168.1.1 | about 4.3 billion |
| IPv6 | 128-bit | 8 groups of hex | 2001:db8::1 | about 3.4 × 10³⁸ |
2001:db8::/32is reserved for documentation. You'll see it in textbooks and slides, never on the real Internet.
Public vs Private vs Special Addresses
| Category | IPv4 Range | Notes |
|---|---|---|
| Private (RFC 1918) | 10.0.0.0 – 10.255.255.255 (10.0.0.0/8) | Large organizations |
172.16.0.0 – 172.31.255.255 (172.16.0.0/12) | Medium networks | |
192.168.0.0 – 192.168.255.255 (192.168.0.0/16) | Home and small office | |
| Loopback | 127.0.0.0/8 (usually 127.0.0.1) | The device talking to itself |
| Link-local (APIPA) | 169.254.0.0/16 | Auto-assigned when DHCP fails |
| Multicast | 224.0.0.0 – 239.255.255.255 | One-to-many delivery |
| Public | Everything else that is routable | Reachable on the Internet |
Private addresses are not routable on the Internet. Your router uses NAT (Network Address Translation) to let many private devices share one public IP.
Classful Addressing (Legacy, but Still on Exams)
| Class | First Octet | Default Subnet Mask | Usable Hosts per Network | Intended For |
|---|---|---|---|---|
| A | 1 – 126 | 255.0.0.0 (/8) | 16,777,214 | Very large networks |
| B | 128 – 191 | 255.255.0.0 (/16) | 65,534 | Medium networks |
| C | 192 – 223 | 255.255.255.0 (/24) | 254 | Small networks |
| D | 224 – 239 | n/a | n/a | Multicast |
| E | 240 – 255 | n/a | n/a | Reserved / experimental |
0.x.x.xis reserved and127.x.x.xis loopback, which is why Class A stops at 126.- Modern networks use CIDR (Classless Inter-Domain Routing, e.g.
10.20.30.0/22) instead of fixed classes. Classes are mostly a teaching tool today.
Network Protocols
A protocol is a set of rules that defines how data is formatted, sent, received, and understood.
| Protocol | Layer (TCP/IP) | Purpose | Default Port |
|---|---|---|---|
| TCP | Transport | Reliable, connection-oriented delivery | n/a |
| UDP | Transport | Fast, connectionless delivery | n/a |
| HTTP | Application | Transfers web pages (plaintext) | 80 |
| HTTPS | Application | HTTP over TLS (encrypted) | 443 |
| FTP | Application | File transfer (plaintext) | 20 / 21 |
| SSH | Application | Secure remote shell, also SFTP | 22 |
| DNS | Application | Domain name ↔ IP resolution | 53 |
| DHCP | Application | Automatic IP configuration | 67 / 68 (UDP) |
| SMTP | Application | Sending email | 25 |
TCP vs UDP
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Acknowledgements, retransmission, ordering | Best effort, no guarantee |
| Speed / overhead | Slower, more overhead | Faster, less overhead |
| Typical use | Web, email, file transfer, SSH | Video/voice streaming, online games, DNS queries |
The TCP Three-Way Handshake
Client Server
| |
|------------- SYN (seq = x) ------------->|
|<-------- SYN-ACK (seq = y, ack = x+1) ---|
|------------- ACK (ack = y+1) ----------->|
| |
|========== connection established =========|
Figure 5: A port scanner like Nmap abuses exactly this. A half-open "SYN scan" sends the SYN, reads the reply, and never completes the handshake.
HTTP vs HTTPS
| Feature | HTTP | HTTPS |
|---|---|---|
| Port | 80 | 443 |
| Encryption | None, readable by sniffers | TLS encrypts the content in transit |
| Identity | Not verified | Server authenticated by a certificate |
| Integrity | Can be modified in transit | Tampering is detected |
Plain FTP and Telnet send credentials in cleartext. In practice use SFTP/FTPS and SSH instead.
OSI Model vs TCP/IP Model
Both are reference models that explain how data moves across a network. OSI is the theoretical one (7 layers). TCP/IP is the practical one the Internet actually runs on (4 layers).
OSI Model (7 layers) TCP/IP Model (4 layers)
+---------------------------+ +---------------------------+
| 7. Application | | |
+---------------------------+ | |
| 6. Presentation | | 4. Application |
+---------------------------+ | HTTP, HTTPS, FTP, DNS |
| 5. Session | | |
+---------------------------+ +---------------------------+
| 4. Transport | | 3. Transport (TCP, UDP) |
+---------------------------+ +---------------------------+
| 3. Network | | 2. Internet (IP, ICMP) |
+---------------------------+ +---------------------------+
| 2. Data Link | | |
+---------------------------+ | 1. Network Access |
| 1. Physical | | Ethernet, Wi-Fi |
+---------------------------+ +---------------------------+
Figure 6: OSI layers 5 to 7 collapse into TCP/IP's Application layer, and layers 1 to 2 collapse into Network Access.
OSI Layer Details
| # | Layer | Function | PDU | Protocols / Examples | Devices |
|---|---|---|---|---|---|
| 7 | Application | Network services for applications | Data | HTTP, DNS, SMTP, FTP | Application firewall, proxy |
| 6 | Presentation | Encoding, compression, encryption | Data | TLS (commonly placed here), JPEG | n/a |
| 5 | Session | Open, manage, close sessions | Data | NetBIOS, RPC | n/a |
| 4 | Transport | End-to-end delivery, ports, reliability | Segment / Datagram | TCP, UDP | Stateful firewall |
| 3 | Network | Logical addressing and routing | Packet | IP, ICMP | Router |
| 2 | Data Link | Local delivery, MAC addressing | Frame | Ethernet, Wi-Fi (802.11) | Switch, AP |
| 1 | Physical | Raw bits over a medium | Bits | Cables, radio signals | Hub, repeater |
Mnemonic (top → bottom): All People Seem To Need Data Processing. Mnemonic (bottom → top): Please Do Not Throw Sausage Pizza Away.
TCP/IP Layer Details
| Layer | Name | Function | Examples |
|---|---|---|---|
| 4 | Application | Network services for applications | HTTP, FTP, DNS |
| 3 | Transport | Data delivery and reliability | TCP, UDP |
| 2 | Internet | Logical addressing and routing | IP, ICMP |
| 1 | Network Access | Physical connection and data-link framing | Ethernet, Wi-Fi |
Key Differences
| Aspect | OSI | TCP/IP |
|---|---|---|
| Layers | 7 | 4 (some textbooks use a 5-layer variant) |
| Nature | Theoretical reference model | Practical, implemented model |
| Real-world use | Teaching, troubleshooting vocabulary | Actual Internet protocol suite |
| Developed by | ISO | US DoD / IETF community |
When someone says "that's a Layer 2 problem" or "that's a Layer 7 attack", they are using OSI vocabulary even though the network runs TCP/IP.
Routing vs Switching
Both move data across a network, but at different layers and with different addresses.
| Feature | Routing | Switching |
|---|---|---|
| OSI Layer | Layer 3 (Network) | Layer 2 (Data Link) |
| Goal | Connect different networks | Connect devices within the same network |
| Device | Router (and Layer 3 switch) | Switch |
| Address used | IP address | MAC address |
| Decision table | Routing table | MAC address (CAM) table |
| PDU | Packet | Frame |
| Related tech | RIP, OSPF, BGP, static routes | VLAN, STP, trunking |
Routing protocols in one line each:
- RIP: distance-vector, hop-count metric, simple but slow to converge. Mostly legacy.
- OSPF: link-state, fast convergence, the common interior protocol inside an organization.
- BGP: path-vector, the protocol that glues different organizations (Autonomous Systems) together. The Internet runs on it.
Switching technologies:
- VLAN: logically splits one physical switch into multiple isolated networks.
- STP (Spanning Tree Protocol): prevents Layer 2 loops that would cause broadcast storms.
Network Security Basics
Network security protects data and devices from unauthorized access and attacks. No single tool does it all, which is why we layer them (defense in depth).
Internet --> [ Firewall ] --> [ IDS/IPS ] --> [ Internal Network ]
| | ^
blocks unwanted detects / stops |
traffic attacks |
|
Remote user ===== VPN (encrypted tunnel) =============+
Figure 7: Layered defenses. Firewall filters, IDS/IPS inspects, and VPN protects remote access.
| Control | What it does | Protects |
|---|---|---|
| Firewall | Allows or blocks traffic based on rules | Network perimeter / segments |
| IDS/IPS | Detects (and optionally blocks) malicious activity | Network and hosts |
| Antivirus / EDR | Detects and removes malware | Endpoints (host-level, not network-level) |
| Encryption | Makes data unreadable without a key (e.g. TLS) | Data in transit / at rest |
| VPN | Encrypted tunnel across an untrusted network | Remote access, site-to-site links |
Types of Firewalls
| Type | How it works | Layer(s) | Limitation |
|---|---|---|---|
| Packet Filtering | Checks each packet's IP, port, and protocol against rules | 3 – 4 | Stateless, no memory of connections |
| Stateful Inspection | Tracks connection state in a state table | 3 – 4 | Doesn't understand application content |
| Proxy (Application) Firewall | Acts as an intermediary; terminates and re-creates the connection | 7 | Slower, protocol-specific |
| NGFW (Next-Generation) | Deep Packet Inspection, application awareness, built-in IPS, threat intel, optional TLS inspection | 3 – 7 | Costly; TLS inspection adds complexity |
IDS vs IPS
| Feature | IDS (Intrusion Detection System) | IPS (Intrusion Prevention System) |
|---|---|---|
| Action | Detects and alerts | Detects and blocks |
| Placement | Out-of-band (via SPAN/TAP copy) | Inline in the traffic path |
| Risk | Attack may succeed before response | False positive can block legitimate traffic |
| Detection | Signature-based, anomaly-based | Same |
Bandwidth, Throughput, and Latency
Bandwidth is the maximum amount of data a link can carry per unit of time. It is measured in bits per second (bps), commonly Kbps, Mbps, Gbps.
Dial-up |# | 56 Kbps
Broadband |######### | 10 Mbps (example tier)
Fiber |#######################| 1 Gbps
(illustrative, not to scale)
Figure 8: Higher bandwidth means more data per second, not necessarily lower delay.
| Term | Meaning | Unit |
|---|---|---|
| Bandwidth | Maximum theoretical capacity of the link | bps, Mbps, Gbps |
| Throughput | Actual data rate you achieve | bps, Mbps |
| Latency | Time for a packet to travel (delay) | ms |
Bits vs bytes: 1 byte = 8 bits. Internet plans are sold in Mbps (bits), file sizes are shown in MB (bytes). A 100 Mbps connection tops out around 12.5 MB/s in theory, and real throughput is lower because of protocol overhead and congestion.
Internet Services
The Internet is a global network of networks that connects billions of devices and offers many services on top of the same protocols.
| Service | What it does | Main Protocol(s) | Example |
|---|---|---|---|
| Web | Access websites | HTTP / HTTPS (+ DNS) | Google, YouTube |
| Send and receive mail | SMTP, IMAP, POP3 | Gmail, Outlook | |
| File transfer | Move files between hosts | FTP / SFTP | Server uploads |
| Chat / VoIP | Real-time communication | Various (often TLS, UDP for media) | Messaging, calls |
| Cloud | Online storage and computing | HTTPS APIs | Google Drive, AWS |
Essential Network Commands
These are the first tools to reach for when troubleshooting, and the first thing a SOC analyst runs on a suspicious host.
| Purpose | Windows | Linux / macOS | Notes |
|---|---|---|---|
| Test reachability | ping | ping | Uses ICMP Echo. Blocked ICMP ≠ host is down |
| Show IP configuration | ipconfig /all | ip addr (ifconfig is legacy on Linux) | macOS still uses ifconfig |
| Trace the path | tracert | traceroute | Shows each hop and its latency |
| Active connections and ports | netstat -ano | ss -tulnp (or netstat -tulnp) | -p / -o reveal the owning process |
| DNS lookup | nslookup | dig, nslookup | Resolve names, inspect DNS records |
| ARP cache (IP ↔ MAC) | arp -a | ip neigh / arp -a | Useful to spot ARP spoofing |
| Routing table | route print | ip route | Where does traffic leave this host? |
# Is the host alive? (Linux: send 4 packets)
ping -c 4 8.8.8.8
# What path does my traffic take?
traceroute example.com # Windows: tracert example.com
# Which ports are listening, and which process owns them?
ss -tulnp # Windows: netstat -ano
# Resolve a domain's A record
dig example.com A +short # or: nslookup example.com
# Who is on my local network segment?
arp -a
Why This Matters for a SOC Analyst
Networking is not a separate subject from security. It is the evidence you investigate.
| Networking concept | What a SOC analyst looks for |
|---|---|
| IP ranges (private/public) | Separate internal from external traffic; spot internal hosts talking to unusual public IPs |
| Ports and protocols | Unexpected listening ports, RDP/SSH exposed to the Internet, cleartext protocols carrying credentials |
| TCP handshake / flags | Many SYNs with no completed connections suggest a port scan |
| DNS | Very long or random-looking domains (DGA, DNS tunneling), newly registered domains |
| ARP table | One MAC address claiming many IPs suggests ARP spoofing / man-in-the-middle |
| ICMP | Sweeps across a subnet suggest host discovery / reconnaissance |
| Firewall / IDS logs | Denied connections, signature hits, outbound traffic to known-bad IPs |
| VPN and TLS | Encrypted channels hide content, so you pivot on metadata (IPs, SNI, timing, volume) |
Common Misconceptions
Details that are easy to get wrong when memorizing slides:
- "Private IPs are only
192.168.x.x." No. There are three private ranges:10.0.0.0/8,172.16.0.0/12,192.168.0.0/16. - "Public IPs are everything from 1.0.0.0 to 223.255.255.255." Not quite. Private, loopback, link-local, and other reserved blocks live inside that span, and
224+is multicast/reserved. - "Loopback is just
127.0.0.1." The whole127.0.0.0/8block is loopback.127.0.0.1is simply the one everyone uses. - "A hub and a switch both connect devices, so they're the same." A hub repeats to all ports. A switch forwards only to the right port.
- "Antivirus is a network security device." It is endpoint protection. Network controls are firewalls, IDS/IPS, segmentation, and so on.
- "VPN is a type of network like LAN or WAN." It is a tunnel/overlay that runs over another network.
- "Higher bandwidth means lower latency." No. Bandwidth is capacity, latency is delay. A satellite link can have high bandwidth and high latency.
- "A failed ping means the host is down." Many hosts and firewalls simply drop ICMP.
- "Classes A/B/C are how IPs are assigned today." Real networks use CIDR. Classes are mostly historical.
- "
ifconfigandtracertwork everywhere."ifconfigis legacy on modern Linux (useip), andtracertis the Windows name (tracerouteelsewhere).
Quick Revision Checklist
Before moving on, make sure you can:
- Explain PAN, LAN, MAN, and WAN with one real example each.
- Say which OSI layer a hub, switch, and router work at, and why that matters.
- Draw the five topologies and name the weakness of each.
- List the three private IPv4 ranges from memory.
- Explain the TCP three-way handshake and why UDP skips it.
- Recite the 7 OSI layers and map them onto the 4 TCP/IP layers.
- Distinguish routing from switching (layer, address, device, protocol).
- Explain the difference between a stateless firewall, a stateful firewall, and an NGFW.
- Explain IDS vs IPS and where each sits in the network.
- Convert Mbps to MB/s and explain bandwidth vs throughput vs latency.
- Use
ping,traceroute,ss/netstat,dig/nslookup,arp, andip routeand interpret the output.
Conclusion
Computer networks let devices and people communicate, share resources, and reach information. They work because many small pieces cooperate: devices that move data, topologies that arrange them, addresses that identify them, protocols that define the rules, and security controls that keep it all trustworthy.
For anyone heading toward a SOC or security engineering role, this is the foundation everything else is built on. Packet captures, firewall rules, SIEM correlation, and incident timelines all assume you can picture what is happening on the wire.
Always connected. Always learning. Always coding. 🙂
If you spot a mistake or have a better way to explain something, please reach out. Corrections make these notes better for everyone.