Ubuntu – Static ip network guide


I have a fresh install of 13.10 and my networking works fine (cable model cloud router) via the standard network manager applet.

I'm trying to setup my box to a use static IP instead of dhcp and I'm trying to use your guide:

Basically, the settings via the networking applet seem to be conflicting with what I see on the command line.

a) The ifconfig -a shows eth0 with the inet address assigned via dhcp.

ifconfig -a

eth0      Link encap:Ethernet  HWaddr 44:87:fc:97:ed:24  
      inet addr:  Bcast:  Mask:
      inet6 addr: fe80::4687:fcff:fe97:ed24/64 Scope:Link
      RX packets:61170 errors:0 dropped:0 overruns:0 frame:0
      TX packets:41321 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:79517729 (79.5 MB)  TX bytes:4735861 (4.7 MB)

lo        Link encap:Local Loopback  
      inet addr:  Mask:


b) However, the interfaces file does not have even eth0 defined.

cat /etc/network/interfaces
auto lo
iface lo inet loopback

c) I could not even do:

sudo ifdown eth0
ifdown: interface eth0 not configured

How is this possible or what am I basically missing ?
Will the steps in the link above for configuring a static IP work ?


Best Answer

The instructions you have linked are for servers where Network Manager is not installed. In such cases, manual methods, in part /etc/network/interfaces, are the methods used to set up networking. On the other hand, in a desktop installation, one with the networking applet, Network Manager controls networking, not manual methods.

In such cases, in order to set a static IP, right-click the applet, also known as the Network Manager icon and select Edit Connections. Edit eth0, in your case, and select IPv4. Change the method to Manual. Fill in your selections and don't forget DNS nameservers. In most cases, the address of the router is sufficient for DNS. Also, be sure to use a static IP address outside the range used by the router for DHCP.

Please see: http://3.bp.blogspot.com/-zXKEt3vxNg4/T58h-Cm1HJI/AAAAAAAAAjs/uOC0tCLcS4w/s1600/ScreenHunter_02%2BApr.%2B30%2B16.37.gif

Related Question