CentOS 7 NIC設定の変更
1524 ワード
移行後、NICの構成を変更する必要があります.手順は次のとおりです.
#yum install net-tools.x86_64
#cd /etc/sysconfig/network-scripts/
#mv ifcfg-eno16780032 ifcfg-eth0
IPADDR GATEWAY DNS1 DNS2
TYPE="Ethernet"
BOOTPROTO="none" none static
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eth0" eth0
UUID="af5a8985-9e7e-4afe-8a7c-51f52ec8b35b"
DEVICE="eth0" eth0
ONBOOT="yes"
IPADDR="192.168.1.3" IP
PREFIX="16"
GATEWAY="192.168.1.1"
DNS1="192.168.1.1" DNS1
DNS2="192.168.0.1"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_PRIVACY="no"
NETMASK="255.255.255.0"
#service network restart
IP
#ip addr
network
#systemctl enable NetworkManager-wait-online.service
#vi /etc/sysconfig/grub
”GRUB_CMDLINE_LINUX“ ”net.ifnames=0 biosdevname=0“.
#grub2-mkconfig -o /boot/grub2/grub.cfg
#vi /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:0c:29:7e:6c:fa",ATTR{type}=="1",KERNEL=="eth*",NAME="eth0"