1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Deterministic ethernet naming scheme?

Discussion in 'FreeBSD Development' started by billli, Nov 26, 2011.

  1. billli

    billli New Member

    Messages:
    16
    Thanks Received:
    0
    Hi:
    On FreeBSD 8.2 I was wondering is the naming of ethernet interfaces consistent in the event of reboot.
    ie)The right most interface will be suffixed with 0, then the one next to it will be suffixed with 1, etc, and will stay the same regardless of rebooting.

    As I recall with FreeBSD 4, it was the first interface that responded was suffixed with 0, and so on.

    The reason is that I have a script that depends on the interfaces' name staying consistent.

    With FreeBSD 8.2, what happens if say I have 3 physical interfaces, named em0, em1, and em2, ordered from left, middle, right, what if the middle interface physically gets damaged, would em0, and em1 show up, or would em0 and em2 show up?

    Thanks
    Bill
     
  2. graudeejs

    graudeejs Well-Known Member

    Messages:
    4,594
    Thanks Received:
    633
    lol, about network card placement :)

    Number shouldn't change.... At least for me, they are always in same order :D (Unless you add new card, then numbers might change)
     
    billli thanks for this.
  3. Crest

    Crest Member

    Messages:
    117
    Thanks Received:
    34
    You could use ifconfig $old name $new an search for $old by mac address.
     
    billli thanks for this.
  4. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,628
    Thanks Received:
    2,386
    It depends on how damaged the card is. If it's not detected on PCI (or PCIe) then you'd end up with em0 (left card) and em1 (right card). If, more commonly, only the network side is broken but it's still detected there would be no change.