Which NMCLI command creates a Ethernet connection named eth0 with IP 192.168.1.50/24, gateway 192.168.1.1, and sets the DNS server to 8.8.8.8, then brings the connection up?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which NMCLI command creates a Ethernet connection named eth0 with IP 192.168.1.50/24, gateway 192.168.1.1, and sets the DNS server to 8.8.8.8, then brings the connection up?

Explanation:
The essential idea is configuring a new Ethernet connection with a static IPv4 setup, activating it, and then assigning the DNS server to that connection. The command sequence that does this correctly first creates the connection named eth0 with the specified IPv4 address and subnet (192.168.1.50/24) and the gateway (192.168.1.1). After that, it activates the connection so the system starts using those settings. Finally, it sets the IPv4 DNS server to 8.8.8.8 for that connection. This order ensures the address and gateway are in place before the interface is brought up, and the DNS is associated with the connection afterward. The other options either omit the gateway, skip bringing the connection up, or apply the DNS server after or without a proper activation sequence, which would not meet the exact flow described.

The essential idea is configuring a new Ethernet connection with a static IPv4 setup, activating it, and then assigning the DNS server to that connection. The command sequence that does this correctly first creates the connection named eth0 with the specified IPv4 address and subnet (192.168.1.50/24) and the gateway (192.168.1.1). After that, it activates the connection so the system starts using those settings. Finally, it sets the IPv4 DNS server to 8.8.8.8 for that connection. This order ensures the address and gateway are in place before the interface is brought up, and the DNS is associated with the connection afterward.

The other options either omit the gateway, skip bringing the connection up, or apply the DNS server after or without a proper activation sequence, which would not meet the exact flow described.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy