# Sudden internet problem

## mihhdu

Hi. I've started having a problem with my connection that seems very very strange. I use dual boot between gentoo and windows. Since today, i noticed the internet connection on gentoo was very slugish (youtube fx was not even streaming, sites were not loading sometimes at all etc.). Now i did some tests to see if it was the same in windows and it's not. Everything seems to be working fine there. It's only in gentoo that i have the problem. I then did some pings and i noticed something rly strange (at least for me). 

```

PING youtube-ui.l.google.com (209.85.129.100) 56(84) bytes of data.

64 bytes from 209.85.129.100: icmp_seq=1 ttl=55 time=49.7 ms

64 bytes from fk-in-f100.1e100.net (209.85.129.100): icmp_seq=2 ttl=55 time=48.6 ms

64 bytes from fk-in-f100.1e100.net (209.85.129.100): icmp_seq=3 ttl=55 time=49.1 ms

64 bytes from fk-in-f100.1e100.net (209.85.129.100): icmp_seq=4 ttl=55 time=48.6 ms

64 bytes from fk-in-f100.1e100.net (209.85.129.100): icmp_seq=5 ttl=55 time=48.7 ms

64 bytes from fk-in-f100.1e100.net (209.85.129.100): icmp_seq=6 ttl=55 time=48.9 ms

64 bytes from fk-in-f100.1e100.net (209.85.129.100): icmp_seq=7 ttl=55 time=48.9 ms

^C64 bytes from fk-in-f100.1e100.net (209.85.129.100): icmp_seq=8 ttl=55 time=49.1 ms

--- youtube-ui.l.google.com ping statistics ---

8 packets transmitted, 8 received, 0% packet loss, time 16063ms

rtt min/avg/max/mdev = 48.649/48.991/49.779/0.442 ms

```

Notice that even though there are no timeouts, the time it took to complete the 8 pings was 16 seconds, far too long(considering there were 8 of them with 50ms return time). What happens when i run ping is that sometimes it just waits for 2 3 seconds doing nothing, but does not call it a timeout nor does it increase the time in between responses (it's still 50ms). While it's doing this, i cannot even quit with Cntrl+C. 

On the other hand, if i ping my router, i don't have the same issues and i get normal, expected, results. So the problem should not be a gentoo related one, but why then does it work on windows O_O.

Also, i've not installed any new programs recently and it used to work just great (hence it's not a driver issue). Why is this ? i have no ideea, it's gotten me completely baffled.

----------

## bendeguz

Well, if i understand, you have this with different pages...

When is this problem occurs? 

Did you change anything in your hardware? Router for example?  Did you change ISP?

Try tcpdumping your traffic to look for symptoms.

You should try another network card if you can...

----------

## mihhdu

 *bendeguz wrote:*   

> Well, if i understand, you have this with different pages...
> 
> When is this problem occurs? 
> 
> Did you change anything in your hardware? Router for example?  Did you change ISP?
> ...

 

No hardware changes, i didn't change ISP, didn't change configuration at all, pinging my router and my DNS server works without problem.

----------

## gerard27

This is not a hardware problem since it works well in Windows.

Open a console and enter

```

/etc/init.d/net.eth0 restart
```

Post the output.

Gerard.

----------

## mihhdu

 *gerard82 wrote:*   

> This is not a hardware problem since it works well in Windows.
> 
> Open a console and enter
> 
> ```
> ...

 

have done it multiple times and everything is ok. output is:

```

/etc/init.d/net.eth0 restart

 * Unmounting network filesystems ...                                     [ ok ]

 * samba -> stop: smbd ...                                                [ ok ]

 * samba -> stop: nmbd ...                                                [ ok ]

 * Stopping eth0

 *   Bringing down eth0

 *     Stopping dhcpcd on eth0 ...                                        [ ok ]

 *     Shutting down eth0 ...                                             [ ok ]

 * Starting eth0

 *   Bringing up eth0

 *     dhcp

 *       Running dhcpcd ...

eth0: dhcpcd 4.0.15 starting

eth0: waiting for carrier

eth0: carrier acquired

eth0: broadcasting for a lease

eth0: offered 192.168.1.2 from 192.168.1.1

eth0: acknowledged 192.168.1.2 from 192.168.1.1

eth0: checking 192.168.1.2 is available on attached networks

eth0: leased 192.168.1.2 for 86400 seconds                                [ ok ]

 *       eth0 received address 192.168.1.2/24

 * Mounting network filesystems ...                                       [ ok ]

 * samba -> start: smbd ...                                               [ ok ]

 * samba -> start: nmbd ...                                               [ ok ]

```

----------

## gerard27

I agree that looks ok.

When you are in Windows do you have anything like samba?

I don't use samba myself but maybe it is eating your eth0.

Gerard.

----------

## mihhdu

 *gerard82 wrote:*   

> I agree that looks ok.
> 
> When you are in Windows do you have anything like samba?
> 
> I don't use samba myself but maybe it is eating your eth0.
> ...

 

i have used it before today and it made no difference whatsoever, but i will try stopping the daemon and testing it out.

----------

## mihhdu

ok i've run ping on google and ping on it's returned ip address and it seems that my problem is related to the dns servers as when i ping the google ip adress it doesn't give any problems. 

I then tried to set up static up address because i suspected dns information was not given correctly by the router. So i modified my /etc/conf.d/net to 

```

config_eth0=( "192.168.1.2/24" )

routes_eth0=( "default via 192.168.1.1" )

dns_servers_eth0=( "193.231.100.134 193.231.100.130" )

```

So now the dns address is specified. Sadly though, this has not solved my problem. 

I don't know what to do since i cannot call my ISP. It works perfectly in windows  :Sad: 

----------

## gerard27

I'm out of ideas,sorry.

Gerard.

----------

## bendeguz

setting google name server? 8.8.8.8

----------

## mihhdu

ok this is the most weird thing i have ever seen. The setup i was using, and that i described to you untill now, was my pc being directly connected to my router. Now, the router uses dhcp server, and you guys know the problems i described earlier. 

What ive done is connect the first router to a second router that also has wireless and from that one to my pc (with linux) and my laptop through wireless. Now, the second router also has dhcp on. The biggest surprise is that if i use the extra router i get no more problems. How can that be ? i mean i am adding a device, not removing it. This doesnt make any sense. At least i got it fixed temporairly untill i can figure things out. Thanks for the help so far guys !

----------

## bendeguz

router problem?

So you're using another router to communicate outside?

maybe have a look at this:

https://forums.gentoo.org/viewtopic-t-818338-highlight-.html

I'm having problems since i changed my router (i know you did not). If you're looking for weird problems, you must read it:)

----------

