View previous topic :: View next topic |
Author |
Message |
GuLo n00b
Joined: 11 Sep 2003 Posts: 12
|
Posted: Fri Sep 12, 2003 8:44 am Post subject: DNS problems? |
|
|
installed the system and rebooted. now there is no network connection. during install everythinig went fine, but after reboot i can't connect to the ftp servers, but I can ping the other machines on the network via IP but not via dns name.
So I guess it has something to do with the dns? |
|
Back to top |
|
|
water Guru
Joined: 19 Jun 2002 Posts: 387 Location: Zierikzee, The Netherlands
|
Posted: Fri Sep 12, 2003 8:49 am Post subject: |
|
|
Are you using a static ip or dhcp?
ip's for DNS-servers are stored in /etc/resolv.conf _________________ Groeten uit Holland |
|
Back to top |
|
|
GuLo n00b
Joined: 11 Sep 2003 Posts: 12
|
Posted: Fri Sep 12, 2003 8:51 am Post subject: |
|
|
i'm using static ips
i have the 2 dns servers stored in /etc/resolv.conf |
|
Back to top |
|
|
water Guru
Joined: 19 Jun 2002 Posts: 387 Location: Zierikzee, The Netherlands
|
Posted: Fri Sep 12, 2003 9:02 am Post subject: |
|
|
Other machines in your own network have to be added in /etc/hosts.
If /etc/resolv.conf doesn't exist, then open a new file using nano and add something like
Code: |
nameserver 208.164.186.1
nameserver 208.164.186.2
|
Where you have to change the ip-adresses to the ones of your ISP.
But, can you ping something outside your network?
Try to ping 212.162.48.146 (www.gentoo.org). If not, you have to take a look at your network setup. _________________ Groeten uit Holland |
|
Back to top |
|
|
GuLo n00b
Joined: 11 Sep 2003 Posts: 12
|
Posted: Fri Sep 12, 2003 9:05 am Post subject: |
|
|
Tried to ping 212.162.48.146 and go t a msg saying "network is unreachable" so I guess something isn't working
Although, I can ping my gateway. |
|
Back to top |
|
|
active Apprentice
Joined: 23 Jun 2003 Posts: 228 Location: Something not a structure or union
|
Posted: Fri Sep 12, 2003 9:15 am Post subject: |
|
|
you can ping your gateway, but is it added to your routing table? _________________ GIT d- s:+>: a-- C+++ UBS+++ P++ L+++
E--- W+ N+ w M- PS+(++) PE PGP+ !t
X++ tv+ b++ D+ G e h! r++ x* |
|
Back to top |
|
|
GuLo n00b
Joined: 11 Sep 2003 Posts: 12
|
Posted: Fri Sep 12, 2003 9:25 am Post subject: |
|
|
Sorry for being a bit stupid today, but where can I find this table? |
|
Back to top |
|
|
To Veteran
Joined: 12 Apr 2003 Posts: 1145 Location: Coimbra, Portugal
|
Posted: Fri Sep 12, 2003 9:29 am Post subject: |
|
|
Tó _________________
------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------ |
|
Back to top |
|
|
GuLo n00b
Joined: 11 Sep 2003 Posts: 12
|
Posted: Fri Sep 12, 2003 9:38 am Post subject: |
|
|
Found the problem in the routing table, the gateway is set to 0.0.0.0.
How do I change this? |
|
Back to top |
|
|
active Apprentice
Joined: 23 Jun 2003 Posts: 228 Location: Something not a structure or union
|
Posted: Fri Sep 12, 2003 9:42 am Post subject: |
|
|
Code: | route add default gw [ip] |
_________________ GIT d- s:+>: a-- C+++ UBS+++ P++ L+++
E--- W+ N+ w M- PS+(++) PE PGP+ !t
X++ tv+ b++ D+ G e h! r++ x* |
|
Back to top |
|
|
GuLo n00b
Joined: 11 Sep 2003 Posts: 12
|
Posted: Fri Sep 12, 2003 9:44 am Post subject: |
|
|
Thanx guys, everything is working again |
|
Back to top |
|
|
active Apprentice
Joined: 23 Jun 2003 Posts: 228 Location: Something not a structure or union
|
Posted: Fri Sep 12, 2003 9:47 am Post subject: |
|
|
ok now go in /etc/conf.d/ end edit the file net:
ex:
Code: |
# For setting the default gateway
#
gateway="eth0/192.168.1.1"
|
replace 192.168.1.1 with your gw. _________________ GIT d- s:+>: a-- C+++ UBS+++ P++ L+++
E--- W+ N+ w M- PS+(++) PE PGP+ !t
X++ tv+ b++ D+ G e h! r++ x* |
|
Back to top |
|
|
cfriedt n00b
Joined: 12 Sep 2003 Posts: 56 Location: Montréal, Québec
|
Posted: Fri Sep 12, 2003 9:43 pm Post subject: |
|
|
hehehe,
I was having a problem with the same thing on my small LAN at home, but quickly realized that you have to add the 'domain' quantifier to /etc/resolv.conf
syntax:
domain yourdomain.net
nameserver your.first.DNS.ip
nameserver your.second.DNS.ip
|
|
Back to top |
|
|
active Apprentice
Joined: 23 Jun 2003 Posts: 228 Location: Something not a structure or union
|
Posted: Fri Sep 12, 2003 9:49 pm Post subject: |
|
|
'domain' isn't a required options _________________ GIT d- s:+>: a-- C+++ UBS+++ P++ L+++
E--- W+ N+ w M- PS+(++) PE PGP+ !t
X++ tv+ b++ D+ G e h! r++ x* |
|
Back to top |
|
|
cfriedt n00b
Joined: 12 Sep 2003 Posts: 56 Location: Montréal, Québec
|
Posted: Fri Sep 12, 2003 11:51 pm Post subject: |
|
|
correct,
domain isn't a required parameter, however if you're running an ipmasqued router / gateway/ firewall / nameserver, it helps if you're trying to resolve an internal host w/o them all listed in /etc/hosts.
I suppose i was generalizing when i shouldn't have been
cheers |
|
Back to top |
|
|
|