DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th September 2009
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default Strange issues with 7.2

Hi,

Let's start first with this - a couple of days ago we had to change our ISP and now everything is configured and working, but however there are some small issue that I just cannot understand.

At home I have a FreeBSD 6.1 gateway which is doing NAT for the internal network, firewall-ing, etc.. Behind the gateway I've another 7.2 system which I use for file server, and one 7.2 Desktop system, and a couple of Windows machines. Everything is working fine, except for BSDs.

First - pinging a remote host from BSD systems takes way too much, than pinging the same host from a Windows machine. Don't know why but resolving hostnames under the FreeBSD systems is taking too much time.

On the same 7.2 desktop system I also have Windows XP and Debian installed. Under Debian resolving a remote host also takes a lot of time, while under Windows XP - everything is working just fine!

Just to mention - nothing was changed or installed on these systems recently.

The second thing is that startx on the 7.2 desktop is taking also a lot of time to start up (usually it was taking ~1 second to load, and now it's taking ~5-10 seconds!).

top shows nothing, expect that for a very short period of time hald was doing something - so I disabled it. Rebooted the system and tried to startx and then X couldn't start and I get this errors:

Code:
Invalid MIT-MAGIC-COOKIE-1 key
I suspect xauth has something to do, but didn't figure out what exactly yet. After a couple of reboots everything is back to normal and on the next reboot it happens again.

Do you know what might be causing this? All BSDs have issues while resolving hostnames, while Windows machines do not..? And X is just waaay too slow now.. That's definitely something that I haven't come across.. until now.

Thanks for any feedback and sorry for the long post
__________________
"I never think of the future. It comes soon enough." - A.E

Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org
Reply With Quote
  #2   (View Single Post)  
Old 25th September 2009
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
top shows nothing, expect that for a very short period of time hald was doing something - so I disabled it. Rebooted the system and tried to startx and then X couldn't start and I get this errors
Unless you need xauth for some reason, I would recommend starting X with the xinit(1) command -- This is the same as startx except it doesn't do any xauth stuff, which us usually fine.

Quote:
First - pinging a remote host from BSD systems takes way too much, than pinging the same host from a Windows machine. Don't know why but resolving hostnames under the FreeBSD systems is taking too much time.
Are you using the same DNS servers on both machines? In BSD it's /etc/resolv.conf, on Windows I believe you can check with ipconfig -a in a cmd prompt.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 26th September 2009
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default

Hi,

This morning I re-checked every configuration file and found out that I was having some wrong entries in /etc/hosts - after we changed the ISP seems like that I forgot to update /etc/hosts file as well. I guess I was just too tired last night and didn't notice this

Fixing /etc/hosts fixes the startx issue.

In the internal network the gateway is also a DHCP server - so it sends the clients the right DNS servers. But however I also re-checked the resolv.conf file on the gateway and yes - it was containing the old DNS servers (another thing that I just didn't notice last night )

So I fixed the resolv.conf entries and did a reboot - just for sure.

Results are as follows:
  • Windows clients are still able to perform a faster ping-ing than the BSD systems
  • Ping-ing remote hosts from BSD systems takes a lot till the actual ping starts - probably DNS resolving is taking more time?

Doing an nslookup from Windows clients sometimes returns this, sometimes resolves normally:
Code:
> nslookup youtube.com
DNS request timed out.
    timeout was 2 seconds.
*** Can't find server name for address <dns-server1>: Timed out
*** Can't find server name for address <dns-server2>: Non-existent domain
*** Default servers are not available
Server:  UnKnown
Address:  <dns-server1>

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out
Resolving the same host from BSD - resolves normal and even faster:

Code:
nslookup youtube.com
Server:         <dns-server1>
Address:        <dns-server1>#53

Non-authoritative answer:
Name:   youtube.com
Address: 74.125.127.100
Name:   youtube.com
Address: 74.125.67.100
Name:   youtube.com
Address: 74.125.45.100
I guess that the Windows nslookup is doing a reverse lookup of the DNS servers as well, so that's why it gives this errors, but I don't understand why I get DNS request time-out?

After these tests I assume that now BSD systems make a faster DNS lookup and Windows clients sometimes fail to resolve - so I can exclude the possibility that DNS lookups are slower in BSD.

I'm outta of other ideas for now. I'll play later with tcpdump and check what goes inside and outside of the gateway.

Thanks again for the feedback, I'm open to accept other ideas as well to resolve this issue
__________________
"I never think of the future. It comes soon enough." - A.E

Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org
Reply With Quote
  #4   (View Single Post)  
Old 26th September 2009
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default

Issue resolved.

The root cause that the primary DNS server was answering very slow. Changed the DNS server and now everything is working fine again
__________________
"I never think of the future. It comes soon enough." - A.E

Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org
Reply With Quote
  #5   (View Single Post)  
Old 26th September 2009
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Just a hint: nslookup is an old, depreciated program that is best not used. The main issues is those redundant reverse dns lookups on the dns server's addresses, which creates noise. The program is also depreciated by it's authors, BIND. The replacements are host, which does a quick lookup of the provided address or IP, and dig, which provides more complete info.
Of course, nslookup is the only option on Windows boxen, which is typical!
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
  #6   (View Single Post)  
Old 26th September 2009
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default

Quote:
Originally Posted by robbak View Post
Just a hint: nslookup is an old, depreciated program that is best not used. The main issues is those redundant reverse dns lookups on the dns server's addresses, which creates noise. The program is also depreciated by it's authors, BIND. The replacements are host, which does a quick lookup of the provided address or IP, and dig, which provides more complete info.
Of course, nslookup is the only option on Windows boxen, which is typical!
Yeap, thanks for the reply robbak!

I know nslookup is deprecated, but as you mentioned I don't have any other choice under Windows.

But what I still wonder is how those Windows machines automatically switched to the second (working) DNS server. The primary DNS server was not so responsive, and browsing was very slow.

Anyway, I've removed the primary DNS server and switched to another one
__________________
"I never think of the future. It comes soon enough." - A.E

Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange FreeBSD Issues (USB/Nvidia Drivers) bjstick FreeBSD Installation and Upgrading 9 10th April 2017 10:57 AM
Strange lib problem mururoa FreeBSD General 3 1st August 2009 07:34 AM
strange dmesg output gosha OpenBSD General 4 11th March 2009 01:10 PM
PF: strange port 21 iwi OpenBSD Security 3 25th November 2008 02:21 PM
strange with dvd+rw-format cyberboy FreeBSD General 0 26th May 2008 05:43 PM


All times are GMT. The time now is 03:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick