{"id":108,"date":"2014-11-05T18:46:30","date_gmt":"2014-11-05T18:46:30","guid":{"rendered":"https:\/\/carminebufano.com\/?p=108"},"modified":"2020-11-12T15:28:29","modified_gmt":"2020-11-12T20:28:29","slug":"change-interface-names-back-to-eth0-eth1-on-centos-7","status":"publish","type":"post","link":"https:\/\/carminebufano.com\/index.php\/2014\/11\/05\/change-interface-names-back-to-eth0-eth1-on-centos-7\/","title":{"rendered":"Change interface names back to eth0, eth1 on CentOS 7"},"content":{"rendered":"<p>CentOS 7 interface naming has changed from the previous version, now instead of the first interface being named eth0, the second named eth1 and so forth, we have eno1 or eno16777984 or some other scheme starting with eno, not a major deal unless your running a multi node application that depends on all the interfaces accross the servers to be named the same. One such application (the one that has caused me the most grief) is Openstack. Openstack is already a nightmare to stand up, we dont need more complications! So, lets change it back!<\/p>\n<p>&nbsp;<\/p>\n<p>Im assuming you have a fresh install of CentOS 7 x64<\/p>\n<p>First lets grab a text editor.<\/p>\n<pre class=\"\">sudo yum install nano<\/pre>\n<p>Next we need to disable the new interface naming rule. We do this by editing GRUB<\/p>\n<pre class=\"\">sudo nano \/etc\/default\/grub<\/pre>\n<p>&nbsp;<\/p>\n<p>Add<\/p>\n<pre class=\"\">net.ifnames=0<\/pre>\n<p>on the line that reads:<\/p>\n<p>&#8220;GRUB_CMDLINE_LINUX=&#8221;rd.lvm.lv=centos\/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos\/root crashkernel=auto&nbsp; vconsole.keymap=us net.ifnames=0 &lt;&#8212;&#8212; add this in the exact same spot, and leave everything after it where it is.<\/p>\n<p>save the file with keystrokes &#8220;CTRL + X, &#8220;Y&#8221;, [ENTER]\n<p>Now we need to regenerate GRUB with this command:<\/p>\n<pre class=\"\">sudo grub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/pre>\n<p>&nbsp;<\/p>\n<p>Next lets re-create the old renaming rules. First create this file if it does not exist.<\/p>\n<pre class=\"\">sudo nano \/etc\/udev\/rules.d\/70-persistent-net.rules<\/pre>\n<p>Within this file add a line like this for each interface on your machine.<\/p>\n<pre class=\"\">SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"xx:xx:xx:xx:xx:xx\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth0\"<\/pre>\n<pre class=\"\">SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"xx:xx:xx:xx:xx:xx\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth1\"<\/pre>\n<p>So if your machine has two interfaces you would have two lines like above. Make sure you change the xx:xx:xx:xx:xx:xx to the corresponding interfaces mac address &amp; you change the name at the end of the line to match the next interface (eth0, eth1, eth2&#8230;)<\/p>\n<p>So now we have fixed the naming rules for when your machine boots. What about the names already configured?<\/p>\n<p>Lets take care of those next.<\/p>\n<p>Move into the folder that contains the interfaces config files:<\/p>\n<pre class=\"\">cd \/etc\/sysconfig\/network-scripts<\/pre>\n<p>If we list the files in this folder we will see the current ones, they are the ones with the name of the interface preceded by &#8220;ifcfg-&#8221; so if your current interface is called eno1, its config file is listed in this folder as &#8220;ifcfg-eno1&#8221;<\/p>\n<p>We need to change these to match the new rules we created&#8230; so:<\/p>\n<pre class=\"\">cp ifcfg-eno1 ifcfg-eth0<\/pre>\n<p>this will copy the config file to a new name &#8220;ifcfg-eth0&#8221;<\/p>\n<p>now lets delete the old config file:<\/p>\n<pre class=\"\">rm ifcfg-eno1<\/pre>\n<p>you will be asked to confirm this deletion, it is ok to do so because we copied it to a new file.<\/p>\n<p>Now lets change a few things in the newly named file to match our new config.<\/p>\n<pre class=\"\">nano ifcfg-eth0<\/pre>\n<p>this will bring up the text editor and open the config file.<\/p>\n<p>in here you want to change the &#8220;name=eno1&#8221; field to make it say:<\/p>\n<pre class=\"\">name=\"eth0\"<\/pre>\n<p>Finally, even though its deprecated, you can get &#8220;ifconfig&#8221; back with.<\/p>\n<pre class=\"\">sudo yum install net-tools<\/pre>\n<p>That is it!<\/p>\n<p>reboot and when your server comes back up it will have eth0 and eth1 instead of eno..<\/p>\n<p>Do this on all the servers in your application that is sensitive to interface name changes and you will be fine to use CentOS 7<\/p>\n<p>&nbsp;<\/p>\n<p>&#8211; Carmine Bufano<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 interface naming has changed from the previous version, now instead of the first interface being named eth0, the second named eth1 and so forth, we have eno1 or eno16777984 or some other scheme starting with eno, not a major deal unless your running a multi node application that depends on all the interfaces&hellip; <a class=\"read-more\" href=\"https:\/\/carminebufano.com\/index.php\/2014\/11\/05\/change-interface-names-back-to-eth0-eth1-on-centos-7\/\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,15],"tags":[74,73,64,70,63,71,68,69,67,65,72,66,46],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-centos","category-walkthroughs","tag-bufano","tag-carmine","tag-centos","tag-centos-7","tag-change","tag-change-interface-name-back","tag-ens","tag-eth0","tag-from","tag-interface","tag-linux","tag-name","tag-to"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":538,"url":"https:\/\/carminebufano.com\/index.php\/2022\/05\/20\/how-to-rename-a-zerotier-one-interface-from-zt-to-eth0-or-eth1-or-anything-you-want\/","url_meta":{"origin":108,"position":0},"title":"How to rename a ZeroTier One  interface from zt\u2026 to eth0 or eth1 or anything you want!","author":"Carmine Bufano","date":"May 20, 2022","format":false,"excerpt":"Below is the original post that walks you through the steps to rename ZeroTier interfaces. Shortly after I posted this, Grant Limberg from ZeroTier posted something that makes a lot of sense. Changing the name of the interface; more specifically removing the \u201czt\u201d from the interface will have some very\u2026","rel":"","context":"In &quot;one&quot;","block_context":{"text":"one","link":"https:\/\/carminebufano.com\/index.php\/category\/one\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":390,"url":"https:\/\/carminebufano.com\/index.php\/2020\/11\/18\/how-to-install-a-multi-node-openstack-cloud-using-rdo-packstack-and-centos-8\/","url_meta":{"origin":108,"position":1},"title":"How to install a multi-node Openstack cloud using RDO Packstack and Centos 8","author":"Carmine Bufano","date":"November 18, 2020","format":false,"excerpt":"This multi-part video is a walk through on installing a two node Openstack Ussuri cluster nested on VMware esxi. It also makes use of VMware NSX for the Management and public networks. A full write up and Part 2 (the actual install and configuration) is coming in the am. https:\/\/youtu.be\/RpSTai3korg","rel":"","context":"In &quot;Walkthroughs&quot;","block_context":{"text":"Walkthroughs","link":"https:\/\/carminebufano.com\/index.php\/category\/walkthroughs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/RpSTai3korg\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":137,"url":"https:\/\/carminebufano.com\/index.php\/2015\/01\/08\/resize-centos-7-partition-for-rdo-packstack-openstack-installer-juno\/","url_meta":{"origin":108,"position":2},"title":"Resize Centos 7 Partition for RDO Packstack Openstack installer Juno","author":"Carmine Bufano","date":"January 8, 2015","format":false,"excerpt":"","rel":"","context":"In &quot;Openstack&quot;","block_context":{"text":"Openstack","link":"https:\/\/carminebufano.com\/index.php\/category\/openstack\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":251,"url":"https:\/\/carminebufano.com\/index.php\/2014\/08\/25\/how-to-configure-many-web-servers-behind-one-public-ip\/","url_meta":{"origin":108,"position":3},"title":"How to self host many web servers with different domains &#038; URLs with one public IP","author":"Carmine Bufano","date":"August 25, 2014","format":false,"excerpt":"","rel":"","context":"In &quot;Ubuntu&quot;","block_context":{"text":"Ubuntu","link":"https:\/\/carminebufano.com\/index.php\/category\/ubuntu\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2014\/08\/Pound-Proxy.vsdx_.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2014\/08\/Pound-Proxy.vsdx_.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2014\/08\/Pound-Proxy.vsdx_.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2014\/08\/Pound-Proxy.vsdx_.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":709,"url":"https:\/\/carminebufano.com\/index.php\/2024\/11\/02\/how-to-fix-openstack-horizon-dashboard-on-centos-stream-9-error-invalidcachebackenderror\/","url_meta":{"origin":108,"position":4},"title":"How to Fix Openstack Horizon Dashboard on Centos Stream 9 error: InvalidCacheBackendError","author":"Carmine Bufano","date":"November 2, 2024","format":false,"excerpt":"If you have recently deployed Openstack Caracal with RDO Packstack you may run into a problem when you first load the Horizon Dashboard. If you get the \"Something went wrong\" text instead of the regular login page even though Packstack finished successfully check the following. Try the following: Login to\u2026","rel":"","context":"In &quot;Microstack&quot;","block_context":{"text":"Microstack","link":"https:\/\/carminebufano.com\/index.php\/category\/openstack\/microstack\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2024\/11\/image-1.png?fit=1024%2C768&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2024\/11\/image-1.png?fit=1024%2C768&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2024\/11\/image-1.png?fit=1024%2C768&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/carminebufano.com\/wp-content\/uploads\/2024\/11\/image-1.png?fit=1024%2C768&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":231,"url":"https:\/\/carminebufano.com\/index.php\/2016\/07\/01\/how-to-fix-rdo-packstack-openstack-installation-error-rabbitmq-server-start-failed-with-exitcode-1\/","url_meta":{"origin":108,"position":5},"title":"How to fix RDO Packstack Openstack Installation Error: &#8220;rabbitmq-server start failed with exitcode 1&#8221;","author":"Carmine Bufano","date":"July 1, 2016","format":false,"excerpt":"","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/carminebufano.com\/index.php\/category\/centos\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_shortlink":"https:\/\/wp.me\/p70MUT-1K","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":1,"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":372,"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/posts\/108\/revisions\/372"}],"wp:attachment":[{"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carminebufano.com\/index.php\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}