Strona 1 z 1

[+] Kubuntu - wolniejszy internet przez router

: 09 lutego 2009, 20:49
autor: infernoo
Proszę o pomoc, radę.
Dzisiaj kupiłem router by podzielić łącze z sieci kablowej. Pod Windowsem wszystko działa szybko i sprawnie bez żadnych problemów jednak pod Linuksem mam same problemy. Internet jest ale na załadowanie każdej nowo otwartej strony muszę czekać 10-15 sekund. Wczytanie Google tyle zajmuje.
Spisałem wszystkie wartości karty sieciowej z Windowsa i sprawdziłem pod Linuksem wszystko jest identyczne.
Więc spróbowałem odłączyć router i tak jak było wcześniej podłączyć internet bezpośrednio do komputera i działa szybko, sprawnie i żadnych problemów.

router: lantech hr-114pro

Proszę o pomoc.
Nie ma mowy tu o blokowaniu jakichkolwiek portów. Wyłączyłem też jakiekolwiek filtrowanie IP i mac i nadal jest to samo. Pod Windowsem działa szybko.
W komputerze mam 3 karty sieciowe podłączałem do każdej internet poprzez router i sytuacja taka sama. 10-14 sekund zanim strona się załaduje, nawet Google.

[Dodano: 2009-02-10, 00:22]
Witam.
Udało się.
Okazało się, że za każdym razem pobierały mi się 3 adresy DNS (resolv.conf) zamiast dwóch.
1-szy był adresem routera i on powodował problem,
już wcześniej usuwałem go, ale zaraz potem robiłem

Kod: Zaznacz cały

networking reset
i okazało się, że wtedy zawsze powracał ten dodatkowy DNS.
Jeśli usunę ten dodatkowy DNS (pierwszy od góry) i nic więcej nie zrobię, internet działa normalnie.
Niestety jeśli uruchomię ponownie komputer nieprawidłowe DNSy powracają.

Mógłby ktoś mi poradzić jak temu zapobiec?

Pozdrawiam.

: 10 lutego 2009, 08:46
autor: maxdawid
A więc tak za nadawanie dnsów odpowiada pakiet dhclient. Możesz wyedytować /etc/dhcp3/dhclient.conf:
odhaszuj
option domain-name-servers
i wpisz adresy poprawne takie które chcesz, aby nadawał:
prepend domain-name-servers
oraz w tej linijce również dodaj te poprawne adresy.

: 10 lutego 2009, 20:58
autor: infernoo
Zawartość pliku dhclient.conf:

Kod: Zaznacz cały

Configuration file for /sbin/dhclient, which is included in Debian's
#       dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#       man page for more information about the syntax of this file
#       and a more comprehensive list of the parameters understood by
#       dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#       not leave anything out (like the domain name, for example), then
#       few changes must be made to this file, if any.
#

send host-name "<hostname>";
#send dhcp-client-identifier xxx.xxx.xxx.xxx;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers xxx.xxx.xxx.xxx;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        netbios-name-servers, netbios-scope, interface-mtu;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject xxx.xxx.xxx.xxx;

#alias {
#  interface "eth0";
#  fixed-address xxx.xxx.xxx.xxx;
#  option subnet-mask xxx.xxx.xxx.xxx;
#}

#lease {
#  interface "eth0";
#  fixed-address xxx.xxx.xxx.xxx;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask xxx.xxx.xxx.xxx
#  option broadcast-address xxx.xxx.xxx.xxx;
#  option routers xxx.xxx.xxx.xxx;
#  option domain-name-servers xxx.xxx.xxx.xxx;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}
Mógłbyś mi pokazać gdzie miałbym wkleić te adresy?
Np.
  • aaa.aaa.aaa.aaa
    bbb.bbb.bbb.bbb
To przykładowe prawidłowe adresy DNS i internet mam na eth1 a tam jest coś o eth0.

: 10 lutego 2009, 21:11
autor: maxdawid

Kod: Zaznacz cały

# Configuration file for /sbin/dhclient, which is included in Debian's
#       dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#       man page for more information about the syntax of this file
#       and a more comprehensive list of the parameters understood by
#       dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#       not leave anything out (like the domain name, for example), then
#       few changes must be made to this file, if any.
#

send host-name "<hostname>";
#send dhcp-client-identifier xxx.xxx.xxx.xxx;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers xxx.xxx.xxx.xxx;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        netbios-name-servers, netbios-scope, interface-mtu;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject xxx.xxx.xxx.xxx;

#alias {
#  interface "eth0";
#  fixed-address xxx.xxx.xxx.xxx;
#  option subnet-mask xxx.xxx.xxx.xxx;
#}

#lease {
#  interface "eth0";
#  fixed-address xxx.xxx.xxx.xxx;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask xxx.xxx.xxx.xxx
#  option broadcast-address xxx.xxx.xxx.xxx;
#  option routers xxx.xxx.xxx.xxx;
#  option domain-name-servers xxx.xxx.xxx.xxx;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}Configuration file for /sbin/dhclient, which is included in Debian's
#    dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#    man page for more information about the syntax of this file
#    and a more comprehensive list of the parameters understood by
#    dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#    not leave anything out (like the domain name, for example), then
#    few changes must be made to this file, if any.
#

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

#send host-name "andare.fugue.com";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
[B]prepend domain-name-servers aaaa, bbbbb;[/B]
request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-search, host-name,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.33.137.255;
#  option routers 192.33.137.250;
[B]   option domain-name-servers aaaa, bbbbbb;[/B]
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}

: 10 lutego 2009, 21:49
autor: infernoo
Niestety sposób zawiódł po ponownym uruchomieniu komputera plik resolv.conf wygląda:

Kod: Zaznacz cały

domain private
search private
nameserver adres routera ZLY DNS
nameserver dobry DNS
nameserver dobry dns

: 11 lutego 2009, 09:12
autor: maxdawid
Możesz zablokować resolv.conf poleceniem

Kod: Zaznacz cały

chattr +i /etc/resolv.conf
Dla odblokowania

Kod: Zaznacz cały

 chattr -i /etc/resolv.conf
Ale wcześniej jeśli edytowałeś plik tak jak pokazałem to wydaj polecenie:

Kod: Zaznacz cały

dhclient eth1

: 11 lutego 2009, 10:19
autor: fnmirk
maxdawid, Twój sposób nie będzie działał ze wszystkimi typami systemu plików. O tym jak poprawnie zablokować zmiany w /etc/resolv.conf było wielokrotnie na forum.

: 11 lutego 2009, 10:27
autor: infernoo
Wcześniej wykonałem kopię pliku, o którym pisałeś więc teraz go tylko przywróciłem.
Ręcznie edytowałem resolv.conf. Użyłem tego polecenia do zablokowania resolv.conf. Uruchomiłem ponownie komputer i DNSy się nie zmieniły.
Dziękuję za pomoc.