Environment
Virtual machine: VMWare10.0.1 build-1379776
Operating system: CentOS7 64-bit
Brief introduction
CentOS7 Minimal installation (Minimal), is not with ifconfig instructions, the instructions in the Net-tools package, through Yum can be installed, but when our network is not configured well, this time Yum is not working (unable to connect to the network download package). Then we need to manually configure the network card settings.
View network adapters
IP A
Lists information for all network adapters
Lo is the local loopback address 127.0.0.1
ENO16777736 is our virtual machine NIC.
Configure IP Address
Open/etc/sysconfig/network-scripts/ifcfg-eno16777736
VI /etc/sysconfig/network-scripts/ifcfg-eno16777736
Default configuration
Modify Configuration
Description
ipv6init=no #关闭ipv6
onboot=Yes #启动自动加载
hwaddr=00:0c:29: c7:a9:5d #MAC地址 filled in according to the Virtual machine network adapter configuration
Prefix=24 #掩码长度
Full configuration file
Type=Ethernetbootproto=Nonedefroute=Yesipv4_failure_fatal=Noipv6init=noipv6_autoconf=Yesipv6_defroute=Yesipv6_failure_fatal=NoNAME=Eno16777736uuid=f74f183e-026c-44fd-91f3-08a08a3d02cfdevice=Eno16777736onboot=yesDNS1=114.114.114.114HWADDR=xx: 0C: in: C7:a9:5dipv6_peerdns=yesipv6_peerroutes=yesipaddr=10.12.2.68PREFIX= -GATEWAY=10.12.2.254
Restart Network Service
Service Network restart
Test the network, ping the gateway
Ping 10.12. 2.254
According to the feedback, the network and configuration are good.
Deployment CentOS Configuration IP Address