Tencent cloud centos 8.0 single network card configuration multiple IP

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

Log out the MAC address

HWADDR=52:54:00:1b:64:88

Add network card information

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

eth0 is modified to eth0:0

Centos8 restart the network card test does not take effect.

Restart command

nmcli c load /etc/sysconfig/network-scripts/ifcfg-eth0:0

nmcli c load /etc/sysconfig/network-scripts/route6-eth0:0

The current environment needs to be restarted directly

The test is normal after restart

ip a test has been recognized normally

Recommended Posts

Tencent cloud centos 8.0 single network card configuration multiple IP
CentOS8 network card configuration file
CentOS7.0 network configuration
CentOS 7.0 network configuration
Centos7.6 dual network card configuration and switching test
Ubuntu 18.04 network card configuration
Centos configure multiple virtual IP
Tencent Cloud Centos install jdk8
Tencent Cloud Centos install nginx
Implementation of CentOS8.0 Network Configuration
Tencent Cloud CentOS7 install LNMP+wordpress
Centos configure multiple virtual IP
Ubuntu 18.04 uses elastic network card to configure multiple external network IP
Tencent Cloud Centos7 install java server
CentOS7 modify the network card name
Detailed examples of Centos6 network configuration
Centos7 change the network card name
CentOS6/CentOS7 dual network card configuration bonding
CentOS7 modify network card name and network repair
Centos7 configuration host name and IP address
Explain the implementation of Centos8 static IP configuration
IP and network settings of CentOS Linux 7 VMware