hostname and nslookup behaving strange
I’m running 3.5.2 and I get two strange behaviors. Unfortunately I updated from 3.5.0 to 3.5.2 and enabled IPv6 at the same time.
- hostname -i parse error
Ususally hostname -i returns:
$> hostname -i
127.0.0.1
But my host is called 1042 and I get 0.0.4.18
$> echo 1042 > 1042
$> hostname -F 1042
$> hostname -i
0.0.4.18
- nslookup shows strange message
$> nslookup google.ch
nslookup: can't resolve '(null)': Name does not resolve
Name: google.ch
Address 1: 2a00:1450:400a:807::2003 zrh04s08-in-x03.1e100.net
Address 2: 172.217.19.3 zrh04s08-in-f3.1e100.net
Please note I fixed the hostname (using io42 instead of 1042) and the second problem still happens. Here the relevant files:
$> cat /etc/hostname
io42
$> cat /etc/resolv.conf
nameserver [ipv4]
nameserver [ipv4]
$> cat /etc/hosts
127.0.0.1 1042.ch io42 localhost.localdomain localhost
5.148.186.160 1042.ch io42
2a02:418:100a:19::1 1042.ch io42
::1 1042.ch io42 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 5.148.186.160
netmask 255.255.255.0
gateway [ipv4]
iface eth0 inet6 static
address 2a02:418:100a:19::1
netmask 64
gateway [ipv6]
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra
I guess the second problem also relates to 1042.ch having a only number part, since it doesn’t happen on my other systems that are on 3.5.2.
One difference 1042.ch uses a static IPv6 config, where my other systems use stateless autoconfig.
(from redmine: issue id 6902, created on 2017-02-20)
- Uploads: