Based on the Linux Master 1 exam syllabusReport an error
arp (2); if it's unreachable, ping (3); if a port isn't open, ss (4); if a name won't resolve, dig (7).ip, ifconfig, editing resolv.conf directly) vs permanent (ifcfg, nmcli con mod) is the biggest exam point of this week.| Layer | Address/unit | Device | Protocols | Diagnostic tools |
|---|---|---|---|---|
| 7 Application | Data | L7 switch | HTTP, DNS, DHCP, SSH | dig, nslookup |
| 4 Transport | Port/segment | L4 switch | TCP, UDP | ss, netstat |
| 3 Network | IP/packet | Router | IP, ICMP | ping, traceroute |
| 2 Data Link | MAC/frame | Switch, bridge | ARP, Ethernet | arp, ip neigh |
| 1 Physical | Bit | Hub, repeater | — | (check cables and links) |
Points to lock into memory:
If you first ask "which layer is this problem at?", the inspection tool is chosen automatically. If the MAC won't resolve, arp (2); if it's unreachable, ping (3); if a port isn't open, ss (4); if a name won't resolve, dig (7). The layer is the navigation for diagnosis.
| Class | First octet | Default mask | Private range |
|---|---|---|---|
| A | 1~126 | /8 (255.0.0.0) | 10.0.0.0/8 |
| B | 128~191 | /16 (255.255.0.0) | 172.16.0.0/12 |
| C | 192~223 | /24 (255.255.255.0) | 192.168.0.0/16 |
Points to lock into memory:
⚠️ Trap review: 169.254.x.x is not a private IP but APIPA (link-local) and is a signal that "no DHCP server was found". 172.32.x.x is outside the private range (16-31) and is a public IP. These two boundaries easily become traps.
| Calculation | Formula |
|---|---|
| Usable hosts | 2^(host bits) − 2 |
| Network address | Largest multiple of the block size that is at most the IP |
| Broadcast address | Next network address − 1 (the last address of the block) |
# Example: analyzing 192.168.1.200/26
# /26 → 6 host bits → 2^6 - 2 = 62 hosts, block size 64
# Among multiples of 64 (0,64,128,192), the largest at most 200 = 192
Network address : 192.168.1.192
Usable range : 192.168.1.193 ~ 192.168.1.254
Broadcast : 192.168.1.255Key distinction: the −2 in the host count is because the network address (all host bits 0) and the broadcast (all 1s) cannot be given to hosts. /30 gives 2 hosts (router-to-router links), /29 gives 6, /28 gives 14, /26 gives 62. You should be able to answer these values instantly.
| Task | Temporary (lost on reboot) | Permanent |
|---|---|---|
| Assign IP | ip addr add / ifconfig | ifcfg-eth0 / nmcli con mod |
| Gateway | ip route add default | GATEWAY in ifcfg |
| DNS | Editing resolv.conf directly (risk of being overwritten) | DNS1/2 in ifcfg / nmcli ... ipv4.dns |
⚠️ Trap review: in a NetworkManager environment, a direct edit to resolv.conf disappears on reboot or restart. With ONBOOT=no, the interface does not come up after boot even if the settings are right. You must distinguish "temporary is ip/ifconfig, permanent is ifcfg/nmcli".
ping 127.0.0.1 # 1. Is the TCP/IP stack OK?
ping 192.168.1.1 # 2. Gateway (L2/L3)?
ping 8.8.8.8 # 3. External IP (routing/firewall)?
ping google.com # 4. DNS?
ss -tlnp # 5. Local service ports?The step at which it first gets blocked is the location of the problem. If 3 works and 4 fails, it is DNS; if 2 works and 3 fails, it is routing/firewall beyond the gateway. "IP works but the domain doesn't" = a definitive DNS signal.
| Port | Protocol | Port | Protocol |
|---|---|---|---|
| 22 | SSH (encrypted) | 53 | DNS (UDP/TCP) |
| 23 | Telnet (plaintext) | 67/68 | DHCP |
| 25 | SMTP | 80 | HTTP |
| 21 | FTP | 443 | HTTPS |
The first questions of real-world troubleshooting are exactly this week's content — "Is the IP right (Day 1-2), can we reach the gateway (Day 2-3), does DNS resolve (Day 2-3), which layer's device is the problem (Day 4)". Network outages can usually be narrowed down to a cause by checking these four in turn. This week is the foundation of practical networking, beyond just the exam.
ip, ifconfig) / settings that remain in files (ifcfg, nmcli).ONBOOT: the ifcfg entry that decides whether to bring the interface up automatically at boot. If no, the network doesn't come up.Click a choice to reveal the answer and explanation.
Question 1
In the OSI 7 layers, which is correct about the layer where a router operates and its core function?
Question 2
How many usable hosts are there in the 192.168.10.0/27 network?
Question 3
Which gives the correct network address and broadcast address of the network that IP address 10.1.1.100/26 belongs to?
Question 4
Which of the following is NOT a private IP address?
Question 5
Which is the correct way to configure a static IP that persists after reboot on a Red Hat-family system?
Question 6
Which command shows the TCP ports currently in LISTEN together with the processes holding them?
Question 7
ping 8.8.8.8 succeeds but ping google.com fails. Which gives the correct cause and tool to check?
Question 8
Which Layer 1 device forwards received frames to all ports and shares a collision domain?
Question 9
Which gives the correct DHCP address assignment process (DORA) and the ports used?
Question 10
Which redundancy bonding mode combines two NICs, normally uses only one, and automatically switches to the other NIC on failure?
Question 11
Which gives the protocol that finds the MAC corresponding to an IP when hosts on the same subnet communicate, and its scope of operation?
Question 12
Which statement about a CIDR /29 network is correct?