Monday, December 07, 2009

Linksys & Gentoo

My brand new home mysql server had a hiccup on install, very strange set of circumstances regarding name resolution. I had installed the latest version of Gentoo on a very mediocre specification PC to act as a MYSQL server on home network, really to aid my self education in coding in Python. Everything went well apart from after the install the server stopped resolving names to IP addresses, preventing me from updating the server. I tried all the handbook instructions on editing the /etc/conf.d/net file as otherwise /etc/resolv.conf gets overwritten on each boot, nothing worked, see my files below


tail /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
# dns_domain_eth0="csynet.co.uk"
#dns_servers_eth0="192.168.0.1"
config_eth0=( "192.168.0.10 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default via 192.168.0.1" )
dns_servers_eth0="192.168.0.1"

ifconfig
eth0 Link encap:Ethernet HWaddr 00:0d:87:36:d7:c7
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:330 errors:0 dropped:0 overruns:0 frame:0
TX packets:157 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41204 (40.2 KiB) TX bytes:13607 (13.2 KiB)
Interrupt:11 Base address:0xd400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:45 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:810 (810.0 B) TX bytes:810 (810.0 B)

tail /etc/resolv.conf
# Generated by net-scripts for interface eth0
nameserver 192.168.0.1

db ~ # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=255 time=0.773 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=255 time=0.758 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=255 time=0.759 ms
^C
--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.758/0.763/0.773/0.023 ms
db ~ # ping 195.112.4.14
PING 195.112.4.14 (195.112.4.14) 56(84) bytes of data.
64 bytes from 195.112.4.14: icmp_seq=1 ttl=53 time=18.8 ms
64 bytes from 195.112.4.14: icmp_seq=2 ttl=53 time=18.6 ms
64 bytes from 195.112.4.14: icmp_seq=3 ttl=53 time=19.1 ms
64 bytes from 195.112.4.14: icmp_seq=4 ttl=53 time=18.5 ms
^C
--- 195.112.4.14 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3026ms
rtt min/avg/max/mdev = 18.535/18.793/19.110/0.252 ms
db ~ # ping ntp.nildram.co.uk
ping: unknown host ntp.nildram.co.uk

However the forums on the gentoo website provided some bright ideas, like not trusting my Linksys adsl router DNS resolver (192.168.0.1) to work with gentoo. Having changed the DNS to the opendns server the problem was solved. I found this very strange, all my other Linux PC’s at home resolve via the linksys with no issues, even my virtualbox hosts use the same resolver with no issue. If anyone has a sensible answer about why gentoo is different I would appreciate a tip. By the way thanks to those at the gentoo forum users for the smart suggestions.

No comments: