Add IP to centos system
vi /etc/sysconfig/network-scripts/ifcfg-eth0
An IP address is added: IPADDR1=192.168.22.231. Of course, more IP addresses can also be added.
IPADDR2=192.168.22.232
Finally, save and exit the file. Shortcut key: shift+z+z
Restart the network service for the changes to take effect.
systemctl restart network
③ Check whether the IP address has been added.
Enter command:
ip addr
How to add an IP in Centos7.6
1. Log in to the virtual machine

2. Enter the command:
cd /etc/sysconfig/network-scripts/
3. Re enter the command:

4. Modify the network card configuration: vi ifcfg-eth0

5. Click keyboard i to add a new IP address. For different gateways, you need to enter corresponding gateways, and for different masks, you need to enter different masks

6. Click the keyboard esc,
Enter wq!
Exit Save

7. Restart the network card
service network restart
that will do
