nerdexam
CompTIA

LX0-104 · Question #231

Which of the following statements would create a default route using a gateway of 192.168.1.1?

The correct answer is D. route add default gw 192.168.1.1. To establish a default route pointing to a specific gateway, the route add default gw command is used in Linux systems.

Networking Fundamentals

Question

Which of the following statements would create a default route using a gateway of 192.168.1.1?

Options

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

How the community answered

(57 responses)
  • A
    7% (4)
  • B
    4% (2)
  • D
    88% (50)
  • E
    2% (1)

Why each option

To establish a default route pointing to a specific gateway, the `route add default gw` command is used in Linux systems.

Anetstat -add default gw

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

Broute default 192.168.1.1

The syntax `route default 192.168.1.1` is incomplete and not the correct way to add a default route using the `route` command.

Cip route default 192.168.1.1

While `ip route` is the modern command for routing, `ip route default 192.168.1.1` is not the correct syntax; it should typically be `ip route add default via 192.168.1.1`.

Droute add default gw 192.168.1.1Correct

The `route add default gw 192.168.1.1` command correctly adds a default route to the routing table, directing all traffic for unknown networks through the gateway at 192.168.1.1.

Eifconfig default gw 192.168.1.1 eth0

`ifconfig` is used for configuring network interfaces, not for directly adding default routes to the kernel's routing table.

Concept tested: Linux network routing table configuration (route command)

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

Topics

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

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice