nerdexam
LPI

102-500 · Question #166

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. Option B is correct because route add default gw 192.168.1.1 is the valid Linux/Unix syntax for adding a default route - route add is the command, default specifies the destination (equivalent to 0.0.0.0/0), and gw is the required keyword preceding the gateway IP. A is wrong…

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

(22 responses)
  • A
    14% (3)
  • B
    77% (17)
  • C
    5% (1)
  • D
    5% (1)

Explanation

Option B is correct because route add default gw 192.168.1.1 is the valid Linux/Unix syntax for adding a default route - route add is the command, default specifies the destination (equivalent to 0.0.0.0/0), and gw is the required keyword preceding the gateway IP.

  • A is wrong because netstat is a network statistics tool used for viewing connections and routing tables, not modifying them; netstat -add is not a valid flag combination.
  • C is wrong because the correct ip route syntax requires add and the via keyword: ip route add default via 192.168.1.1.
  • D is wrong because it omits add - without it, the route command doesn't know what operation to perform.
  • E is wrong because ifconfig configures interface parameters (IP, netmask, MTU), not routing; it has no concept of a gateway route.

Memory tip: Think of the route command like a sentence - "route add [destination] gw [gateway]" - you're telling the system to add a path to a destination through a gateway. If the command name isn't route, or the action word add is missing, it won't work.

Topics

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

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice