Difference between revisions of "Configuring an alias IP"
Jump to navigation
Jump to search
Line 32: | Line 32: | ||
* {{ipconfig}} | * {{ipconfig}} | ||
* {{ifconfig}} | * {{ifconfig}} | ||
+ | |||
+ | |||
+ | [[Category:Networking]] |
Revision as of 13:06, 10 March 2021
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: