XK0-005 · Question #492
Developers have requested implementation of a persistent, static route on the application server. Packets sent over the interface eth0 to 10.0.213.5/32 should be routed via 10.0.5.1. Which of the…
The correct answer is D. ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0. The correct modern Linux command is ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0, which adds a host route to 10.0.213.5 through gateway 10.0.5.1 on interface eth0. Option A uses incorrect route command syntax (the legacy route command uses add differently and has no -i…
Question
Developers have requested implementation of a persistent, static route on the application server. Packets sent over the interface eth0 to 10.0.213.5/32 should be routed via 10.0.5.1. Which of the following commands should the administrator run to achieve this goal?
Options
- Aroute -i etho -p add 10.0.213.5 10.0.5.1
- Broute modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1"
- Cecho "10.0.213.5 10.0.5.1 eth0" > /proc/net/route
- Dip route add 10.0.213.5/32 via 10.0.5.1 dev eth0
How the community answered
(24 responses)- A4% (1)
- B4% (1)
- C8% (2)
- D83% (20)
Explanation
The correct modern Linux command is ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0, which adds a host route to 10.0.213.5 through gateway 10.0.5.1 on interface eth0. Option A uses incorrect route command syntax (the legacy route command uses add differently and has no -i flag). Option B looks like a NetworkManager nmcli command but is syntactically wrong. Option C attempts to write directly to /proc/net/route, which is a read-only kernel interface. Note: to make the route truly persistent across reboots, it must also be added to the network configuration files (e.g., /etc/sysconfig/network-scripts/ or NetworkManager config).
Topics
Community Discussion
No community discussion yet for this question.