# Is this a bug?



## Sundj (Nov 19, 2008)

> %uname -a
> FreeBSD 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
> %ping dl_dir.qq.com
> ping: cannot resolve dl_dir.qq.com: Unknown server error






> [sundj@WebServer ~]$ uname -a
> Linux WebServer 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
> [sundj@WebServer ~]$ ping dl_dir.qq.com
> PING dl_dir1.qq.com (221.236.30.114) 56(84) bytes of data.
> ...





> C:\>ping dl_dir.qq.com
> 
> Pinging dl_dir.tc.qq.com [60.28.230.162] with 32 bytes of data:
> 
> ...



I think this is must be a bug!


----------



## kamikaze (Nov 19, 2008)

What exactly is supposed to be a bug?


----------



## Cka3o4Huk (Nov 19, 2008)

IIUC, Sundj's problem is DNS resolving under BSD. 
Please, look man 5 resolver.


----------



## kamikaze (Nov 19, 2008)

It could simply be that he isn't connected, didn't run dhclient, any of these things.


----------



## Cka3o4Huk (Nov 19, 2008)

Concerning with different IP addresses of dl_dir.qq.com:
1) 221.236.30.114 - internal
2) 60.28.230.162 - external

Depends on order of DNSs in list.


----------



## lme@ (Nov 19, 2008)

Please create threads in the appropriate section.

Thank you!


----------



## Vladimir (Nov 19, 2008)

It's impossible, that such threads appear. The template of thread is necessary.


----------



## vivek (Nov 19, 2008)

Update /etc/resolv.conf  file. Here is my file
cat /etc/resolv.conf 

```
nameserver 4.2.2.1
nameserver 4.2.2.2
nameserver 4.2.2.3
```

Make sure firewall (PF or IPFW) is allowing access to DNS server.


----------



## Sundj (Nov 19, 2008)

lme@ said:
			
		

> Please create threads in the appropriate section.
> 
> Thank you!



i'm sorry!


----------



## Sundj (Nov 19, 2008)

ah ha ~

I think this is a bug with parse domain name.
"dl_dir.qq.com" can be parsed on Linux and windowsï¼Œ but couldn't on FreeBSD
I found that it will not be pasred, resolved by FreeBSD which domain name include char "_". 

My English is poor, but i realy would like to talk to you ~ Can u understand me?


----------



## Vladimir (Nov 19, 2008)

do it:

```
dig dl_dir.qq.com
```


----------



## Sundj (Nov 19, 2008)

> %dig dl_dir.qq.com
> 
> ; <<>> DiG 9.4.2 <<>> dl_dir.qq.com
> ;; global options:  printcmd
> ...



the result


----------



## Vladimir (Nov 19, 2008)

So, has you see, you don't have problem with resolving. Odds-on problem with your network. You have provided insufficient information to fix your problem.


----------



## Sundj (Nov 19, 2008)

Thanks Vladimir.

I try to express myself exactly, but a little hard  Sorry~

I havn't problem.

When I did this "ping dl_dir.qq.com" on FreeBSD, it got error "ping: cannot resolve dl_dir.qq.com: Unknown server error"
but on linux or windows havn't this error.

Because there is a "_" in "dl_dir.qq.com".

So I think that was a BUG to FreeBSD ...  Can you understand me


----------



## Cka3o4Huk (Nov 19, 2008)

```
riddler# uname -a
FreeBSD riddler 7.0-STABLE-200807 FreeBSD 7.0-STABLE-200807 #0: Mon Jul 14 22:45:15 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC 
riddler# ping dl_dir.qq.com
PING dl_dir1.qq.com (58.211.84.131): 56 data bytes
```
It seems there is no bug.


----------



## Vye (Nov 19, 2008)

Sundj said:
			
		

> Thanks Vladimir.
> 
> I try to express myself exactly, but a little hard  Sorry~
> 
> ...



I don't think anyone is having a problem understanding what you're saying. You just have not provided any information that points to FreeBSD as the cause of your problem. Your network/NIC does not appear to be configured appropriately. 

Maybe you could try using telnet to connect to a service on that domain instead of using ICMP (ping) to test the connection? It appears to be at least somewhat functional since you can do DNS queries.

Example:

```
[vye@nms ~]$ telnet dl_dir.qq.com 80
Trying 221.236.30.114...
Connected to dl_dir1.qq.com.
Escape character is '^]'.
```

If you have any firewall services running it would be to your benefit to temporarily disable them while troubleshooting.


----------



## bsddaemon (Nov 19, 2008)

Interesting, I got this "bug", too, even telnet doesnt work either



> bsddaemon@workstation:~% ping dl_dir.qq.com
> ping: cannot resolve dl_dir.qq.com: Unknown server error



I tried with 2 other Linux servers, it works fine

I run my own FreeBSD DNS server (BIND), and I suspect it would be culprit :S


----------



## DutchDaemon (Nov 19, 2008)

FreebSD 7.1-PRE with BIND 9.5.0-p2 has no problem with this (though the underscore violates an RFC, I believe).


----------



## tbyte (Nov 19, 2008)

