一、基础环境
1、角色、ip、版本、内核
serverA 192.168.1.30 3.10.0-229.el7.x86_64 CentOS Linux release 7.1.1503 (Core)
二、修改网卡名为eth0
1、备份配置
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bak
2、修改配置
diff /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bak
88c88
< linux16 /vmlinuz-3.10.0-229.el7.x86_64 root=UUID=5120ba17-c4a9-403a-b9df-b2fa09957e14 ro crashkernel=auto rhgb quiet LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0
---
> linux16 /vmlinuz-3.10.0-229.el7.x86_64 root=UUID=5120ba17-c4a9-403a-b9df-b2fa09957e14 ro crashkernel=auto rhgb quiet LANG=en_US.UTF-8
3、改配置名字
mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0
4、将/etc/sysconfig/network-scripts/ifcfg-eth0里的name修改成eth0
NAME=eth0
5、重启网络服务
/etc/init.d/network restart
Restarting network (via systemctl): [ OK ]
6、重启机器
reboot
7、检查验证
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d2:b2:51 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.30/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fed2:b251/64 scope link
valid_lft forever preferred_lft forever
(责任编辑:IT) |