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
  • Week 1
    • 1.Operating Systems and the Kernel: What Linux Does
    • 2.The Birth of Linux: From Unix to Linus
    • 3.Free Software and Open Source: What a License Decides
    • 4.Distributions: The Unit That Bundles the Kernel and Tools for Sale
    • 5.Week 1 Review: The Identity Behind the Name Linux
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
  • Week 9
    • 1.The OSI 7 Layers and TCP/IP
    • 2.Communication Methods and Network Technologies
    • 3.IP Addresses and Subnet Calculation
    • 4.Network Configuration and Commands
    • 5.Week 9 Review: The Network on One Page
  • Week 10
  • Week 11
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
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 2/Week 9/Day 5

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

Linux Master 2· AssociateWeek 9 · Day 5~19 min read

Day 5 - Week 9 Review: The Network on One Page

📌 Key Takeaways

  • The OSI 7 layers, bottom to top — Physical, Data Link, Network, Transport, Session, Presentation, Application. A router is Layer 3, a switch is Layer 2, a hub is Layer 1.
  • CD is for wired (Ethernet), CA is for wireless (Wi-Fi).
  • An ATM cell is 53 bytes, and FDDI is a dual fiber-optic ring with token passing.
  • 254 · 126 · 62 · 30 · 14 · 6 · 2 — the host-count row for Class C subnets.
  • hosts is where you write down the answers, resolv.conf is where you write down whom to ask.

The Network on One Page

   OSI 7 layers                     TCP/IP        Device        Unit
   ─────────────────────────────────────────────────────────────────
   7 Application  HTTP·FTP·SMTP·DNS  ┐
   6 Presentation Encryption·compression ├─ Application  Gateway  Data
   5 Session      Connection mgmt    ┘
   4 Transport    TCP · UDP · ports  ── Transport      Gateway     Segment
   3 Network      IP · ICMP · ARP    ── Internet       Router      Packet
   2 Data Link    MAC · Ethernet     ┐
   1 Physical     Cable·signal       ┘─ Network Access Switch/Hub  Frame/Bit
 
   Ports  21 FTP · 22 SSH · 23 TELNET · 25 SMTP · 53 DNS
          80 HTTP · 110 POP3 · 143 IMAP · 443 HTTPS
 
   Switching  Circuit switching (PSTN, dedicated path) ↔ Packet switching (PSDN, cut into pieces)
              Packet switching = Datagram (connectionless) + Virtual circuit (connection-oriented)
 
   Access  CSMA/CD wired · CSMA/CA wireless · Token passing (Token Ring·FDDI)
 
   WAN    X.25 → Frame Relay → ATM (fixed 53-byte cell)
          FDDI fiber dual-ring token passing · DQDB MAN (802.6)
 
   IEEE   802.3 Ethernet · 802.5 Token Ring · 802.6 DQDB · 802.11 Wireless LAN
 
   Addr   A 1~126 · B 128~191 · C 192~223 · D 224~239 (multicast)
          Private 10.x · 172.16~31.x · 192.168.x · Loopback 127.0.0.1
          Hosts = (256 − mask) − 2

Subnet Calculation One More Time

Mask/NotationBlockHosts
255.255.255.0/24256254
255.255.255.128/25128126
255.255.255.192/266462
255.255.255.224/273230
255.255.255.240/281614
255.255.255.248/2986
255.255.255.252/3042
   256 − last value of the mask = block size
   block size − 2 = number of usable hosts
   256 ÷ block size = number of subnets

Same IP, Different Mask

Keep the IP fixed at 192.168.1.130 and change only the mask. You can see at a glance that the longer the mask, the narrower the network the address belongs to.

MaskBlockNetwork addressBroadcast addressHost rangeCount
/25128.128.255.129 ~ .254126
/2664.128.191.129 ~ .19062
/2732.128.159.129 ~ .15830
/2816.128.143.129 ~ .14214
/298.128.135.129 ~ .1346
/304.128.131.129 ~ .1302
  • With every mask, 130 falls into the block that starts at 128, so the network address came out the same. What changes is the end of the block. The broadcast address is always network address + block size − 1.
  • /30 has exactly 2 hosts. It is the smallest subnet, used for a segment that links two devices one-to-one.

Are Two Addresses in the Same Subnet?

