Configuring an alias IP

From wikieduonline
Revision as of 13:07, 10 March 2021 by Welcome (talk | contribs)
Jump to navigation Jump to search

Windows


Linux alias

ifconfig eth0:0 192.168.1.6 up
ifconfig eth0:0
eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.6  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 33:54:00:7d:35:22  txqueuelen 1000  (Ethernet)

MacOS alias

Configure 3 alias in en1 interface, https://ss64.com/osx/ifconfig.html:

sudo ifconfig en1 inet 192.168.10.2/24 add
sudo ifconfig en1 inet 192.168.20.2/24 add
sudo ifconfig en1 inet 192.168.30.2/24 add

or

sudo ifconfig en1 inet 192.168.10.2/24 alias
sudo ifconfig en1 inet 192.168.20.2/24 alias
sudo ifconfig en1 inet 192.168.30.2/24 alias


Remove/delete alias:

sudo ifconfig en1 inet 192.168.10.2/24 delete


ifconfig eth# up or ip link set eth0 up

See also

Advertising: