Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to rename a wireless interface. Right now I have 4 network interfaces, 2 Wireless, 2 Cable. the order is like this:

eth0 - Cable (Realtek RTL-8169)
eth1 - Cable (Intel 82579V)
eth2 - Wireless (Broadcom BCM4321 Proprietary Drivers)
wlan0 - Wireless (RaLink RT2800)

I want to rename eth2 to wlan1. This way the wireless cards are wlan and the cable ones are eth (The way I like it). How can I do this?

Using the suggestion made by virpara I found the following:

eth1 - e1000e wlan0 - rt2800 wlan1 - b43 eth2 - wl

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:19.0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:60:77:ab:5e:30", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x1814:/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/0000:03:02.0 (rt2800pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:9c:05:fd:28", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x14e4:/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/0000:03:00.0/ssb0:0 (b43-pci-bridge)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:18:39:0e:f0:ff", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

# PCI device 0x14e4:/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/0000:03:00.0 (wl)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:18:39:0e:f0:ff", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

Now my questions are:

  1. Why wlan1 and eth2 have the same MAC?
  2. If there are 2 duplicated MACS (eth2 & wlan1) where is the other NIC?
  3. Why is Realtek (eth0) not appearing on the list?
  4. Where did wlan1 come from since I can not see it using ifconfig -a, iwconfig or lshw. There is no wlan1 except in the /etc/udev/rules.d/70-persistent-net.rules file.
share|improve this question
    
Sorry not talking about the name of an interface connection. I am talking about the interface name. –  Luis Alvarado May 27 '12 at 3:11
    
ifconfig -a what does it give? –  virpara May 27 '12 at 3:41
    
It gives the first list I mentioned. I got it from there then did a lshw -c network to know which name was associated with what card. But the confusion to rename began with your answer. –  Luis Alvarado May 27 '12 at 3:57
    
Can you pastebin output of lshw -c network, and/or let us know which devices you installed in your system -- i.e. why you have two 802.11 ifaces? –  izx May 27 '12 at 5:15
    
Actually the first ones I mentioned are what the lshw output and ifconfig -a give me. I just summarized them. –  Luis Alvarado May 29 '12 at 21:09

3 Answers 3

See the comment at the beginning of /etc/udev/rules.d/70-persistent-net.rules:

 # Entries are automatically added by the 75-persistent-net-generator.rules
 # file; however you are also free to add your own entries. 

That is an auto-generated (and possibly customized file).

/lib/udev/rules.d/75-persistent-net-generator.rules is where all the action takes place. It's hard to tell right now which entries are auto and which were added by you or some other application.

Try renaming 70-..... to an extension that is not .rules (or move to another directory). Then reboot, and paste the content of the "clean generated" 70-persistent-net.rules.

share|improve this answer
    
Doing that threw me the same file. –  Luis Alvarado May 29 '12 at 21:38

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

you will have content as,

# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x11ab:0x4357 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:b3:7b:28:3d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:3c:e0:f2:45", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

make changes accordingly in NAME=

share|improve this answer
    
Going to update my question using your info here. There is something weird about this maybe you can answer the questions. –  Luis Alvarado May 27 '12 at 3:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.