How to Give your Linux Temporary IP Address

Submitted by str on Sat, 09/24/2011 - 00:39

In some odd cases like you are troubleshooting network problem or you want to join temporarily a different VLAN or subnet, it is very handy, useful and sometimes really required to change your Ubuntu box IP Address.

Use ifconfig
sudo Ifconfig eth0 192.168.1.88 netmask 255.255.255.0

Add route
sudo route add default gw 192.168.1.254

Where:192.168.1.88 is the IP Address that you want to use.
255.255.255.0 is the subnet mask of the network you want to join
192.168.1.254 is your gateway

Comments