Difference between revisions of "Binding Network Devices"

From Amahi Wiki
Jump to: navigation, search
Line 12: Line 12:
 
This file maps the card with MAC 00:1d:60:b5:43:66 to eth0 and the card with 5c:d9:98:af:21:43 to eth1.
 
This file maps the card with MAC 00:1d:60:b5:43:66 to eth0 and the card with 5c:d9:98:af:21:43 to eth1.
  
If you want to reverse the assignements, switch eth0 and eth1 at the end of the lines.
+
If you want to reverse the assignements, switch eth0 and eth1 at the end of the entries. Or delete one of the entries.
  
Please exercise care. Improperly modifying this file may render your system without network or even not boot properly.
+
These changes will only take effect after a reboot.
 +
 
 +
'''Please exercise care. Improperly modifying this file may render your system without network or even not boot properly.'''

Revision as of 03:43, 27 December 2011

You can manually force the assignment from a network card to what device comes up as (eth0, eth1 ...), by changing the udev rules. You can manually edit this file:

           /etc/udev/rules.d/70-persistent-net.rules

This file maps MAC address to device name.

Example

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1d:60:b5:43:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="5c:d9:98:af:21:43", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="et1"

This file maps the card with MAC 00:1d:60:b5:43:66 to eth0 and the card with 5c:d9:98:af:21:43 to eth1.

If you want to reverse the assignements, switch eth0 and eth1 at the end of the entries. Or delete one of the entries.

These changes will only take effect after a reboot.

Please exercise care. Improperly modifying this file may render your system without network or even not boot properly.