Debian network problems after net install

tdawg

Platinum Member
May 18, 2001
2,215
6
81
Hello all,

So, I'm very interested in trying out Debian since I now have an extra hard drive to play with. I really want a minimal install without all that extra software I'll never use, so I just downloaded the 180mb net install disk.

During the install, it detected my realtec onboard NIC and autoconfigured it, but when I restarted to boot into the new system, it was no longer detected. So I'm stranded with no ability to download any packages (especially X and gnome), and I don't know linux at all (I've dabbled a bit in the past), so all the command line stuff is getting me nowhere.

I downloaded and successfully installed ubuntu, which detected both onboard NIC's on my motherboard, but I didn't like all the excess software.

So here I am. Can anybody help me? I've read numerous posts about configuring the network from the command line, but 'ifdown eth0' returns 'eth0 not configured' and 'ifup eth0' results in an attempt to connect to my router, but eventually fails.

Thanks in advance.

Trevor
 

tdawg

Platinum Member
May 18, 2001
2,215
6
81
ifup eth0 -v results in:

configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
dhclient -e -pf /var/run/dhclient.eth0.pid -lf /var/run/dhclient.eth0.leases eth0

Internet Software Consortium DHCP client 2.0p15...

Listening on LPF/eth0/<MAC address>
Sending on LPF/eth0/<MAC address>
Sending on Socket/fallback/fallback-net
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval x (x=some number) [this repeated 6 times]

No DHCPOFFERS received
No working leases in persistent database

Exiting

failed to bring up eth0


Just for reference, in case it helps, ifdown eth0 -v results in:

ifdown: interface eth0 not configured

Hope that helps.

Thanks,
Trevor
 

nsafreak

Diamond Member
Oct 16, 2001
7,093
3
81
Umm I'm pretty sure you need to put the -v flag BEFORE the eth0 although it may well not matter. Post the output from ifconfig eth0 please.

EDIT: My bad you do need it after the eth0.
 

bersl2

Golden Member
Aug 2, 2004
1,617
0
0
Just seeing what it would do. I don't use no fancy-schmancy "ifup" on my boxes.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Alright, the easiest way to solve this problem is by looking at what you want and the possible problems that prevent you from what you want.

I assume that you have a computer that is running linux attatched to a twisted wire-based ethernet network and your trying to get a lease from your DHCP server to automaticly get a ip address, dns address, and default route address.. all of which you need to be able to get on the internet.

However when you boot up your machine, this doesn't happen and your stuck with no connectivity.

Now there are numerious things that can go wrong and it's pretty much the same issues mostly irregardless of the OS that your using. PCs and their hardware are all the same, ethernet is all the same, and everybody is using TCP/IP...

So the possible problems are:
1. Your OS is not able to detect and configure the nic card.
2. You have multiple possible networking devices and it's trying to use the wrong one.
3. The OS doesn't know that it's suppose to set up a network interface for you.
4. The dhcp server is incorrectly configured, or is expecting a specific hostname to go with a adress and your system isn't sending it the correct one.
5. The dhcp client software and the server software isn't very compatable.
6. The drivers are buggy.

That's about what I can think of off of the top of my head.. I am sure there are other problems that can pop up. Also the realy sucky part is that more then one thing can be going bad at once.. for isntance you can have a bad ethernet wire AND have buggy drivers.

So we can test for 1 and 2 right away with this command:
ifconfig -a

It will spit out all possible network interfaces that it has aviable. Any wifi, ethernet cards, even firewire can show up here. Minimally you should have 2. Lo for 'loopback', and eth0 for your nic card.

So if eth0 shows up then you know the drivers work and the system has the card detected and at least minimally operational.

If you have eth0 and eth1 and more then it could be trying to use the wrong device and you should make sure that eth0 is indeed your nic card... but you should probably have only one, I am guessing.


By going ifup eth0 -v you show that at least it knows that it should get a networking interface going on that device.

The next step is to try to configure your network interface manually and make sure that the network isn't screwed up, and that your drivers are not buggy.

Steps to setup a temporary (until you reboot) network interface and dns address and gateway are as follows:

ifconfig eth0 192.168.0.1 up
(were 192.168.0.1 is your ip address you want)
route add default gw 192.168.0.254
(were 192.168.0.254 is your gateway..)
then edit /etc/resolv.conf and add a extra line:
nameserver 192.168.0.254
(were 192.168.0.254 is your dns server)

You can add several dhcp server ip address to /etc/resolv.conf and they will be used in order top to bottom.

After you get the network manually configured you can test it out using ping..
ping 127.0.0.1
(to make sure that basic network loopback interface is working)
ping 192.168.0.1
(to make sure that your nic card's ip address is functional)
ping 192.168.0.254
(to make sure that the network is up and your able to get the gateway to respond)
ping 192.168.0.254
(if you have a different ip address for the name server then the gateway you can test to make sure that you can reach the dns server is present and you can reach it.)
ping www.google.com
ping www.yahoo.com
(to make sure that DNS is working and your able to get out of your local network and out onto the internet).


I all that is working then you know for certain that the drivers and installed and functioning correctly and that the network is working. You can either edit /etc/network/interfaces or use a GUI tool to configure the system to use those manual settings that you know will work or figure out why the dhcp server isn't giving you your ip address stuff.

see:
man interfaces

for details on the format of that text file if you feel like making the settings that you know work perminate. Otherwise many dhcp clients can send hostnames and ids to dhcp servers that are not the same as your actual hostname and there are other types of client software that you can use.
 

tdawg

Platinum Member
May 18, 2001
2,215
6
81
Thanks, Drag. I'll definitely give that a try.

For nsafreak: output of ifconfig eth0 -v is as follows:

Link encap: Ethernet HWaddress: <MAC address>
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 0 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisions: 0 txqueuelen: 1000
RX bytes: 0 (0.0b) TX bytes: 0 (0.0b)
Interrupt: 5 Base address: 0x4000

Hope that helps.

Thanks again for the help so far.

Trevor