{"id":917,"date":"2014-11-05T13:54:17","date_gmt":"2014-11-05T12:54:17","guid":{"rendered":"http:\/\/elkano.org\/blog\/?p=917"},"modified":"2016-06-07T12:51:54","modified_gmt":"2016-06-07T10:51:54","slug":"rename-interfaces-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/elkano.org\/blog\/rename-interfaces-ubuntu-14-04\/","title":{"rendered":"Rename interfaces on Ubuntu 14.04"},"content":{"rendered":"<p>On my virtual machines I use many network interfaces, each one connected to a different vlan. I usually rename the interfaces on the guest machine with a meaningful name referring to its vlan, like eth40 for the interface that is connected to vlan 40. Until now I used to use ifrename package on my debian guests, but on Ubuntu 14.04 this packakge is not very long distributed.<\/p>\n<p>To achive this I used an udev rule. Simply create the file <strong>\/etc\/udev\/rules.d\/70-persistent-net.rules<\/strong> with the following content, one line for each interface you want to rename:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-linenumbers=\"false\">SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;b2:b3:31:58:96:59&quot;, ATTR{dev_id}==&quot;0x0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth40&quot;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Now, change your \/etc\/network\/interfaces file accordingly, reboot the guest and your interfaces should have changed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On my virtual machines I use many network interfaces, each one connected to a different vlan. I usually rename the interfaces on the guest machine with a meaningful name referring to its vlan, like eth40 for the interface that is connected to vlan 40. Until now I used to use ifrename package on my debian [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,27],"tags":[131,148,124],"_links":{"self":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/917"}],"collection":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/comments?post=917"}],"version-history":[{"count":3,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/917\/revisions"}],"predecessor-version":[{"id":920,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/917\/revisions\/920"}],"wp:attachment":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/media?parent=917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/categories?post=917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/tags?post=917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}