Web lists-archives.com

Re: hostname of the modem gateway

On Tue 02 Jan 2018 at 08:50:13 (+0100), john doe wrote:
> On 1/2/2018 8:16 AM, john doe wrote:
> >On 1/2/2018 8:01 AM, Tom Furie wrote:
> >>On Tue, Jan 02, 2018 at 07:52:31AM +0100, john doe wrote:
> >>
> >>>My default route is not and host(1) gives me that
> >>>same error.
> >>
> >>What the error actually means is that there is no reverse DNS resolution
> >>for that IP address, in other words the IP address cannot be resolved to
> >>its hostname. It has nothing at all to do with routing.
> >>
> >
> >The OP has said that he want it to get the hostname of his
> >upstream router/gateway.
> >'ip -r r' will show the FQDN of his default route ( in
> >that case.
> >
> Rereading the all conversation I should have said to "David Wright
> <deblis@xxxxxxxxxxxxxxxxx>" that the error:
> $ host
> Host not found: 3(NXDOMAIN)
> Meens that there is no hostname associated with that ip.
> But in the case of the OP it should work.

I haven't a clue what works for the OP, not even after glancing at the
subsequent thread that seems to continue the debate. I don't even know
exactly how they generated the lines:

|> # route
|> gateway = home.telecomitalia.it
|> # ip route
|> gateway =

All I did was to suggest how the OP could get ip to do what route
appears to do by default, which is to print names in place of
dotted quads.

I have a name associated with but it's not resolvable
through DNS: there's no resolver in the router. I have to resolve
it with getent, and I asume my system is doing just that:

$ getent hosts     router
$ ping router
PING router ( 56(84) bytes of data.
64 bytes from router ( icmp_seq=1 ttl=64 time=2.24 ms
64 bytes from router ( icmp_seq=2 ttl=64 time=1.53 ms
64 bytes from router ( icmp_seq=3 ttl=64 time=1.15 ms
64 bytes from router ( icmp_seq=4 ttl=64 time=1.42 ms
--- router ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 1.157/1.590/2.245/0.402 ms
$ head -12 /etc/hosts
# /root/hosts-0-acer       localhost       acer

# /root/hosts-1-local-template
# List of local hosts.
# Comment out the line of this host when installing.
# Check the IPv6 lines occasionally because they change them.     router