[root@f18 ~]# cat /etc/fedora-release
Fedora release 18 (Spherical Cow)
[root@f18 ~]# uname -ri
3.9.0-0.rc5.git1.1.vanilla.mainline.knurd.1.fc18.x86_64 x86_64
|
My laptop has one physical NIC and the device name is p10p1.
Here’s an explanation of how to change the device name from p10p1 to eth0.
- before change the device name
# biosdevname -i p10p1 -d
BIOS device: p10p1
Kernel name: p10p1
Permanent MAC: 78:E7:D1:xx:xx:xx
Assigned MAC : 78:E7:D1:xx:xx:xx
ifIndex: 2
Driver: r8169
Driver version: 2.3LK-NAPI
Firmware version: rtl_nic/rtl8168d-2.fw
Bus Info: 0000:02:00.0
PCI name : 0000:02:00.0
PCI Slot : 10
Index in slot: 1
|
There is no “70-net-persistent.rules” file under “/etc/udev/rules.d”
# ls /etc/udev/rules.d/*
/etc/udev/rules.d/60-sysprof.rules
#
|
# pwd
/etc/sysconfig/network-scripts
# cat ifcfg-p10p1
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=p10p1
UUID=2b9e9659-417d-4c35-a6b6-f33e8acf8ac1
ONBOOT=yes
HWADDR=78:E7:D1:xx:xx:xx
IPADDR0=192.168.11.100
PREFIX0=24
GATEWAY0=192.168.11.1
DNS1=127.0.0.1
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
|
- change the device name to eth0 from p10p1
edit /etc/default/grub
add “biosdevname=0”
# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_CMDLINE_LINUX="biosdevname=0 rd.md=0 rd.lvm=0 rd.dm=0 vconsole.keymap=jp106 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.luks=0 rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_THEME="/boot/grub2/themes/system/theme.txt"
|
update grub2 config
# grub2-mkconfig > /boot/grub2/grub.cfg
|
I assigned an static IP.
create ifcfg-eth0 file unnder /etc/sysconfig/network-scripts directory.
# cp ifcfg-p10p1 ifcfg-eth0
|
edit ifcfg-eth0
change the device name “NAME” to eth0 from p10p1
# diff ifcfg-p10p1 ifcfg-eth0
9c9
< NAME=p10p1
---
> NAME=eth0
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=2b9e9659-417d-4c35-a6b6-f33e8acf8ac1
ONBOOT=yes
HWADDR=78:E7:D1:xx:xx:xx
IPADDR0=192.168.11.100
PREFIX0=24
GATEWAY0=192.168.11.1
DNS1=127.0.0.1
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
#
|
reboot the OS.
after rebooting the OS.
the device name has been changed to eth0.
# ifconfig eth0 | grep "inet"
inet 192.168.11.100 netmask 255.255.255.0 broadcast 192.168.11.255
# biosdevname -i eth0 -d
BIOS device: p10p1
Kernel name: eth0
Permanent MAC: 78:E7:D1:xx:xx:xx
Assigned MAC : 78:E7:D1:xx:xx:xx
ifIndex: 2
Driver: r8169
Driver version: 2.3LK-NAPI
Firmware version: rtl_nic/rtl8168d-2.fw
Bus Info: 0000:02:00.0
PCI name : 0000:02:00.0
PCI Slot : 10
Index in slot: 1
|
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.