LFCS · 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. This question asks for the correct commands to delete the default gateway entry from the system's IP routing table.
Question
Options
- Aroute del default
- Bifconfig unset default
- Cnetstat -r default
- Dip route del default
- Esysctl ipv4.default_gw=0
How the community answered
(23 responses)- A91% (21)
- B4% (1)
- E4% (1)
Why each option
This question asks for the correct commands to delete the default gateway entry from the system's IP routing table.
The `route del default` command uses the older `route` utility to remove the default route, effectively deleting the default gateway from the routing table.
`ifconfig` is primarily used for configuring network interfaces, not for directly manipulating routing table entries like deleting a default gateway, and it does not have an 'unset default' option.
`netstat -r` is used to display the routing table, not to modify or delete routes within it.
The `ip route del default` command uses the modern `ip` utility (from the iproute2 suite) to delete the default route, which serves as the default gateway.
`sysctl` is used to modify kernel parameters at runtime, not to directly delete specific routes from the routing table; `ipv4.default_gw` is not a standard sysctl parameter for this purpose.
Concept tested: Deleting default routes
Source: https://man7.org/linux/man-pages/man8/route.8.html
Topics
Community Discussion
No community discussion yet for this question.