Hi Martin, Yes, this is expected behavior for udev to make the NIC ordering 'stickey' to the MAC address.
We have a wiki help page related to that: Changing Network Hardware http://doc.astlinux.org/userdoc:tt_change_net_hardware As long as the NIC hardware does not change relative to the flash storage, there should never be an issue. If the flash storage is ever moved to different hardware, you should remove the 70-persistent-net.rules file before making the move. This has never been a issue in production AFAIF and serves a good function to make sure the NIC ordering is consistent. While it would be possible to create an executable shell script "/mnt/kd/rc.local.stop" that removed the 70-persistent-net.rules file on shutdowns, I would not recommend that. Lonnie On Apr 14, 2014, at 4:39 PM, Martin Sunstrum wrote: > Hardware: Soekris net5501 hardware > Astlinux: 1.1.4-Asterisk-11.7.0 > > I have had an issue that I have experienced twice in the last couple of weeks. > > I believe the issue I have experienced may have some relation to what was > observed in http://sourceforge.net/p/astlinux/mailman/message/30421685/ > > Astlinux is not operable because eth0 is not found (assigned) in my net5501 > hardware. > > I captured partial console logs, but here is what I think is happening: > > - I took an existing Compact Flash device from another one of my > net5501 devices, and plugged it into a new net5501 > - Astlinux had been configured with a static IP address. (I don’t > know if this is related to the issue or not) > - I had the serial port hooked up to my PC, but no Ethernet cable > plugged into the new net5501 > - I powered up the new net5501 > - I saw flash by on the console that eth0 was renamed to eth4 > > <30>udevd[165]: renamed network interface eth0 to eth4 > <30>udevd[166]: renamed network interface eth1 to eth5 > <30>udevd[168]: renamed network interface eth2 to eth6 > > - Astlinux starts, and I plug in my Ethernet cable > - But Astlinux is not reachable, since there is no eth0 port. > > - Following some leads from Dr. Google, I inspected on this new > net5501 device the existence of the following file: > /etc/udev/rules.d/70-persistent-net.rules > > It did exist, and the contents show the cause of the problem. > =========================================================================== = > # This file was automatically generated by the /lib/udev/write_net_rules > # program, run by the persistent-net-generator.rules rules file. > # > # You can modify it, as long as you keep each rule on a single > # line, and change only the value of the NAME= key. > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:70:dc", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth0" > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:70:dd", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth1" > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:70:df", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth3" > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:70:de", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth2" > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:cf:84", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth4" > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:cf:85", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth5" > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:cf:86", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth6" > > # PCI device 0x1106:0x3053 (via-rhine) > SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", > ATTR{address}=="00:00:24:d0:cf:87", ATTR{dev_id}=="0x0", ATTR{type}=="1", > KERNEL=="eth*", NAME="eth7" > =========================================================================== = > > eth0 is mapped to the Ethernet MAC address of my original hardware, not my > new hardware. > > To get over this issue, I need to just simply delete this file > 70-persistent-net.rules in its entirety, and reboot the hardware. > > > The other time that this occurred earlier, I did NOT do the same steps as > above (ie. Use an existing compact flash). Rather, I was setting up a net5501 > completely from scratch. In that instance, it seemed like via-rhine, or the > Astlinux image, Linux had history on a MAC address that I did not recognize. > In that situation, eth0 was remaned to eth1, eth1 to eth2 , ... and eth0 was > assigned the unrecognized MAC address. > Again, in that situation I deleted 70-persistent-net.rules to rectify the > problem. > > > From a setup / reliability concern, can we give some consideration to purging > this file automatically in Astlinux ? > Or any other suggestions on how to auto-purge it ? > > Thx, Martin > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech_______________________________________________ > Astlinux-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal to > [email protected]. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Astlinux-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to [email protected].
