View previous topic :: View next topic |
Author |
Message |
Koenpje Tux's lil' helper
Joined: 04 Jan 2005 Posts: 128
|
Posted: Wed Jan 05, 2005 3:33 pm Post subject: Setting up IP & DNS |
|
|
During the installation I had an internet connection and could dowload packages, kernels,...
But now after the installation of Gentoo, I have a IP but that's it. I can ping my other computers in my network, and I can ping my router, but I can't ping sites. So I think I need to set a DNS? But where? |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Wed Jan 05, 2005 3:37 pm Post subject: |
|
|
You probably need to set the default gateway to the IP of your router.
Usually this is 192.168.1.1
I believe this is set in /etc/conf.d/net with a line like Code: | gateway=eth0/192.168.1.1 |
Just change eth0 to your interface and the number to the IP of your router. |
|
Back to top |
|
|
ToeiRei Veteran
Joined: 03 Jan 2005 Posts: 1191 Location: Austria
|
Posted: Wed Jan 05, 2005 3:37 pm Post subject: |
|
|
your dns servers should be set up in /etc/resolv.conf:
Code: |
domain example.com
nameserver <ip of nameserver>
nameserver <ip of nameserver>
|
Rei _________________ Please stand by - The mailer daemon is busy burning your messages in hell... |
|
Back to top |
|
|
Koenpje Tux's lil' helper
Joined: 04 Jan 2005 Posts: 128
|
Posted: Wed Jan 05, 2005 3:38 pm Post subject: |
|
|
ToeiRei wrote: | your dns servers should be set up in /etc/resolv.conf:
Code: |
domain example.com
nameserver <ip of nameserver>
nameserver <ip of nameserver>
|
Rei |
Was already done
Gonna try Jubenvi 's option now |
|
Back to top |
|
|
Koenpje Tux's lil' helper
Joined: 04 Jan 2005 Posts: 128
|
Posted: Wed Jan 05, 2005 3:41 pm Post subject: |
|
|
jubenvi wrote: | You probably need to set the default gateway to the IP of your router.
Usually this is 192.168.1.1
I believe this is set in /etc/conf.d/net with a line like Code: | gateway=eth0/192.168.1.1 |
Just change eth0 to your interface and the number to the IP of your router. |
Was already set
gateway="eth0/192.168.1.1" |
|
Back to top |
|
|
ToeiRei Veteran
Joined: 03 Jan 2005 Posts: 1191 Location: Austria
|
Posted: Wed Jan 05, 2005 3:45 pm Post subject: |
|
|
Jubenvi's option in short without restarting services:
route add default gw <gateway>
that's what the entry in conf.d/net does at starting the network scripts.
Rei _________________ Please stand by - The mailer daemon is busy burning your messages in hell... |
|
Back to top |
|
|
Koenpje Tux's lil' helper
Joined: 04 Jan 2005 Posts: 128
|
Posted: Wed Jan 05, 2005 3:48 pm Post subject: |
|
|
WTF
I typed:
route add default gw $192.168.1.1
But you need to do it without the "$", but at the guide there is "$" sign |
|
Back to top |
|
|
Koenpje Tux's lil' helper
Joined: 04 Jan 2005 Posts: 128
|
Posted: Wed Jan 05, 2005 3:52 pm Post subject: |
|
|
Pff I can ping site's now, but when I want to emerge some program's, he wants to connect to ftp's but none of them work
Failed: address family not supported by protocol
That's the error I get after each attemp to download from a ftp, and the last site is: www.hardeman.nu and then I get the error: Failed: conection refused |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Wed Jan 05, 2005 10:16 pm Post subject: |
|
|
Are you positive "Packet Socket" option is compiled into kernel or you have the kernel module af_packet loaded?
I had a similar problem when I used DHCP when that option wasn't included. |
|
Back to top |
|
|
|