Why do you want to do a test?
In the process of using CentOS7, it is found that there are many different parts of the network than CentOS6.
1.CENTOS7 defaults to using the network of the NetworkManager management system and is no longer
2.NetworkManager is managed by default with Nmtui or NMCLI and is no longer a ifcfg configuration file in Sysconfig, but these ifcfg files are still supported
3. The default NetworkManager and network work in the system at the same time, but the NetworkManager will start before the network
4. Actual use of the process found that even in the Ifcfg configuration file using static IP address and static DNS, in NetworkManager still use automatic acquisition (DHCP) way, automatically obtain the IP address and DNS server address
5.NetworkManager default use IP command to configure the network instead of IFCFGXXX,IP command configured network restart after failure
Test environment:
Testing virtualized environments: VMware ESXi 5.1.0
Operating system: CentOS7.0 (1406-x86_64) with minimal installation (default is NetworkManager Management Network Service)
Network environment: Multi-VLAN network environment, one VLAN with DHCP service
Test results:
The network card corresponding to the VMware VMXNET3 Ethernet Controller is ens160, and the network adapter name for the VMware E1000 Ethernet Controller is ENS32,CENTOS7 and VMXNET2 is not supported by default. If VMXNET3 is used, the network card number is ens160, ens192, and ens224, if E1000 is used, the network card number is ENS32, Ens33, ens34.
If a static IP address is set in the network connection step when the operating system is installed, the ipaddr, PREFIX, and Gateway are appended with a 0 in the Ifcfg configuration file, and the value of Bootproto is set to none. If you bind a public IP address, the following numbers will be added.
The ifcfg file uses "name=" instead of "device=", Ifup and Ifdown are all using "device=", and it is not necessary to replace the "ifcfg" used by default in the Name= file with "device=" in the test process. The network service can still be started, but the value of Ipv4.method in NMCLI is manual only if the value of Bootproto is none and not DHCP.
Manually modifying the Ifcfg file does not trigger NetworkManager to apply these changes, you need to use NMCLI connection reload, or use systemctl restart Networkmanager.service, for example, change Bootproto from DHCP to static in Ifcfg, note that NMCLI connection reload is not a substitute for systemctl restart Networkmanager.service, because any changes in NMCLI will change the ifcfg file after save persistent, but the changes in NMCLI will not take effect immediately in the system, still need systemctl restart Networkmanager.service, the previous configuration and modified configuration will be left in the system via the IP a command.
If NetworkManager is disabled, commands such as NMCLI, Nmtui, and so on will no longer be available.
The result set in NMCLI may be superimposed, such as there may be multiple IP addresses or DNS server addresses, and remove can delete only one configuration property but cannot delete the entire result set.
Accidentally encountering a connection name in NetworkManager is not a NIC name, you can change it manually with NMCLI.
Test Summary:
NetworkManager is not as convenient and error-prone as the network, so it is recommended to use NetworkManager carefully before it is unknown.
Tips
Configure your server as follows as prompted to do so, to avoid the hassle and networkmanager caused by the
When the operating system is installed, the network is configured to use dynamic IP on DHCP, the intention is to set up a static IP address manually, set the DNS server address in advance, or write the DNS address into the file and set a scheduled task or automatic update configuration.
Turn off DHCP as much as possible, especially if a server that requires a static IP address does not use DHCP to get addresses that might not be used, in case there are duplicates in the NMCLI result set encountered in the test results above
disable NetworkManager to use the network, do not need to use the default ifcfg file "Name=" replaced by "device=", the network service can still start, The network is still available if the Ifcfg configuration file is configured correctly, and because Systemctl is different from services, the run state of the command line in this service is displayed SYSTEMCTL status network, for example, the network call is/ETC/RC.D /init.d/network start, this command returns code 0 correctly and exits, which does not mean that the network service has stopped, and the user only needs to be concerned about whether the status is green active.
This article is from "Communication, My Favorites" blog, please make sure to keep this source http://dgd2010.blog.51cto.com/1539422/1592821
Problems of CENTOS7 network environment in virtualized environment