nameserver listening on 3 different addresses

Barry Margolin barmar at genuity.net
Thu Apr 4 21:00:05 UTC 2002


In article <a8ib5o$69b at pub3.rc.vix.com>,
Pete Peterson <petersonp at genrad.com> wrote:
>Hmmm -- my digs, the one that came with 8.2.3 and the one that came with
>with Red Hat 7.2 (bind 9.1.3) , admit to a -p option to specify a port, but
>no -b option.

dig 9.2.0 supports it, but it doesn't show up in the output of "dig -h".
dig 8.3 shows it in the -h output, but it only seems to work when it uses
TCP (e.g. for zone transfers), not UDP.

>Does anyone know the basis for how BIND selects the originating port address?

It doesn't.  If you don't use the query-source option, it lets the OS
select an address.  The choice probably depends on the order of entries in
the routing table, which could be affected by the order in which all the
addresses were assigned to the interface, the way memory is allocated in
the kernel, the default gateway address, or other factors that are
difficult for me to think of offhand.  The best way to think of it is that
it's arbitrary and potentially random, so if you need a specific source
address the application must bind to that address.

-- 
Barry Margolin, barmar at genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list