Two addressesMaskBoundaryVerdict
192.168.1.60 and 192.168.1.70/25 (block 128)Both within 0 ~ 127Same subnet — direct communication
192.168.1.60 and 192.168.1.70/26 (block 64)60 is in 0 ~ 63, 70 is in 64 ~ 127Different subnets — a router is needed
192.168.1.100 and 192.168.1.126/27 (block 32)Both within 96 ~ 127Same subnet
192.168.1.126 and 192.168.1.127/27 (block 32)127 is the broadcast address of that block127 cannot be assigned to a host
  • Numbers that are close can still be different networks if a boundary lies between them. 60 and 70 differ by only 10, but under /26 the boundary at 64 separates them.
  • When you are given an address, first check that it is not the first (network) or last (broadcast) address of its block. Questions that ask you to pick "an address that cannot be assigned to a host" take this form.

Threading Four Days Through One Connection

This is what happens when you type www.example.com into a browser on a computer whose IP is 192.168.0.10/24 and whose default gateway is 192.168.0.1.

   1  Name → IP          Check /etc/hosts; if it is not there, ask the DNS server (port 53) in /etc/resolv.conf
                         → receive 93.184.216.34                              (Day 4)
   2  Inside or outside?  My network is 192.168.0.0 ~ 192.168.0.255. 93.x is outside
                         → send it to the default gateway 192.168.0.1          (Days 3·4)
   3  IP → MAC           Find the gateway's MAC with ARP                       (Day 1)
   4  Encapsulation       Send it out as a [ MAC | IP | TCP | data ] frame      (Day 1)
   5  Path selection      Routers look at the IP and pass the packet to the next hop (Day 2, packet switching)
   6  Connect and request TCP 3-way handshake, then an HTTP request to port 80  (Day 1)
If this step breaksSymptom you seeWhat to check
1It works by IP but not by name/etc/resolv.conf, nslookup
2Hosts on the same network work but the outside does notThe default line of ip route
3You cannot even reach the device right next to youCable, arp -n, IP and mask
6ping works but only that one service does notWhether the other side's port is open — netstat -tulpn
  • Three kinds of addresses are nested inside one frame. The port means "which program", the IP means "which computer", and the MAC means "which device is the very next hop".
  • That is why the destination IP stays the same all the way, while the MAC changes to the next segment's each time the packet passes a router. It is also why step 3 looks for the gateway's MAC, not the server's.
  • A switch looks only at the MAC in step 4, while a router opens up to the IP in step 5. A device's layer = the layer of the header it opens.

Putting Commands on the Layers

CommandWhat it showsLayer · address it touches
ethtoolLink status, speedLayer 1
arp · ip neighIP ↔ MAC tableLayer 2 — MAC
ifconfig · ip addrInterface IP and MACLayers 2·3
route · ip routeRouting table, default gatewayLayer 3 — IP
ping · tracerouteReachability, pathLayer 3 — ICMP
netstat · ssOpen ports, connectionsLayer 4 — port
nslookup · dig · hostName ↔ IPLayer 7 — DNS
  • Sweeping from bottom to top gives you a troubleshooting order as is. Is the cable attached → is an address assigned → is there a route → is the port open → does the name resolve?

Comparing Easily Confused Pairs

ItemABDistinguishing criterion
OSI vs TCP/IP7 layers, theory4 layers, practicePurpose
Switch vs routerLayer 2, MACLayer 3, IPAddress it looks at
MAC vs IPHardware, fixedConfigured, changeableWhere it is engraved
TCP vs UDPReliable, connection-orientedFast, connectionlessWhat it prioritizes
Circuit vs packet switchingPSTN, dedicatedPSDN, split upPath occupancy
Datagram vs virtual circuitConnectionlessConnection-oriented, order keptWhether the path is fixed
CSMA/CD vs CAWired, detectionWireless, avoidanceMedium
X.25 vs Frame RelayMore error checking, slowTrimmed down, fastAssumes good line quality
Class A vs C1~126192~223First octet
/etc/hosts vs resolv.confName↔IP answersDNS servers to askWhat gets written
ifconfig vs ipOld net-toolsCurrent iproute2Generation
ping vs tracerouteCan I reach it?Where does it get blocked?What it tells you

