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?
A . route -i etho -p add 10.0.213.5 10.0.5.1
B . route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1"
C . echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route
D . ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0
Answer: D
Explanation:
The command ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0 adds a static route to the routing table that sends packets destined for 10.0.213.5/32 (a single host) through the gateway 10.0.5.1 on the interface eth0. This is the correct way to achieve the goal. The other options are incorrect because they either use the wrong syntax (route -i etho -p add), the wrong command (route modify), or the wrong file (/proc/net/route).
Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 12: Managing Network Connections, page 379.
Latest XK0-005 Dumps Valid Version with 136 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund