{"id":5923,"date":"2016-05-14T10:11:02","date_gmt":"2016-05-14T02:11:02","guid":{"rendered":"http:\/\/rmohan.com\/?p=5923"},"modified":"2016-05-14T10:16:01","modified_gmt":"2016-05-14T02:16:01","slug":"default-network-name-to-old-eth0-on-rhel-7-fedora-19-above","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5923","title":{"rendered":"default network name to old \u201ceth0\u201d on RHEL 7 \/ Fedora 19 disable ipv 6"},"content":{"rendered":"<p> Tags: biosdevname=0, default network device, GRUB_CMDLINE_LINUX, how to change network name to old eth0, net.ifnames=0, net.ifnames=0 biosdevname=0, Red Hat Enterprise Network name\t<\/p>\n<p>Step 1) add kernel boot args &#038; regenerate the grub config<\/p>\n<p>The following kernel boot arguments need to be added:<br \/>\nbiosdevname=0<br \/>\n net.ifnames=0<\/p>\n<p>Open \/etc\/default\/grub with your favorite editor and add those two options to the line starting with GRUB_CMDLINE_LINUX:<\/p>\n<p>[root@apache2 ~]# cat \/etc\/default\/grub<br \/>\nGRUB_TIMEOUT=5<br \/>\nGRUB_DISTRIBUTOR=&#8221;$(sed &#8216;s, release .*$,,g&#8217; \/etc\/system-release)&#8221;<br \/>\nGRUB_DEFAULT=saved<br \/>\nGRUB_DISABLE_SUBMENU=true<br \/>\nGRUB_TERMINAL_OUTPUT=&#8221;console&#8221;<br \/>\nGRUB_CMDLINE_LINUX=&#8221;crashkernel=auto rd.lvm.lv=centos\/root rd.lvm.lv=centos\/swap rhgb quiet&#8221;<br \/>\nGRUB_DISABLE_RECOVERY=&#8221;true&#8221;<br \/>\n[root@apache2 ~]#<\/p>\n<p>Will look like this:<br \/>\nGRUB_TIMEOUT=5<br \/>\nGRUB_DISTRIBUTOR=&#8221;$(sed &#8216;s, release .*$,,g&#8217; \/etc\/system-release)&#8221;<br \/>\nGRUB_DEFAULT=saved<br \/>\nGRUB_DISABLE_SUBMENU=true<br \/>\nGRUB_TERMINAL_OUTPUT=&#8221;console&#8221;<br \/>\n<strong>GRUB_CMDLINE_LINUX=&#8221;crashkernel=auto rd.lvm.lv=centos\/root rd.lvm.lv=centos\/swap rhgb quiet net.ifnames=0 biosdevname=0&#8243;<\/strong><br \/>\nGRUB_DISABLE_RECOVERY=&#8221;true&#8221;<\/p>\n<p>root@apache2 ~]# grub2-mkconfig -o \/boot\/grub2\/grub.cfg<br \/>\nGenerating grub configuration file &#8230;<br \/>\nFound linux image: \/boot\/vmlinuz-3.10.0-327.18.2.el7.x86_64<br \/>\nFound initrd image: \/boot\/initramfs-3.10.0-327.18.2.el7.x86_64.img<br \/>\nFound linux image: \/boot\/vmlinuz-3.10.0-327.13.1.el7.x86_64<br \/>\nFound initrd image: \/boot\/initramfs-3.10.0-327.13.1.el7.x86_64.img<br \/>\nFound linux image: \/boot\/vmlinuz-0-rescue-8ac53b429efd489eb5771be2120e30d7<br \/>\nFound initrd image: \/boot\/initramfs-0-rescue-8ac53b429efd489eb5771be2120e30d7.img<br \/>\ndone<br \/>\n[root@apache2 ~]#<br \/>\n[root@apache2 ~]# cd \/etc\/sysconfig\/network-scripts\/<\/p>\n<p>[root@apache2 network-scripts]# mv ifcfg-eno16777736 ifcfg-eth0<br \/>\n[root@apache2 network-scripts]# vi ifcfg-eth0<\/p>\n<p>BOOTPROTO=&#8221;static&#8221;<br \/>\nIPV4_FAILURE_FATAL=&#8221;no&#8221;<br \/>\nDEVICE=&#8221;eth0&#8243;<br \/>\nONBOOT=&#8221;yes&#8221;<br \/>\nIPADDR=&#8221;192.168.1.72&#8243;<br \/>\nPREFIX=&#8221;24&#8243;<br \/>\nNETMASK=&#8221;255.255.255.0&#8243;<br \/>\nGATEWAY=&#8221;192.168.1.254&#8243;<br \/>\nDNS1=&#8221;8.8.8.8&#8243;<\/p>\n<p>root@apache2 network-scripts]#     systemctl stop NetworkManager<br \/>\n[root@apache2 network-scripts]#      systemctl disable NetworkManager<br \/>\nRemoved symlink \/etc\/systemd\/system\/multi-user.target.wants\/NetworkManager.service.<br \/>\nRemoved symlink \/etc\/systemd\/system\/dbus-org.freedesktop.NetworkManager.service.<br \/>\nRemoved symlink \/etc\/systemd\/system\/dbus-org.freedesktop.nm-dispatcher.service.<br \/>\n[root@apache2 network-scripts]#<\/p>\n<p>Step 2) add a udev symlink, just to make sure<\/p>\n<p>Basically adding the biosdevname=0 and net.ifnames=0 arguments to grub should be enough. But here\u2019s another way just in case:<\/p>\n<p>[root@test ~]# ln -s \/dev\/null \/etc\/udev\/rules.d\/80-net-name-slot.rules<\/p>\n<p>[root@apache2 ~]# ifconfig -a<br \/>\neth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br \/>\n        inet 192.168.1.72  netmask 255.255.255.0  broadcast 192.168.1.255<br \/>\n        inet6 fe80::20c:29ff:fed4:db04  prefixlen 64  scopeid 0x20<link>\n        ether 00:0c:29:d4:db:04  txqueuelen 1000  (Ethernet)<br \/>\n        RX packets 191  bytes 19824 (19.3 KiB)<br \/>\n        RX errors 0  dropped 0  overruns 0  frame 0<br \/>\n        TX packets 125  bytes 18952 (18.5 KiB)<br \/>\n        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<\/p>\n<p>Disable IPv6:<\/p>\n<p>First check that IPv6 is enabled or not:<br \/>\nlsmod | grep -i ipv6<\/p>\n<p>Search for the line \u201cGRUB_CMDLINE_LINUX\u201d and add the following at the beginning: \u201cipv6.disable=1?<\/p>\n<p>Will look like this:<br \/>\nGRUB_CMDLINE_LINUX=&#8221;ipv6.disable=1 rd.lvm.lv=rootvg\/usrlv&#8230;<\/p>\n<p>Create a new configuration based on the currently running system using grub2-mkconfig command:<br \/>\ngrub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/p>\n","protected":false},"excerpt":{"rendered":"<p> Tags: biosdevname=0, default network device, GRUB_CMDLINE_LINUX, how to change network name to old eth0, net.ifnames=0, net.ifnames=0 biosdevname=0, Red Hat Enterprise Network name <\/p>\n<p>Step 1) add kernel boot args &#038; regenerate the grub config<\/p>\n<p>The following kernel boot arguments need to be added: biosdevname=0 net.ifnames=0<\/p>\n<p>Open \/etc\/default\/grub with your favorite editor and add those [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5923"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5923"}],"version-history":[{"count":4,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5923\/revisions"}],"predecessor-version":[{"id":5927,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5923\/revisions\/5927"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}