How to delete eth0/eth1 lan card entry completely

Once you added the lan card using system-config-network command, eth0 or eht1 entry will be added, you can add ip or set to DHCP using system-config-network. Eventhough you removed a lan card from system physically entry for that lan card will be shown in the device configuration utility. To remove it completely edit /etc/udev/rules/70-persistant-net.rules. File will be like below

[root@mail ~]# vim  /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x10de:0x03ef (forcedeth) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1a:4d:7b:55:84", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:0d:1g:55:25", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


In above file 2 entries are shown namely eth0 and eth1
Carefully delete the entry for respective card, if you want to delete eth1 file should be like below after editing.

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x10de:0x03ef (forcedeth) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1a:4d:7b:55:84", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Don't worry if you see eth1 even after deleting it, just try rebooting machine. 

0 comments:

Post a Comment

 
Design by GeekInLinux | Powered by Blogger