Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-21-2005, 03:48 AM
|
#1
|
LQ Newbie
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6
Rep:
|
dns client fails after power failure (Debian Sarge)
After a power failure on my Debian Sarge box, the dns client it should use isn't working right anymore....
Each time after reboot, the /etc/resolv.conf file disappears. The dns servers this box' client should use are static, and coded in /etc/network/interfaces:
Code:
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo eth0 eth1
iface lo inet loopback
# The primary network interface
iface eth0 inet static
address 10.0.0.1
netmask 255.0.0.0
network 10.0.0.0
broadcast 10.255.255.255
dns-nameservers 194.159.73.135 194.159.73.136 194.159.73.137
#dns-search thuis
gateway 10.0.0.250
# dns-* options are implemented by the resolvconf package, if installed
iface eth1 inet static
address 10.0.0.2
netmask 255.0.0.0
broadcast 10.255.255.255
network 10.0.0.0
gateway 10.0.0.250
i can ping my local lan and my gateway, but pinging my dns servers is impossible. When I nslookup, and get the server info, it returns 127.0.0.1.
Even after setting server 194.159.73.135 (ISP dns) with nslookup, I can't ping that dns server, nor hostnames lookups.
this is in /etc/nsswitch.conf:
Code:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: dns files
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
I know all ip adresses are allright. Because nslookup is failing, everything (apache, postfix, enz) is failing too. But I can ssh to my box on my lan (to the ip)
Somewhere on the internet, i found it maybe have to do something with dhcp. But I don't use that, nor dhcp client nor dhcp server.
Can someone give me some hints?
Last edited by faked; 01-21-2005 at 07:47 AM.
|
|
|
01-21-2005, 04:08 AM
|
#2
|
LQ Newbie
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6
Original Poster
Rep:
|
NOT solved
restarting the box and restarting bind (/etc/init.d/bind9 restart) did not help. Pinging to some <edit>ip</edit> outside my lan is still impossible.
<edit>
When I edit and save my resolv.conf, the whole file resolv.conf disappears after an hour or so. There remains a dir /etc/resolvconf/ (no dot!). Trying /etc/init.d/resolvconf start gives
Code:
./resolvconf start
Setting up resolvconf...run-parts: /etc/resolvconf/update.d/bind exited with return code 1
run-parts: /etc/resolvconf/update.d/libc exited with return code 1
failed.
/etc/init.d/resolvconf reload gives me
Code:
./resolvconf reload
run-parts: /etc/resolvconf/update.d/bind exited with return code 1
run-parts: /etc/resolvconf/update.d/libc exited with return code 1
but the situation gets stranger:
i can ping the ip's on my lan,
i can ping 127.0.0.1,
but i can NOT ping localhost (times out);
i can not ping my isp's dns server :
Code:
ping 194.159.73.134
connect: Network is unreachable
CAN SOMEBODY PLEASE HELP THIS NEWBEE  ?
I think this shouldn't be so difficult....... please help
thanx,.....
faked
</edit>
Last edited by faked; 01-21-2005 at 07:46 AM.
|
|
|
01-21-2005, 08:07 AM
|
#3
|
LQ Newbie
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6
Original Poster
Rep:
|
not solved, samba very slow but running
I can use samba, but it takes 4 minutes in win. 2k and xp home before the login window appears, and another 3 to browse the available shares. When i'm in a share, browsing is going at the normal speed. But the connection times out sometimes.....
remember:
apache and postfix are not working any more. In apache, i use mod_rewrite to rewrite every undefined virtual host to mydomain.com, including ip's. So when i go to my ip, i will be redirected to mydomain.com. This worked fine, before the power failure
Maybe something went wrong with the drivers? HOW To check that? My two cards have different brands
Please reply!
|
|
|
01-21-2005, 08:47 AM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,230
|
Run: to verify your network settings
If they are OK then run:
to see if your gateway is setup correctly
If not, then:
Code:
route add default gw xx.xx.xx.xx
where xx.xx.xx.xx is the IP of your gateway (router, modem whatever connects to to the net)
|
|
|
01-21-2005, 05:50 PM
|
#5
|
LQ Newbie
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6
Original Poster
Rep:
|
not solved, some more info's and configs
ifconfig returns:
Code:
eth0 Link encap:Ethernet HWaddr 00:50:FC:EE:34:F3
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6676 errors:0 dropped:0 overruns:0 frame:0
TX packets:2755 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2015203 (1.9 MiB) TX bytes:246047 (240.2 KiB)
Interrupt:11 Base address:0x1800
eth1 Link encap:Ethernet HWaddr 00:50:BF:98:09:5C
inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2419 errors:0 dropped:0 overruns:0 frame:0
TX packets:8753 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:450359 (439.8 KiB) TX bytes:697012 (680.6 KiB)
Interrupt:11 Base address:0x1000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6298 errors:0 dropped:0 overruns:0 frame:0
TX packets:6298 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:484848 (473.4 KiB) TX bytes:484848 (473.4 KiB)
this seems to be OK, I think.
running route, I get this:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.0.0.0 U 0 0 0 eth1
localnet * 255.0.0.0 U 0 0 0 eth0
i didn't thought this was ok, so i did route add default gw 10.0.0.250 (my gateway, working fine) and rebooted.
now route shows:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.0.0.0 U 0 0 0 eth1
localnet * 255.0.0.0 U 0 0 0 eth0
default 10.0.0.250 0.0.0.0 UG 0 0 0 eth0
default 10.0.0.250 0.0.0.0 UG 0 0 0 eth1
note: i was playing around with postfix before this shit started happening
pinging to outside lan keeps timing out
but my resolv.conf is again empty after boot!
i checked out the debian page about networking http://www.debian.org/doc/manuals/re...teway.en.html,
installed the sendmail package instead of postfix (was still in cache)
and commented out everything in /etc/network/if-down.d/sendmail and /etc/network/if-up.d/sendmail
i restarted all interfaces (eth0, eth1, lo) using ifdown interfacename and ifup too.
Now, dns lookups are still not being made!
finally, this is in /etc/network/interfaces:
Code:
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo eth0 eth1
iface lo inet loopback
# The primary network interface
iface eth0 inet static
address 10.0.0.1
netmask 255.0.0.0
network 10.0.0.0
broadcast 10.255.255.255
dns-nameservers 194.159.73.135 194.159.73.136 194.159.73.137
#dns-search thuis
gateway 10.0.0.250
# dns-* options are implemented by the resolvconf package, if installed
iface eth1 inet static
address 10.0.0.2
netmask 255.0.0.0
broadcast 10.255.255.255
network 10.0.0.0
gateway 10.0.0.250
what to do? I don't know any about the resolvconf package, which may be the cause?
tnx again, faked
EDIT:
route -n (found on the wiki page about networking) doesn't help
/EDIT
EDIT:
samba is now quick, like it was before this problem. But the problems remain...
/EDIT
Last edited by faked; 01-22-2005 at 04:08 AM.
|
|
|
01-24-2005, 07:42 AM
|
#6
|
LQ Newbie
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6
Original Poster
Rep:
|
problem found???
I think the problem has been found, but not solved:
"route" gives:
Code:
localnet * 255.0.0.0 U 0 0 0 eth0
localnet * 255.0.0.0 U 0 0 0 eth1
default 10.0.0.250 0.0.0.0 UG 0 0 0 eth1
default 10.0.0.250 0.0.0.0 UG 0 0 0 eth0
it takes about 20 seconds to let the last two lines appear.....
I think localnet should use the lo interface, isn't????
also, /etc/resolv.conf keeps getting cleaned. When i save something, it stayes, but after an hour or so, the file is empty.
This server is NOT functioning as a dns server. Though, I tried
Code:
dpkg-reconfigure bind9
, I got this:
Code:
altijd:/etc# dpkg-reconfigure bind9
Stopping domain name service: namedrndc: connect failed: connection refused
.
update-rc.d: warning: /etc/rc2.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc3.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc4.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc5.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc2.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc3.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc4.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc5.d/K15bind9 is not a link to ../init.d/bind9
restarting bind myself gives no errors. The /var/log/bind9-query.log file is empty!
CAN SOMEONE HELP PLEASE?
|
|
|
01-25-2005, 01:05 PM
|
#7
|
LQ Newbie
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6
Original Poster
Rep:
|
SOLVED!
problem solved!
I found /etc/resolv.conf was pointing to /etc/resolvconf/run/resolv.conf, something which has to do with a package "resolvconf" (used for dhcp) which wasn't removed well because of power failure.
I renamed the link, and created a /etc/resolv.conf containing
Code:
nameserver xx.xx.xx.xx
nameserver yy.yy.yy.yy
nameserver zz.zz.zz.zz
and chmodded it 755.
Everything (nslookup, dig, apache) works like before. The brand new file stays there after boot.
Thanx to the people of the debian user list !
------
faked
--------
|
|
|
All times are GMT -5. The time now is 12:28 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|