CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
  • Week 1
    • 1.Operating Systems and Linux: What the Kernel Does
    • 2.Free Software and Distributions: The Ecosystem Built by Licenses
    • 3.Installation and Booting: From the Moment You Power On
    • 4.Filesystem Structure and File Types: Everything Is a File
    • 5.Week 1 Comprehensive Review: Time to See Through the Concepts
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
    • 1.Networking Basics: The OSI 7 Layers and IP Address / Subnet Calculation
    • 2.Network Configuration: Setting Up Interfaces, Gateways, and DNS by Hand
    • 3.Network Diagnostics: Commands That Narrow Down the Problem, from ping to tcpdump
    • 4.Network Devices, Protocols, and Redundancy: Infrastructure Threaded Together by Layers
    • 5.Week 8 Comprehensive Review: Threading Networking Together on a Single Layer Map
  • Week 9
  • Week 10
  • Week 11
  • Week 12
  • Week 13
  • Week 14
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← Linux Master 1/Week 8/Day 1

Based on the Linux Master 1 exam syllabus·Report an error

Linux Master 1· AssociateWeek 8 · Day 1~25 min read

Day 1 - Networking Basics: The OSI 7 Layers and IP Address / Subnet Calculation

📌 Key Takeaways

  • Network troubleshooting boils down to two questions: "At which layer is it blocked?" (the layer model) and "Which network does it belong to?" (subnet calculation).
  • Memorize the address and device for each layer as a set: Layer 2 = MAC / switch, Layer 3 = IP / router, Layer 4 = port / TCP and UDP.
  • TCP is connection-oriented and reliable (3-way handshake); UDP is connectionless and fast. Header sizes are 20 bytes vs 8 bytes.
  • IP classes are decided by the first octet (A 1-126, B 128-191, C 192-223). 127 is loopback, and 169.254 is APIPA = a sign that DHCP failed.
  • Usable hosts = 2^(host bits) − 2. The network address is "the largest multiple of the block size that is less than or equal to the IP", and the broadcast address is the last address of that block.

The OSI 7 Layers — Splitting Communication into 7 Responsibilities

  • Network communication is not a single lump; it is a stack of 7 layers, each doing a different job.
  • Encapsulation: on the sending side, data moves from the top (Layer 7) down to the bottom (Layer 1), and each layer adds its header.
  • Decapsulation: on the receiving side, data moves from the bottom up, and the headers are stripped off.
LayerNameCore responsibilityData unit (PDU)Typical devices / protocols
7ApplicationProvides user servicesDataHTTP, FTP, SMTP, DNS
6PresentationEncoding, encryption, compressionDataSSL/TLS, JPEG, ASCII
5SessionEstablishing, maintaining, and ending connectionsDataNetBIOS, RPC
4TransportEnd-to-end reliability, portsSegmentTCP, UDP
3NetworkLogical addressing, routingPacketIP, ICMP, router
2Data LinkPhysical addressing, frames, error controlFrameEthernet, MAC, switch
1PhysicalTransmitting bits as electrical signalsBitCable, hub, repeater

Mnemonic: "All People Seem To Need Data Processing" (7→1: Application, Presentation, Session, Transport, Network, Data link, Physical). For 1→7, use "Please Do Not Throw Sausage Pizza Away". The exam has questions that ask about layer order.

Key distinction: pair each layer number with that layer's address and device. Layer 2 = MAC address / switch, Layer 3 = IP address / router, Layer 4 = port number / TCP and UDP. "Which layer is a MAC address?" → Layer 2. "Which layer is a router?" → Layer 3. This mapping is the root of the Day 4 device questions.

The TCP/IP 4 Layers — The Model the Real Internet Uses

  • OSI is a theoretical reference model, while the real Internet runs on the simpler TCP/IP 4-layer model.
  • The TCP/IP 4 layers are a form that merges several OSI layers.
TCP/IP layerCorresponding OSI layersTypical protocols
Application7, 6, 5HTTP, FTP, DNS, SMTP, SSH
Transport4TCP, UDP
Internet3IP, ICMP, ARP
Network Access2, 1Ethernet, ARP

TCP/IP is the "practical model" that developed through real implementation on the US ARPANET in the 1970s, while OSI is the "theoretical model" standardized by ISO in 1984. The real Internet is dominated by TCP/IP, but the 7 layers are more precise as a language for analyzing problems, so both are used. The exam asks about the correspondence between the OSI 7 layers and the TCP/IP 4 layers.

TCP vs UDP — The Two Faces of Layer 4

  • The transport layer has two protocols with opposite personalities.
ItemTCPUDP
Connection methodConnection-oriented (3-way handshake)Connectionless
ReliabilityGuaranteed (retransmission, ordering, flow control)Not guaranteed
SpeedRelatively slowFast
Header size20 bytes8 bytes
UsesWeb, email, file transferDNS, streaming, VoIP

TCP's 3-way handshake establishes a connection in 3 steps: SYN → SYN/ACK → ACK. Connection teardown is a 4-way exchange (two FIN/ACK pairs). UDP just sends with no such procedure — so it is fast but gives no delivery guarantee. Summarize it as "reliability = TCP, speed = UDP".

IP Address Classes — 5 Grades Split by the First Octet

  • An IPv4 address divides 32 bits into 4 groups of 8 bits (octets) and is written with dots (e.g., 192.168.0.1).
  • In the past, the class was determined by the value of the first octet, which set the boundary between the network and host portions.
ClassFirst octet rangeDefault subnet maskNetwork/host bitsUse
A1 ~ 126255.0.0.0 (/8)8 / 24Large
B128 ~ 191255.255.0.0 (/16)16 / 16Medium
C192 ~ 223255.255.255.0 (/24)24 / 8Small
D224 ~ 239None—Multicast
E240 ~ 255None—Research / reserved

⚠️ Trap: first octet 127 (127.0.0.0/8) looks like it falls within the Class A range, but it is reserved for loopback and is not assigned to ordinary hosts. That is why the practical Class A range is written as 1-126. 127.0.0.1 is the machine itself (localhost).

  • Also memorize the private IP ranges (addresses used only inside internal networks, not routed directly on the Internet).
ClassPrivate IP range
A10.0.0.0 ~ 10.255.255.255 (10.0.0.0/8)
B172.16.0.0 ~ 172.31.255.255 (172.16.0.0/12)
C192.168.0.0 ~ 192.168.255.255 (192.168.0.0/16)

Key distinction: 169.254.x.x is not a private IP; it is an APIPA (link-local) address. It is an address a host assigns itself when it cannot find a DHCP server, so "the IP starts with 169.254 but the Internet doesn't work" = a sign that DHCP failed. This concept is used both in practice and on the exam.

Subnet Mask and CIDR — The Boundary Between Network and Host

  • A subnet mask is a 32-bit value that tells you where the network portion of an IP address ends and the host portion begins.
  • The bits filled with 1 are the network; the bits that are 0 are the host.
# 255.255.255.0 in binary
11111111.11111111.11111111.00000000
#  └─────── network (24 bits) ──────┘ └ host (8 bits) ┘
  • CIDR notation writes the number of 1s after a slash. /24 = 24 leading 1s in the mask = 255.255.255.0.
CIDRSubnet maskLast octet in binaryBlock size
/24255.255.255.000000000256
/25255.255.255.12810000000128
/26255.255.255.1921100000064
/27255.255.255.2241110000032
/28255.255.255.2401111000016
/29255.255.255.248111110008
/30255.255.255.252111111004

A mask octet value is the result of filling that many 1s from the left. 128 = one 1, 192 = two, 224 = three, 240 = four, 248 = five, 252 = six. If you memorize the sequence "128 192 224 240 248 252 254 255", you can instantly convert any CIDR to a mask.

Subnet Calculation — Host Count, Network Address, Broadcast

  • This is the heart of the practical exam. Learn the hand calculation by breaking it into steps.

1) Usable hosts = 2^(host bits) − 2

  • Why subtract 2: because the network address (all host bits 0) and the broadcast address (all host bits 1) are removed.
  • These two cannot be assigned to hosts.
# /24 → 8 host bits → 2^8 - 2 = 254 hosts
# /26 → 6 host bits → 2^6 - 2 = 62 hosts
# /30 → 2 host bits → 2^2 - 2 = 2 hosts (for router-to-router links)

2) Finding the network and broadcast addresses (example: 192.168.1.0/26)

  • /26 has a block size of 64. The last octet splits subnets in units of 0, 64, 128, and 192.
# The first subnet of 192.168.1.0/26
Network address     : 192.168.1.0      (all host bits 0)
First usable address: 192.168.1.1
Last usable address : 192.168.1.62
Broadcast           : 192.168.1.63     (all host bits 1)
# The next subnet is 192.168.1.64/26, then 192.168.1.128/26 ...

Key distinction: the network address of the network an IP belongs to is "the largest multiple of the block size that is less than or equal to the IP". Example: 192.168.1.100/26 has block size 64 → among multiples of 64 (0, 64, 128, 192), the largest that is at most 100 is 64 → network address 192.168.1.64, broadcast 192.168.1.127. You need this calculation on the practical exam.

3) Try it yourself — verify with ipcalc

# ipcalc shows the subnet calculation automatically (install it if missing)
ipcalc 192.168.1.100/26
# Network:   192.168.1.64/26
# HostMin:   192.168.1.65
# HostMax:   192.168.1.126
# Broadcast: 192.168.1.127
# Hosts/Net: 62
  • If you get into the habit of calculating by hand first and then checking with ipcalc, you can solve problems quickly and accurately in the exam room even without tools.

⚠️ Trap: "/31" has only 1 host bit, so 2^1−2 = 0 and it normally cannot hold any hosts, but under RFC 3021 it is an exception on point-to-point links between routers, where both addresses are used. On the exam, the standard is questions that apply the −2 formula, such as "/30 holds 2 hosts, /29 holds 6".

Starting tomorrow (Day 2), ip addr, gateways, and routing all operate on top of the Layer 3 foundation we built today.

📖 Glossary

  • Encapsulation / decapsulation: headers being added as data moves down through the layers / being stripped as it moves up.
  • PDU: the unit of data each layer handles. Layer 4 is a segment, Layer 3 is a packet, Layer 2 is a frame, Layer 1 is a bit.
  • MAC address: the Layer 2 physical address. A unique number burned into the device, used only within the same network.
  • 3-way handshake: the 3-step procedure by which TCP establishes a connection: SYN → SYN/ACK → ACK. Teardown is two FIN/ACK pairs (4-way).
  • Octet: an 8-bit group that makes up an IPv4 address. The 32 bits are divided into four chunks.
  • Loopback (127.0.0.1): an address that refers to the machine itself. It lies within the Class A range but is not assigned to hosts.
  • Private IP: an address used only inside internal networks and not routed to the Internet (10/8, 172.16-31, 192.168).
  • APIPA (169.254.x.x): a link-local address a host assigns itself when it cannot find a DHCP server. A sign that the Internet won't work.
  • Subnet mask: a 32-bit value that marks the boundary between the network and host portions of an IP. 1 is network, 0 is host.
  • CIDR (/24): notation that writes the number of 1s in the mask after a slash. /24 means 255.255.255.0.
  • Block size: the interval at which subnets are divided for that CIDR. For /26 they break every 64 (0, 64, 128, 192).
  • Network address / broadcast address: the address with all host bits 0 / the address with all host bits 1. Neither can be given to a host.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Which of the OSI 7 layers determines the path of a packet (routing) based on its IP address?

Question 2

How many usable IP addresses (assignable to hosts) are there in the 192.168.10.0/26 network?

Question 3

What is the broadcast address of the network that the IP address 172.20.5.130/25 belongs to?

Question 4

Which of the following is NOT a private IP address?

Question 5

Which statement about TCP and UDP is correct?

Question 6

Which is the correct subnet mask for CIDR notation /28?

Question 7

A host's IP is automatically set to 169.254.12.34 and the Internet does not work. What is the most likely cause?

PreviousVirtualization Management: Using One Server Like Many with Hypervisors, KVM, and ContainersWeek 7 · Day 6Next Network Configuration: Setting Up Interfaces, Gateways, and DNS by HandWeek 8 · Day 2

Official references

  • Linux Master 1 official exam syllabus(opens in a new tab)

On this page

  • Key Takeaways
  • The OSI 7 Layers — Splitting Communication into 7 Responsibilities
  • The TCP/IP 4 Layers — The Model the Real Internet Uses
  • TCP vs UDP — The Two Faces of Layer 4
  • IP Address Classes — 5 Grades Split by the First Octet
  • Subnet Mask and CIDR — The Boundary Between Network and Host
  • Subnet Calculation — Host Count, Network Address, Broadcast
  • Glossary
  • Practice Questions