Difference between revisions of "Configuring an alias IP"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== Windows == | == Windows == | ||
* <code>[[ipconfig /all]]</code> | * <code>[[ipconfig /all]]</code> | ||
− | |||
== Linux alias == | == Linux alias == | ||
Line 13: | Line 12: | ||
== [[MacOS]] [[alias]] == | == [[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: | ||
− | + | ||
− | sudo ifconfig en1 inet 192.168.10.2/24 add | + | 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.20.2/24 add |
− | sudo ifconfig en1 inet 192.168.30.2/24 add | + | sudo ifconfig en1 inet 192.168.30.2/24 add |
− | |||
or | or | ||
<pre> | <pre> |
Latest revision as of 16:06, 18 December 2023
Contents
Windows[edit]
Linux alias[edit]
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[edit]
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[edit]
Advertising: