Based on the Linux Master 1 exam syllabusReport an error
| Device | Operating layer | Core function | Limits / characteristics |
|---|---|---|---|
| Repeater | 1 (Physical) | Amplifies and regenerates weakened signals | Only boosts the signal, no ability to discriminate |
| Hub | 1 (Physical) | Distributes the signal to multiple ports | Sends received signals out all ports (broadcast), shares a collision domain |
| Bridge | 2 (Data Link) | Connects segments by MAC | Separates collision domains (software processing, slow) |
| Switch | 2 (Data Link) | Learns MAC addresses and forwards only to the matching port | Separates collision domains per port (hardware, fast) |
| Router | 3 (Network) | Determines paths between networks by IP | Separates broadcast domains, connects different networks |
| L4/L7 switch | 4-7 | Load balancing based on port and application | Acts as a load balancer |
The key comparison is hub vs switch. A hub spreads each received frame to all ports (shared bandwidth, collisions occur), which is inefficient, while a switch learns a MAC address table and sends only to the destination port (no collisions, dedicated bandwidth). The key one-liner is "a switch looks at the MAC and a router looks at the IP".
Key distinction: collision domain vs broadcast domain. A switch divides collision domains per port, but forwards broadcasts to all ports (there is one broadcast domain). Only a router finally divides the broadcast domain. So the answer to "to shrink the broadcast scope" is "a router (or a VLAN)".
In the early 1990s, hubs were the LAN standard, but as hosts increased, collisions exploded and performance plummeted. With the arrival of switches (MAC learning), each port got dedicated bandwidth and the collision problem disappeared. Today the "hub" has practically vanished and all LAN switching is switch-based — the exam asks about the difference between the two conceptually.
# How ARP works: "Who knows the MAC of 192.168.1.1?" (broadcast)
# → that host replies "My MAC is aa:bb:..." (unicast reply)
arp -n # check the ARP cache (IP↔MAC)
ip neigh show # modern| Protocol | Direction | Role |
|---|---|---|
| ARP | IP → MAC | Finds the MAC when the IP is known |
| RARP | MAC → IP | Finds the IP when the MAC is known (historical, replaced by DHCP) |
⚠️ Trap: ARP works directly only within the same local network (L2). When communicating with a host on another network, you learn the gateway's MAC, not the MAC of the other side's IP. "The MAC of a host on another subnet is not in the ARP table" is normal, and that traffic is routed through the gateway.
ping and traceroute operate on top of this protocol.| ICMP message | Meaning | Related tool |
|---|---|---|
| Echo Request/Reply | Reachability check (ping) | ping |
| Time Exceeded | TTL reached 0 (path tracing) | traceroute |
| Destination Unreachable | Destination cannot be reached | — |
| Redirect | Suggests a better path | — |
traceroute can draw a path thanks to ICMP Time Exceeded. As the TTL is raised from 1, each router sends a "time exceeded" message when the TTL hits 0, and the source of that message is the address of that hop. ICMP is the foundation protocol for reachability and path diagnosis.
# Query flow: local cache → /etc/hosts → name server in resolv.conf → root → TLD → authoritative server
dig google.com +short
host google.com| Record | Role |
|---|---|
| A / AAAA | Domain → IPv4 / IPv6 |
| MX | Mail server |
| NS | Authoritative name server |
| CNAME | Alias |
| PTR | Reverse (IP → domain) |
Key distinction: DNS uses UDP 53 by default, but uses TCP 53 when the response is large (over 512 bytes) or for a zone transfer. An answer choice saying "DNS uses only UDP" is wrong. The port number is 53 and it uses both UDP and TCP.
# The 4 steps of DHCP (DORA)
# Discover → client: "Is there a DHCP server?" (broadcast)
# Offer → server: "I'll give you this IP"
# Request → client: "I'll use that IP"
# Acknowledge → server: "Confirmed"
# Renew an address via DHCP on Linux
dhclient eth0 # request an address
dhclient -r eth0 # return the address (release)Remember the 4 steps of DHCP as DORA (Discover-Offer-Request-Acknowledge). If this process fails, the host assigns itself a 169.254.x.x (APIPA) address (see Day 1). "The IP starts with 169.254" = a sign that DHCP's DORA failed.
Before DHCP, administrators typed the IP into every host by hand (static assignment). As mobile devices like laptops and phones multiplied, automatic assignment became essential. DHCP is an evolution of RARP and BOOTP, and today almost every LAN/Wi-Fi hands out addresses via DHCP.
| Protocol | Port | Transport | Layer | Use |
|---|---|---|---|---|
| FTP | 20/21 | TCP | 7 | File transfer |
| SSH | 22 | TCP | 7 | Remote access (encrypted) |
| Telnet | 23 | TCP | 7 | Remote access (plaintext) |
| SMTP | 25 | TCP | 7 | Sending mail |
| DNS | 53 | UDP/TCP | 7 | Name resolution |
| DHCP | 67/68 | UDP | 7 | Automatic address assignment |
| HTTP | 80 | TCP | 7 | Web |
| HTTPS | 443 | TCP | 7 | Encrypted web |
| POP3 / IMAP | 110 / 143 | TCP | 7 | Receiving mail |
⚠️ Trap: SSH (22) and Telnet (23) are both remote access, but Telnet is plaintext and SSH is encrypted. For security, Telnet is not used. Only DNS defaults to UDP; most of the rest of the list above are TCP. You must memorize the port number together with its TCP/UDP pairing.
# Check a bonding interface
cat /proc/net/bonding/bond0
# Create a bond with nmcli
nmcli con add type bond con-name bond0 ifname bond0 mode active-backup
nmcli con add type bond-slave ifname eth0 master bond0
nmcli con add type bond-slave ifname eth1 master bond0| Bonding mode | Number | Behavior |
|---|---|---|
| balance-rr | 0 | Round-robin (load balancing) |
| active-backup | 1 | Only one active, automatic failover on failure (redundancy) |
| balance-xor | 2 | Distribution based on source/destination |
| broadcast | 3 | Transmit on all slaves |
| 802.3ad (LACP) | 4 | Negotiates with the switch to aggregate links |
| Item | Bonding | Teaming |
|---|---|---|
| Implementation | Kernel module (bonding) | User-space daemon (teamd) |
| Era | Traditional | Newer (RHEL7+) |
| Configuration | Mode (0-6) | runner (activebackup, loadbalance, etc.) |
The most commonly used mode is active-backup (mode 1) — redundancy that uses one NIC and automatically switches to another NIC if it dies. To increase bandwidth, use balance-rr (0) or 802.3ad (4, LACP). Distinguish them as "redundancy = active-backup, bandwidth aggregation = LACP".
Key distinction: bonding is a kernel module, while teaming is implemented as a user-space daemon (teamd). The functionality is similar, but teaming is more flexible and extensible. If the exam asks "the difference between the two", the answer is the implementation location (kernel vs user space) and the era (traditional vs RHEL7 and later).
# Layer 2: MAC addresses and the ARP table
ip link show # check interface MAC
arp -n # IP↔MAC mapping
# Layer 3: ICMP reachability and path
ping -c 2 8.8.8.8 # ICMP Echo
traceroute -n 8.8.8.8 # path via ICMP Time Exceeded
# Layer 7: DNS and DHCP
dig google.com +short # DNS query (UDP 53)
cat /proc/net/bonding/bond0 # bonding status (if present)Tomorrow (Day 5) we do a comprehensive review of the whole week and finish with questions that include subnet calculation.
dhclient: the Linux command to request (dhclient eth0) or return (-r) a DHCP address.teamd. The runner determines behavior.Click a choice to reveal the answer and explanation.
Question 1
Which Layer 2 device learns a MAC address table and forwards received frames only to the destination port?
Question 2
Which device can separate broadcast domains?
Question 3
Which protocol finds the MAC address corresponding to the other side's IP when communicating on the same network?
Question 4
What is the correct order of the 4 steps (DORA) of DHCP address assignment?
Question 5
Which is correct about the port and transport protocol used by DNS?
Question 6
You want to combine two NICs into a redundant setup that normally uses only one and automatically switches to the other NIC on failure. Which bonding mode is appropriate?
Question 7
Which is correct about the difference between bonding and teaming?