nerdexam
CompTIA

LX0-104 · Question #671

When issuing the command ifconfig eth0 192.168.1.20/24 up, which of the following happens? (Choose two correct answers.)

The correct answer is A. The address 192.168.1.20 is associated with the interface eth0. B. A network route to 192.168.1.0 with the netmask 255.255.255.0 pointing directly to eth0 is. The ifconfig command with an IP address and CIDR suffix on an interface assigns the specified address and automatically configures a direct route for the corresponding local network.

Networking Fundamentals

Question

When issuing the command ifconfig eth0 192.168.1.20/24 up, which of the following happens? (Choose two correct answers.)

Options

  • AThe address 192.168.1.20 is associated with the interface eth0.
  • BA network route to 192.168.1.0 with the netmask 255.255.255.0 pointing directly to eth0 is
  • C192.168.1.1 is probed for router functionality and, in case of success, it is added to the list of
  • DThe addresses from 192.168.1.20 to 192.168.1.24 are activated on the interface eth0.
  • EIf eth0 was configured with a previous IP address, it is retained an addition to adding the new

How the community answered

(36 responses)
  • A
    78% (28)
  • C
    6% (2)
  • D
    3% (1)
  • E
    14% (5)

Why each option

The `ifconfig` command with an IP address and CIDR suffix on an interface assigns the specified address and automatically configures a direct route for the corresponding local network.

AThe address 192.168.1.20 is associated with the interface eth0.Correct

The command `ifconfig eth0 192.168.1.20/24 up` explicitly assigns the IPv4 address `192.168.1.20` to the `eth0` network interface.

BA network route to 192.168.1.0 with the netmask 255.255.255.0 pointing directly to eth0 isCorrect

When an IP address and subnet mask (implied by /24) are assigned to an interface, the operating system automatically creates a connected route for the local subnet (`192.168.1.0/24` with netmask `255.255.255.0`) that is directly accessible via the `eth0` interface.

C192.168.1.1 is probed for router functionality and, in case of success, it is added to the list of

Assigning an IP address with `ifconfig` does not automatically probe for or add default router functionality; default gateway configuration is a separate routing step.

DThe addresses from 192.168.1.20 to 192.168.1.24 are activated on the interface eth0.

The `/24` in `192.168.1.20/24` is a CIDR notation for the subnet mask (255.255.255.0), not a range of IP addresses to be activated.

EIf eth0 was configured with a previous IP address, it is retained an addition to adding the new

When `ifconfig` is used to set an IP address, it typically replaces any previously configured primary IP address on that interface unless specific commands or flags for adding a secondary address are used.

Concept tested: ifconfig IP address assignment

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

Topics

#ifconfig#Network interface configuration#IP address assignment#Route creation

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice