# Can´t resolve hostname

## _dA_CyANIDe

Hi,

i have a big problem... i can ping only IP adresses, but no domain names since i´ve upgraded my baselayout.

my DNS servers are 192.168.10.10 and 192.168.1.1 and gateway to internet is 192.168.100.252 (Ovislink)

my /etc/resolv.conf contain this: 

----------------------

nameserver 192.168.10.10

nameserver 192.168.1.1

domain kn.vutbr.cz

-------------------------------------

my /etc/conf.d/net contain this:

----------------------

iface_eth0="192.168.100.251 broadcast 192.168.100.255 netmask 255.255.255.0"

gateway="eth0/192.168.100.252"

-------------------------------------

my /etc/conf.d/domainname :

---------------------------

OVERRIDE = 1

DNSDOMAIN="kn.vutbr.cz"

#NISDOMAIN=""

-----------------------------------

my /etc/hosts :

------------------------------------

127.0.0.1  a03-0726a a03-0726a.kn.vutbr.cz localhost.localdomain localhost

+ some IPv6 config 

------------------------------------

my /etc/host.conf :

-----------------------------------

order hosts, bind

mdns off

multi off

-----------------------------------

Can anybody help me in my problem, pls?

----------

## adaptr

```
emerge bind-tools
```

and run

```
dig <some-public-domain>
```

then scrutinise the output for any clues.

----------

## _dA_CyANIDe

there is a little problem. I can't resolve gentoo.inode.at to connect to their FTP and emerge bind-tools.   :Sad: 

----------

## adaptr

Boot livecd, chroot and do it there  :Wink: 

----------

## _dA_CyANIDe

There is an output from DIG:

<<>> DiG 9.2.5 <<>> www.seznam.cz

;;global option: printcmd

;;connection timed out; no servers could be reached

I have no idea what is wrong..  :Confused: 

----------

## adaptr

Well, for one thing, your system does not have reachable nameservers - it says so.

This may mean that the contents of resolv.conf are simply wrong, or it may indicate a deeper network-related problem.

----------

## _dA_CyANIDe

I have 2 PC one with WinXP and one with Gentoo  :Smile: ), on both PC are the same nameservers. WinXP works fine, but gentoo (after upgrade baselayout) not.

----------

## adaptr

Then you'll have to edit resolv.conf on the Gentoo box manually - if it works then it is a problem with the /etc/conf.d settings...

----------

## _dA_CyANIDe

resolv.conf is corretly set. No firewalls are running. GRRRrr  :Evil or Very Mad: 

----------

## andrewwalker27

I'm having exactly the same problem, I upgraded the baselayout package and I have now lost my internet gateway.

I checked my config and it appears correct. Everything was fine until I did emerge baselayout, I suspect it's a bug but don't know how to prove it, never mind fix it!

----------

## _dA_CyANIDe

Yes, it's a serious problem.  :Sad:  I've checked some init scripts but with no success.

----------

## _dA_CyANIDe

I think, that downgrading to previous version of baselayout may help with this problem, but i haven't tried it yet.

----------

## andrewwalker27

Trouble is, how do I now downgrade without an internet connection? If I get the necessary package from another machine what do I do to emerge it and stop it trying to re-emerge the broken one?

----------

## _dA_CyANIDe

Boot from LiveCD -> chroot -> test if your internet connection workes -> emerge =baselayout-<previous version>

or 

Get the previous baselayout package from another machine -> copy it into the DISTFILES dir (i think /usr/portage/distfiles) -> emerge =baselayout-<previous version>

but be careful it may change many conf files, before do this I recommend you to make a backup copy.

----------

## NeddySeagoon

_dA_CyANIDe,

Files are never deleted from /usr/portage/distfiles unless you do it

----------

## _dA_CyANIDe

I'm sorry, that's my bad.  :Embarassed: 

----------

## _dA_CyANIDe

For about month I can't resolve hostname from ISP's DNS on Gentoo box. If i use >(i don't want to say this word)< Windows, everything is ok. Settings on Gentoo are good. resolv.conf, hostname, domainname, hosts are well configured. I checked many scrips which are dependent on eth0 (resolving ), but with no success. I think, that it is deep networking problem or maybe compatibility problem. I've tried 

```
 emerge -e system && emerge -e world 
```

 for recompilation, but it still no work.  :Twisted Evil:   :Twisted Evil:   :Twisted Evil: 

Can anybody help me? .. MANY THANX

mod edit: @@ HELL PROBLEM WITH DNS RESOLVING @@ grrr => problem with dns resolving (subject) --Earthwings

----------

## Earthwings

Merged last post to this older thread about the problem.

----------

## m_sqrd

_dA_CyANIDe,

first check that there has not been a syntax change in your /etc/conf.d/net (some times happens with baselayout upgrades)  see the /etc/conf.d/net.example 

next  Show the output of

ifconfig -a

arp -a

cat /etc/nsswitch.conf

cat /etc/conf.d/hostname

also just try this.

dig @147.229.191.135 www.seznam.cz

----------

## _dA_CyANIDe

Hi m_sqrd,

here are outputs:

eth0    Zapouzdøení(Encapsulation):Ethernet  HWadr 00:08:54:04:5D:88

          inet adr:192.168.100.251  Broadcast:192.168.100.255 Mask:255.255.255.0

          AKTIVOVÁNO VESMÌROVÉ_VYSÍLÁNÍ BÌÍ MULTICAST  MTU:1500  Metrika:1

          RX packets:84 errors:0 dropped:0 overruns:0 frame:0

          TX packets:226 errors:0 dropped:0 overruns:0 carrier:0

          kolizí:0 délka odchozí fronty:1000

          RX bytes:22568 (22.0 Kb)  TX bytes:19446 (18.9 Kb)

          Pøeruení:19 Vstupnì/Výstupní port:0xc000

lo        Zapouzdøení:Loopback

          inet adr:127.0.0.1 Maska:255.0.0.0

          AKTIVOVÁNO SMYÈKA BÌÍ  MTU:16436  Metrika:1

          RX packets:14 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

          kolizí:0 délka odchozí fronty:0

          RX bytes:700 (700.0 b)  TX bytes:700 (700.0 b)

teql0   Zapouzdøení:NEZNÁM  HWadr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

          NEARP  MTU:1500  Metrika:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          kolizí:0 délka odchozí fronty:100

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

arp -a :

? (192.168.100.252) na 00:4F:62:00:61:3E [ether] on eth0

cat /etc/nsswitch.conf :

# /etc/nsswitch.conf:

# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nsswitch.conf,v 1.1 2005/05/17 00:52:41 vapier Exp $

passwd:      compat

shadow:      compat

group:       compat

# passwd:    db files nis

# shadow:    db files nis

# group:     db files nis

hosts:       files dns

networks:    files dns

services:    db files

protocols:   db files

rpc:         db files

ethers:      db files

netmasks:    files

netgroup:    files

bootparams:  files

automount:   files

aliases:     files

cat /etc/conf.d/hostname :

# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/conf.d/hostname,v 1.2.4.1 2005/02/19 02:13:53 vapier Exp $

# Set to the hostname of this machine

HOSTNAME="a03-0726a"

dig to www.gentoo.org ... no server could be reached

----------

## _dA_CyANIDe

Here is /etc/conf.d/net :

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface

#

config_eth0=( "192.168.100.251 netmask 255.255.255.0 broadcast 192.168.100.255" )

routes_eth0=( "default gw 192.168.100.252" )

----------

## m_sqrd

ok did you dig @147.229.191.135 www.gentoo.org or just dig www.gentoo.org ?

the 147.229.191.135 is a ns at your ISP 'paja.kn.vutbr.cz'

also whats your netstat -rn look like?

----------

## _dA_CyANIDe

Adresát         Gate                      Mask              Pøízn   MSS Wind   irtt Rozhraní

192.168.100.0      0.0.0.0               255.255.255.0      U             0 0          0 eth0

127.0.0.0             0.0.0.0              255.0.0.0              U             0 0          0 lo

0.0.0.0            192.168.100.252       0.0.0.0               UG           0 0          0 eth0

I´ve tried

dig www.gentoo.org

if i've used dig @ www.gentoo.org, but i got this output :

couldn't get address for "": not found

The kn.vutbr.cz is my school domain.  Now i'm @ home and i'm behind the router (192.168.100.252), so we haven't domain name or maybe localdomain.

----------

## m_sqrd

ok but use dig @147.229.191.135 www.gentoo.org

dig @ tells dig to use "server_name or ipaddress"  as the source for the lookup.

and I check that server from here a few min.. ago and it was up,  so what I'm look for is to see if there is something block udp port 53 from that box.

dig @147.229.191.135 www.gentoo.org

; <<>> DiG 9.2.5 <<>> @147.229.191.135 www.gentoo.org

; (1 server found)

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13061

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:

;www.gentoo.org.                        IN      A

;; ANSWER SECTION:

www.gentoo.org.         86400   IN      A       204.225.92.144

www.gentoo.org.         600     IN      A       66.219.59.46

www.gentoo.org.         600     IN      A       65.19.163.231

;; AUTHORITY SECTION:

gentoo.org.             12743   IN      NS      udns2.ultradns.net.

gentoo.org.             12743   IN      NS      udns1.ultradns.net.

;; ADDITIONAL SECTION:

udns2.ultradns.net.     62448   IN      A       204.74.101.1

udns1.ultradns.net.     62448   IN      A       204.69.234.1

;; Query time: 188 msec

;; SERVER: 147.229.191.135#53(147.229.191.135)

;; WHEN: Wed Aug 24 12:22:18 2005

;; MSG SIZE  rcvd: 178

----------

## _dA_CyANIDe

Output from : dig @ 147.229.191.135 www.gentoo.org

connection timed out; no servers could be reached.

I have no firewall running.

----------

## m_sqrd

Hmm.

Ok do you have traceroute if so try 

traceroute -d -p 53 147.229.191.135 

I don't think it is going to work. but it could show something usefull.

what's your network look like

(modem/dsl/cable)----(switch)---(computers) ?

----------

## _dA_CyANIDe

Ehm, i'm sorry. In which package can i find traceroute .. i have only tracepath or traceroute6..

I have it. It's in net-analyzer/traceroute package.

----------

## _dA_CyANIDe

My connection is >

{CABLE(ISP)}----->192.168.19.108{ROUTER and SWITCH (OVISLINK1120AP)}192.168.100.252------------> My 2 computers 192.168.100.251(gentoo) & 192.168.100.253(winxp)

----------

## _dA_CyANIDe

Output from tracepath>

a03-0726a ~ # tracepath 147.229.191.135/53

 1:  a03-0726a (192.168.100.251)                            0.463ms pmtu 1500

 1:  192.168.100.252 (192.168.100.252)                      1.536ms

 2:  192.168.19.10 (192.168.19.10)                          5.856ms

 3:  no reply

 4:  no reply

 5:  no reply

 6:  no reply

 7:  no reply

 8:  no reply

 9:  no reply

10:  no reply

11:  no reply

12:  no reply

13:  no reply

14:  no reply

15:  no reply

16:  no reply

17:  no reply

18:  no reply

19:  no reply

20:  no reply

21:  no reply

22:  no reply

23:  no reply

24:  no reply

25:  no reply

26:  no reply

27:  no reply

28:  no reply

29:  no reply

30:  no reply

31:  no reply

     Too many hops: pmtu 1500

     Resume: pmtu 1500

I have no idea what is wrong...it's a serious problem.  :Rolling Eyes: 

----------

## m_sqrd

on your windows box do (ipconfig /all) I think that it for windows.

there something not right here you send packet they go out to the first hop past your router then nothing.. 

maybe a netmask problem. but lets see whats in the box that works.

----------

## _dA_CyANIDe

Everything seems to be configured ok. 

I have dual boot (WXP,GENTOO) on one pc and on another is winxp only. If i boot winXP on dual boot pc, everything workes fine. But, if i boot Gentoo then not. DNS, GW, are configured as on  WinXP.  :Sad: 

----------

## _dA_CyANIDe

Here is an output from ipconfig /all 

Address IP . . . . . . . . . . . . : 192.168.100.251

 Subnet mask . . . . . . . . . . : 255.255.255.0

 Default gateway . . . . . . . . . . : 192.168.100.252

 DNS Servers. . . . . . . . . . . : 192.168.10.10

                                            192.168.1.1

----------

## m_sqrd

Hmmm Very strange.

did your ISP give you the 251,252,253 address ?

what happens if you switch the windows and the gentoo IP's ?

----------

## _dA_CyANIDe

So here is summary:

1, behind the router is "my" net. (i choose 192.168.100.XXX private adreses instead of 172.xxxx)  , so my PCs are 192.168.100.251 & 192.168.100.253. The router is 192.168.100.252

2, before the router(access point) is ISP private net (distributing INET to other clients by WIFI). My access point IP adress is 192.168.10.108 and his GW is 192.168.19.10.

xxx(ISP router(next GW))(192.168.19.10)------(192.168.10.108)(My access point GW(192.168.19.10))(192.168.100.252)--------------(My two PCs with 192.168.100.251&253 IPs)

So, one physical PC have IP 192.168.100.251 and another have IP 192.168.100.253.

Access point have 192.168.100.252 it is original firmware settings.

Huh, sorry for bad english.  :Wink: 

----------

## m_sqrd

Ok I'm sorry I miss the point about this being a daul boot and ever thing is ok when you boot in to windows..  the only other thing I can think of right now is maybe something in the sysctl file.

I'm still trying to get this in to my head  *Quote:*   

> 
> 
> xxx(ISP router(next GW))(192.168.19.10)------(192.168.10.108)(My access point GW(192.168.19.10))(192.168.100.252)--------------(My two PCs with 192.168.100.251&253 IPs)
> 
> 

 

but you do a very good job english  :Very Happy:  so that no prob...

----------

## _dA_CyANIDe

Thx, my vocabulary bUrN in hELL:)))

