37 to Eth: A Comprehensive Guide to Network Interface Name Changes
Have you ever found yourself in a situation where you need to change the network interface name from ‘ens37’ to ‘eth1’ on your Linux system? It’s a common scenario, especially when transitioning between different Linux distributions or when specific network configurations are required. In this detailed guide, I’ll walk you through the process step by step, ensuring you have a smooth transition.
Understanding the Difference Between ens37 and eth1
Before diving into the process, let’s clarify the difference between ‘ens37’ and ‘eth1’. In Linux systems, network interface names are used to identify and manage different network interfaces. Traditionally, these names were in the format of ‘ethX’, where ‘X’ represented the interface number. However, with newer Linux distributions, the naming convention has evolved to ‘ensXX’, where ‘XX’ represents the interface number.
The ‘ens37’ naming convention is used in newer Linux distributions, while ‘eth1’ is the traditional naming convention. The reason for this change is to provide a more descriptive and standardized naming scheme for network interfaces.
Step-by-Step Guide to Changing Network Interface Name from ens37 to eth1
Now that we understand the difference between ‘ens37’ and ‘eth1’, let’s proceed with the step-by-step guide to change the network interface name.
Step 1: Edit the GRUB Configuration
Open a terminal and use any text editor (such as nano or vim) with administrative privileges to edit the ‘/etc/default/grub’ file:
sudo nano /etc/default/grub
Locate the line that reads ‘GRUBCMDLINELINUX”net.ifnames0 biosdevname0″‘ and modify it to ‘GRUBCMDLINELINUX”net.ifnames0 biosdevname0 net.ifnames0″‘. This change enables the use of the ‘ensXX’ naming convention.
Save and close the file.
Step 2: Update GRUB Configuration
In the terminal, run the following command to update the GRUB configuration:
sudo update-grub
Step 3: Rename Network Interface Configuration File
Now, we need to rename the network interface configuration file. Use the following command to open the network interface configuration file:
sudo nano /etc/udev/rules.d/70-persistent-net.rules
Locate the line that contains ‘NAME=”ens37″‘ and replace it with ‘NAME=”eth1″‘. Save and close the file.
Step 4: Restart the Network Service
After making the necessary changes, restart the network service to apply the new configuration:
sudo systemctl restart networking
Alternatively, you can restart your computer to ensure the changes take effect.
Verifying the Network Interface Name Change
Once the network service is restarted, you can verify that the network interface name has been successfully changed from ‘ens37’ to ‘eth1’ by running the following command in the terminal:
ip a
This command will display the network interfaces and their corresponding names. Look for the ‘eth1’ interface to confirm the successful change.
Conclusion
Changing the network interface name from ‘ens37’ to ‘eth1’ on your Linux system is a straightforward process. By following the step-by-step guide outlined in this article, you can easily transition between the two naming conventions. Remember to restart the network service or your computer to apply the changes. Happy networking!