I was doing some work in GNS3 in which I had to run a Virtual machine(tiny version of OS) and needed to connect that machine to a virtual router that was running also on GNS3. For this I needed to set an ip address in one of my interfaces(eth0).

After I close GNS3, and failed to get internet from port. I also found that my Ethernet interface name has changed from eth0 to eth1.

I think that is the reason I am not getting internet form my LAN port.

I deleted that project in GNS3 but problem persists.

Is there any way to change it again to eth0 ?

  • Whats the output of grep '<MAC_Address>' /etc/udev/rules.d/70-persistent-net.rules ? ..replace <MAC_Address> with MAC address of the interface.. – heemayl Jun 17 '15 at 11:59
  • @heemayl , th o/p is SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="68:f7:28:23:ce:30", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" – Deb Jun 17 '15 at 12:12
  • What is GNS3?.. – Pilot6 Jun 17 '15 at 13:02

You need to modify the udev rule for the network interface to change the name. As seen in the /etc/udev/rules.d/70-persistent-net.rules file:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth1"

the name has been changed to eth1.

To change the name of the interface back to eth0:

  • Open the file /etc/udev/rules.d/70-persistent-net.rules with your favorite editor

  • Find the rule matching your MAC address

  • Change the NAME value from eth1 to eth0 i.e. NAME="eth0"

  • To apply changes without restarting run sudo udevadm trigger

|improve this answer|||||
  • last command showing like this : control: unrecognized option '--related-rules' – Deb Jun 17 '15 at 12:43
  • @Deb try sudo udevadm trigger – heemayl Jun 17 '15 at 12:45
  • ok, interface name has changed. but still not getting internet. ethernet port showing connected but no internet. – Deb Jun 17 '15 at 12:55
  • @Deb How did you configure the network interface? – heemayl Jun 17 '15 at 12:56
  • I did the configuaration in GNS3 by adding the tiny OS.image file. – Deb Jun 17 '15 at 12:59

first, SU -l into root then perform the following:

cd /etc/sysconfig


cd network-scripts/


vi ifcfg-eth0

VI is an editor that is very dangerous lol, but be careful to not change anything unless that is the objective.

|improve this answer|||||

For ubuntu 16.04 and above you should not use KERNEL=="eth*". So you should just use

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth1"
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.