Here is configuration of sysctl.conf

# /etc/sysctl.conf

#

# For more information on how this file works, please see

# the manpages sysctl( :Cool:  and sysctl.conf(5).

#

# In order for this file to work properly, you must first

# enable 'Sysctl support' in the kernel.

#

# Look in /proc/sys/ for all the things you can setup.

#

# Disables packet forwarding

net.ipv4.ip_forward = 0

# Disables IP dynaddr

#net.ipv4.ip_dynaddr = 0

# Disable ECN

#net.ipv4.tcp_ecn = 0

# Enables source route verification

net.ipv4.conf.default.rp_filter = 1

# Enable reverse path

net.ipv4.conf.all.rp_filter = 1

# Disable source route

net.ipv4.conf.all.accept_source_route = 0

net.ipv4.conf.default.accept_source_route = 0

# Disable redirects

net.ipv4.conf.all.accept_redirects = 0

#net.ipv4.conf.default.accept_redirects = 0

# Disable secure redirects

net.ipv4.conf.all.secure_redirects = 0

#net.ipv4.conf.default.secure_redirects = 0

# Ignore ICMP broadcasts

net.ipv4.icmp_echo_ignore_broadcasts = 1

# Ignore ping

net.ipv4.icmp_echo_ignore_all = 1

# Protect againists bed error messages

net.ipv4.icmp_ignore_bogus_error_responses = 1

# Log martians

net.ipv4.conf.all.log_martians = 1

# Disables the magic-sysrq key

#kernel.sysrq = 0

# When the kernel panics, automatically reboot in 3 seconds

#kernel.panic = 3

# Allow for more PIDs (cool factor!); may break some programs

#kernel.pid_max = 999999

# TCP Port for lock manager

#fs.nfs.nlm_tcpport = 0

# UDP Port for lock manager

#fs.nfs.nlm_udpport = 0

----------

## m_sqrd

Did you set there setting ?

 *Quote:*   

> 
> 
> net.ipv4.conf.all.accept_source_route = 0
> 
> net.ipv4.conf.default.accept_source_route = 0
> ...

 

```

I checked and sure enuff 

equery belongs /etc/sysctl.conf

[ Searching for file(s) /etc/sysctl.conf in *... ]

sys-apps/baselayout-1.11.13-r1 (/etc/sysctl.conf)

```

can be updated but I don't think that is standerd.

check your /usr/portage/distfiles/rc-scripts*.tar.gz 

and see what your old one had.

----------

## _dA_CyANIDe

Yes, i did. It is settings from : [url] http://www.gentoo.org/doc/en/security/security-handbook.xml?part=1&chap=9 [/url]

----------

## m_sqrd

Ok I under stand that but I'd try to go back to your baseline and test from there.

becouse you said at one point the live-cd worked.

----------

## _dA_CyANIDe

5 minutes ago i´ve tried to boot from livecd and set up eth0, but it is the same problem as without livecd. This is really mysterious..for me. I didn´t use chroot. Just only livecd console.  :Crying or Very sad: 

