It's my first time expercience with multiples networks cards. I have two networks cards on my debian server.

  • card 1: on on a public network,
  • card 2 : on private network

I have edit my /etc/network/interface file with :

  • eth0 : use dhcp (public network)
  • eth1 : use static IP (private network) my interface are up using allow-hotplug

But in fact, eth0 is automaticly attached to the card2 and eth1 to the card1.

I have changed my interface file ( invert eth0 and eth1 conf) but it's not work, i think the cards are randomly attached to interfaces.

How can i configure my cards/interface to force eth0 use only card1 and eth1 use only card2 ?

Thanks for your help.

Sorry for my lack of english.

1 Answer 1


You might want to configure udev mappings for your network cards based on their MAC addresses.

Good explanations are provided at debianhelp on udev

  • Thanks for this link, i have add a rules file for rename device ( but this link is not good for debian : SYSFS{address} must be replaced by ATTR{address}. Now it's work perfectly.
    – Pixman
    Jan 19, 2017 at 12:42

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.