Article 6D8KM How to set multiple IP addresses on a NIC?

How to set multiple IP addresses on a NIC?

by
Jason.nix
from LinuxQuestions.org on (#6D8KM)
Hello,
To set the multiple IP addresses on a NIC, I must create a virtual NIC?
For example, If my real NIC name is enp0s3, then I must:
Code:# touch /etc/network/interfaces.d/enp0s3:0
# nano /etc/network/interfaces.d/enp0s3:0

auto enp0s3:0
iface enp0s3:0 inet static
address 10.0.5.20
netmask 255.255.255.0

#
# systemctl restart networkingIs it mandatory? Can I add the above lines to the real NIC file (/etc/network/interfaces.d/enp0s3)?

Thank you.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments