Since 8.0 has modified the configuration of multiple IPs for a single network card, this document is written for explanation.
If the document writing is abnormal, or the test is abnormal, please leave a message in time
First you need to apply for an intranet IP
At this time, the console will have an extra intranet IP
Then apply for an elastic industrial network IP at the elastic EIP
Note: After the elastic public IP is bound to the instance, it is free. If it is not bound, an idle fee will be charged.
unbound
for binding
All the above processes are no different from the previous centos7
Server with changes
The configuration begins.
Single network card and multiple IP copy a secondary network card eth0:0 to eth0 during configuration
cp /etc/sysconfig/network-scripts/ifcfg-eth{0,0:0}
cp /etc/sysconfig/network-scripts/route6-eth{0,0:0}
Edit eth0:0
vim ifcfg-eth0:0
# dhcp is changed to static
BOOTPROTO=static
# eth0 is modified to eth0:0
DEVICE=eth0:0
IPADDR=10.0.0.4
NETMASK=255.255.0.0
GATEWAY=10.0.0.1
ONBOOT=yes
PERSISTENT_DHCLIENT=yes
TYPE=Ethernet
USERCTL=no
The IP viewing location is as follows
vim route6-eth0:0
default dev eth0:0
Centos8 restart the network card test does not take effect.
Restart command
The current environment needs to be restarted directly
The test is normal after restart
ip a test has been recognized normally
Recommended Posts