PDA

View Full Version : networking not enabled on startup?



tenthirtytwo
05-11-2007, 08:39 PM
Hi, I am somewhat of a linux newb. I have some command line experience from other platforms. I primarily use Knoppix for data recovery.

Anywho, I have used it in the past, and when the machine was hooked up to the net (gets an IP through DHCP), after boot networking would be enabled, I didn't need to do anything extra.

I had to download the newest distro, but unfortunately the net does not start. Furthermore, I cannot for the life of me get it started!

After starting up the machine, I open a command window.

$ ping X.X.X.1 (another host I know is up)
connect: Network is unreachable
$ ifconfig -a -v
eth0
Link encap: Ethernet HWaddr ...
BROADCAST MULTICAST MTU: 1500 Metric: 1
RX packets: 450 errors: 24 dropped: 0 overruns: 0 frame: 0
TX packets: 17 errors: 0 dropped: 0 overrunes: 0 carrier: 0
collisions: 0 txqueuelen: 1000
RX bytes: 44938 (43.8 KiB) TX bytes: 2902 (2.8 KiB)
Interrupt: 17 Base address: 0xd800

lo
...
$ sudo pump -i eth0 -s
Device eth0
IP: X.X.X.2 (correct IP for this machine)
All info following is correct for the machine...netmask, gateway, DNS servers, etc!

If I use ifconfig and route to manually add the correct IP, netmask, and gateway, then try to ping again I get:

$ ping X.X.X.1
PING X.X.X.1 (X.X.X.1) 56(84) bytes of data
From X.X.X.2 icmp_seq=10 Destination Host Unreachable
15 packets transmitted, 0 received, +3 errors, 100% packet loss, time 14015ms
, pipe 3

Anyway, if anyone can help me out with this I'd appreciate it. I just need to get the network running so I can scp data from the HD. :( Thanks in advance, and I am happy to provide any additional info needed. I have tried /etc/init.d/networking restart and start, ifup -a, ifconfig eth0 up...none seem to do anything.

JohnnyH
05-11-2007, 10:19 PM
You don't mention whether you tried to set up your network card using the Knoppix network card configuration utility. I find that, using Knoppix 5.1.1 (you don't say which release you're using), it does *not* work if you use DHCP. You might find some helpful details in this posting
http://www.knoppix.net/forum/viewtopic.php?t=26965&highlight=
or maybe the other postings referenced therein.

tenthirtytwo
05-12-2007, 12:11 AM
Ahh sorry, I did try using netcardconfig with and without the DHCP option, both did not seem to work

However, I forgot to include the output of exactly what happened afterwards. My mistake. I will try this again as soon as possible and post the output.

I am using 5.1.1, the latest distro.

monteiro
05-13-2007, 09:32 AM
Try to add your network commands into /etc/network/interfaces

My /etc/network/interface looks like this (sensitive info taken out)

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo wlan0
iface lo inet loopback

allow-hotplug wlan0











iface wlan0 inet dhcp
wireless-essid xxxxxx
wireless-key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
wireless-channel 11
up ifconfig wlan0 up
post-up route add default gateway 192.168.0.1 || true

Good luck

tenthirtytwo
05-14-2007, 07:33 PM
Okay, I tried the netcardconfig thing again, these are the results:

using DHCP:

$ netcardconfig
Sending DHCP broadcast from device eth0Operation failed.
Failed.
Hit return to exit.

Without DHCP:

$ netcardconfig
ifconfig eth0 X.X.X.X netmask 255.255.255.192 broadcast X.X.X.255 up
route add default gw X.X.X.1
Setting Nameserver in /etc/resolv.conf to Y.Y.Y.Y
Adding Nameserver in /etc/resolv.conf: Z.Z.Z.Z
Done.
$ ping X.X.X.1
PING X.X.X.1
From X.X.X.X icmp_seq=1 Destination Host Unreachable

As far as /etc/network/interfaces, how should it look if I am using eth0 rather than wireless? Currently it looks like:

$ cat /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet static
[what follows is all the ethernet info for this machine]

Thanks again for any advice.

JohnnyH
05-14-2007, 10:21 PM
... when the machine was hooked up to the net (gets an IP through DHCP) ...
What is your configuration - e.g. domestic or connecting to a company network ? - if domestic, are you behind a router (recommended !) ?
Then please post the output of ifconfig eth0 with the local subnet IP Addresses not concealed by X.X.X.X and so on if we are to be able to help you :wink: .
(Posting such subnet addresses should not be a vulnerability behind a router due to Network Address Translation, but if you want to be cautious, you could use alphabetical characters, but consistently use the same character for the same number so that we can see the structure. But by default, the first two characters are often 192 and 168 .)

