View Single Post
  #1   (View Single Post)  
Old 23rd November 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default Working around cheap SOHO routers under OpenBSD

A friend of mine uses a cheaper home router to handle the connection to his ISP, this device implements a small forwarding DNS server.. but it only listens on UDP.

Protocol limitations documented in RFC1035 mention that a packet received from a UDP DNS server be no greater then 512 bytes in size.. or else the packet is truncated. (Whatever that means..).

You may be asking why this is relevant.. well, he uses OpenBSD as a workstation.. as such he uses Pidgin to connect to Yahoo's servers.

If you dig(1) you'll see how many redundant servers they have.. unfortunately this exceeds the UDP DNS packet limitation and in the case of my friends router makes for a nasty problem.. the domain can't be resolved.

;; Truncated, retrying in TCP mode.
;; Connection to for failed: connection refused.
I found many solutions to his problem..

1) Use his ISP's servers directly in /etc/resolv.conf
2) Use OpenBSD and replace the SOHO router..
3) Try enabling the edns0 option in /etc/resolv.conf

But naturally.. he chose #3, and it appears to work for him..
Originally Posted by resolv.conf(5)
options edns0 - Attach OPT pseudo-RR for EDNS0 extension specified in RFC 2671, to inform DNS server of our receive buffer size. The option will allow DNS servers to take advantage of non-default receive buffer size, and to send larger replies. DNS query packets with EDNS0 extension are not compatible with non-EDNS0 DNS servers. The option must be used only when all the DNS servers listed in nameserver lines are able to handle EDNS0 extension.
So, in summary.. if you're using a DNS server that doesn't support TCP, try using this option as a stopgap measure.

Note; dig(1) will still try to use a TCP server if the query is too large.. so use the +ignore option to bypass that.

Last edited by BSDfan666; 23rd November 2008 at 07:40 PM.
Reply With Quote