Thread: DHCPd and BIND: unable to ping or access clients from server using hostname
i have setup dhcp , bind server (ubuntu 11.10). problem i'm having i'm unable ping or nslookup clients (my ubuntu 11.10 laptop , windows 7, , xp pc) server using hostname. i'm able ping server client, , server anywhere on network. windows clients able ping each other using hostnames , can ping ubuntu laptop. i'm doing wrong.
bind setup
named.conf.options
named.conf.localcode:administrator@ns:~$ cat /etc/bind/named.conf.options options { directory "/var/cache/bind"; // if there firewall between , nameservers want // talk to, may need fix firewall allow multiple // ports talk. see http://www.kb.cert.org/vuls/id/800113 // if isp provided 1 or more ip addresses stable // nameservers, want use them forwarders. // uncomment following block, , insert addresses replacing // all-0's placeholder. forwarders { 192.168.1.1; 8.8.8.8; # google 8.8.4.4; }; auth-nxdomain no; # conform rfc1035 listen-on-v6 { any; }; };
2 zone filescode:administrator@ns:~$ cat /etc/bind/named.conf.local // // local configuration here // // consider adding 1918 zones here, if not used in // organization //include "/etc/bind/zones.rfc1918"; #foward lookup zones - holds records, records map host names ip addresses zone "mydomain.me" { type master; file "/etc/bind/zones/db.mydomain.me"; allow-update { key dhcpupdate; }; }; #reverse lookup zones - holds pointer records (ptr) maps ip hostname #192.168.1 zone "1.168.192.in-addr.arpa" { type master; notify no; file "/etc/bind/zones/db.192"; allow-update { key dhcpupdate; }; };
reversecode:administrator@ns:~$ ls /etc/bind/zones backup db.192 db.mydomain.me
data filecode:administrator@ns:~$ cat /etc/bind/zones/db.192 ; ; bind reverse data file local loopback interface ; $ttl 604800 @ in soa ns.mydomain.me. root.mydomain.me. ( 1 ; serial 604800 ; refresh 86400 ; retry 2419200 ; expire 604800 ) ; negative cache ttl ; @ in ns ns. 174 in ptr ns.mydomain.me. 174 in ptr ns. 175 in ptr vm-grinder. 56 in ptr dnqmwb01.mydomain.me. dnqmwb01. 57 in ptr dnqmap01.mydomain.me. dnqmap01. 58 in ptr dnqmds01.mydomain.me. dnqmds01. 59 in ptr dnqmdb01.mydomain.me. dnqmdb01. 61 in ptr unqmop01.mydomain.me. unqmop01. 130 in ptr cloudmgr.mydomain.me. cloudmgr. 131 in ptr cloudhost1.mydomain.me. cloudhost1.
dhcp optionscode:administrator@ns:~$ cat /etc/bind/zones/db.mydomain.me ; ; bind data file local loopback interface ; $ttl 604800 @ in soa ns.mydomain.me. root.mydomain.me. ( 2 ; serial 604800 ; refresh 86400 ; retry 2419200 ; expire 604800 ) ; negative cache ttl ; @ in ns ns.mydomain.me. @ in 192.168.1.174 ns in 192.168.1.174 vm-grinder in 192.168.1.175 dnqmwb01 in 192.168.1.56 dnqmap01 in 192.168.1.57 dnqmds01 in 192.168.1.58 dnqmdb01 in 192.168.1.59 unqmop01 in 192.168.1.61 cloudmgr in 192.168.1.130 cloudhost1 in 192.168.1.131
ifconfig on server
interface selectioncode:administrator@ns:~$ ifconfig eth1 link encap:ethernet hwaddr 00:25:90:55:15:60 inet addr:192.168.1.174 bcast:192.168.1.255 mask:255.255.255.0 inet6 addr: fe80::225:90ff:fe55:1560/64 scope:link broadcast running multicast mtu:1500 metric:1 rx packets:1531089 errors:0 dropped:58 overruns:0 frame:0 tx packets:682890 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:1406128970 (1.4 gb) tx bytes:82035875 (82.0 mb) interrupt:16 memory:fb900000-fb920000 lo link encap:local loopback inet addr:127.0.0.1 mask:255.0.0.0 inet6 addr: ::1/128 scope:host loopback running mtu:16436 metric:1 rx packets:782 errors:0 dropped:0 overruns:0 frame:0 tx packets:782 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 rx bytes:106569 (106.5 kb) tx bytes:106569 (106.5 kb)
dhcpd.confcode:administrator@ns:~$ cat /etc/default/isc-dhcp-server # defaults dhcp initscript # sourced /etc/init.d/dhcp # installed @ /etc/default/isc-dhcp-server maintainer scripts # # posix shell fragment # # on interfaces should dhcp server (dhcpd) serve dhcp requests? # separate multiple interfaces spaces, e.g. "eth0 eth1". interfaces="eth1"
from ubuntu clientcode:administrator@ns:~$ cat /etc/dhcp/dhcpd.conf # ddns-updates-style parameter controls whether or not server # attempt dns update when lease confirmed. default # behavior of version 2 packages ('none', since dhcp v2 didn't # have support ddns.) ddns-update-style none; # option definitions common supported networks... option domain-name "mydomain.me"; option domain-name-servers ns.mydomain.me; option subnet-mask 255.255.255.0; option broadcast-address 192.168.1.255; option routers 192.168.1.1; default-lease-time 600; max-lease-time 7200; subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.167 192.168.1.255; } # if dhcp server official dhcp server local # network, authoritative directive should uncommented. authoritative; # use send dhcp log messages different log file (you # have hack syslog.conf complete redirection). log-facility local7;
know ubuntu client using dns , dhcp server because see handshake process dhcp server ip
i can ping server clientcode:kenneth@km-ubuntu:~$ sudo dhclient -v internet systems consortium dhcp client 4.1.1-p1 copyright 2004-2010 internet systems consortium. rights reserved. info, please visit https://www.isc.org/software/dhcp/ listening on lpf/wlan0/00:21:6a:8f:32:3a sending on lpf/wlan0/00:21:6a:8f:32:3a sending on socket/fallback dhcprequest of 192.168.1.195 on wlan0 255.255.255.255 port 67 dhcpnak 192.168.1.174 dhcpdiscover on wlan0 255.255.255.255 port 67 interval 3 dhcpoffer of 192.168.1.214 192.168.1.174 dhcprequest of 192.168.1.214 on wlan0 255.255.255.255 port 67 dhcpack of 192.168.1.214 192.168.1.174 rather invoking init scripts through /etc/init.d, use service(8) utility, e.g. service smbd reload since script attempting invoke has been converted upstart job, may use reload(8) utility, e.g. reload smbd bound 192.168.1.214 -- renewal in 240 seconds. kenneth@km-ubuntu:~$ ifconfig eth0 link encap:ethernet hwaddr 00:27:13:66:40:d3 broadcast multicast mtu:1500 metric:1 rx packets:0 errors:0 dropped:0 overruns:0 frame:0 tx packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:0 (0.0 b) tx bytes:0 (0.0 b) interrupt:20 memory:fc600000-fc620000 lo link encap:local loopback inet addr:127.0.0.1 mask:255.0.0.0 inet6 addr: ::1/128 scope:host loopback running mtu:16436 metric:1 rx packets:2015 errors:0 dropped:0 overruns:0 frame:0 tx packets:2015 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 rx bytes:179103 (179.1 kb) tx bytes:179103 (179.1 kb) wlan0 link encap:ethernet hwaddr 00:21:6a:8f:32:3a inet addr:192.168.1.214 bcast:192.168.1.255 mask:255.255.255.0 inet6 addr: fe80::221:6aff:fe8f:323a/64 scope:link broadcast running multicast mtu:1500 metric:1 rx packets:79628 errors:0 dropped:0 overruns:0 frame:0 tx packets:39004 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:48627659 (48.6 mb) tx bytes:6514573 (6.5 mb)
i know working because, resolv.conf points correct nameserver , domain.code:kenneth@km-ubuntu:~$ ping ns ping ns.mydomain.me (192.168.1.174) 56(84) bytes of data. 64 bytes 192.168.1.174: icmp_req=1 ttl=64 time=1.29 ms 64 bytes 192.168.1.174: icmp_req=2 ttl=64 time=0.797 ms 64 bytes 192.168.1.174: icmp_req=3 ttl=64 time=0.832 ms ^c64 bytes 192.168.1.174: icmp_req=4 ttl=64 time=0.828 ms --- ns.mydomain.me ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 15016ms rtt min/avg/max/mdev = 0.797/0.938/1.297/0.209 ms
from ubuntu servercode:kenneth@km-ubuntu:~$ cat /etc/resolv.conf domain mydomain.me search mydomain.me nameserver 192.168.1.174
cannot ping client server
i can't ping windows client servercode:administrator@ns:~$ ping km-ubuntu ping: unknown host km-ubuntu
from windows 7 hostcode:administrator@ns:~$ ping newman ping: unknown host newman administrator@ns:~$ ping newman.mydomain. ping: unknown host newman.mydomain. administrator@ns:~$ ping newman.mydomain.me ping: unknown host newman.mydomain.me administrator@ns:~$ host newman host newman not found: 3(nxdomain)
know here works way supposed to. falls withing ip range, on domain , can ping ubuntu client?
code:c:\users\john doe>ipconfig windows ip configuration wireless lan adapter wireless network connection 2: media state . . . . . . . . . . . : media disconnected connection-specific dns suffix . : ethernet adapter local area connection 2: media state . . . . . . . . . . . : media disconnected connection-specific dns suffix . : wireless lan adapter wireless network connection: connection-specific dns suffix . : mydomain.me link-local ipv6 address . . . . . : fe80::7cc1:6421:7325:31b4%14 ipv4 address. . . . . . . . . . . : 192.168.1.171 subnet mask . . . . . . . . . . . : 255.255.255.0 default gateway . . . . . . . . . : 192.168.1.1 c:\users\john doe>ping 3qy pinging 3qy [192.168.1.219] 32 bytes of data: reply 192.168.1.219: bytes=32 time=16ms ttl=128 reply 192.168.1.219: bytes=32 time=19ms ttl=128 reply 192.168.1.219: bytes=32 time=1ms ttl=128 reply 192.168.1.219: bytes=32 time=2ms ttl=128 ping statistics 192.168.1.219: packets: sent = 4, received = 4, lost = 0 (0% loss), approximate round trip times in milli-seconds: minimum = 1ms, maximum = 19ms, average = 9ms c:\users\john doe> c:\users\john doe>ping km-ubuntu pinging km-ubuntu [192.168.1.214] 32 bytes of data: reply 192.168.1.214: bytes=32 time=6ms ttl=64 reply 192.168.1.214: bytes=32 time=20ms ttl=64 reply 192.168.1.214: bytes=32 time=1ms ttl=64 ping statistics 192.168.1.214: packets: sent = 3, received = 3, lost = 0 (0% loss), approximate round trip times in milli-seconds: minimum = 1ms, maximum = 20ms, average = 9ms control-c ^c c:\users\john doe>
never mind found answer.
code:all have is: sudo nano /etc/nsswitch.conf change line says hosts: files dns this: hosts: files wins dns (order matter) finally, need install winbind sudo apt-get install winbind enable windows ping ubuntu need install samba: sudo apt-get install samba
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] DHCPd and BIND: unable to ping or access clients from server using hostname
Ubuntu
Comments
Post a Comment