Difference between revisions of "Configuring an alias IP"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
ether 33:54:00:7d:35:22 txqueuelen 1000 (Ethernet) | ether 33:54:00:7d:35:22 txqueuelen 1000 (Ethernet) | ||
− | + | == [[MacOS]] [[alias]] == | |
Configure 3 alias in <code>en1</code> interface, https://ss64.com/osx/ifconfig.html: | Configure 3 alias in <code>en1</code> interface, https://ss64.com/osx/ifconfig.html: | ||
<pre> | <pre> | ||
Line 28: | Line 28: | ||
ifconfig eth# up or [[ip link]] set eth0 up | ifconfig eth# up or [[ip link]] set eth0 up | ||
− | |||
== See also == | == See also == | ||
* {{ipconfig}} | * {{ipconfig}} | ||
* {{ifconfig}} | * {{ifconfig}} |
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: