exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 143 discussion

Actual exam question from CompTIA's XK0-004
Question #: 143
Topic #: 1
[All XK0-004 Questions]

A Linux administrator is adding a static IP address to a network interface on a Linux system. The administrator modifies the ifcfg- eth0 configuration file with the following settings:

After the administrator restarts the Linux server, the system is not connected to the network. Which of the following configuration settings needs to be changed?

  • A. Set BOOTPROTO to BOOTP and USERCTL to yes.
  • B. Set BOOTPROTO to NONE and ONBOOT to yes.
  • C. Set USERCTL to yes and ONBOOT to no.
  • D. Set NETMASK to 255.255.0.0 and ONBOOT to yes.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
Reference:
https://www.tecmint.com/set-add-static-ip-address-in-linux/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
alfre
Highly Voted 4 years, 4 months ago
B. Set BOOTPROTO to NONE and ONBOOT to yes.
upvoted 12 times
...
DiaaEmara
Most Recent 2 years, 5 months ago
B Configuring an Interface with Static Network Settings Using ifcfg Files For example, to configure an interface with static network settings using ifcfg files, for an interface with the name enp1s0, create a file with the name ifcfg-enp1s0 in the /etc/sysconfig/network-scripts/ directory, that contains: For IPv4 configuration DEVICE=enp1s0 BOOTPROTO=none ONBOOT=yes PREFIX=24 IPADDR=10.0.1.27
upvoted 1 times
...
examtopics_htc
2 years, 6 months ago
Selected Answer: B
Change BOOTPROTO for that static IP
upvoted 2 times
...
xeun88
2 years, 7 months ago
BOOTPROTO to NONE because they said static IP
upvoted 3 times
...
alex85
4 years, 2 months ago
So what if the IP is 192.16.20.10/24 then the netmask suppose to be 255.255.255.0? The answer is D?
upvoted 1 times
...
Mikey_
4 years, 5 months ago
Why would you change the netmask? B would disable the DCHP setting
upvoted 4 times
betty_boop
4 years, 5 months ago
The correct answer is B. Set BOOTPROTO to NONE and ONBOOT to yes. BOOTPRO is set to NONE for static assignment (check this link https://www.dummies.com/programming/networking/network-administration-linux-ifcfg-files/ ) And ONBOOT specifies YES to o indicate whether the device should be enabled when Linux boots up.
upvoted 12 times
toroloco
4 years, 3 months ago
you are right in the link you provided there is an example of a Here’s a typical ifcfg file for an interface that has a static IP address: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes USERCTL=no IPADDR=192.168.1.200 NETMASK=255.255.255.0 BROADCAST=192.168.1.255 NETWORK=192.168.1.0
upvoted 5 times
toroloco
4 years, 3 months ago
The answer is B.
upvoted 5 times
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago