nerdexam
Linux_Foundation

LFCS · Question #769

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 default gw <gateway_ip> command is used to configure a default gateway for network traffic on Linux systems.

Submitted by ngozi_ng· Apr 18, 2026Networking

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

(27 responses)
  • B
    4% (1)
  • D
    93% (25)
  • E
    4% (1)

Why each option

The `route add default gw <gateway_ip>` command is used to configure a default gateway for network traffic on Linux systems.

Anetstat add defaultgw

`netstat` is primarily used for displaying network connections, routing tables, and interface statistics, not for adding routes.

Broute default 192.168.1.1

`route default 192.168.1.1` is syntactically incorrect; it lacks the `add` keyword and `gw` specifier.

Cip route default 192.168.1.1

`ip route default 192.168.1.1` is incomplete for the `ip` command; the correct syntax would be `ip route add default via 192.168.1.1`.

Droute add defaultgw 192.168.1.1Correct

The `route add default gw 192.168.1.1` command is the correct and standard syntax to add a default gateway using the `route` command. The `default` keyword specifies the default route, and `gw` (or `gateway`) specifies the next-hop IP address for that route.

Eifconfig defaultgw 192.168.1.1 eth0

`ifconfig` is used for configuring network interfaces, not for adding default routes; `defaultgw` is not a valid parameter for `ifconfig`.

Concept tested: Adding a default network route

Source: https://man7.org/linux/man-pages/man8/route.8.html

Topics

#route command#default route#gateway#network configuration

Community Discussion

No community discussion yet for this question.

Full LFCS Practice