----------

## m_sqrd

Ok let me try to draw out your network on a white board as I still can't get my head around it  :Confused: 

but in the mean time try booting off the livecd but use x.x.x.250 as your address and see what that dose just for testing.

----------

## _dA_CyANIDe

Here is my scheme:

[url]

http://eva.fit.vutbr.cz/~xstude04/scheme.jpg

[/url]

I've tried to use etheral and gspoof for genrating TCP/IP packets. 

I'd generated TCP (syn) packet such as this >

Source addres> 192.168.100.251

Source port > 53

Dest. addr. > 192.168.10.10

Dest. port > 53

Flags > syn

to test, if the DNS(192.168.10.10) will send ACK.

Then ethereal has caught packets. DNS respond with ACK,RST whitch is OK. So the TCP port 53 inbound and outbound connection is ok. Now, i don't know how to test UDP.

----------

## m_sqrd

Ok so now the livecd dose not work.  :Evil or Very Mad: 

but it did before?  :Question: 

I still can't figure out your network layout from the 2 example you've given

so I realy cant tell now deep up the network tree you getting look like just pasted your 1st route too me but I just can't make heads or tails from your drawing. 

xxx(ISP router)--->to first network wired.

#First Network --wired_interface to wifi

WAN_Intreface  (192.168.19.10/192.168.10.108)LAN_interface  "?? is this backwareds "

dose it really look like WAN_Intreface(192.168.10.108/192.168.19.10)LAN_interface

------ My access point GW-------- wifi to wired

WAN_Intreface (192.168.19.10/192.168.100.252)LAN_interface --------------(My two PCs with 192.168.100.251&253 IPs)

----------

## _dA_CyANIDe

LiveCD didn't work before. I was change DNS name in make.conf to IP address in mirrors. So, that emerge workes.

This is traceroute from 192.168.100.251:

 1     2 ms     1 ms    <1 ms  192.168.100.252  my Access point

 2     4 ms    10 ms     4 ms  192.168.19.10 router 1

 3     4 ms     5 ms    14 ms  192.168.15.10 router 2

 4    92 ms    93 ms    23 ms  192.168.14.10 router 3

 5   144 ms   147 ms   477 ms  192.168.64.11 router 4

 6    26 ms    14 ms    20 ms  192.168.57.1 router 5

 7    19 ms    18 ms    15 ms  192.168.185.100 router 6

 8    16 ms    35 ms    17 ms  192.168.185.99 router 7

 9    17 ms    25 ms    26 ms  192.168.100.6 router 8

10     *        *        *     Request timed out. router 9

11    40 ms    43 ms    65 ms  192.168.1.1 - router 10 && SECONDARY DNS

12    23 ms    17 ms    20 ms  ip-poda-gw2.hlucin.net [82.209.62.1] - this is our visible IP for cca 1000 pepople

It should be WAN_Intreface(192.168.19.10/192.168.10.108)WAN_Iface of AP -  wireless connection between

AP's LAN_interface(192.168.100.252)-----------(My two PCs) - wired connection.

Huh.  :Smile: 

----------

## m_sqrd

 *Quote:*   

> 
> 
>  1 2 ms 1 ms <1 ms 192.168.100.252 my Access point <------------------------ SEE BELOW!
> 
> 2 4 ms 10 ms 4 ms 192.168.19.10 router 1
> ...

 

Ok I Give up !

----------

## _dA_CyANIDe

Ok, i´ll try to program my own resolver. I´ll check what the resolver function give back. It can be CFLAGS compile incompatibility.

----------

## _dA_CyANIDe

So,

dig +qr +debug +tcp www.google.com gives me an output!  :Laughing: 

I was discover, that my UDP port 53 port is blocked with something. If i use TCP port 53 for DNS->IP resolving, then everything is ok. 

So, the question is...What is blocker? and How can i switch to resolving by TCP packets?

----------

## _dA_CyANIDe

So, this problem is solved.

IN /etc/services missed nameserver in :

domain		53/tcp		nameserver	# Domain Name Server

domain		53/udp	       nameserver

HUUUUH   :Shocked:   :Laughing:   :Laughing:   :Laughing:   :Laughing:   :Laughing:   :Laughing: 

How can I put [SOLVED] into topic header?

----------