First of all '_' is not allowed symbol in a domain name according to http://tools.ietf.org/html/rfc1034 ...
So tell Your admin to fix it, because other resolvers can refuse to even try to work with it.


----------



## DutchDaemon (Nov 19, 2008)

Certainly not in a domain name, no, but I think the jury's rather undecided about underscores in the hostname part of a fqdn.


----------



## gordon@ (Nov 19, 2008)

DutchDaemon said:
			
		

> Certainly not in a domain name, no, but I think the jury's rather undecided about underscores in the hostname part of a fqdn.



The RFC is pretty clear actually. Underscores are reserved characters that are not supposed to be in a fqdn at all. I would suggest that the underscore in the hostname is the root of the problem. Change it to a hyphen and see if the problem goes away.


----------



## SirDice (Nov 19, 2008)

Seems to work fine?


```
dice@williscorto:~>dig dl_dir.qq.com

; <<>> DiG 9.4.2-P1 <<>> dl_dir.qq.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43864
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;dl_dir.qq.com.			IN	A

;; ANSWER SECTION:
dl_dir.qq.com.		600	IN	CNAME	dl_dir1.qq.com.
dl_dir1.qq.com.		600	IN	A	58.211.84.131
dl_dir1.qq.com.		600	IN	A	221.236.30.114
dl_dir1.qq.com.		600	IN	A	221.236.30.115

;; AUTHORITY SECTION:
dl_dir1.qq.com.		7200	IN	NS	ns-cnc1.qq.com.
dl_dir1.qq.com.		7200	IN	NS	ns-cnc2.qq.com.

;; Query time: 1542 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Nov 19 20:48:06 2008
;; MSG SIZE  rcvd: 145

dice@williscorto:~>nslookup dl_dir.qq.com
Server:		192.168.1.1
Address:	192.168.1.1#53

Non-authoritative answer:
dl_dir.qq.com	canonical name = dl_dir1.qq.com.
Name:	dl_dir1.qq.com
Address: 221.236.30.115
Name:	dl_dir1.qq.com
Address: 58.211.84.131
Name:	dl_dir1.qq.com
Address: 221.236.30.114

dice@williscorto:~>ping dl_dir.qq.com
PING dl_dir1.qq.com (221.236.30.114): 56 data bytes
64 bytes from 221.236.30.114: icmp_seq=0 ttl=48 time=383.579 ms
64 bytes from 221.236.30.114: icmp_seq=1 ttl=48 time=383.036 ms
64 bytes from 221.236.30.114: icmp_seq=2 ttl=48 time=383.383 ms
64 bytes from 221.236.30.114: icmp_seq=3 ttl=48 time=383.094 ms
^C
--- dl_dir1.qq.com ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 383.036/383.273/383.579/0.220 ms
dice@williscorto:~>uname -a
FreeBSD williscorto.dicelan.home 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Wed Oct 15 14:01:36 CEST 2008     root@molly.dicelan.home:/usr/obj/usr/src/sys/CORTO  i386
```

Sundj, check your /etc/resolv.conf


----------



## Sundj (Nov 20, 2008)

OK, I have checked my resolv.conf



> %cat /etc/resolv.conf
> nameserver 203.196.0.6
> nameserver 203.196.1.6
> nameserver 202.106.0.20
> ...


----------



## Sundj (Nov 20, 2008)

I also telnet

On Linux 


> [sundj@WebServer ~]$ telnet dl_dir.qq.com 80
> Trying 221.236.30.115...
> Connected to dl_dir.qq.com (221.236.30.115).
> Escape character is '^]'.
> ...



On FreeBSD


> %telnet dl_dir.qq.com 80
> dl_dir.qq.com: Non-recoverable failure in name resolution
> %uname -a
> FreeBSD 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Wed Nov 12 16:55:58 CST 2008  :/usr/obj/usr/src/sys/KERNDB  i386
> %


----------



## brucec@ (Nov 20, 2008)

This isn't technically a bug, but it has been worked around in STABLE and will be in 7.1.  See PR misc/128861 for details - http://www.freebsd.org/cgi/query-pr.cgi?pr=128862&cat=


----------



## Sundj (Nov 20, 2008)

Originator: xjtdy888

Yes, he is my friend. He reported this bug to delphij.


Hahaha~ 


> 1. This is not a bug, ask qq.com to fix their domain name since
> it's a clear violation of Internet STD 13 (RFC 1034). These
> DNS administrators should be fired.
> 2. This has been worked around in all supported stable branches
> ...


----------



## Sundj (Nov 20, 2008)

Thank you all!


----------



## DutchDaemon (Nov 20, 2008)

gordon@ said:
			
		

> The RFC is pretty clear actually. Underscores are reserved characters that are not supposed to be in a fqdn at all.



I know, but I see a lot of applications 'allowing' it, like Squid and Firefox. Probably because huge sites like Blogspot and others allow their users to put underscores in their blog names (like groove_rider) and such. It's a bit of a Microsoft tactic, I guess: allow massive infractions on an RFC, and the RFC will be circumvented. Not good, but a reality.


----------

