D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Assigning Static IP addresses on Mint 12

 

On 27/12/12 17:47, Roland Tarver wrote:
> Fair point. Even as a low grade linux user I  would still prefer to
> use a command line wherever possible. This assumes that the command
> line task I am attempting uses the current (up-to-date) method(s) and
> is no harder than it's gui alternative. In this case it seems I was
> better off using the gui program - as you have rightly pointed out
> lol. Thank you :-)

It's definitely doable in the shell alone: to really quickly push down
an interface and configure it on your network you could do:

ifconfig eth0 down
ifconfig eth0 inet 192.168.1.10 netmask 255.255.255.0 up
echo "nameserver 192.168.1.1" > /etc/resolv.conf
route add default gw 192.168.1.1

And you're done. The problem you'll have is that you use wifi (wlan0)
instead of wired (eth0) networking, which means you'll also have to
configure WPA/WPA2 and the authentication method, which is not so easy
at a prompt. If you configure your wifi manually by defining wlan0 with
a stanza in /etc/network/interfaces (which is my usual method of
controlling static addressing) then network-manager will stop working
for that interface and will display "device not managed" in the taskbar
applet and control panel section: you will not find this helpful when
you are in a coffee shop, airport or other environment with a new wifi
setup that you want to connect to. Trust me, unless you really know what
you are doing it's best to leave autoconfiguration and joining new wifi
networks to network-manager or another graphical helper. Static wired
connections are much, much easier to configure manually.

> No!? it does not seem to have it's own entry? Unless it looked like
> "127.0.1.1    Atomiser", which I subsequently deleted since I thought
> it was added by me a long time ago, when messing about! (Yes, I will
> stick to gui tools lol lol) I definately could be wrong? lol. My
> /etc/hosts file is shown below...

Ah, that 127.0.1.1 entry has a complicated history, relating to the dual
roles of /etc/hosts as both an override mechanism and the default
resolution method if all else fails (via nsswitch) - if you can be
bothered, there's some information about it on this bug report:
https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/234543

It's definitely safe (and desirable) to delete the "127.0.1.1 Atomiser"
entry, it was probably added previously and automatically by the Ubuntu
installer/upgrader utilities and that behaviour has been superseded now.
However, the "127.0.0.1 localhost" entry is strictly *not* optional, as
it binds the canonical loopback address correctly.

> The example, below, does not seem to include its own entry? Please
> explain? and sorry if this is really simple / boring for other readers!
>
> http://community.linuxmint.com/tutorial/view/159

Yeah, I quickly scanned that "tutorial" and it's just awful I'm afraid,
the poor guy is obviously well meaning but not technically qualified to
give advice.

> Bad Apple and everyone else, I have learnt quite a lot from this
> thread - simple though it may be. So thank you all very indeed.

No problem, glad I could help.

Cheers

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq