{"id":43,"date":"2010-02-01T14:49:40","date_gmt":"2010-02-01T13:49:40","guid":{"rendered":"http:\/\/toderu.ro\/blog\/?p=43"},"modified":"2010-02-01T14:49:40","modified_gmt":"2010-02-01T13:49:40","slug":"how-do-i-rename-ethernet-devices-in-red-hat-enterprise-linux","status":"publish","type":"post","link":"https:\/\/kb.toderu.ro\/?p=43","title":{"rendered":"How do I rename ethernet devices in Red Hat Enterprise Linux?"},"content":{"rendered":"<p>\t\t\t\tSolution<\/p>\n<p>This example will change the ethernet device with name <code>dev12345<\/code> to <code>eth0<\/code> and assumes <code>eth0<\/code> currently does not exist.<br \/>\nDown the device before changing any files with the command <code># ifdown dev12345<\/code>. Also remove the kernel module which is<br \/>\nreferenced against this device in the <code>\/etc\/modprobe.conf<\/code>. In this example there is a line which has &#8220;<code>alias dev12345<br \/>\ne1000<\/code>&#8220;, so perform &#8220;<code>#rmmod e1000<\/code>&#8220;.  It may also be necessary to run &#8220;<code>#ifdown<\/code> &#8221; on any other network devices using this<br \/>\nkernel module.  If this step is skipped it may be necessary to undo any file name changes including setting up the<br \/>\n<code>ifcfg-dev12345<\/code> file as mentioned below.<br \/>\nModify the file <code>\/etc\/sysconfig\/hwconf<\/code> replacing <code>ifcfg-dev12345<\/code> with <code>ifcfg-eth0<\/code>.  If this file doesn&#8217;t exist ignore this<br \/>\nstep as this file is simply a generated file from the Red Hat Enterprise Linux installation program:<br \/>\n<code>class: NETWORK<br \/>\nbus: PCI<br \/>\ndetached: 0<br \/>\ndevice: eth0<\/code><br \/>\nModify the file <code>\/etc\/modprobe.conf<\/code> replacing <code>ifcfg-dev12345<\/code> with <code>ifcfg-eth0<\/code>:<br \/>\n<code>alias eth0 e1000<\/code><br \/>\nIn the directory <code>\/etc\/sysconfig\/network-scripts\/<\/code> rename the file <code>ifcfg-dev12345<\/code> to <code>ifcfg-eth0<\/code>. Edit this file replacing<br \/>\n<code>ifcfg-dev12345<\/code> with <code>ifcfg-eth0<\/code>:<br \/>\n<code>DEVICE=eth0<\/code><br \/>\nIf the <code>system-config-network<\/code>* tools were used, it may be necessary to remove any file referencing the old device in the<br \/>\n<code>\/etc\/sysconfig\/networking directory<\/code>. ie.<br \/>\n<code># find \/etc\/sysconfig\/networking -name ifcfg-dev12345<\/code><br \/>\n<code>\/etc\/sysconfig\/networking\/profiles\/default\/ifcfg-dev12345<\/code><br \/>\n<code>\/etc\/sysconfig\/networking\/devices\/ifcfg-dev12345<\/code><br \/>\n<code># rm \/etc\/sysconfig\/networking\/profiles\/default\/ifcfg-dev12345<\/code><br \/>\n<code># rm \/etc\/sysconfig\/networking\/devices\/ifcfg-dev12345<\/code><br \/>\nAt this stage it is now possible to up eth0 with the command <code># ifup eth0<\/code>.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solution This example will change the ethernet device with name dev12345 to eth0 and assumes eth0 currently does not exist. Down the device before changing any files with the command # ifdown dev12345. Also remove the kernel module which is referenced against this device in the \/etc\/modprobe.conf. In this example there is a line which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,8],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-linux","category-networking"],"_links":{"self":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43"}],"version-history":[{"count":0,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions"}],"wp:attachment":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}