[system] Nic biosdevname Disable

CentOS 7 / RHEL 7 의 경우 biosdevname 사용으로 인하여

Nic Device name 이 ethX -> ens 등으로 표시가 됩니다.

별도로 바꿔줄 필요는 없지만 종종 바꿀일 들이 생깁니다.

 

Nic Device 확인

[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::3d0d:c304:ffd2:345d  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:a1:92:93  txqueuelen 1000  (Ethernet)
        RX packets 413  bytes 28643 (27.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 55  bytes 8462 (8.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost ~]#

Nic Device 확인시 ens33 으로 설정 되어 있습니다.

 

grub file 편집

설정전

[root@localhost ~]# vi /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

 

설정후

[root@localhost ~]# vi /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"

GRUB_CMDLINE_LINUX net.ifnames=0 biosdevname=0 추가

 

grub2-mkconfig 명령어 실행

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-24b6899878164e84bdd6ecc2468d59ff
Found initrd image: /boot/initramfs-0-rescue-24b6899878164e84bdd6ecc2468d59ff.img
done
[root@localhost ~]#

 

시스템 리부팅후 확인

[root@localhost ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::991d:2916:bd16:7c3d  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:a1:92:93  txqueuelen 1000  (Ethernet)
        RX packets 188  bytes 14643 (14.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 49  bytes 7742 (7.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost ~]#

 

추가적으로 /etc/sysconfing/network-scripts/ifcfg-ens33 을 eth0 으로 변경 하고 설정 정보를 변경 해야 합니다.

 

 

댓글 남기기