Author Topic: Static IP address lost  (Read 295 times)

Offline xr200

  • Full Member
  • ***
  • Posts: 96
Static IP address lost
« on: March 02, 2013, 07:23:51 PM »
I have a laptop running PCLOS KDE fully updated.  It is configured
to connect to my WIFI network at boot with a static IP address.

Occasionally, I'll take the laptop to a public WIFI hotspot
and use the network center to find their SSID and connect
to the public network.   I turn the laptop off (correctly,
using the Lock/Logout widgit).

When I get home, and I turn the laptop on, I do get connected
automatically to my WIFI network at home, but with a DHCP-ed
IP address (which is different than the desired static IP address).
If I bring up the network center, disconnect the connection,
connect again, I'll get back my correct static IP address.

I don't change anything in the network configuration:  I just disconnect
and connect.  Subsequent reboots at home always connect me
correctly with my configured static IP address.

What's going on?   

xr200

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: Static IP address lost
« Reply #1 on: March 02, 2013, 08:44:18 PM »

This is not an attempt at figuring out why the network tool does not work as expected but an attempt to solve the problem through a work around.Have you tried to set up your router to give your laptop the same IP address? You will be using dhcp but the address you will be getting will always be the same and hence you will get the same result as if you are using a static IP address.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline xr200

  • Full Member
  • ***
  • Posts: 96
Re: Static IP address lost
« Reply #2 on: March 03, 2013, 07:41:21 AM »
No, I haven't tried that: if I did, I'd never be able reproduce the problem  :)

Since I figured out that I can just disconnect/reconnect and all's well, I just do that.
Doesn't take long and I don't need to do it very often.

I'd like to find out if anyone else is experiencing this problem, or is it just me?

If it's just me, oh well, but if it affects others, perhaps one
of the experts might get interested into looking into it.

xr200

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4001
Re: Static IP address lost
« Reply #3 on: March 03, 2013, 08:16:43 AM »
I think this is to be expected. A static address is for a static connection. If you go to another network where that address is not available, you are no longer connecting with a static address. I'm not at all surprised the next time you connect at home you don't get the static address, as it is natural to try to connect with the current set-up.

Whether this behaviour is to be considered normal or not is purely a matter of opinion.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline rastus

  • Sr. Member
  • ****
  • Posts: 257
Re: Static IP address lost
« Reply #4 on: March 03, 2013, 09:48:28 AM »
Is this of any use?

Dynamic addresses are obtained automatically and usually do not require any attention from the user. However there are several specific cases:

    1    If the network has not been available all the time while the system was starting, the internet connection may stay disabled even after fixing the network problems. To revive it instantly, run dhclient as root. This will set the dynamic address.
    2    The previous situation may happen if the network is accessed by separate hardware that starts at the same time as your machine. In some cases Linux boots faster than the network router and finds no network at startup. Find dhclient.conf (for instance, /etc/dhcp3/dhclient.cof for Debian) and add/correct the line reboot nn;, where nn is the delay for which the system must wait after booting, for the router to start.
   
Source HERE.