Commonly Missed Points

  1. "Layer 5 is Transport" → Layer 4 is Transport; Layer 5 is Session.
  2. "A switch is Layer 3" → It is Layer 2. Layer 3 is the router.
  3. "UDP guarantees reliability" → It does not. TCP does.
  4. "CSMA/CA is wired" → CA is wireless, and CD is wired.
  5. "An ATM cell is 48 bytes" → It is 53 bytes. 48 is only the data portion.
  6. "127 is Class A" → It is left out of the range. It is reserved for loopback.
  7. "All of 172.x is private IP" → Only 172.16 ~ 172.31 is.
  8. "255.255.255.192 means 64 hosts" → It is 62. You must subtract 2.
  9. "A mask like 255.255.255.100" → It cannot exist. The 1 bits must be contiguous from the left.
  10. "Write the DNS server in /etc/hosts" → It goes in /etc/resolv.conf.
  11. "IPv6 is 64 bits" → It is 128 bits. IPv4 is 32 bits.

Telling Look-Alike Names Apart

Look-alikesOne line to tell them apart
ISO / OSIISO is the organization, OSI is the 7-layer model that organization made
IEEE / IETFIEEE sets the 802 (LAN) standards, IETF produces RFCs (Internet protocols)
IANA / ICANNBoth manage addresses and names. IANA does the hands-on number assignment, ICANN oversees
PSTN / PSDNT is telephone (circuit switching), D is data (packet switching)
ARP / RARPIP → MAC / MAC → IP
FDDI / DQDBDual ring (fiber) / dual bus (MAN)
Token Ring / FDDIBoth use token passing. 802.5 / fiber dual ring
Hub / SwitchFloods to everyone (Layer 1) / looks at the MAC and sends only to that port (Layer 2)
Network address / Broadcast addressAll host bits 0 / all host bits 1
netstat -r / netstat -iRouting table / interface statistics
ip addr / ip linkHandles addresses / turns devices on and off

Telling Look-Alike Numbers Apart

NumberConfusing pairHow to tell them apart
4848 data bytes of an ATM cell / 48-bit MAC addressDifferent units — bytes vs bits
5353-byte ATM cell / DNS port 53The same number by coincidence
64 / 62Address count / host count of /26Whether you subtracted 2
126Last first octet of Class A / host count of /25Range vs count
127Loopback rangeThe value missing between A and B
802.3 / 802.5 / 802.11Ethernet / Token Ring / wireless LAN3 is wired CSMA/CD, 11 is wireless CSMA/CA

Values That Appear on the Exam as They Are

ValueWhat it is
7 / 4Number of OSI layers / number of TCP/IP layers
53 bytesATM cell size
62Host count of /26 (255.255.255.192)
32 / 128 bitsIPv4 / IPv6 address length
48 bitsMAC address length
127.0.0.1Loopback
0~1023Well-known port range
22 / 23 / 25 / 53 / 80 / 110SSH / TELNET / SMTP / DNS / HTTP / POP3

Next week is Internet services. It covers the web, mail, DNS, remote access, and file sharing. 20 of the 32 Linux Usage questions come from this area, so it carries the greatest weight.

📖 Glossary

  • OSI 7 layers : A reference model that divides communication into seven stages, from Physical to Application.
  • CSMA/CD : The wired Ethernet method that detects collisions and retransmits.
  • ATM : A transmission method that uses fixed 53-byte cells.
  • Subnet mask : A value that separates the network portion from the host portion.
  • Private IP : Addresses used only inside an internal network. The 10, 172.16~31, and 192.168 ranges.
  • Default gateway : The router that traffic leaving the network passes through.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

In the OSI 7 layers, which layer does a switch operate at?

Question 2

Which medium access control method is used in wireless LANs?

Question 3

Which of the following is the loopback address that points to the host itself?

Question 4

When the subnet mask 255.255.255.224 is applied to a Class C network, how many usable hosts does one subnet have?

Question 5

What is the default port number of SMTP, which is used to send mail?

Question 6

Which of the following is not in a private IP address range?

PreviousNetwork Configuration and CommandsWeek 9 · Day 4Next The Web and MailWeek 10 · Day 1

Official references

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

On this page

  • Key Takeaways
  • The Network on One Page
  • Subnet Calculation One More Time
  • Same IP, Different Mask
  • Are Two Addresses in the Same Subnet?
  • Threading Four Days Through One Connection
  • Putting Commands on the Layers
  • Comparing Easily Confused Pairs
  • Commonly Missed Points
  • Telling Look-Alike Names Apart
  • Telling Look-Alike Numbers Apart
  • Values That Appear on the Exam as They Are
  • Glossary
  • Practice Questions