Static address with network manager

Brian Wootton Brian.Meg at btinternet.com
Mon Aug 30 20:30:11 UTC 2010


On 29/08/10 21:58, kubuntu-users-request at lists.ubuntu.com wrote:
> Message: 10
> Date: Sun, 29 Aug 2010 14:01:49 -0700
> From: Christophe Guilbert<cguilbert at picasso.ucsf.edu>
> Subject: Static address with network manager
> To:kubuntu-users at lists.ubuntu.com
> Message-ID:<4C7ACABD.8040801 at picasso.ucsf.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi,
>
> I would like to know how to setup a static address using a GUI tool
> I used to do that very easily with any previous Kubuntu version.
> I am using network manager , I can set a new connection with a static IP
> address with network manager ("connect automatically" option checked) ,
> however each time I reboot my computer , I got a DHCP  address again ,
> the new connection never come first.
> How can a start this connection by default when I start the computer
>
> Also when I setup a new  connection , I had to setup this stupid kvallet
> passwrd which I DON"T want , how can I fix that
>
> Thanks a lot for any help
>
>    
Presuming that you have a router and it covers the class C
network 192.168.xx.xx
Presuming you are using KNetworkManager

Do these
  1. write your own /etc/hosts - see one of my hosts files at the end.
       you have to know beforehand what your computers network name
       and IP is,
       what your router/gateway's IP is, what your Netmask is and what
       your namesever IP address is.
  2. do at least one of the following:
          a) turn off DHCP in your router
          b) pick static IP addresses outside the routers DHCP declared 
range
          c) change your routers DHCP range
          d) tell the router's DHCP to always use the same IP address
      I can do all of these on my router, but any one should be sufficient.
      (b) is probably the more correct way, different routers differ in 
their setups.

3. Run KNetworkManager, either from the system tray or  applications>system,
     Navigate to Manage Connections, pick what you want 
wired/wireless/whatever
     click 'add', fill whatever boxes depending on what type of 
connection you
     selected and then click 'IP address', select 'manual' from the 
'method' drop
     down menu and fill in all the numbers. You probably want to tick 
'connect auto-
     matically' also, and finish.

    And that should be it! he said hopefully.
    I only use static addresses on my local network and I look at my 
/etc/hosts fairly
    often to make sure my machines haven't tried to second-guess me, I 
keep a copy
    of the /etc/hosts I want so I can overwrite what the OS thinks I 
want back to what
    I want.
    Below is a copy of my /etc/hosts, note I've hashed out the loop-back 
127.0.0.1 stuff
    and also note you want the localhost alias for whichever machine the 
/etc/hosts is
    on. All my machines (except the printer) have the some hosts file 
except for shifting
    the localhost alias, and the IPV6 stuff.
    Hope this makes sense
    brian
   
---------------------------------------------------------------------------------------
# generated by drakconnect
#127.0.0.1 meg
#127.0.0.1 localhost
# 127.0.0.1
# static home entries generated by brian
192.168.1.254   gateway
192.168.1.64    nutmeg
192.168.1.65    meg localhost
192.168.1.66    megaera
192.168.1.67    HP9A8E2A

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts









More information about the kubuntu-users mailing list