When changing an interface address with the ip addr command, how do you make the change persist through a system restart?

Prepare for the Cisco Network Programmability Design and Implementation Specialist Exam. Study with flashcards and multiple choice questions, with hints and explanations for each question. Ace your exam with confidence!

To ensure that an interface address change made with the ip addr command persists through a system restart, it is necessary to make the same change in the /etc/network/interfaces file. This file is the configuration file used by the networking service in many Linux distributions. It defines how network interfaces are configured and can set static IP addresses, netmasks, gateways, and more.

When you manually change an interface's IP address using the ip addr command, that change exists only in the current session and will be lost after a reboot. By adding the configuration details to the /etc/network/interfaces file, the system will apply these settings automatically each time it starts up or when the networking service is restarted.

While using sudo is essential to execute the command with elevated privileges, this does not in itself contribute to the persistence of the IP address upon reboot. Similarly, simply making changes in the /etc/network file may not yield the desired results, as this file may not be the primary configuration file used in many distributions.

The ifconfig command, although still present in some systems, is an older method of managing network interfaces and does not support persistent configurations in the same manner that editing the appropriate configuration files does. Thus, modifying the /etc/network/interfaces file is the appropriate

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy