Developers have requested implementation of a persistent sta - CompTIA Linux + XK0-005

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?

Answers
  1. correct
Explanation

Correct Answer: D. ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0

This command uses the modern ip tool to add a static route for the host 10.0.213.5/32, routing packets through the gateway 10.0.5.1 via the eth0 interface. It's the correct and recommended method for managing routes on modern Linux systems. The /32 mask ensures the route is specific to a single host.

Why other options are incorrect:

  • A. route -i eth0 -p add 10.0.213.5 10.0.5.1: This syntax is incorrect and mixes flags from older and non-standard implementations. The -p flag is typically used on Windows, not Linux, and -i is not valid in this context. The route command is also deprecated in favor of ip route.
  • B. route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1": This command resembles a NetworkManager or systemd syntax but is not a valid shell command. It's not used in standard route management and would not persistently or correctly apply a static route in typical Linux environments.
  • C. echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route: Directly writing to /proc/net/route is not how static routes are configured. This file is used by the kernel to display routing information and is not writable for route management. Using this method is unsafe and ineffective.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered