LX0-104 · Question #60
What is the command to delete the default gateway from the system IP routing table? (Choose TWO correct answers.)
The correct answer is A. route del default D. ip route del default. To remove the default gateway from the system's IP routing table, administrators can use either the deprecated route del default command or the more modern ip route del default command. Both commands effectively delete the entry that directs all unrouted traffic.
Question
Options
- Aroute del default
- Bifconfig unset default
- Cnetstat -r default
- Dip route del default
- Esysctl ipv4.default_gw=0
How the community answered
(43 responses)- A72% (31)
- B14% (6)
- C9% (4)
- E5% (2)
Why each option
To remove the default gateway from the system's IP routing table, administrators can use either the deprecated `route del default` command or the more modern `ip route del default` command. Both commands effectively delete the entry that directs all unrouted traffic.
`route del default` is a traditional command in Linux from the `net-tools` package used to delete the default route entry from the kernel's routing table.
`ifconfig` is used for configuring network interfaces, not for directly manipulating the routing table in this manner, and it does not have an `unset default` option for gateways.
`netstat -r` displays the routing table, but it is a read-only command and cannot be used to delete routes.
`ip route del default` is the modern and preferred command in Linux from the `iproute2` utility suite, designed to remove the default gateway with a consistent and powerful interface for network configuration.
`sysctl` is used to modify kernel parameters at runtime, but setting `ipv4.default_gw=0` is not a standard or valid command to delete the default route from the routing table.
Concept tested: Deleting default IP gateway (Linux)
Topics
Community Discussion
No community discussion yet for this question.