Odd behaviour to get names resolved (13.0-RELEASE/amd-64)

Dear Users

I recently upgraded 12.2 -> 13.0 (amd64), both releases versions. I have my network adapter configured with a static IP and there are several machines names listed in /etc/hosts (including the local hostaname). There is a extract of this file:
Code:
# $FreeBSD: releng/12.1/lib/libc/net/hosts 338729 2018-09-17 18:56:47Z brd $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1            localhost localhost.my.domain
127.0.0.1        localhost localhost.my.domain

200.17.215.86        matata.quimica.ufpr.br matata
200.17.215.86        matata.quimica.ufpr.br.
200.17.215.64           bohr.quimica.ufpr.br bohr
200.17.215.64           bohr.quimica.ufpr.br.
200.17.215.84        mrsmee.quimica.ufpr.br mrsmee 
200.17.215.84        mrsmee.quimica.ufpr.br.
and so on .... . Here, /etc/resolv.conf:

Code:
nameserver 200.17.209.123
nameserver 8.8.8.8

Now, the problem: when I typed ssh mrsmee, I was successful, with no errors or important alerts. But, when I typed ping mrsmee, I got:
Code:
ping: Name does not resolve.
I am, 13.0-RELEASE knows which is the IP to connect to mrsmee using ssh but, it does not know which is the IP used by mrsmee.

If I try to do: ping 200.17.215.84 (the IP used by mrsmee), I got: ping: IPv6 requested but IPv4 target address provided.
If I try to become ping explicitly using IPV4: ping -4 200.17.215.84, I got: ping: -4 and -6 cannot be used simultaneously

Please, could you suggest some explanation for this behaviour? Here, there is the output for uname -a:
Code:
% matata /home/edulsa uname -a
FreeBSD matata 13.0-RELEASE-p2 FreeBSD 13.0-RELEASE-p2 #4 b74cdf1ec: Wed Jun  2 12:22:06 -03 2021     root@matata:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

Thank your in advance for your attention

My best wishes

Eduardo
 
On 13.0 ping6(8) is the same executable as ping(8).
Code:
dice@hosaka:~ % ll -i /sbin/ping /sbin/ping6
37641 -r-sr-xr-x  2 root  wheel  62688 May 30 20:35 /sbin/ping*
37641 -r-sr-xr-x  2 root  wheel  62688 May 30 20:35 /sbin/ping6*
 
when I typed ssh mrsmee, I was successful, with no errors or important alerts.
Is mrsmee perhaps defined in ~/.ssh/config?
Code:
dice@hosaka:~ % cat .ssh/config
Host somethingoranother
 HostName 1.2.3.4
dice@hosaka:~ % ssh somethingoranother
 
Code:
[titus@uk ~]$ alias ping
alias ping='ping6'
[titus@uk ~]$ ping -4 8.8.8.8
ping6: -4 and -6 cannot be used simultaneously
[titus@uk ~]$
 
Maybe that alias was inherited from an older FreeBSD version where ping6(8) and ping(8) were still separate executables? It's not useful on 13.0 any more in any case.
 
It certainly explains the odd error message. But that alias was never standard, so it must have been added at some point.
 
Dear

First it all, thank you for your time and efforts.

I found the error source: there was an alias (ping = ping -c6). When I removed this alias, ping became straightforward. I added a blank space between "c" and "6" and everything started to go fine.

Thank you again for your attention

My best wishes

Eduardo
 
Back
Top