What of the following can be done by the command ifconfig? (Choose TWO correct answers.)
A.
Set a network interface active or inactive.
B.
Specify the kernel module to be used with a network interface.
C.
Allow regular users to change the network configuration of a network interface.
D.
Change the netmask used on a network interface.
E.
Specify which network services are available on a network interface.
The Answer Is:
A, D
This question includes an explanation.
Explanation:
The command ifconfig can be used to set a network interface active or inactive by using the up or down options. For example, the following command will activate the eth0 interface:
sudo ifconfig eth0 up
The command ifconfig can also be used to change the netmask used on a network interface by specifying the netmask option followed by the desired netmask value. For example, the following command will change the netmask of the eth0 interface to 255.255.255.0:
sudo ifconfig eth0 netmask 255.255.255.0
The other options in the question are not possible with the ifconfig command. The command ifconfig cannot specify the kernel module to be used with a network interface. This is done by the modprobe command or the /etc/modules file. The command ifconfig cannot allow regular users to change the network configuration of a network interface. This is controlled by the sudoers file or the polkit framework. The command ifconfig cannot specify which network services are available on a network interface. This is done by the firewall rules or the /etc/services file. References: