Results 1 to 5 of 5

Thread: Reboot changes Static IP

  1. #1
    Junior Member
    Join Date
    Jan 2006
    Location
    Connecticut
    Posts
    2

    Reboot changes Static IP

    Hi everyone - I just found Knoppix and already am a big fan - I gotta say everything works nicely except for one odd behavior maybe someone might help me with.
    I'm not a total noob but I'm no kernel recompiler either.

    I have a Knoppix CD booting with a usb drive holding my settings (250 meg ext2 fs)

    everything behaves exactly as expected except after a reboot - my static ip is set to 192.168.0.233 and when the system comes back up I dont reconnect ... upon typing ifconfig I see the ip address has changed - its still in the range where it should work but I'm assuming the gateway has changed too as dns no longer resolves.

    I can run the network card config and it defaults to all the settings that were previously set ( So I know it remembers my settings - ) and when I accept the defaults (prefilled) I can get online and everything is fine.

    I'd almost think it was wanting to go DHCP on me by default no matter what the static settings were ...... ?

    I spose I could deal with it but if anyone has anyone has any thoughts I'd be interested.

    Thanks,
    Rob

  2. #2
    Junior Member
    Join Date
    Jan 2006
    Location
    Connecticut
    Posts
    2
    I also tried the cheatcode nodhcp on boot - that did something different - it changed my ip to local loopack.

    ??

  3. #3
    Junior Member
    Join Date
    Aug 2005
    Posts
    2
    Howdy from Tucson,

    I have a similler problem. The Knoppix restore seems to save my wireless lan settings but doesn't load them at boot up.
    I have to load my wireless card with the ndiswapper, then configue wlan0. All this amounts too is clicking on the
    screen to pick the driver file in ndiswapper, then starting wavlan and accepting all the settings stored from
    my previous configuration. Including the static IP address I set.

    So, surely it should be possible to write a script to load these stettings?

    Can someone point us in the right direction. I suspect a shell script like the old config.sys or autoexec.bat.

    Where does Knoppix look on boot up for such a configuration file?

    Mort

  4. #4
    Junior Member
    Join Date
    Jan 2006
    Posts
    8
    ZP and Mort, although both of your problems share some similarities (you'd like to configure your network card with a static IP, and you'd like to automate this setup), your problems also differ somewhat.

    ZP, athough you didn't mention in either of your posts, I suspect that your network card connects directly with your broadband modem or a router connected to your broadband modem. If the prior case is true, then you're going to have to stick with DHCP, and your problem becomes either a routing and/or DNS issue. However, if the later case is true, then you can choose whether you wish to stick with DHCP or use a static IP instead. Nevertheless, your problem still will become a routing and/or DNS issue.

    Here's a way to check on your routing setup: netstat -nr. You should get something like this:
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

    If you do get something back like this, then your routing should be ok--assuming that your network card is configured with an IP address like 192.168.0.X (where X is [2,254]). The third line contains the route for your particular network segment; assuming that it's correct, then you should be able to ping the IP of your gateway (192.168.0.1 in this case). The fourth line is the default route; this is the route that will handle packets from/to the Internet (or any other network segment besides the one(s) specified in your routing table). On the other hand, if you don't get back some output like that, then you'll need to remove the bogus route(s) from your routing table, and add the correct route(s). You can do that with the route command, like this: route add -net 192.168.0.0 netmask 255.255.255.0 eth0.

    Afterwards, you need to check your DNS settings. Edit /etc/resolv.conf. Make sure that it contains the IP(s) of the correct DNS server(s).

    You should be able to connect to the Internet just fine by now--assuming that you either not using a firewall, or are using a properly configured firewall.

    Mort, you asked how to automate the process. Well, fortunately (or perhaps unfortunately to you) there are lots of ways to do this, and I'm not going to get into all of that. You can check out the Linux networking How-To for that. One way to automate the process is to add/adjust an entry in one of your rc scripts--like /etc/rc.conf. This is usually enough to get things up and running for a simple network setup.

    FYI: I've been using Linux for . . . ever (since 1992), and I've worked with lots of different distros. I'm tired of tweaking various distro-specific initialization scripts (most of them are in /etc, /etc/network, and/or /etc/init.d) to handle setting up my network. Well, I tweak those scripts for my clients if they ask me to do it, but I came up with another solution for my own setup. I rolled my own network setup script that I can either run manually or add to my bootstrap process. Basically, all you need to do is: make a list of the commands you execute to configure your network, turn that list into a script, test that script (to ensure that it works), and then run chkconfig on it (if you have it on your system). If you don't have chkconfig, then you can manually copy your script to /etc/init.d, and create the appropriate symbolic links to that file (something like, ln -s /etc/init.d/myScript /etc/rc3.d/SXXmyScript). Nevertheless, I'd strongly recommend that you'd check out the initialization scripts infomation from Linux From Scratch project for some interesting ideas on how to tweak your network script(s) further, before attempting this part on your own.

  5. #5
    Junior Member
    Join Date
    Aug 2005
    Posts
    2
    Thanks for the help.
    I'll dig into automating the ndiswapper load with a script.
    Getting the wirless running seamlessly is a big step in making Knoppix a daily driver.
    I'm even getting tired of entering my wep key every time I want to connect. If I was running
    WAP I'd give up. The WAP string is just to time consuming to enter every time and I can never
    remember the whole thing.

    Thanks again

    Mort

Similar Threads

  1. Static IP won't function
    By bearqst in forum Networking
    Replies: 8
    Last Post: 10-18-2005, 03:57 PM
  2. Static IP Help
    By hoy_128 in forum Networking
    Replies: 1
    Last Post: 07-29-2004, 03:37 AM
  3. Setting Static IP
    By A. Jorge Garcia in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 03-13-2004, 09:08 PM
  4. Static IPs?
    By A. Jorge Garcia in forum General Support
    Replies: 3
    Last Post: 03-06-2004, 12:18 AM
  5. Static IP is not static!
    By beecee in forum Networking
    Replies: 4
    Last Post: 01-19-2004, 08:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell PowerEdge R630 Server 2x E5-2680 V4 = 28 Cores S130 32GB RAM NEW 480GB SSD picture

Dell PowerEdge R630 Server 2x E5-2680 V4 = 28 Cores S130 32GB RAM NEW 480GB SSD

$208.99



Dell Poweredge R730xd LFF 14-Bay 2U Server | Choose Your CPU & RAM Config picture

Dell Poweredge R730xd LFF 14-Bay 2U Server | Choose Your CPU & RAM Config

$489.99



Dell Poweredge R630 Server 2x E5-2620 V4 =16 Cores | S130 | 32GB RAM | 2x trays picture

Dell Poweredge R630 Server 2x E5-2620 V4 =16 Cores | S130 | 32GB RAM | 2x trays

$167.99



Dell Poweredge R630 2x Xeon E5-2680 v4 2.4ghz 28-Cores / 128gb / H330 / 2x 1TB picture

Dell Poweredge R630 2x Xeon E5-2680 v4 2.4ghz 28-Cores / 128gb / H330 / 2x 1TB

$324.99



Dell PowerEdge R630 Server 2x E5-2640v3 2.60Ghz 16-Core 64GB H330 picture

Dell PowerEdge R630 Server 2x E5-2640v3 2.60Ghz 16-Core 64GB H330

$182.65



HP ProLiant MicroServer Gen8 Server Xeon E3-1220L 8GB RAM No HDD's picture

HP ProLiant MicroServer Gen8 Server Xeon E3-1220L 8GB RAM No HDD's

$229.99



HP ProLiant DL360 G9 Server 2x E5-2690v3 2.60Ghz 24-Core 256GB P440ar picture

HP ProLiant DL360 G9 Server 2x E5-2690v3 2.60Ghz 24-Core 256GB P440ar

$302.90



SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture

SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount

$202.49



DELL PowerEdge R930 4x E7-8890v4 2.2GHz =96 Cores 128GB H730p PCIe 2xSFP+ RJ45 picture

DELL PowerEdge R930 4x E7-8890v4 2.2GHz =96 Cores 128GB H730p PCIe 2xSFP+ RJ45

$824.00



NetApp FAS8060 Server Dual Controller (4x E5-2658 2.10GHz 128GB RAM) NO HDDs picture

NetApp FAS8060 Server Dual Controller (4x E5-2658 2.10GHz 128GB RAM) NO HDDs

$199.99