Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]resolving is very slow
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Thu Feb 21, 2008 12:32 pm    Post subject: [SOLVED]resolving is very slow Reply with quote

Hi,
I've got a Fastweb HAG ,a device that lets me use my connection using up to 3 ethernet ports (one for each pc) , I set my gentoo boxes to use static IP for some reasons (using hosts aliases make simpler use ssh, distcc) the problem is that resolving address is really slow: for example it takes some seconds from when I enter an url into my browser to when the data transfer begins, same thing happens when I download distfiles using emerge.

In my /etc/conf.d/net I got only these two lines (on each box) :
Code:

config_eth0=("<my_ip>/24")
routes_eth0=("default")


in my resolv.conf I got
Code:

nameserver 212.216.112.112
nameserver 192.168.0.1


Did I make some mistake? If you need infos just ask it.


Last edited by magowiz on Fri Feb 22, 2008 11:04 am; edited 1 time in total
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Thu Feb 21, 2008 3:13 pm    Post subject: Reply with quote

OK, so 192.168.0.1 is the HAG I take it. Your ISP should provide more than one IP for DNS. See if you can find some alternates to try.

[edit] Oh, and try this for the route on each system:
Code:

routes_eth0=("default via 192.168.0.1")

_________________
Thomas S. Howard


Last edited by didymos on Thu Feb 21, 2008 3:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Thu Feb 21, 2008 3:20 pm    Post subject: Reply with quote

didymos wrote:
See if you can find some alternates to try.


See http://european.ch.orsn.net/tech-switch-linux.php for alternative nameservers.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Thu Feb 21, 2008 6:46 pm    Post subject: Reply with quote

didymos wrote:
OK, so 192.168.0.1 is the HAG I take it.


I'm not really sure that it is the HAG, I tried to remove the line with that ip in my resolv.conf and resolving is faster...

Quote:
Your ISP should provide more than one IP for DNS. See if you can find some alternates to try.


yes it SHOULD, but on my ISP site there are no instructions on how to configure DNS, they only supports DHCP configurations, I think I should call their call center.
Quote:

[edit] Oh, and try this for the route on each system:
Code:

routes_eth0=("default via 192.168.0.1")


I tried to scan that IP with nmap and it says that seems down, IMHO the ip 192.168.0.1 isn't really an useful IP, and the resolv takes longer because it queries that ip and goes on timeout.... the problem is that if I remove that "nameserver 192....... " from resolv.conf, on reboot that nameserver returns.
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Fri Feb 22, 2008 6:48 am    Post subject: Reply with quote

A few tricks:

First up: let it assign nameservers via DHCP, then use those values statically.

Another: "whois fastweb.it" shows two dns servers. In this case:

Code:

dns1.fastweb.it
dns2.fastweb.it


Ping each one to get the IPs:

Code:

213.140.2.12
213.140.2.21


Next up: emerge bind-tools and run "dig fastweb.it". In this case, don't bother because the record returned just results in the same info above. You can also do the dig and whois stuff on the web. There's a ton of sites that let you do queries. A lot of them still offer "nslookup" though, which is an older tool and no longer recommended, having been superseded by dig. The reason you want to try dig is that sometimes, whois only lists 2 or 3 DNS servers, whereas dig may show quite a few more.

Last trick: Notice the "dns1" and "dns2". Suggests there might be more in that sequence, so try pinging dns3, dns4, etc. In this case, they don't exist, but often they do, especially with larger ISPs that cover a large geographic area.

Now, what I'm wondering is why those two addresses keep popping up. Is some sort of autoconfiguration of resolv.conf set up? Otherwise, I don't see why that file would be changed. Oh, and interestingly, the 212.216.112.112 address does not belong to fastweb, but rather Telecom Italia IDC. So, looks like fastweb leases from them, which means you can probably use all their DNS servers as well. Their domain is "telecomitalia.it", and whois gives you:

Code:

ns.telecomitalia.it
dnsts.interbusiness.it
dns3.nic.it


which are:

Code:

156.54.249.250
80.22.52.131
193.205.245.66


dns2.nic.it is a valid host too: 193.205.245.8

Not all those may work, though.

I still have no clue where 212.216.112.112 is coming from though. Probably some DNS server for use w/DHCP they don't publicize. There are likely others that work as well, e.g. 212.216.112.113, though I'm too lazy to check into that.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Fri Feb 22, 2008 10:58 am    Post subject: Reply with quote

I solved it :
the probleb was avahi-dnscond :
- I removed it from the runlevel
- I deleted all lines in /etc/resolv.conf and replaced with :
Code:

search residential.fw #that is the domain of residential customers
nameserver <dns_1>
nameserver <dns_2>


after a reboot my resolv.conf has a little change:
Code:

# Generated by dhcpcd for interface eth0
search residential.fw
nameserver <dns_1>
nameserver <dns_3>


anyway now it works like a charm.

PS: the dns_1, dns_2 ips differs from the dns1.fastweb.it
dns2.fastweb.it ones, a call center operator gives me those "correct" dns .
I think dns_3 was automatically found using the directive search residential.fw . I choose to not publish the ips of dns because the call center operator said to me that those dns changes depending on the location of the customer, so I think it's a better idea to call the call center and ask for propers dns.
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Fri Feb 22, 2008 11:40 am    Post subject: Reply with quote

Looks like they're using some internal system, because "residential.fw" isn't a valid domain. It's like giving your private home network a domain like "local.lan" or somesuch. Which is fine as long as they don't answer DNS queries for the internal domain.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Fri Feb 22, 2008 11:44 am    Post subject: Reply with quote

didymos wrote:
Looks like they're using some internal system, because "residential.fw" isn't a valid domain. It's like giving your private home network a domain like "local.lan" or somesuch. Which is fine as long as they don't answer DNS queries for the internal domain.


I think it uses this kind of internal system since my ISP is like a huge private LAN, every users infact has a private IP (not a public one) and it uses NAT to query internet network.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum