All, I am trying to understand better how you give an interface a more descriptive name and get it all working without a reboot, if possible. We have 1G and 10G interfaces, and I?m trying to use names like 1G-internal, 1G-external, 10G-private, etc. When I boot up, it?s all fine, but if I add one I?m not sure if there is a way to avoid the reboot? For example, I added the 10G interface names this week. Specifically, is there a way to change the network interface name you see in ifconfig and nmcli connection without rebooting CentOS 7? I changed the name in network-scripts. I tried to restart NetworkManager. I brought down the interface and tried to rename the file and bring it up again, but it still retains the previous run-time setting associated with the same UUID in the file. Also I find that on all but one of the server on which I did this, I can restart NetworkManager, but network.service is failing to restart. Do I want both active? And if yes, is this indicative of a problem related to changing the interfaces that goes away (only) by rebooting? For some reason, after doing this on several systems, on only one I can restart network.service, but it also still shows the old interface name. thanks, Mark MARK H RICHER, MS CS NPS-NCR Digital Forensics Lab IT Manager Computer Science Department Naval Postgraduate School - National Capital Region (NCR) 900 N Glebe Rd, Rm 5-182, Arlington, VA 22203 571.858.3254 (o) 571.303.9498 (m) mhricher at nps.edu<mailto:mhricher at nps.edu>
On 10/03/2014 09:12 AM, Richer, Mark (CIV) wrote:> All, > > I am trying to understand better how you give an interface a more descriptive name and get it all working without a reboot, if possible.udev is in control. You need a /etc/udev/rules.d/70-persistent-net.rules like: # net device () SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:8b:02:81:f4:4a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" Then I think you first restart udev then network.> > We have 1G and 10G interfaces, and I?m trying to use names like 1G-internal, 1G-external, 10G-private, etc. When I boot up, it?s all fine, but if I add one I?m not sure if there is a way to avoid the reboot? For example, I added the 10G interface names this week. > > Specifically, is there a way to change the network interface name you see in ifconfig and nmcli connection without rebooting CentOS 7? > > I changed the name in network-scripts. I tried to restart NetworkManager. > > I brought down the interface and tried to rename the file and bring it up again, but it still retains the previous run-time setting associated with the same UUID in the file. > > Also I find that on all but one of the server on which I did this, I can restart NetworkManager, but network.service is failing to restart. Do I want both active? And if yes, is this indicative of a problem related to changing the interfaces that goes away (only) by rebooting? For some reason, after doing this on several systems, on only one I can restart network.service, but it also still shows the old interface name. > > thanks, > Mark > > MARK H RICHER, MS CS > NPS-NCR Digital Forensics Lab IT Manager > Computer Science Department > Naval Postgraduate School - National Capital Region (NCR) > 900 N Glebe Rd, Rm 5-182, Arlington, VA 22203 > 571.858.3254 (o) 571.303.9498 (m) mhricher at nps.edu<mailto:mhricher at nps.edu> > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >
On 03/10/14 09:12 AM, Richer, Mark (CIV) wrote:> All, > > I am trying to understand better how you give an interface a more descriptive name and get it all working without a reboot, if possible. > > We have 1G and 10G interfaces, and I?m trying to use names like 1G-internal, 1G-external, 10G-private, etc. When I boot up, it?s all fine, but if I add one I?m not sure if there is a way to avoid the reboot? For example, I added the 10G interface names this week. > > Specifically, is there a way to change the network interface name you see in ifconfig and nmcli connection without rebooting CentOS 7? > > I changed the name in network-scripts. I tried to restart NetworkManager. > > I brought down the interface and tried to rename the file and bring it up again, but it still retains the previous run-time setting associated with the same UUID in the file. > > Also I find that on all but one of the server on which I did this, I can restart NetworkManager, but network.service is failing to restart. Do I want both active? And if yes, is this indicative of a problem related to changing the interfaces that goes away (only) by rebooting? For some reason, after doing this on several systems, on only one I can restart network.service, but it also still shows the old interface name. > > thanks, > MarkI actually wrote a small tutorial on how to do just this. https://alteeve.ca/w/Changing_Ethernet_Device_Names_in_EL7_and_Fedora_15%2B Cheers -- Digimer Papers and Projects: https://alteeve.ca/w/ What if the cure for cancer is trapped in the mind of a person without access to education?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey Mark, You can use "ip" tools to do the trick. For Ubuntu I wrote this upstart script that helps with it without touching udev. You can see it here: http://www1.ngtech.co.il/paste/1175/ You can run this function at runtime and it will change the interface name. On CentOS you will need to find the right "spot" in boot to apply this link. Before NetworkManager and after udev. All The Bests, Eliezer On 10/03/2014 04:12 PM, Richer, Mark (CIV) wrote:> All, > > I am trying to understand better how you give an interface a more > descriptive name and get it all working without a reboot, if > possible. > > We have 1G and 10G interfaces, and I?m trying to use names like > 1G-internal, 1G-external, 10G-private, etc. When I boot up, it?s > all fine, but if I add one I?m not sure if there is a way to avoid > the reboot? For example, I added the 10G interface names this > week. > > Specifically, is there a way to change the network interface name > you see in ifconfig and nmcli connection without rebooting CentOS > 7? > > I changed the name in network-scripts. I tried to restart > NetworkManager. > > I brought down the interface and tried to rename the file and bring > it up again, but it still retains the previous run-time setting > associated with the same UUID in the file. > > Also I find that on all but one of the server on which I did this, > I can restart NetworkManager, but network.service is failing to > restart. Do I want both active? And if yes, is this indicative of > a problem related to changing the interfaces that goes away (only) > by rebooting? For some reason, after doing this on several systems, > on only one I can restart network.service, but it also still shows > the old interface name. > > thanks, Mark > > MARK H RICHER, MS CS NPS-NCR Digital Forensics Lab IT Manager > Computer Science Department Naval Postgraduate School - National > Capital Region (NCR) 900 N Glebe Rd, Rm 5-182, Arlington, VA 22203 > 571.858.3254 (o) 571.303.9498 (m) > mhricher at nps.edu<mailto:mhricher at nps.edu> > > > > _______________________________________________ CentOS mailing > list CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUMVMdAAoJENxnfXtQ8ZQUqL8H+wU+CSfoH6gAjJQUN2QaDO8t Rc+/zY2aAvP7vJ1rZtiEdt4he+wRWYCsV7olb2wq2/G+i+8FT14huRpYVufyMwLR VpN/sknu1KNc5fuIY6MTGYUoGDgcgCe3zy77e4cqo5IvPUNyPNfh2+X5H5xwfYaq pvQi6za9U2Gnlj3D65pCwI5svBWbPVNkdQO83xXNlyBhKqEqV1utqG4G5uiOusoM 6EIZZ9lNlLO/3PqUkg6d77HTowsT73qOmAa4KT46iZ1mnB/pibwglt8rxpAieDOD 3G3QScjuOje3EXdnBE6oJ90h6I645X12sAdEOSTITsgdfjAEZiNTIPil6ZaEzrw=YSN7 -----END PGP SIGNATURE-----