Add an ethernet subinterface
Probably obsolete with the rise of Netplan
Assuming RedHat, Centos or Fedora.
The process: Go to the directory with the networking scripts
cd /etc/sysconfig/network-scripts
Copy the original network script for the interface
cp ifcfg-eth0 ifcfg-eth0:1
Edit ifcfg-eth0:1 and change the device name, change DEVICE=eth0 to DEVICE=eth0:1 Change the IP address, change IPADDR=[current value] to IPADDR=[ip address for subinterface]
Save the file.
Restart the network service.
service network restart
Check with ifconfig.