Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Okay, I know there are already questions about how to set up a static ip in 12.10, but I keep having specific issues and problems with the guides I've found.

  • First of all, when I run ifconfig, I find that both lo and wlan0 have downloaded packets. In my /etc/network/interfaces file it says auto lo. Which should I be setting?

  • Secondly, every guide I've found does it as though eth0 is the main connection, but it isn't for me? So what should I be doing differently?

  • Next: If I do it the graphical way, through Network settings, do I need to change the settings for both IPV4 and IPV6? Every guide I've found has only ever done it for IVP4.

  • Lastly, how do I know what to set my ip address as when I set it to static?

I'm running Ubuntu 12.10 on a HP Folio 13. Thanks in advance!

share|improve this question
First: Why u need Static Ip? Second: what is your gateway IP adress? If u run desktop edition, better do it graphical way. I need more details about your network confguration.. then i can point you to the right way.. – gexas Mar 5 at 19:19
I want it because I host a Minecraft server. What details do you need? – schtocker Mar 5 at 20:48

2 Answers

up vote 1 down vote accepted

Do you have a specific reason for wanting to set a static IP address? it's not needed in the vast majority of situations. If you do need it, it should be either by request from a network administrator at your organization (in which case it's his responsibility to assist you and provide the proper config values), or because you know you need it on a network you built.

-First of all, when I run ifconfig, I find that both lo and wlan0 have downloaded packets. In my /etc/network/interfaces file it says auto lo. Which should I be setting?

lo is an internal loopback interface. You don't need to change this one. Read about the loopback interface here:

http://en.wikipedia.org/wiki/Loopback

-Secondly, every guide I've found does it as though eth0 is the main connection, but it isn't for me? So what should I be doing differently?

What is your main connection? If it's eth1, you should apply the instructions from your guides to eth1 instead. Use common sense here :) It would help if you could tell us which guides you're looking at.

-Next: If I do it the graphical way, through Network settings, do I need to change the settings for both IPV4 and IPV6? Every guide I've found has only ever done it for IVP4.

Not unless you know you need IPV6. This would be something your network administrator can tell you. If it's your own network, you should know whether you have configured or need IPV6.

-Lastly, how do I know what to set my ip address as when I set it to static?

Ah, here's the crux of the matter. You should know this, either because your network administrator told you "configure a static IP on your machine, here are the config parameters") or because you decided "I'll make my home network fully static, here's how I'm going to allocate my address space, here's the IP address for the gateway, this is the IP for my computer" and so on.

If you don't really know what IP address to set, then potentially you don't really need to set one.

I suggest you read up on what setting up a private network with static addresses entails (http://www.wikihow.com/Set-up-a-Private-Network), you don't need to follow the instructions but it will help you understand how to plan a small network and determine whether you want/need to do this.

share|improve this answer
I want a static ip address because I host a Minecraft server, and it's getting rather tiresome texting my friends the ip address every time I put up the server. I was unsure of my main connection; but now that you've cleared up for me that it's not lo, then it must wlan0. Some of the guides I've been following are howtoforge.com/linux-basics-set-a-static-ip-on-ubuntu , howtogeek.com/howto/ubuntu/… and jonathanmoeller.com/screed/?p=4053 Also, I am without a network admin because this is my home network. – schtocker Mar 5 at 20:45
Thanks for the explanation. How are you connecting to the internet? DSL? cable modem? You can configure your home router to forward minecraft connections to your computer regardless of its internal IP address, but in order to get a static "public" ip address (the one you give your friends) you would need to speak to your ISP. An easier route is to set up dynamic DNS, this way you give people a name like "schtocker-minecraft.dyndns.org" which doesn't change. Read here: wikihow.com/Make-a-Personal-Minecraft-Server – roadmr Mar 5 at 21:10
Okay, No-IP seems like my ideal solution. Problem is, and I'm not sure what I've done, but whenever the No-IP script is running I am unable to connect to the internet. I have to restart my laptop to be able to. When I ran make install I assumed it'd install it (I had to download the tar.gz) but it just took me to setup and then I couldn't connect to the internet. – schtocker Mar 5 at 22:26
Oh woops I forgot to tag @roadmr – schtocker Mar 5 at 22:40
Don't worry, I've now fixed it. I did as the No-IP website suggested and downloaded/installed it with wget. It now works perfeclty. Thank you very much! – schtocker Mar 5 at 22:47

static ip configuration example

Here is an example for a static configuration of interface eth0 in /etc/network/interfaces

 iface eth0 inet static 
    address 10.1.2.3 
    netmask 255.255.240.0 
    broadcast 10.1.255.255
    dns-nameservers 10.1.2.3 10.1.2.3
    dns-search example.com

For more informations see man interfaces

share|improve this answer
man interfaces provides a very good reference on how to configure interfaces. It's a bit technical (not a tutorial!) but is very helpful. – roadmr Mar 5 at 19:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.