RHEL7网卡设置

1.改网卡名

先vim /etc/sysconfig/grub:
GRUB_TIMEOUT=5
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"
grub2-mkconfig -o /boot/grub2/grub.cfg
再reboot后修改配置网卡名

2.设置IP

TYPE=Ethernet
BOOTPROTO=static
NM_CONTROLLED=no
IPADDR=192.168.56.101
NETMASK=255.255.255.0
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s8
UUID=9f771188-1e88-4145-a02d-701c88cb688b
DEVICE=eth1
ONBOOT=yes
 
重启服务:systemctl restart network     ip add
posted on 2016-04-13 10:50  奔跑的东东  阅读(787)  评论(0编辑  收藏  举报