My address:
user@pc1:~$ ifconfig eth0 |grep "inet "
inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0
I can ping this address
user@pc1:~$ ping -c 1 192.168.2.11
PING 192.168.2.11 (192.168.2.11) 56(84) bytes of data.
64 bytes from 192.168.2.11: icmp_req=1 ttl=64 time=0.686 ms
--- 192.168.2.11 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.686/0.686/0.686/0.000 ms
But pinging its hostname seems to resolve the IP address, but it doesn’t return pings.
user@pc1:~$ ping -c 1 pc2.dtvg.nix
PING pc2.dtvg.nix (192.128.2.11) 56(84) bytes of data.
--- pc2.dtvg.nix ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
While pinging another hostname on the same network works fine.
user@pc1 ~$ ping -c1 gw.dtvg.nix
PING gw.dtvg.nix (192.168.2.1) 56(84) bytes of data.
64 bytes from gw.dtvg.nix (192.168.2.1): icmp_req=1 ttl=64 time=0.220 ms
--- gw.dtvg.nix ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.220/0.220/0.220/0.000 ms
My /etc/resolve.conf
user@pc1:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search dtvg.nix
named.conf on my nameserver (gw)
root@gw:/var/cache/bind# cat /etc/bind/named.conf.local
zone "dtvg.nix" {
type master;
file "/var/cache/bind/db.dtvg.nix";
allow-update { key dhcpupdate; };
};
zone "2.168.192.in-addr.arpa" {
type master;
notify no;
file "/var/cache/bind/db.2.168.192.in-addr.arpa";
allow-update { key dhcpupdate; };
};
Reverse lookup on my nameserver, gw, with unnecessary hosts removed
root@gw:/var/cache/bind# cat db.2.168.192.in-addr.arpa
$ORIGIN .
$TTL 604800 ; 1 week
2.168.192.in-addr.arpa IN SOA dtvg.nix. root.dtvg.nix. (
140 ; serial
604800 ; refresh (1 week)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
604800 ; minimum (1 week)
)
NS gw.dtvg.nix.
$ORIGIN 2.168.192.in-addr.arpa.
1 PTR gw.dtvg.nix.
$TTL 604800 ; 1 week
10 PTR pc1
11 PTR pc2
Forward lookup zone file on my nameserver, gw, with unnecessary hosts removed
root@phoenix:/var/cache/bind# cat db.dtvg.nix
$ORIGIN .
$TTL 604800 ; 1 week
dtvg.nix IN SOA dtvg.nix. root.dtvg.nix. (
140 ; serial
604800 ; refresh (1 week)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
604801 ; minimum (1 week 1 second)
)
NS gw.dtvg.nix
$ORIGIN dtvg.nix.
$TTL 604800 ; 1 week
gw A 192.168.2.1
pc1 A 192.128.2.10
pc2 A 192.128.2.11