LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2004, 07:06 PM   #16
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45

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>
 
Old 12-01-2004, 07:15 PM   #17
peaceslp
LQ Newbie
 
Registered: Nov 2004
Posts: 21

Original Poster
Rep: Reputation: 15
It says host name lookup failure, im assuming its still a problem with the dns.
Edit: and i cant ping any addresses
 
Old 12-01-2004, 07:18 PM   #18
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
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 ?

Last edited by mjrich; 12-01-2004 at 07:21 PM.
 
Old 12-01-2004, 07:23 PM   #19
peaceslp
LQ Newbie
 
Registered: Nov 2004
Posts: 21

Original Poster
Rep: Reputation: 15
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

Last edited by peaceslp; 12-01-2004 at 07:25 PM.
 
Old 12-01-2004, 07:33 PM   #20
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
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 !
 
Old 12-01-2004, 07:42 PM   #21
peaceslp
LQ Newbie
 
Registered: Nov 2004
Posts: 21

Original Poster
Rep: Reputation: 15
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.

Last edited by peaceslp; 12-01-2004 at 08:05 PM.
 
Old 12-01-2004, 08:02 PM   #22
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
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).

Last edited by mjrich; 12-01-2004 at 08:05 PM.
 
Old 12-01-2004, 08:07 PM   #23
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
From post #16 above...

# route add default gw <gateway ip>
 
Old 12-01-2004, 08:11 PM   #24
peaceslp
LQ Newbie
 
Registered: Nov 2004
Posts: 21

Original Poster
Rep: Reputation: 15
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?
 
Old 12-01-2004, 08:19 PM   #25
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
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
 
Old 12-01-2004, 08:25 PM   #26
peaceslp
LQ Newbie
 
Registered: Nov 2004
Posts: 21

Original Poster
Rep: Reputation: 15
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.
 
Old 12-01-2004, 08:26 PM   #27
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
No worries - glad to be of help

Cheers,

mj
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drivers for Linux Mr. Hill Linux - Newbie 5 02-15-2005 07:11 AM
Drivers with linux alexr186 Linux - Software 2 12-19-2003 05:32 PM
Linux Drivers Omer Linux - Hardware 1 09-14-2003 11:37 PM
VIA 4 in 1 drivers for Linux? ludwig W Linux - Software 8 04-15-2003 07:28 AM
Linux drivers musicman_ace Linux - General 1 05-04-2001 01:45 PM


All times are GMT -5. The time now is 12:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration