What is the command to add another IP address to an interface that already has (at least) one IP address?

What is the command to add another IP address to an interface that already has (at least) one IP
address?

What is the command to add another IP address to an interface that already has (at least) one IP
address?

A.
ifconfig eth0:1 192.168.1.2

B.
ifconfig eth0 192.168.1.2

C.
ipconfig eth0:1 192.168.1.2

D.
ipconfig eth0 192.168.1.2

E.
ifconfig eth0:sub1 192.168.1.2

Explanation:

From the man pages:
ifconfig – configure a network interface

The interface is usually a driver name followed by a unit number, for example eth0 for the first
Ethernet interface. If your kernel supports alias interfaces, you can specify them with eth0:0 for the
first alias of eth0.
You can use them to assign a second address.



Leave a Reply 0

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