nerdexam
CompTIA

LX0-103 · Question #169

Identify the statement that would create a default route using a gateway of 192.168.1.1.

The correct answer is D. route add defaultgw 192.168.1.1. The route add command is used on Linux to add static routes, including a default gateway route.

System Architecture

Question

Identify the statement that would create a default route using a gateway of 192.168.1.1.

Options

  • Anetstat add defaultgw
  • Broute default 192.168.1.1
  • Cip route default 192.168.1.1
  • Droute add defaultgw 192.168.1.1
  • Eifconfig defaultgw 192.168.1.1 eth0

How the community answered

(20 responses)
  • B
    5% (1)
  • D
    90% (18)
  • E
    5% (1)

Why each option

The `route add` command is used on Linux to add static routes, including a default gateway route.

Anetstat add defaultgw

`netstat` is a diagnostic utility for displaying network connections and statistics, not for adding or modifying routes.

Broute default 192.168.1.1

The `route` command requires the `add` keyword before specifying the route type; omitting it results in invalid syntax.

Cip route default 192.168.1.1

The `ip route` command uses different syntax - the correct form would be `ip route add default via 192.168.1.1`, making this option syntactically incorrect.

Droute add defaultgw 192.168.1.1Correct

The `route add defaultgw 192.168.1.1` command uses the correct `route` utility with the `add` action and `defaultgw` parameter to specify the gateway IP. The `route` command is the traditional Linux tool for manipulating the kernel's IP routing table, and `add defaultgw` is the required syntax to define where packets with no more-specific route should be forwarded.

Eifconfig defaultgw 192.168.1.1 eth0

`ifconfig` is used to configure network interface parameters such as IP address and netmask, not to define routing or gateways.

Concept tested: Linux static default route configuration with route command

Source: https://linux.die.net/man/8/route

Topics

#route command#default gateway#routing table#network configuration

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice