Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #184223

Re: Weird resolver problem in Debian 8

From Torbjorn Pettersson <tobbe@strul.nu>
Newsgroups linux.debian.user
Subject Re: Weird resolver problem in Debian 8
Date 2017-07-25 16:50 +0200
Message-ID <u79jQ-420-5@gated-at.bofh.it> (permalink)
References <u79a9-3YE-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 25/07/17 16:32, Torbjorn Pettersson wrote:
> Hello folks,
> I came upon a weird problem with the resolver on Debian 8.
>
> root@myserver:~# cat /etc/resolv.conf
> search strul.nu
> nameserver 192.168.10.20
> nameserver 192.168.20.20
> sortlist 192.168.20.0/255.255.254.0
>
> root@myserver:~# grep -i hosts /etc/nsswitch.conf
> hosts:          files dns
>
> root@myserver:~# grep -i mailgw /etc/hosts
> root@myserver:~#
>
>
>
>
> Checking addresses in dns:
>
> root@myserver:~# host mailgw.strul.nu
> mailgw.strul.nu has address 192.168.10.11
> mailgw.strul.nu has address 192.168.20.11
>
> And ping works the way it is supposed to, every time I run it. That is,
> it uses the address suggested by the sortlist:
>

Oups. I see that I made some errors in transcribing this for email.
Corrected it below:
> root@myserver:~# ping mailgw.strul.nu
> PING mailgw.strul.nu (192.168.20.11) 56(84) bytes of data.
> 64 bytes from mailgw10.strul.nu (192.168.20.11): icmp_seq=1
> ttl=64 time=0.132 ms
> 64 bytes from mailgw10.strul.nu (192.168.20.11): icmp_seq=2
> ttl=64 time=0.133 ms
>
> Same result regardless of how many times I run it. Great,
> but telnet, however, chooses one of the a records at "random".
>
>
> root@myserver:~# telnet mailgw.strul.nu smtp
> Trying 192.168.20.11...
> Connected to mailgw.strul.nu.
> Escape character is '^]'.
> 220 mailgw10.strul.nu ESMTP
>
> ....
>
> root@myserver:~# telnet mailgw.strul.nu smtp
> Trying 192.168.10.11...
>
>
> Anyone experienced something similar, or know what could be wrong?
> In my head this should be handled by libc both for telnet and ping, so
> the behavior should be the same?
> Also, of course "telnet" in this case isn't really the problem, it's
> just an example. The problem in this case is exim4, which behaves like
> telnet, not like ping.
>
> Regards
> Torbjorn
>

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Weird resolver problem in Debian 8 Torbjorn Pettersson <tobbe@strul.nu> - 2017-07-25 16:40 +0200
  Re: Weird resolver problem in Debian 8 Torbjorn Pettersson <tobbe@strul.nu> - 2017-07-25 16:50 +0200
  Re: Weird resolver problem in Debian 8 Henrique de Moraes Holschuh <hmh@debian.org> - 2017-07-25 17:50 +0200
    Re: Weird resolver problem in Debian 8 Torbjörn Pettersson <tobbe@strul.nu> - 2017-07-25 19:30 +0200

csiph-web