In linux, add a secondary ip address. In addition to primary, there are two types of ip addresses: 1. ip alias (sub-interface) 2. secondary ip (secondary ip) www.2cto.com can be added to a physical network card. alias is added by ifconfig. ifconfig is displayed as a sub-interface, such as eth0: 1; secondary ip is supported by ip commands. add sub-interface: # ifconfig eth0: 1 10.10.56.33/24 up # Add to memory and take effect immediately. You can view ifconfig and ip addr sh. you can also create a corresponding sub-interface configuration file under the/etc/sysconfig/network-scripts directory: cd/etc/sysconfig/network-scripts; cp ifcfg-eth0: 0; Edit: ifcfg-eth0: 0, change the DEVICE name and ip address can be: DEVICE = eth0: 0 IPADDR = 10.10.56.33 Linux up to 255 ip alias. www.2cto.com add secondary ip: # ip a add dev eth1 172.16.18.18/24 brd 172.16.18.255 # ip a sh dev eth1 ...... inet 172.16.18.118/24 brd 172.16.18.255 scope global secondary eth1 # If the ip address of the same network segment is added, the secondary ip address is displayed. If the ip address is not the same network segment, it is primary. however, for physical NICs, except for the first configured IP address, the added IP address can be regarded as secondary. the ip ifconfig command added here is invisible. as far as I know, adding a secondary ip address to the ip address is only added to the memory. I don't know if it can be implemented in the configuration file.