Labels

Android (1) bash (2) boost (2) C (34) C++ (2) cheatsheet (2) CLion (6) css (3) Debian (33) DL (17) Docker (2) Dreamweaver (2) Eclipse (3) fail2ban (4) git (5) GitHub (4) Hacking (3) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (31) javascript (3) Linux (167) Mac (19) Machine Learning (1) mySQL (48) Netbeans (4) Networking (1) Nexus (1) OpenVMS (6) Oracle (1) Pandas (3) php (16) Postgresql (8) Python (9) raid (1) RedHat (14) Samba (2) Slackware (47) SQL (14) svn (1) tar (1) ThinkPad (1) Virtualbox (3) Visual Basic (1) Visual Studio (1) Windows (2)

Sunday, 19 July 2020

Rename Network on RedHat and Debian (possibly others)

How to rename Network on RHEL, Debian and possibly others.




I've noticed that when a NIC is changed, either physically or virtually, the all too familiar eth0 can become enp0s5 or similar.

This example was on a RHEL 7.8 virtual install.

So if we ifconfig we see that eth0 isn't there and may be something like the above.

ip link set enp05s down
ip link set enp05s name eth0
ip link set eth0 up

If we again do ifconfig, we see that all is well...


BUT, this is not preserved through a reboot, I'll come back to this, but also see the links below;

https://blog.david14.com/2020/07/rhel-network-configuration.html
 





Specifically on Debian


If we do

sudo dmesg | grep -I eth 

and see something like the below;


then we can try the below;

vim /etc/default/grub

Change

GRUB_CMDLINE_LINUX=""

To

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

Then do

grub-update

and after reboot, we should now see our old faithful eth*


No comments:

Post a Comment

Note: only a member of this blog may post a comment.