nerdexam
CompTIA

LX0-104 · Question #503

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

The correct answer is B. route add default gw 192.168.1.1. The route add default gw <gateway_IP> command is used to manually add a default route to the kernel's IP routing table, directing traffic for unknown networks through the specified gateway.

Networking Fundamentals

Question

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

Options

  • Anetstat -add default gw 192.168.1.1
  • Broute add default gw 192.168.1.1
  • Cip route default 192.168.1.1
  • Droute default gw 192.168.1.1
  • Eifconfig default gw 192.168.1.1 eth0

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    88% (21)
  • E
    4% (1)

Why each option

The `route add default gw <gateway_IP>` command is used to manually add a default route to the kernel's IP routing table, directing traffic for unknown networks through the specified gateway.

Anetstat -add default gw 192.168.1.1

netstat is primarily used to display network connections, routing tables, and interface statistics, not to add routes.

Broute add default gw 192.168.1.1Correct

The `route` command, specifically with the `add default gw` options, is the correct syntax for adding a default gateway to the routing table. This establishes the path for all traffic destined for networks not explicitly defined in the routing table, directing it to the specified gateway IP address.

Cip route default 192.168.1.1

The `ip route add default via <gateway_IP>` command is the modern equivalent, but `ip route default` is not the correct syntax for adding a default route with `ip`.

Droute default gw 192.168.1.1

This option is missing the `add` keyword required by the `route` command to establish a new route.

Eifconfig default gw 192.168.1.1 eth0

ifconfig is used to configure network interfaces, not to add default routes directly; it's also a deprecated command in favor of `ip`.

Concept tested: Adding a default route using the route command.

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

Topics

#default route#network configuration#route command

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice