Challenge - 5 Problems
Network Interface Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of the command
ifconfig eth0 if the interface is down?You run
ifconfig eth0 on a Linux system where the network interface eth0 is currently disabled. What will the output show?Linux CLI
ifconfig eth0
Attempts:
2 left
💡 Hint
Think about what happens when an interface is down but still exists.
✗ Incorrect
When an interface is down,
ifconfig still shows its details but without the 'UP' flag and usually no IP address assigned.💻 Command Output
intermediate2:00remaining
What does
ip addr show dev eth0 display when the interface has multiple IP addresses?You run
ip addr show dev eth0 on a system where eth0 has two IPv4 addresses assigned. What will the output include?Linux CLI
ip addr show dev eth0
Attempts:
2 left
💡 Hint
Think about how
ip addr handles multiple addresses.✗ Incorrect
ip addr show lists all IP addresses assigned to the interface, each with its own label.📝 Syntax
advanced2:00remaining
Which command correctly assigns the IP address 192.168.1.10/24 to interface eth0 using
ip?Choose the correct syntax to add the IP address 192.168.1.10 with subnet mask 255.255.255.0 to the interface eth0.
Attempts:
2 left
💡 Hint
Remember the order:
ip addr add [address] dev [interface]✗ Incorrect
The correct syntax is
ip addr add [IP]/[prefix] dev [interface]. Other options are invalid commands.🔧 Debug
advanced2:00remaining
Why does the command
ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up fail with 'SIOCSIFADDR: Operation not permitted'?You run
ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up but get the error 'SIOCSIFADDR: Operation not permitted'. What is the most likely cause?Attempts:
2 left
💡 Hint
Think about permissions required for network configuration.
✗ Incorrect
Changing IP addresses requires administrative privileges. Without sudo or root, the operation is denied.
🚀 Application
expert3:00remaining
How to script a check that prints all active interfaces with their IPv4 addresses using
ip addr?You want a script that lists only interfaces that are UP and shows their IPv4 addresses in a simple format:
interface: IP. Which command pipeline achieves this?Attempts:
2 left
💡 Hint
Use
ip -o -4 addr show up for one-line output per address.✗ Incorrect
Option B uses the correct flags for IPv4, one-line output, filters UP interfaces, and formats output as 'interface: IP'. Others either miss interface names or include extra lines.