LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Drivers (https://www.linuxquestions.org/questions/linux-newbie-8/linux-drivers-261132/)

mjrich 12-01-2004 06:06 PM

If the output of ifconfig indicated that eth0 was already up, and you can ping individual ip addresses (which I assume from your post #9) then it is almost certainly due to either the dns or gateway not being configured, rather than dhcp.

You may need to set the netmask and gateway ips, i.e.
Code:

ifconfig eth0 ip <ip address> netmask 255.255.255.0
route add default gw <gateway ip>


peaceslp 12-01-2004 06:15 PM

It says host name lookup failure, im assuming its still a problem with the dns.
Edit: and i cant ping any addresses

mjrich 12-01-2004 06:18 PM

Do you mean that you can't ping *numbered* ip addresses (eg. ping 216.239.37.99), or *named* ip addresses, eg. ping yahoo.com ?

Have you added your default gateway, as above ?

peaceslp 12-01-2004 06:23 PM

Ok, I have tried pinging named servers like yahoo.com and it says unknown host; I have also tried pinging my router with the ip address (numbered) and it says the network is unreachable.

Edit: I tried adding the gateway like you had above with my addresses instead, but it said the host could not be looked up, something like that. Thanks again for your persistence

mjrich 12-01-2004 06:33 PM

If you have rebooted, you may need to check that eth0 is still up (use ifconfig, as root). If eth0 is up, the default gateway and netmask are set, and you have an ip address, then I would check, carefully, that you do in fact have the correct nameserver listed in /etc/resolve.conf !

peaceslp 12-01-2004 06:42 PM

This is exactly what i get with ifconfig,

eth0 Link encap:Ethernet HWaddr 00:03:0D:0B:76:56
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Rx Pactkets: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 ytes:0 (0.0 b) TX bytes: (0.0 b)
Interrupt: 3 Base address:0x20000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask 255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1


(some more junk) but no ip addresses are listed with ifconfig?

Edit: I was able to assign an ip address to it and ping my router, but i still cant ping yahoo. I tried to change the route agian, but it said host not found.

Edit2: How do you change the gateway?, I was looking under ifconfig --help. I changed the ip like you had above, but i left out ip before the ip address. Maybe im putting things in wrong, not being able to change the gateway.

mjrich 12-01-2004 07:02 PM

You would normally have an additional line, before the one begining with UP, e.g.

addr:<ip address> Bcast:<bcast address> Mask:255.255.255.0

However this may just be due to distro differences (try ifconfig -a to be sure). Otherwise, you'll probably have to run dhclient to set the ip dynamically. Just a thought, but there is often a gui to set this automatically - you may want to have a poke around to check for something along the lines of Network Card Config on your menu. And yes, I know I derided Gui's earlier on :)

EDIT: If you can ping your router, then try pinging the ip address (as the number) of, say google. If that's successful, then your dns entries are pretty likely to be wrong (or temporarily down).

mjrich 12-01-2004 07:07 PM

From post #16 above...

# route add default gw <gateway ip>

peaceslp 12-01-2004 07:11 PM

i tried that, it didnt work. I figured if i could ping my router i must have part of it right, i just need to tell it to use my router as a gateway. The default ip for my router is 192.168.1.1, thats the one i use as a gateway right, or do i use the ip assigned by the school dhcp server to the router?

mjrich 12-01-2004 07:19 PM

What do you mean by 'it didn't work' ? Error messages ? Clouds of smoke ?

The ip of your router is the one you should use as your gateway. So,

# route add default gw 192.168.1.1

peaceslp 12-01-2004 07:25 PM

Umm, Well i got it to work (you did), i was putting # ifconfig route add default 192.168.1.1 in instead of the other way. Thats awsome! My next project is to get my wireless card to work next. I have already tried ndiswrapper, but i wont bother you with that right now. Thanks for the help, it was greatly appreciated.

mjrich 12-01-2004 07:26 PM

No worries - glad to be of help :)

Cheers,

mj


All times are GMT -5. The time now is 09:07 PM.