System Management

An administrator must give a server's wired interface ens192 a static address on a new NetworkManager profile named office-lan. The address is 192.168.10.25/24, the gateway is 192.168.10.1, and the profile must not use DHCP. Which command sequence creates the profile correctly?

Show the answer

Correct answerB. nmcli connection add type ethernet ifname ens192 con-name office-lan ipv4.method manual ipv4.addresses 192.168.10.25/24 ipv4.gateway 192.168.10.1

A static profile uses ipv4.method manual with an address and gateway, created with nmcli connection add. The device modify command is tempting but only changes the live settings of an existing device; it does not create a new saved profile, and office-lan is not a device name. The auto method would keep DHCP in use.