How To Create IP Addresses On a Linux Server without Corresponding NICs

If you do not want to create new interfaces, just new IP addresses, use these commands:

ip addr add brd + dev eth0
ip addr add brd + dev eth0
ip addr add brd + dev eth0

# Replace the IP addresses and subnet masks as you desire.

The IP addresses will go away upon rebooting.  You may want multiple IP addresses on new "semi-virtual" interfaces on a Linux server.  These interfaces can be linked to a device such as eth1.  The following method comes with a caveat as I have experienced networking problems with the method below.  The main IP address stops working after an hour or two.  The new interfaces with IP addresses may cause network instability on the server.  The below method of creating new interfaces is not recommended for anything but theoretical testing or short-duration procedures.

# Usage instructions:  Save the content below as  Then do the following to run it:  chmod +x; ./
ip li add dummy0 type dummy
ip li add dummy1 type dummy
ip li add dummy2 type dummy
ip li add dummy3 type dummy
ip li add dummy4 type dummy
ip link set name eth20 label dummy0
ip link set name eth21 label dummy1
ip link set name eth22 label dummy2
ip link set name eth23 label dummy3
ip link set name eth24 label dummy4
ip addr add brd + dev eth20 label eth20:0
ip addr add brd + dev eth21 label eth22:0
ip addr add brd + dev eth22 label eth23:0
ip addr add brd + dev eth23 label eth24:0
ip addr add brd + dev eth24 label eth25:0

# The IP addresses are just examples.  The CIDR can be modifed as well.
# The interface names eth20 through eth25 are numbered in a high way (starting at 20) so as to avoid conflict with the server's NIC names.

# For a book on Docker, you may want to view this list.

Leave a comment

Your email address will not be published. Required fields are marked *