nerdexam
CompTIA

LX0-103 · Question #173

Consider the following command and an abbreviated version of its output: $ netstat nr Kernel IP routing table Destination Gateway Genmask Flags Iface 192.168.165.0 0.0.0.0 255.255.255.0 U ethO 127.0.0

The correct answer is A. 192.168.165.1. The netstat -nr routing table identifies the default gateway as the entry with destination 0.0.0.0 and the UG flag, where the Gateway column shows the actual gateway IP.

System Architecture

Question

Consider the following command and an abbreviated version of its output:

$ netstat nr Kernel IP routing table Destination Gateway Genmask Flags Iface 192.168.165.0 0.0.0.0 255.255.255.0 U ethO 127.0.0.0 0.0.0.0 255.0.0.0 U loO 0.0.0.0 192.168.165.1 0.0.0.0 UG ethO What is the default gateway for the network?

Options

  • A192.168.165.1
  • B255.0.0.0
  • C255.255.255.0
  • D0.0.0.0
  • E192.168.165.0

How the community answered

(44 responses)
  • A
    73% (32)
  • B
    14% (6)
  • C
    7% (3)
  • D
    2% (1)
  • E
    5% (2)

Why each option

The netstat -nr routing table identifies the default gateway as the entry with destination 0.0.0.0 and the UG flag, where the Gateway column shows the actual gateway IP.

A192.168.165.1Correct

In the routing table output, the row with Destination 0.0.0.0 and Flags UG (U=route is up, G=gateway) represents the default route. The Gateway column for that entry shows 192.168.165.1, which is the IP address to which all unmatched traffic is forwarded. This is the standard Linux representation of the default gateway.

B255.0.0.0

255.0.0.0 is the Genmask (subnet mask) for the loopback network route, not a gateway address.

C255.255.255.0

255.255.255.0 is the subnet mask for the 192.168.165.0 local network entry, not a gateway.

D0.0.0.0

0.0.0.0 in the Destination column denotes the default route (catch-all destination), not the gateway IP address itself.

E192.168.165.0

192.168.165.0 is the local network address for the eth0 interface subnet, not a gateway.

Concept tested: Reading Linux kernel IP routing table output

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

Topics

#netstat -nr#routing table#default gateway#network analysis

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice