Sometimes when we are in the middle of network troubleshooting we need to add a temporary aliasing ip address for our server or pc.
In linux operating system the quick way to do that is by using the following command in the console:
ip addr add 192.168.10.10/24 dev eth0
Replace eth0 with your actual network interface. For temporary changing the gateway use the following command:
ip route replace default via 192.168.10.1
Replace the temporary ip address and gateway with yours. If you want to remove the temporary ip address use the following command :
ip addr del 192.168.10.10/24 dev eth0
Another way to remove them is by restarting your machine.
No comments:
Post a Comment