tenthirtytwo
05-15-2007, 03:52 PM
... when the machine was hooked up to the net (gets an IP through DHCP) ...
What is your configuration - e.g. domestic or connecting to a company network ? - if domestic, are you behind a router (recommended !) ?
Then please post the output of ifconfig eth0 with the local subnet IP Addresses not concealed by X.X.X.X and so on if we are to be able to help you :wink: .
(Posting such subnet addresses should not be a vulnerability behind a router due to Network Address Translation, but if you want to be cautious, you could use alphabetical characters, but consistently use the same character for the same number so that we can see the structure. But by default, the first two characters are often 192 and 168 .)

This is at my place of work, and there is no NAT involved, which is why I don't feel comfortable disclosing the addresses on a public forum.

For what it's worth, the primary system that is installed on the machine I am using is a working Windows system that also gets an IP through DHCP. It works fine. I am just hijacking this machine to retrieve data off a HD.

I'm not sure what the help would be in posting exactly what the address is, but I will post it with 192.168.0 in place of the first 3.

$ netcardconfig
ifconfig eth0 192.168.0.3 netmask 255.255.255.192 broadcast 192.168.0.255 up
route add default gw 192.168.0.1
Setting Nameserver in /etc/resolv.conf to 192.168.0.205
Adding Nameserver in /etc/resolv.conf: 192.168.0.23
Done.

Thanks again.

JohnnyH
05-15-2007, 08:19 PM
Several issues appear here - I'll have to throw out some quick thoughts as I'll be away for a few days.
1.

$ netcardconfig
ifconfig eth0 192.168.0.3 netmask 255.255.255.192 broadcast 192.168.0.255 up
route add default gw 192.168.0.1
Setting Nameserver in /etc/resolv.conf to 192.168.0.205
Adding Nameserver in /etc/resolv.conf: 192.168.0.23
Done.

Not clear what's going on here - 2 different nameservers 'perceived' by netcardconfig on the network (?!)
How about trying each in turn with a manual edit of /etc/resolv.conf .

2. Unlike my domestic router-managed network, your company network is dynamically allocating different IP addresses at different times of connection of your machine : cf
(First posting, where by your new convention X.X.X = 192.168.0 ) :

IP: X.X.X.2 (correct IP for this machine)
(Previous posting) :

ifconfig eth0 192.168.0.3

This could be tedious if, as in my system, Knoppix 5.1.1 doesn't work in DHCP mode :(
- maybe try a bit of trial & error ;)

tenthirtytwo
05-16-2007, 06:59 AM
Not clear what's going on here - 2 different nameservers 'perceived' by netcardconfig on the network (?!)
How about trying each in turn with a manual edit of /etc/resolv.conf .


It is pretty common to have two different DNS servers listed, and I have yet to find a system that had a problem with this. My home system I'm on right now does the same thing through Windows. But I will give this a shot.



2. Unlike my domestic router-managed network, your company network is dynamically allocating different IP addresses at different times of connection of your machine
This could be tedious if, as in my system, Knoppix 5.1.1 doesn't work in DHCP mode :(
- maybe try a bit of trial & error ;)

Hmm no, sorry for the confusion. In my first posts I just arbitrarily named the system I was pinging X.X.X.1 and the IP of my current system X.X.X.2. The numbers didn't have anything to do with the IPs.

When you asked me to be more specific, I took the actual IP addresses of everything and replaced the first 3 sets with 192.168.0. So the IP of this system does currently, and always has, ended in 3. The IPs are statically set, but handed out via DHCP. Hopefully this makes sense.

JohnnyH
05-21-2007, 09:43 AM
... Anywho, I have used it in the past, and when the machine was hooked up to the net (gets an IP through DHCP), after boot networking would be enabled, I didn't need to do anything extra.
... I just need to get the network running so I can scp data from the HD. ...
OK then I can only suggest that you use a live CD other than Knoppix 5.x , as the network concerned has goodness knows what constraints/requirements on the interfacing of 'guest' machines/systems (BTW I note that the network mask is unconventional), but does work with DHCP.
Knoppix 5.1.1 has never worked for me in DHCP mode, but you might like to try SIDUX; for a lightweight system I find Damn Small Linux to be very reliable and should enable you to do the job that you specify ;) .