LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Fresh Minimal Debian Install, Slow Internet Performance? (https://www.linuxquestions.org/questions/linux-networking-3/fresh-minimal-debian-install-slow-internet-performance-676978/)

NickViper1024 10-16-2008 11:44 PM

Fresh Minimal Debian Install, Slow Internet Performance?
 
I used a netinst CD to install Debian Lenny. I manually installed everything and even before I got to installing X I noticed that apt-get was taking a long time to "connect" to anything. Upon making a connection everything seemed to flow by very fast (on my T1 connection).

Now that I have everything installed to my liking, Mozilla spends a great deal of time at the "looking up (dns)" stage (in the status bar.) After that stage it flows by pretty quick and the page is displayed. Also, pictures take up to a couple minutes to load whereas they are typically instant.

I dual boot Windows Vista on this machine and I have no internet speed problems in Vista, I even use Mozilla in Vista to compare. I now have a laptop (Vista, Mozilla) running next to this machine (Debian, Mozilla) and the same exact page takes up to several seconds or maybe a couple minutes to finish whereas my laptop (Vista) is done almost instantly.

Code:

viper@viper:~$ ping www.chase.com
PING www.chase.com (159.53.64.105) 56(84) bytes of data.

--- www.chase.com ping statistics ---
392 packets transmitted, 0 received, 100% packet loss, time 391095ms

Code:

viper:/home/viper# tracert www.chase.com
traceroute to www.chase.com (159.53.64.105), 30 hops max, 40 byte packets
 1  cpe-76-184-176-1.tx.res.rr.com (76.184.176.1)  13.258 ms  15.399 ms *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * ae-13-13.ebr1.Dallas1.Level3.net (4.69.137.138)  22.830 ms  24.700 ms
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * cr2.dlstx.ip.att.net (12.122.18.197)  56.794 ms
12  cr2.nsvtn.ip.att.net (12.122.28.65)  63.898 ms * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * 12.118.191.110 (12.118.191.110)  58.213 ms  64.931 ms
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

I don't suppose THAT's normal? lol... I initiated this ping about 5 minutes ago and it couldn't even finish one ping... although I can browse Chase's website (albeit a very very slow pace.)

I an eth0 and eth1, I am only using eth1 currently. I have an nVidia nForce 570 SLI MCP and I'm using the ethernet on the mainboard, no PCI cards. During the Debian install everything seemed ok... it detected my ethernet interfaces obviously and I was able to flag them as DHCP without any problems.

salasi 10-17-2008 02:48 AM

All the evidence suggests that you have a name resolution problem (a DNS problem).

probably the most sensible tool for looking at that is dig; it would be interesting to see whether you have a very slow initial lookup followed by fast repeats, or not.

either (probably)
  • you are going back to a DNS server which is v slow (your ISP?)
  • your name resolution is set up to query a non-existant or non-working service first and only then, when that has timed out, queries the working one

NickViper1024 10-17-2008 09:04 AM

Quote:

Originally Posted by salasi (Post 3313153)
All the evidence suggests that you have a name resolution problem (a DNS problem).

probably the most sensible tool for looking at that is dig; it would be interesting to see whether you have a very slow initial lookup followed by fast repeats, or not.

either (probably)
  • you are going back to a DNS server which is v slow (your ISP?)
  • your name resolution is set up to query a non-existant or non-working service first and only then, when that has timed out, queries the working one

I think you've hit the nail on the head. I failed to mention this in my first post because I wasn't 100% sure how to "articulate" it:

If I visit a site for the first time in a single X session, it takes awhile to look up the DNS. But if I click on links that lead to different pages on the same DNS/IP it's much faster, although still not as fast as I was hoping for.

I'll have to check my DNS settings when I get home, but I have it set up to look at 3 DNS servers: 192.168.2.1 (local router), and 2 DNS servers that auto-populated from my ISP. Is there a recommended way of dealing with this issue? Should I have a localhost DNS service running?

NickViper1024 10-17-2008 06:09 PM

How do I look at my Debian network settings? I dont see anything in XFCE, how about the terminal?

pinniped 10-17-2008 07:12 PM

Debian has all its network configuration in /etc/network/interfaces.

Another thing to look at is what version of IP is being used; the world is still plagued by machines which only understand IPv4 and if your name resolver is sending out IPv6 requests then falling back to sending out IPv4 requests when it doesn't get a response, that can really slow things down.

NickViper1024 10-17-2008 11:07 PM

Ok so I did some digging and research on configuring Debian's networking and now I'm more confused than when I started.

I'm going to reinstall Debian tonight and hope and pray that fixes the issue, although I'm sure it won't because I've reinstalled Debian a few times now... I don't know where to turn to get my DNS settings fixed. I've looked at /etc/hosts, /etc/resolv.conf, /etc/network/interfaces, and I don't understand which file lists the actual DNS servers to reference.

pinniped 10-17-2008 11:42 PM

Don't reinstall Debian, you're wasting your time because that won't fix anything.

/etc/hosts is a deprecated but often necessary file; it contains the hostname:IP address of a number of hosts which you may need to know before you have DNS and so on fully set up. On home computers it would typically be empty.

/etc/resolv.conf contains the IP address for nameservers which the resolver will use

So what is in your /etc/resolv.conf file and what is in your /etc/interfaces file?

What is your network setup like; are you getting a dynamic IP from a router/modem or are you using a static IP?

NickViper1024 10-18-2008 12:11 AM

Quote:

Originally Posted by pinniped (Post 3314157)
Don't reinstall Debian, you're wasting your time because that won't fix anything.

/etc/hosts is a deprecated but often necessary file; it contains the hostname:IP address of a number of hosts which you may need to know before you have DNS and so on fully set up. On home computers it would typically be empty.

/etc/resolv.conf contains the IP address for nameservers which the resolver will use

So what is in your /etc/resolv.conf file and what is in your /etc/interfaces file?

What is your network setup like; are you getting a dynamic IP from a router/modem or are you using a static IP?

Code:

# /etc/resolv.conf

### BEGIN INFO
#
# Modified_by:  NetworkManager
# Process:      /usr/bin/NetworkManager
# Process_id:  3437
#
### END INFO

domain PandaNetwork


search PandaNetwork WORKGROUP


nameserver 192.168.2.1
nameserver 24.93.41.127
nameserver 24.93.41.128

Code:

# /etc/interfaces

default        0.0.0.0
loopback        127.0.0.0
link-local      169.254.0.0

I am on a small home LAN. I have a Linksys router hooked to a modem giving DHCP to all hosts in the 192.168.2.* range. My PC is currently 192.168.2.3, the router is 192.168.2.1 of course.

I reinstalled Debian and instead of going for a clean, slim install I chose the bloated "Desktop Environment" option in tasksel... No change, except while logged into Gnome I can visit System->Administration->Network and see that my DNS tab has the following:

Code:

192.168.2.1
24.93.41.127
24.93.41.128

and by default, the Search Domain was detected as "PandaNetwork" (that is the workgroup defined by the router... but I have several Windows XP hosts that use Workgroup:"WORKGROUP" instead so I added "WORKGROUP" to the Search Domains list.)

Code:

Search Domains:
PandaNetwork
WORKGROUP

The Hosts tab (which I'm assuming is /etc/hosts) only holds loopback info (127.0.0.1 and 127.0.1.1 pointing to localhost and viper.PandaNetwork (viper is my hostname))

I hope that's enough information for you. I look forward to fixing this issue once and for all so I can go back to a clean Debian install. I'm still a Linux noob, but I like my computers squeaky clean!

salasi 10-18-2008 05:34 AM

Not sure why you have done what you have done; seeing dig results would be nice. You need to try a website that you haven't used recently, and do it twice.

Are you running anything that might cache dns lookups (dns/bind/named, dnsmasq, maradns, etc, etc)?

Also check nsswitch. And the advice about not running both ipv6 and ipv4 was good.

Quote:

I reinstalled Debian
Well I hope you did this for amusement rather than because you thought that it would cure this problem. If you didn't do something different in setting up networking, the outcome would be the same.

Quote:

I am on a small home LAN. I have a Linksys router hooked to a modem giving DHCP to all hosts in the 192.168.2.* range. My PC is currently 192.168.2.3, the router is 192.168.2.1 of course.
Given
Quote:

192.168.2.1
24.93.41.127
24.93.41.128
the first source that you are using for DNS lookups is your router; maybe the 24.93.41's work well, or maybe they don't but
I once had an ISP that did this kind of idiocy (and they were cr*p, although those things may or may not be connected);
  • the .127 and .128 are clearly on the same sub-net and that is as clear a declaration as you are likely to get that 'we haven't understood networking' because they've haven'y taken the opportunity to get the redundancy that they could out of the primary/secondary nameservers (but this needn't be important if the first one in the list always responds promptly)
  • really, as your router is the first source of lookups, then the first question becomes, is your router set up correctly and is it responding to your requests?

Is the router also set up to use the 24.93.41's?

Don't, by the way, assume that your your router's name cache can contain many entries; it may be very few indeed. So, if your router is set up to use a slow or non-responding nameserver, this would be an outcome. Equally, if the router doesn't respond for some reason, you'll wait for the router before trying anything else and that would make things slow.

NickViper1024 10-18-2008 10:49 AM

No need to get snippy with me.

I reinstalled Debian because my first install was a very clean one. I thought maybe if I selected "Desktop Environment" in tasksel, I would get a service or something that helps with DNS. My DNS has been a little faster since the reinstall but still unacceptable, especially compared to my Vista partition.

How do I check to see if any of the mentioned services are running? And how do I check to see if IPv6 and IPv4 are running concurrently? How do I check nsswitch?

I'm not sure why you feel the need to talk about my ISP's "stupidity" in dealing with DNS servers. The Internet works exceptionally fast. And since my internet works exceptionally fast in Windows, I somehow doubt my router is doing something wrong. But should that be the case, can you tell me how I can verify this? I'm using a Belkin router.

Code:

viper@viper:~$ dig

; <<>> DiG 9.5.0-P2 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46575
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 3

;; QUESTION SECTION:
;.                                IN        NS

;; ANSWER SECTION:
.                        21336        IN        NS        a.root-servers.net.
.                        21336        IN        NS        k.root-servers.net.
.                        21336        IN        NS        m.root-servers.net.
.                        21336        IN        NS        d.root-servers.net.
.                        21336        IN        NS        b.root-servers.net.
.                        21336        IN        NS        c.root-servers.net.
.                        21336        IN        NS        l.root-servers.net.
.                        21336        IN        NS        i.root-servers.net.
.                        21336        IN        NS        e.root-servers.net.
.                        21336        IN        NS        h.root-servers.net.
.                        21336        IN        NS        f.root-servers.net.
.                        21336        IN        NS        g.root-servers.net.
.                        21336        IN        NS        j.root-servers.net.

;; ADDITIONAL SECTION:
a.root-servers.net.        599470        IN        A        198.41.0.4
j.root-servers.net.        603552        IN        A        192.58.128.30
j.root-servers.net.        603552        IN        AAAA        2001:503:c27::2:30

;; Query time: 24 msec
;; SERVER: 24.93.41.127#53(24.93.41.127)
;; WHEN: Sat Oct 18 10:39:10 2008
;; MSG SIZE  rcvd: 288

Code:

viper@viper:~$ dig www.ameriprise.com

; <<>> DiG 9.5.0-P2 <<>> www.ameriprise.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49145
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.ameriprise.com.                IN        A

;; ANSWER SECTION:
www.ameriprise.com.        80        IN        A        129.33.114.90

;; Query time: 89 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Oct 18 10:39:53 2008
;; MSG SIZE  rcvd: 52

Code:

viper@viper:~$ dig www.ameriprise.com

; <<>> DiG 9.5.0-P2 <<>> www.ameriprise.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44337
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.ameriprise.com.                IN        A

;; ANSWER SECTION:
www.ameriprise.com.        80        IN        A        129.33.114.90

;; Query time: 6 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Oct 18 10:46:34 2008
;; MSG SIZE  rcvd: 52


fature 12-16-2008 09:16 AM

Hi,

I had the same issue when i swithed to "experimental" using kde4.1 and konqueror.
Also note that in my experience, firefox seems faster than konqueror, but that is a different debate.

This worked for me, but it may not for you...

First, edit your hostname file (/etc/hostname) using vi or whatever you like.

it probably reads:
yourhostname

change it to:
yourhostname.localdomain

Now change your hosts file (/etc/hosts)

The 2 top lines will be :
127.0.0.1 localhost
127.0.1.1 yourhostname.localdomain yourhostname

remove the 2nd line (127.0.1.1) and then add the other entries to the first line (127.0.0.1)
so you should end up with 1 line that reads:
127.0.0.1 localhost yourhostname.localdomain yourhostname

then reboot and let me know!

Lee.

alexhwest 12-26-2008 04:37 PM

This:
viper@viper:~$ ping www.chase.com
PING www.chase.com (159.53.64.105) 56(84) bytes of data.

--- www.chase.com ping statistics ---
392 packets transmitted, 0 received, 100% packet loss, time 391095ms

pretty much tells me that your problem has nothing to do with DNS. If it did, it would not have gotten 100%
packet loss. You either have an issue with the built in card, or the wire.

How about trying a traceroute -n?

rweaver 12-29-2008 04:13 PM

In addition to alex's suggestion of "traceroute -n" could you give us the output of:

Code:

ping -c5 -w10000 google.com
and also

Code:

/sbin/ifconfig -a
I would suggest using google as a end point because they do reliably return icmp (pings for instance). Many banks don't.


All times are GMT -5. The time now is 09:31 AM.