LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't assign static IP (https://www.linuxquestions.org/questions/linux-newbie-8/cant-assign-static-ip-4175462442/)

BuhRock 05-18-2013 03:42 AM

Can't assign static IP
 
I'm in VMplayer using two ubuntu machines. One is a server, one is a client. I want to set a static for the server, and have edited the /etc/network/interfaces file to where it looks like this:

Code:

auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address 192.168.1.101
        netmask 255.255.255.0
        gateway 192.168.1.1

Then I edited the /etc/resolv.conf file and restarted the services with:
Code:

sudo /etc/init.d/networking restart
When I do an ifconfig, it's still the old IP though. I'm not sure why...

ali.abry 05-18-2013 06:37 AM

try ifdown and ifup command to bring down network and bring it up then check if static ip assigned .

Satyaveer Arya 05-18-2013 06:46 AM

Give a try with GUI.
http://www.addictivetips.com/ubuntu-...-ubuntu-linux/

BuhRock 05-18-2013 02:38 PM

Was resolved with the ifdown and ifup command. Thanks!


All times are GMT -5. The time now is 11:27 PM.