Naming networkinterfaces using udev

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
== Naming networkinterfaces using udev ==
 
== Naming networkinterfaces using udev ==
  
Usually the robots are configured to use DHCP at networkinterface 'eth0' and have a static IP (10.0.1.2) at interface 'eth1'. In order to get the wireless netcard to use DHCP we want to rename it to 'eth0'. This can be achieved by using the udev system.  
+
Usually the robots are configured to use DHCP at networkinterface 'eth0' and have a static IP (10.0.1.2) at interface 'eth1'. In order to get the wireless PCMCIA netcard to use DHCP we want to rename it to 'eth0'. This can be achieved by using the udev system.  
 
Changes are done in the file  
 
Changes are done in the file  
 
  /etc/udev/rules.d/75-network-devices.rules
 
  /etc/udev/rules.d/75-network-devices.rules

Revision as of 14:26, 17 April 2009

Naming networkinterfaces using udev

Usually the robots are configured to use DHCP at networkinterface 'eth0' and have a static IP (10.0.1.2) at interface 'eth1'. In order to get the wireless PCMCIA netcard to use DHCP we want to rename it to 'eth0'. This can be achieved by using the udev system. Changes are done in the file

/etc/udev/rules.d/75-network-devices.rules

Add the following two lines:

SUBSYSTEMS=="pci", DRIVERS=="via-rhine", NAME="eth1"
SUBSYSTEMS=="pci", DRIVERS=="yenta_cardbus", NAME="eth0"

Remove any conflicting lines.

Jetway Atom boards

The approach above will work on the VIA based motherboards used at the SMRs. The new Intel Atom based motherborads from Jetway uses a Realtek network controller. Therefore change the line

SUBSYSTEMS=="pci", DRIVERS=="via-rhine", NAME="eth1"

to

SUBSYSTEMS=="pci", DRIVERS=="r8168", NAME="eth1"

to achieve the same on the Jetway motherboards.

Further information

To find the information available for the different networkinterfaces (and all other devices) use "udevinfo". For 'eth0' execute the following command:

udevinfo -a -p /sys/class/net/eth0

All devices available on the system are found in the '/sys' file system, and can be listed using "udevinfo".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox