Pre-Security Course / Module 2
Networking
Almost every attack travels over a network, and on a real engagement you will be placed inside one and asked to find your way around. This module builds a working mental model — the devices a network is made of, the layers everyone talks in, how machines are addressed, how traffic moves within and between networks (switching, routing, NAT), and the concept that catches out every fresher: why being on one network does not mean you can reach another.
2.1 · How machines talk — IP addresses and the client/server model
For one device to send data to another, it needs the other's address. That address is its IP address — for example 10.10.10.2. The everyday form is four numbers, each from 0 to 255, joined by dots; this is IPv4. (There is a newer, longer form called IPv6, written with colons and hex, but IPv4 is what you will read most of the time.)
Because each of the four numbers is 0–255, you already know something from Module 1: each one is a single byte. An IPv4 address is just four bytes. That is not trivia — it is exactly why subnetting works, as you will see shortly.
Private and public addresses
Some address ranges are private: used only inside home and office networks, never routed across the public internet. You will see them everywhere in labs and internal engagements. Learn to recognise the three private ranges:
| Private range | Looks like | Typical use |
|---|---|---|
10.0.0.0 – 10.255.255.255 | 10.x.x.x | Large company networks. |
172.16.0.0 – 172.31.255.255 | 172.16–31.x.x | Medium networks. |
192.168.0.0 – 192.168.255.255 | 192.168.x.x | Home and small-office networks. |
A public IP, by contrast, is reachable from the wider internet — a website's server has one. When you see 192.168.1.20 you are almost certainly looking at a machine inside a private network; 8.8.8.8 (a well-known public DNS server) is out on the open internet. How private addresses still reach the internet is a puzzle solved later in this module, by NAT.
Client and server
Most conversations follow the client/server pattern. The server waits, offering a service — a website, a database. The client starts the conversation and asks for something — your browser fetching a page. The same machine can be a server for one thing and a client for another. Keep this simple picture, because almost everything you test is one side talking to the other.
⌨ Try it yourself — find your own IP
- Private IP (inside your network): Windows → Command Prompt →
ipconfig; Mac → Terminal →ifconfig | grep inet. Look for192.168.x.xor10.x.x.x. - Public IP (how the internet sees you): search "what is my IP". That one address is shared by every device in your home — a clue to NAT, later.
In short — every device has an IP address (four bytes in IPv4). Private ranges (10.x, 172.16–31.x, 192.168.x) live inside networks; public IPs face the internet. In the client/server model the client asks and the server answers.
Quick check
-
Which address is a private IP you would expect inside an office network?
192.168.x.xis a private range.8.8.8.8is public, and256is invalid — each number only goes to 255. -
In the client/server model, which side starts the conversation?
The client initiates the request; the server waits and responds.
-
Why can each number in an IPv4 address only go up to 255?
An IPv4 address is four bytes; from Module 1, one byte holds 0 to 255.
2.2 · Ports and services (and TCP vs UDP)
An IP address gets your message to the right machine — but a machine runs many services at once. A port is a numbered doorway that says which service you want.
10.10.10.2:443 — this machine, this service.Many ports are agreed by convention, so a scanner reporting an open port tells you what is probably running. A handful are worth memorising:
| Port | Service | What it does |
|---|---|---|
| 80 | HTTP | Web traffic — unencrypted. |
| 443 | HTTPS | Web traffic — encrypted. |
| 22 | SSH | Secure remote login to a server (terminal). |
| 53 | DNS | Turning names into IP addresses. |
| 3389 | RDP | Remote desktop to a Windows machine. |
| 3306 / 1433 | MySQL / MSSQL | Databases (you will meet these dialects in Module 4). |
TCP and UDP
Every port is one of two styles. TCP is like a phone call: the two sides connect, then confirm each piece arrived and re-send anything lost — reliable, with a little overhead; the web, SSH and most services use it. UDP is like posting a letter and not checking it arrived: faster and lighter, no guarantee, used for DNS, voice and video. So 22/tcp open tells you both the doorway (22) and the delivery style (TCP).
In short — the IP finds the machine; the port picks the service (80/443 web, 22 SSH, 3389 RDP). TCP is a reliable connection (phone call); UDP is fast fire-and-forget (posted letter).
Quick check
-
A scan shows port
443open. What is most likely running?443 is the agreed port for HTTPS. DNS uses 53 and remote desktop uses 3389.
-
Which best describes TCP compared with UDP?
TCP is the phone call — it confirms and re-sends. UDP is the posted letter — faster, with no guarantee.
-
What does the port number add on top of the IP address?
The IP address finds the building; the port chooses the flat inside it.
2.3 · The kit in the rack — the devices a network is built from
On your first engagement a client will hand you a network diagram, and it will be drawn with a small, standard set of boxes. Nobody will stop to explain them. This section is that explanation, so the diagram reads like a sentence rather than a puzzle.
| Device | What it does | Why a tester cares |
|---|---|---|
| Hub | Copies every incoming signal out of every other port, blindly. | Everyone sees everyone's traffic. Obsolete, but the idea explains why sniffing used to be trivial. |
| Switch | Connects devices within one network and sends each frame only to the port that needs it. | The box you are plugged into on an internal test. It also enforces VLANs. |
| Router | Moves traffic between different networks, choosing a path by IP address. | It decides whether one subnet can even reach another. |
| Firewall | Sits at a boundary and allows or blocks traffic against a rule list. | The single most common reason you cannot reach something. Its rules are a whole service line. |
| Access point (AP) | Puts the wired network on the air as Wi-Fi. | An attack surface that needs no physical entry to the building. |
| Load balancer | Spreads incoming requests across several identical servers. | One name and IP can hide many machines, which can make findings behave inconsistently. |
| Proxy / WAF | Stands in front of a server, inspecting and forwarding requests. | A WAF may block your payloads — so you learn to notice when you are fighting the shield, not the app. |
| Modem / ONT | Converts the provider's line into ordinary network traffic. | Where the organisation's network physically meets the outside world. |
| IDS / IPS | Watches traffic for known-bad patterns; an IPS also blocks it. | It is what notices you. The blue team reads its alerts while you work. |
Hub versus switch — a small history with a big lesson
A hub has no idea who is who. A frame arriving on one port is repeated out of every other port, and each machine decides whether the frame was meant for it. The consequence is the point: on a hub, any machine could quietly record everybody's traffic.
A switch learns which device sits on which port and delivers each frame to that port alone. Hubs have all but vanished from real networks — but the word survives in interview questions and in decade-old diagrams, and the distinction is exactly why capturing traffic on a modern switched network takes a deliberate trick (a mirrored port, or an attack that fools the switch) rather than simply plugging in and listening.
What a typical company network looks like
Put those boxes together and almost every organisation you visit looks roughly like this:
The pocket hanging off the firewall has a name worth knowing. A DMZ (demilitarised zone) holds the machines that must be reachable from the internet — a public website, a mail relay. They are deliberately kept out of the internal network, so that breaking into the public web server does not automatically place an attacker next to the payroll database.
When you are put on an internal test, your first two questions are answered by a picture like this one: which of those boxes am I plugged into, and how many firewalls sit between me and what I want to reach. The rest of this module is really about answering those two questions properly.
In short — switches connect devices inside a network, routers connect networks to each other, and firewalls guard the boundaries between them. A hub repeated traffic to everyone, which is why it died. A DMZ is the walled pocket for machines the public must reach.
Quick check
-
What made a hub a security problem compared with a switch?
A hub copies traffic to all ports, so any machine could listen to everyone. A switch delivers each frame only to the port that needs it.
-
Which device connects two different networks to each other?
Routers move traffic between networks using IP. Switches work inside one network; an AP adds Wi-Fi to one.
-
Why is a public web server usually placed in a DMZ?
The DMZ keeps internet-facing machines away from the internal network, limiting how far a compromise spreads.
-
Your payloads are being rejected before the application ever sees them. Most likely culprit?
A WAF sits in front of the app and drops requests that match bad patterns — you are fighting the shield, not the application.
2.4 · Thinking in layers — the OSI and TCP/IP models
You now have addresses, ports and hardware. The next idea ties them together, and it is the one piece of theory in this module that you will be asked about in an interview almost every time.
Networking is split into layers. Each layer does one job and hands its result to the next, and no layer needs to know how the others do their work. The browser asking for a page does not care whether the packet travels by fibre or by Wi-Fi; the cable does not care that it is carrying a web page. That separation is why the internet can change underneath us without every program breaking.
There are two models of this. The OSI model has seven layers and is the shared vocabulary the industry talks in. The TCP/IP model has four and is closer to how the internet is actually built. You are expected to know both, and to know that they describe the same journey at different resolutions.
A mnemonic that has survived decades, reading from layer 7 down to layer 1: All People Seem To Need Data Processing.
Why a security person actually needs this
Not for the trivia. The layer numbers are the vocabulary of the job — colleagues and clients use them as shorthand constantly, and a weakness only makes sense once you know which layer it lives at.
| Layer | Heard in the wild | A weakness that lives there |
|---|---|---|
| 7 · Application | "It is a layer 7 issue." "We put a WAF in front." | SQL injection, cross-site scripting — the whole of web testing. |
| 4 · Transport | "Which ports are open?" | Services exposed that should not be; a scanner works mostly here. |
| 3 · Network | "The layer 3 firewall allows that subnet." | Flat networks with no segmentation; routes that should not exist. |
| 2 · Data link | "That is a layer 2 attack." | ARP spoofing, VLAN hopping — tricks that work only inside one LAN. |
| 1 · Physical | "They left a live port in reception." | An unlocked socket or rogue device; no software fixes it. |
The service lines in Module 5 map onto this cleanly too. Network penetration testing works mostly at layers 3 and 4 — what is reachable and what is listening. Web application testing lives almost entirely at layer 7 — what the application does with what you send it. Knowing which layer you are working at tells you which questions are even worth asking.
Watch out — "layer 8" is an old joke meaning the human being. When someone calls a finding a layer 8 problem, they mean somebody clicked something they should not have.
In short — networking is built in layers so each job stays independent. OSI has seven layers and gives the industry its vocabulary; TCP/IP has four and matches how the internet is really built. Layer 3 is IP and routers, layer 4 is TCP and ports, layer 7 is the application — and knowing the layer tells you what kind of weakness you are dealing with.
Quick check
-
How many layers does the OSI model have?
OSI has seven; the TCP/IP model condenses the same journey into four.
-
IP addresses and routers belong to which OSI layer?
Layer 3 addresses machines across networks. Ports and TCP sit one layer up, at 4.
-
A colleague calls SQL injection "a layer 7 problem". What do they mean?
Layer 7 is the application layer, so the flaw is in what the app does with your input — not in how packets are routed.
-
Which pairing is correct?
Switches forward by MAC address at layer 2; routers forward by IP address at layer 3.
2.5 · Subnetting and CIDR
A big network is split into smaller blocks called subnets. A subnet is simply a group of IP addresses that sit together and can talk to each other directly. You must understand this for one very practical reason: your permission to test — your scope — is almost always written as a subnet, and you have to know exactly which addresses it covers.
Reading CIDR notation
The modern shorthand is CIDR: an address, a slash, and a number — 10.10.10.0/24. The slash number says how much of the address is "fixed", which tells you how many addresses are in the block. An IPv4 address is 32 bits; the CIDR number says how many of those bits are locked. The one you meet most is /24 — it locks the first three numbers and lets only the last vary, giving 256 addresses:
/24: three numbers locked, the last free — 256 addresses in this block.| CIDR | Addresses | Plain meaning |
|---|---|---|
/24 | 256 | Last number varies — a typical small network. |
/16 | 65,536 | Last two numbers vary — a large network. |
/32 | 1 | Every bit fixed — exactly one machine. |
So if a client scopes you to 192.168.5.0/24, you may test the 256 addresses from 192.168.5.0 to 192.168.5.255 — and nothing outside them. Reading CIDR correctly is the line between authorised testing and trespassing, which is why it returns as a hard rule in Module 5.
Watch out — 10.10.4.0/24 and 10.10.5.0/24 are different subnets. 10.10.5.7 is not inside a /24 that starts at 10.10.4.0.
In short — a subnet is a block of addresses that belong together. CIDR like /24 tells you the block's size (256); /16 is bigger, /32 is one host. Your scope is usually a subnet, so reading CIDR is a survival skill.
Quick check
-
How many addresses does
10.0.0.0/24contain?A
/24fixes the first three numbers and leaves the last free: 256 addresses. -
Your scope is
172.16.4.0/24. Which address is OUT of scope?A
/24on172.16.4.0covers172.16.4.0–255.172.16.5.10is a different subnet. -
What does
/32such as192.168.1.50/32describe?Every bit is fixed in a
/32, so it points to a single host.
2.6 · Switching — inside one network
Now we look at how devices actually reach each other. Start small: several computers on the same network. What connects them is a switch, and this is the world of switching — moving traffic within a single local network (a LAN, Local Area Network).
MAC addresses — the local name tag
On the local wire, devices are not found by their IP but by a second, lower-level address: the MAC address, a unique identifier burned into every network card (it looks like 00:1A:2B:3C:4D:5E). A helpful way to hold the two apart:
- The IP address is like a postal address — used to route mail across the world, between networks. It can change depending on where you plug in.
- The MAC address is like a name tag on the person — used for hand-to-hand delivery in the room. It stays with the device.
A switch's whole job is efficient hand-to-hand delivery: it learns which device (MAC) sits on which of its ports, and forwards each message only to the correct port instead of shouting to everyone. All the devices a switch connects form one LAN — they can reach each other directly, without a router.
VLANs — one switch, separate networks
A single physical switch can be divided into separate VLANs (Virtual LANs), so that devices plugged into the same switch are kept in different networks and cannot talk directly. This is a first taste of segmentation — deliberately separating groups of machines, say putting staff laptops on one VLAN and servers on another. Consultants routinely review VLAN setups, because weak segmentation lets an attacker who lands on one VLAN wander into others.
In short — a switch moves traffic within one LAN, delivering by MAC address (the device's fixed "name tag", vs the IP "postal address"). VLANs split one switch into separate networks — an early segmentation control.
Quick check
-
What is a MAC address?
The MAC is the card's fixed name tag, used for delivery inside one network. IP addresses work across networks.
-
What does a switch do?
A switch works within one network, delivering by MAC address. Connecting networks is the router's job.
-
Why do organisations put staff laptops and servers on separate VLANs?
VLANs split one switch into separate networks, so a compromised laptop cannot freely reach the servers.
2.7 · Routing — getting between networks
A switch moves traffic within one network. But how does a packet get from your network to a different one — another office subnet, or a website on the internet? That is routing, and the device that does it is a router.
The default gateway
Every device follows one simple rule. When it wants to send a packet, it asks: "is the destination on my own network?" If yes, the switch delivers it locally. If no, it hands the packet to its default gateway — the address of the router that leads out of the local network. The gateway is the door out of your subnet; you saw it if you ran ipconfig earlier (the "Default Gateway" line).
Routing tables and hops
Routers keep a routing table — a list of "to reach this network, send to that next router." A packet may cross several routers to reach its destination; each one is a hop. The tool traceroute (or tracert on Windows) shows you the hops a packet takes. And crucially: if no router in the chain knows a path to the destination network, you get an error like "Network unreachable" or "No route to host." Hold that phrase — it is the difference, in the next section, between "there is no path" and "a firewall is blocking me."
⌨ Try it yourself — see the hops
In a terminal / command prompt: tracert sesmo.in (Windows) or traceroute sesmo.in (Mac/Linux). Each line is one router your packet passed through on the way. The first hop is usually your own default gateway.
In short — routing moves traffic between networks via routers. If a destination is not local, a device sends it to its default gateway; routers pass it hop by hop using their routing tables. No known path → "network unreachable / no route to host".
Quick check
-
What is the "default gateway"?
When the destination is not on your own network, your machine hands the packet to the default gateway.
-
What is the job of a router (vs a switch)?
Routers move traffic between networks using IP. Switches move it within one network using MAC.
-
You try to reach a network and get "No route to host." What does that indicate?
That error comes back fast and means exactly what it says: no path exists — a routing problem, not a firewall.
2.8 · NAT — many private addresses, one public one
Here is the puzzle from section 2.1: private addresses like 192.168.1.20 are not allowed on the public internet, and there are nowhere near enough public IPv4 addresses for every device on Earth. So how does your laptop, on a private address, reach a website? The answer is NAT — Network Address Translation.
Your router performs a neat trick. As a packet leaves your network for the internet, the router rewrites the private source address to its own single public address, and notes the swap in a table. When the reply comes back to the public address, the router looks up the table and rewrites it back to the right private device. Every device in your home shares that one public IP — which is exactly what you saw in the "what is my IP" exercise.
Why a consultant cares
NAT has a side effect that matters constantly. Because internal machines hide behind the router, they are not directly reachable from the internet — someone outside cannot simply connect to 192.168.1.20. To deliberately expose an internal service (say a web server) to the outside, an administrator sets up port forwarding: "traffic arriving at my public IP on port 443, send to 192.168.1.20:443." Understanding this tells you why a scan from the internet sees only the router's public face, while the same scan from inside the network sees the real hosts — and why "which side am I testing from?" is always a fair question.
In short — NAT lets many private addresses share one public IP — the router rewrites addresses and remembers the mapping. A side effect: internal hosts are not directly reachable from outside unless port forwarding exposes them.
Quick check
-
What does NAT do?
The router rewrites private source addresses to its own public one, and reverses the swap on the way back.
-
Why can't someone on the internet directly connect to your laptop at
192.168.1.20?Private addresses are not routable on the internet. Nothing reaches in unless a port is deliberately forwarded.
-
An admin wants an internal web server reachable from the internet. What do they set up?
Port forwarding maps a public IP and port to an internal host and port — and it is a deliberate hole worth reviewing.
2.9 · Segmentation and reachability — why you can't reach that other subnet
This is the section that saves you looking lost on your first internal engagement. You are given access and placed on a subnet — say 10.10.20.0/24. You try to reach a server on a different subnet, 10.10.30.10, and… nothing. A fresher panics or assumes the target is down. A consultant knows there are two very different reasons, and learns to tell them apart.
The two reasons you can't get through
- No route (a routing problem). The two subnets simply are not connected for you — your gateway has no path to
10.10.30.0/24. The tell is an error like "Network unreachable" or "No route to host", usually returned quickly (Module 2.5). - A security boundary (a firewall rule). There is a route, but a firewall sitting between the segments is deliberately dropping your traffic. This is network segmentation used on purpose as a security control. The tell is different: your connection often just hangs and times out (the firewall silently drops the packet), rather than giving an instant "no route".
A third, friendlier response is worth knowing: "Connection refused" usually means you did reach the host, but nothing is listening on that port (or it is politely rejecting) — you have connectivity, just not that service. So three outcomes, three meanings: no route (routing has no path), timeout (likely a firewall dropping you), connection refused (you reached the host, port closed).
Why this is the heart of internal testing
Organisations segment their networks precisely so that a breach in one place does not become a breach everywhere — staff laptops should not freely reach the core banking servers. A big part of an internal engagement is testing exactly that: "from where I landed, what else can I reach, and what is correctly blocked?" When an attacker (or tester) does manage to move from one segment toward another, that movement is called pivoting or lateral movement. Good segmentation, enforced by firewall rules between subnets, is what makes pivoting hard — and reviewing those firewall rules (next section) is how a consultant checks the boundary holds.
In short — being on one subnet does not mean you can reach another. Either there is no route (routing has no path — "network unreachable"), or a firewall is deliberately blocking you (segmentation — usually a silent timeout). "Connection refused" means you reached the host but the port is closed. Testing what you can reach across segments is the core of internal work.
Quick check
-
You are on
10.10.20.0/24and cannot reach a server on10.10.30.10. What are the two main possibilities?Those are the two answers that matter on an internal test: no path exists, or a path exists and is being blocked.
-
Your connection to a port just hangs and eventually times out (no quick error). What does this most suggest?
A silent timeout is the signature of a firewall dropping packets. A closed port answers immediately instead.
-
"Connection refused" usually means…
Refused means you got there — the host answered, but no service was waiting on that port.
-
Moving from the subnet you landed on toward another segment is called…
Pivoting (lateral movement) is moving from the segment you landed on toward another.
2.10 · DHCP and DNS — getting an address, finding a name
Two quiet services run before you do anything at all on a network. One hands your machine an address; the other turns names into addresses. You have never configured either by hand, which is exactly why they are easy to overlook — and both are gold for a tester.
DHCP — how your device gets an address
You have never typed an IP address into your laptop, yet it always has one. DHCP (Dynamic Host Configuration Protocol) is why. When a device joins a network it shouts, in effect, "is anybody handing out addresses?" A DHCP server — usually the router or firewall itself — answers with an offer, the device asks to keep it, and the server confirms. Four steps, and they have a name you will hear: DORA — Discover, Offer, Request, Acknowledge.
The address is a lease, not a gift: it is held for a set time and then renewed, which is why a machine can come back tomorrow with a different address. Servers, by contrast, are usually given a fixed address by hand, precisely so that other machines can rely on finding them.
What matters for you is that DHCP does not hand over an address alone. In that one exchange your machine is also told:
| What DHCP gives you | What it tells a tester |
|---|---|
| An IP address | Where you are standing. |
| A subnet mask | How big your neighbourhood is — how many hosts are next to you. |
| A default gateway | The router's address; the way out of this subnet. |
| A DNS server | Usually an internal server, whose own address hints at the server network. |
Read that column again. Within seconds of plugging into a client's network socket, DHCP has told you your subnet, its size, the router to reach everything else, and the address of a name server that is probably a domain controller. That is the whole opening move of an internal engagement, handed over for free.
The reverse is informative too. If you plug in and get no address, the port is likely protected — many organisations use NAC (network access control, often 802.1X) to refuse unknown devices. Silence is itself a finding, and a good sign the client has done something right.
Watch out — because devices trust the first offer that arrives, a rogue DHCP server planted on a network can hand out its own address as the gateway and quietly sit in the middle of everyone's traffic. It is a classic internal attack and a reason segmentation matters.
DNS — finding a name
You type sesmo.in, not an IP address — yet the network only routes by IP. Something must translate the name into a number. That something is the Domain Name System (DNS): the phone book of the internet. Your machine asks a DNS server "what is the IP for sesmo.in?", gets back an answer like 198.51.100.24, and only then connects. DNS mostly runs on port 53.
Protocols you will keep meeting
A protocol is just an agreed set of rules for a conversation. A small handful come up again and again:
- HTTP / HTTPS — the language of the web (Module 3). HTTPS is HTTP wrapped in encryption.
- SSH — an encrypted terminal login to a remote server.
- DNS — name-to-IP lookups, as above.
- SMTP — the protocol that carries email between mail servers.
- DHCP — hands out IP addresses automatically, as above.
You will not memorise every rule. The goal is recognition: when a report says "the finding is in the SMTP service" or "DNS was misconfigured," you know which conversation is meant.
⌨ Try it yourself — do a DNS lookup
In a terminal type nslookup sesmo.in. You will see the name resolve to one or more IPs — by hand, what your browser does silently before every page load.
In short — DHCP leases your machine an address and, with it, the subnet mask, gateway and DNS server — an instant map of where you are. DNS is the phone book that turns names into IP addresses (port 53). A protocol is an agreed conversation; HTTP/S, SSH, DNS, SMTP and DHCP are the ones you meet most.
Quick check
-
What does DNS do?
DNS maps human-friendly names to the IP addresses the network routes to.
-
Besides an IP address, what else does DHCP hand your machine?
One DHCP exchange tells you the size of your subnet, the way out of it, and a name server worth looking at — the opening map of an internal test.
-
You plug into a client's network port and receive no address at all. Most likely?
No lease usually means network access control (802.1X) is turning your device away — which is the network behaving as it should.
-
Which protocol gives an encrypted terminal login to a remote server?
SSH is the encrypted remote-login protocol (port 22). SMTP carries email; DNS resolves names.
-
What is a "protocol"?
A protocol is simply an agreed conversation — rules both ends follow so they understand each other.
2.11 · Config files and firewall rules
You have now met the three devices that hold a network together — the switch (within a network), the router (between networks), and the firewall (the security boundary that enforces segmentation). Every one of them is controlled by a configuration file — usually just called the config: a text file listing addresses, passwords, routes, VLANs, and rules. On a router or firewall you will hear the phrase running-config — the live configuration currently in effect. "Grab the running-config" means export that text so it can be reviewed.
Config review and firewall-rule review
Reading these files is genuine consulting work. A config review reads a device's config against a security standard and flags weak settings — default passwords still in place, management left unencrypted, risky features switched on. And because a firewall's config is largely a list of rules — each saying "allow traffic from this source, to this destination, on this port — or deny it" — a firewall rule review reads that list for holes: a rule that permits far too much, a forgotten "allow any" at the top that quietly overrides everything below, or the very segmentation gaps from section 2.9 (a path that should be blocked but isn't). You do not need to write these rules yet; you need to know they exist, live in a config file, and that reading them is a task you may be handed on day one.
In short — switches, routers and firewalls are all driven by config files (the running-config). Reviewing those configs — and especially a firewall's allow/deny rules — is real consulting work, and it is how the segmentation boundaries from 2.7 are checked.
Quick check
-
A team lead asks you to "pull the running-config" from a firewall. What are they asking for?
The running-config is the device's live configuration in text form — exactly what a config review reads.
-
What does a "firewall rule review" involve?
A rule review reads the allow/deny list line by line, looking for rules that are too broad, duplicated or dead.
-
Which three devices, each with a config a consultant might review, hold a network together?
Switch (within a network), router (between networks), firewall (the security boundary) — each driven by a config.
Module 2 glossary
- IP address
- A device's routable address, e.g.
10.10.10.2(four bytes in IPv4). - Private vs public IP
- Private ranges (10.x, 172.16–31.x, 192.168.x) stay inside networks; public IPs face the internet.
- Hub / switch / router
- Repeats traffic to every port (obsolete) / connects devices inside one network / connects networks to each other.
- Firewall
- Allows or blocks traffic at a boundary according to a rule list.
- DMZ
- A walled-off pocket holding machines the internet must reach, kept out of the internal network.
- OSI model
- Seven layers describing a network journey — 7 application, 4 transport, 3 network, 2 data link, 1 physical.
- TCP/IP model
- The four-layer version the internet is actually built on: application, transport, internet, link.
- DHCP
- Leases a device its IP address plus subnet mask, default gateway and DNS server (Discover, Offer, Request, Acknowledge).
- DNS
- Turns a name such as
sesmo.ininto an IP address. Port 53. - Port
- A numbered doorway selecting a service (80/443 web, 22 SSH, 3389 RDP).
- TCP / UDP
- Reliable connection (phone call) vs fast fire-and-forget (posted letter).
- Subnet / CIDR
- A block of addresses;
/24= 256,/16= 65,536,/32= one host. - Switch / MAC address
- Connects devices within one LAN, delivering by MAC (the device's fixed hardware "name tag").
- VLAN
- A virtual split of one switch into separate networks — a segmentation control.
- Router / default gateway
- Moves traffic between networks; the gateway is the router a device sends non-local traffic to.
- Routing table / hop
- A router's list of paths to networks; each router crossed is one hop.
- NAT / port forwarding
- Many private IPs share one public IP; port forwarding exposes one internal service outward.
- Segmentation
- Deliberately separating groups of machines so a breach in one does not spread.
- Pivoting / lateral movement
- Moving from the segment you landed on toward another.
- Config (running-config)
- The text file that sets up a device; reviewing it is "config review".
Recap — what you can now do
- Explain how a message finds a machine (IP) and a service (port), and read CIDR scope.
- Name the devices in a network diagram — hub, switch, router, firewall, AP, load balancer, WAF — and say what a DMZ is for.
- Place a problem at the right OSI layer, and map the seven OSI layers onto the four of TCP/IP.
- Describe switching within a LAN (MAC, switch, VLAN) and routing between networks (gateway, routes, hops).
- Explain NAT and why internal hosts aren't reachable from outside without port forwarding.
- Reason about reachability: no route vs a firewall boundary vs connection refused — and what segmentation and pivoting mean.
- Explain how DHCP hands you an address and a map of the network, say what DNS does, name the core protocols, and describe config and firewall-rule reviews.
End-of-module quiz
-
Which device moves traffic between different networks?
Routers connect networks (by IP); switches connect devices within one network (by MAC).
-
Your whole home shares one public IP address. Which technology makes that possible?
NAT rewrites many private addresses to one public address at the router.
-
You are dropped on a subnet and a connection to another segment simply times out. Most likely cause?
A silent timeout points to a firewall dropping packets — a deliberate security boundary, versus an instant no-route error.
-
Why do organisations segment their networks?
Segmentation contains breaches. Testing what you can reach across segments — and reviewing the firewall rules — is core internal work.