View previous topic :: View next topic |
Author |
Message |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Fri Aug 12, 2005 5:53 pm Post subject: eth0 and DHCP working but not internet |
|
|
Hey
The subject title pretty much says it all. I boot up and it finds my network card and all the DHCP stuff.
It also shows the correct info when I type ifconfig. I have broadband going through ethernet, not USB,
and I can browse the internet in Windows.
But when I:
ping google.com or ping www.google.com (shouldn't make a difference)
or any host
it says, "Host not found"
Any ideas?
Thanks |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sven Vermeulen Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/d5e02e493e22b9c75ed22.gif)
Joined: 29 Aug 2002 Posts: 1345 Location: Mechelen, Belgium
|
Posted: Fri Aug 12, 2005 6:05 pm Post subject: |
|
|
Do you have the /etc/nsswitch.conf file? If not, create one with the following content:
Code: |
passwd: compat
shadow: compat
group: compat
hosts: files dns
networks: files dns
services: db files
protocols: db files
rpc: db files
ethers: db files
netmasks: files
netgroup: files
bootparams: files
automount: files
aliases: files
|
Next, check if you have a /etc/resolv.conf which contains the correct domain name servers.
You can always try pinging to them:
Code: |
~# cat /etc/resolv.conf
nameserver 195.130.130.11
nameserver 195.130.133.11
domain siphos.be
~# ping -c 3 195.130.130.11
PING 195.130.130.11 (195.130.130.11) 56(84) bytes of data.
64 bytes from 195.130.130.11: icmp_seq=1 ttl=59 time=58.6 ms
64 bytes from 195.130.130.11: icmp_seq=2 ttl=59 time=52.3 ms
64 bytes from 195.130.130.11: icmp_seq=3 ttl=59 time=58.9 ms
--- 195.130.130.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2014ms
rtt min/avg/max/mdev = 52.331/56.638/58.961/3.061 ms
|
If that works out well, and you can still not ping any domain name, your domain servers are probably not valid. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crisis l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/656300483434d1ec3ed160.jpg)
Joined: 10 Feb 2003 Posts: 613 Location: Portland, OR
|
Posted: Fri Aug 12, 2005 6:05 pm Post subject: |
|
|
Sounds like DNS. Did you copy over /etc/resolv.conf during the install?
Try pinging an IP (not dns name). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nixnut Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/29856733845fd04c0f3d8c.gif)
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Aug 12, 2005 6:05 pm Post subject: |
|
|
Moved from Installing Gentoo to Networking & Security.
Check your /etc/resolv.conf.
Can you ping ip numbers even if you can't ping domain names? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Fri Aug 12, 2005 6:09 pm Post subject: |
|
|
Let me give everything a go, and I'll post back here. Just for interest sake, what nameservers do I use?
I also haven't installed anything yet, I'm booting off the Minimal Install CD. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Fri Aug 12, 2005 6:29 pm Post subject: |
|
|
No luck, I tried it all. The files and nameservers are all there.
When I ping the ip address I get "network unreachable". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Fri Aug 12, 2005 9:55 pm Post subject: |
|
|
OK, I got it working. For some reason it wouldn't assign me and ip address ann gateway`.
So I did an ipconfig in Windows and got the details, and then manually set it up using ifconfig and route. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 4:20 pm Post subject: |
|
|
Hey, I'm getting the same problem again, but I've installed GenToo now.
I tried what I did before but it doesn't work. It's actually quite strange, because it doesn't
say anything like, "host not found", it just sits there.
How can I fix this? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m_sqrd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 18 Jul 2005 Posts: 367
|
Posted: Sat Aug 13, 2005 5:10 pm Post subject: |
|
|
ok lets see if we can pin this down
1. dose your windows box boot up with DHCP ?
2 what dose your net work look like modem --> switch --- > computers ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 5:21 pm Post subject: |
|
|
no switches etc, it goes straight to the cable modem.
i've booted up with and without dhcp, but neither worked.
i also got the ip address and gateway from windows and set it manually but that didn't work.
The strange thing is that it did work from the LiveCD, manual config i mean. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m_sqrd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 18 Jul 2005 Posts: 367
|
Posted: Sat Aug 13, 2005 5:27 pm Post subject: |
|
|
Ok but how dose the windows box boot via DHCP or do you have setting your ISP gave you to put in to windows via the control panel ... networking ect... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 5:47 pm Post subject: |
|
|
Windows just picks it up automatically, thats the other thing I can't figure out.
Why doesn't linux pick it up. In the LiveCD I still had to enter it manually. Strange. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m_sqrd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 18 Jul 2005 Posts: 367
|
Posted: Sat Aug 13, 2005 6:12 pm Post subject: |
|
|
ok so when you boot the linux box do you shutdown the windows box first then boot the linux box
I guess I should ask these are 2 diffrent boxes are they not.
if so cat the output of your /var/lib/dhcpc/dhcpcd-eth0.info and lets look at that. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 6:25 pm Post subject: |
|
|
I'll do that. No, same box, I am dual booting. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
the_mgt Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/16252930542f5307bcf1ba.jpg)
Joined: 05 Aug 2005 Posts: 259 Location: Germany, near Hannover
|
Posted: Sat Aug 13, 2005 6:43 pm Post subject: |
|
|
1. If you boot with windows, you can contact the internet? So you have set up your internet connection via the cable modem there, right? Or what takes you to the internet? Any hardware routers???
2. If you connect to the internet from the box you are running gentoo on, did you set up any internet connection? If not, how do you expect to connect to the internet, if you have no external hardware router?
3. If you don't have a hardware router and your only computer connects directly to the internet, what do you need dhcp for?
After all these posts here, i am still not able to figure out your problem. Describe your network configuration and the involved computers more precisely.....
As an example, my configuration:
ISP--->ADSL Modem--->GentooBox (Router, runs dhcp Server) ---> MyLaptop (is dhcp Client)
My Router connects to the internet, is the gateway and provides DNS and DHCP for my LAN. Any computer starting with "config_eth0=("dhcp")" in my network gets an IP address assigned and automatically uses my router as gateway and nameserver. The GentooBox has a fixed IP address.
So, if you only want to connect one single desktop pc to the internet, you don't need a dhcp server.
If you have a hardware router, that is your DHCP and DNS server and is your gateway. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 7:07 pm Post subject: |
|
|
Ok, here goes.
I recently got a Broadband connection with modem, which I connected straight to my pc.
so it's PC -> Modem -> ISP.
The internet in Windows works fine using DHCP, it finds everything.
Now when I was installing GenToo, using the LiveCD, it didn't pick up the ip adress, gateway etc. Or perhaps it did, but it didn't work.
So I went and ipconfig'ed Windows and got the ip details and then did this in GenToo:
Code: |
ifconfig eth0 <ip> netmask <mask> up
route add default gw <gw>
|
And that worked fine. So thinking that I would have a similar problem in the actual installed linux, I added the relevant details so it would be done on startup.
No I finished installing, and it did what it was supposed to do, except there was no internet. So I tried to use DHCP again and then it failed on netmount.
Hope that makes things a bit more clear. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 7:16 pm Post subject: |
|
|
Code: | /var/lib/dhcpc/dhcpcd-eth0.info |
doesn't exist on my machine. Theres a dhcp directory in the lib dir but it's empty. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m_sqrd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 18 Jul 2005 Posts: 367
|
Posted: Sat Aug 13, 2005 7:34 pm Post subject: |
|
|
Ok I'm the one whos confused now.
when you boot of the live-cd you get an ipaddress. and you tested this by
ifconfig eth0 (and it had some like)
eth0 Link encap:Ethernet HWaddr 00:yy:zz:00:11:22
inet addr:192.168.1.12 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18443 errors:0 dropped:0 overruns:0 frame:0
TX packets:14750 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19549297 (18.6 Mb) TX bytes:2065479 (1.9 Mb)
forget the address shown thats for over here on my network.
but you did get some like that yes ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
the_mgt Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/16252930542f5307bcf1ba.jpg)
Joined: 05 Aug 2005 Posts: 259 Location: Germany, near Hannover
|
Posted: Sat Aug 13, 2005 7:45 pm Post subject: |
|
|
EDIT: hehe, the poster above me was faster, please answer his question first
hmmm, i am still confused. Are you sure you didn't setup an internet connection under windows which dials in automatically?
What where the exact ip values, ipconfig listed in windows? How many connections did you see in windows?
What i can't figure out is, which of your computers sends the username and password to your ISP. Thats essentially for having an internet connection. So either your modem does that or you setup somthing in windows....
1.If your modem really provides internet over dhcp (which i think makes it a hardware router) then using dhcp should work.. (and your ip in windows should have been something like 192.168.x.x or 169.x.x.x or in rare cases 10.x.x.x)
Did you emerge net-misc/dhcp ? If so, using "config_eth0=( "dhcp" )" in /etc/conf.d/net and restarting /etc/init.d/net.eth0 should do the trick. If you didn't emerge net-misc/dhcp, no wonder it doesn't work.
2.If your modem does not provide internet via dhcp, than you have to set up an adsl connection under gentoo. Try using adsl-connect. (your ip in windows should have been something like 89.181.53.44 or some seemingly random number)
If you only use a single pc, you don't need netmount at all. But if netmount does not start, it is always a sign for a net device which didn't start.
I suggest you look at some howtos about setting up networks with linux. Maybe one of the examples fits your needs. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 9:05 pm Post subject: |
|
|
m_sqrd:
yip, i did that. I don't think I did it after it worked though.
the_mgt:
the ip is 89.19.xx.xx (don't want to give it all out)
Hmm, I did setup up stuff in Windows, but that doesn't explain why it worked off the liveCD. I think it looks at the mac address of the modem.
I'm sure I emerged dhcp. Well I can can run it so I must have. Let me go try that config.. thing. I did iface="dhcp" and it didn't work. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
the_mgt Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/16252930542f5307bcf1ba.jpg)
Joined: 05 Aug 2005 Posts: 259 Location: Germany, near Hannover
|
Posted: Sat Aug 13, 2005 9:12 pm Post subject: |
|
|
89.x.x.x is an internet adress, so you are directly connected to your ISP.
Why it worked with the LiveCD is a miracle to me...
I think you need to establish a pppoe connection first. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sat Aug 13, 2005 9:19 pm Post subject: |
|
|
Nope, the config thing didn't work.
I think what we have to ask ourselves is:
What did LiveCD do that I'm not?
How do I establish the PPPoe connection? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m_sqrd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 18 Jul 2005 Posts: 367
|
Posted: Sat Aug 13, 2005 9:34 pm Post subject: |
|
|
Hmmm..
what ISP are you using and the modem info as well may be we can finger it out that way. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr_Ridd n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Aug 2005 Posts: 29
|
Posted: Sun Aug 14, 2005 12:11 pm Post subject: |
|
|
I'm with NTL uk.
How do I set the DHCP server address? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m_sqrd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 18 Jul 2005 Posts: 367
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|