If you want to create persistent eth names or change the default
1. First you need to find out the MAC address of the devices and look for the attribute,
ATTR{address}==
[root@manuken ~]# udevinfo -a -p /sys/class/net/devxxx
ATTR{address}=="00:24:81:0f:10:ba"
00:24:81:0f:10:ba is devxxx
[root@manuken ~]# udevinfo -a -p /sys/class/net/dev1xx
00:24:81:0f:13:be is dev1xx
2. Now create the file /etc/udev/rules.d/70-persistent-net.rules, with the following parameters
Example options net_1,net_2 or eth4 eth 5
KERNEL=="eth*", ATTR{address}=="00:24:81:0f:10:ba", NAME="eth4"
or
KERNEL=="eth*", ATTR{address}=="00:24:81:0f:10:ba", NAME="net_1"
KERNEL=="eth*", ATTR{address}=="00:24:81:0f:13:be", NAME="eth5"
or
KERNEL=="eth*", ATTR{address}=="00:24:81:0f:13:be", NAME="net_2"
3. Changes have to be reflected also in /etc/sysconfig/ifcfg-devxxx y /etc/sysconfig/ifcfg-dev1xx
a)
/etc/sysconfig/ifcfg-dev20548
DEVICE=eth4
or
DEVICE=net_1
/etc/sysconfig/ifcfg-dev5837
DEVICE=eth5
or
DEVICE=net_2
b) Also you can change the script name
mv /etc/sysconfig/ifcfg-devxxx /etc/sysconfig/ifcfg-eth4
mv /etc/sysconfig/ifcfg-dev1xxx /etc/sysconfig/ifcfg-eth5
or
mv /etc/sysconfig/ifcfg-devxxx /etc/sysconfig/ifcfg-net_1
mv /etc/sysconfig/ifcfg-dev1xxx /etc/sysconfig/ifcfg-net_2
Udev can also be used to retain Network naming after hardware replacement. This time we base the naming decision on PCI ID rather than mac address.
This can be especially useful in case of hardware failure with NIC replacement in the same PCI Lane.
lspci provides the info in this case
Example
KERNEL=="eth*", ID=="0000:05:05.0", NAME="eth0"
KERNEL=="eth*", ID=="0000:0b:00.0", NAME="eth1"
KERNEL=="eth*", ID=="0000:0c:02.0", NAME="eth2"
3 comments:
Great Article
Network Security Projects for CSE
JavaScript Training in Chennai
Project Centers in Chennai
JavaScript Training in Chennai
I recently read your post and I got a lot of information. Definitely, I will share this blog for my friends.
JMeter Training in Chennai
JMeter Certification
Linux Training in Chennai
Graphic Design Courses in Chennai
Spark Training in Chennai
Pega Training in Chennai
Primavera Training in Chennai
Unix Training in Chennai
Placement Training in Chennai
Oracle Training in Chennai
JMeter Training in T Nagar
JMeter Training in OMR
Aivivu chuyên vé rẻ, tham khảo
vé máy bay đi Mỹ bao nhiêu tiền
vé máy bay mỹ về việt nam
mua vé máy bay từ anh về việt nam
bay từ pháp về việt nam mấy tiếng
Post a comment