Can a single network card have 2 IP addresses

ipnic

Are network cards and IP addresses a one-one map?

Best Answer

On linux, the command is ip addr add IFADDR dev STRING, where IFADDR and STRING are replaced by the IP address and device name. You can see some examples in the Guide to IP Layer NEtwork Administration with Linux. You'll also want to specify your routes that use that IP address using ip route. Again, the guide comes through.

Even though the syntax of the ip commands makes it seem that you are associating the IP address with a specific network card, linux considers the IP address as belonging to the overall system. Thus in some circumstances you may want to twiddle with ARP settings.