Am Gateway volle 4 mbit im Lan nur 2 mbit ?

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
zillion42
Beiträge: 5
Registriert: 09.04.2006 18:22:18

Am Gateway volle 4 mbit im Lan nur 2 mbit ?

Beitrag von zillion42 » 09.04.2006 18:49:15

Hallo allen hier im Forum,

Mein Problem habe ich durch suchen nirgends finden können. Es ist folgendes...

Ich habe seit 01.04.06 vier Mbit über das Fernshkabel, vorher hatte ich 1 Mbit. Direkt hinter dem Kabelmodem ist mein 2.68 Debian mit 2 Realtek, Usb Drucker, Samba, ftp, ssh usw.. Kernel habe ich selbst gebacken da ich SMP habe (Asus A7m266-d).
Das Debian Routet für mich und meine Freundin also insgesamt 3 Rechner und das klappt auch alles wunderbar.

Mein problem ist das ich an allen Rechnen im Lan maximal 2 Mbit bekomme wohingegen das Debian System die vollen 4 Mbit nutzt. Das ist ärgerlich da ich meine Downloads nicht unbedingt über vnc am Router laden will sondern an meinem eigenen Rechner...

Irgend jemand eine Idee woran es liegen könnte ?

Hier meine Interfaces...

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

# The secondary interface
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.1
broadcast 192.168.0.255

Da ich iptables nicht behersche, aber sowohl gnome als auch kde installiert habe benutze ich zum portforwarden Guidedog. :)
Guidedog hat folgendes script um meine Ports zu forwarden:

#!/bin/sh
# [Guidedog]
# DO NOT EDIT!
# This script was generated by "Guidedog" by Simon Edwards
# http://www.simonzone.com/software/guidedog/ This script requires Linux
# kernel 2.4.x and iptables.
#
# [Description]
#
# [Config]
# DISABLED=0
# ROUTING=1
# MASQUERADE=1
# MASQUERADEFTP=0
# MASQUERADEIRC=0
# [Forwarding]
# TYPE=TCP
# ORIGINALPORT=10308
# SPECIFYORIGINALADDRESS=0
# ORIGINALADDRESS=
# NEWPORT=10308
# SPECIFYNEWADDRESS=1
# NEWADDRESS=192.168.0.42
# COMMENT=LockOnTCP
# [Forwarding]
# TYPE=UDP
# ORIGINALPORT=10308
# SPECIFYORIGINALADDRESS=0
# ORIGINALADDRESS=
# NEWPORT=10308
# SPECIFYNEWADDRESS=1
# NEWADDRESS=192.168.0.42
# COMMENT=LockonUDP
# [End]

# Real code starts here
# If you change the line below then also change the # DISABLED line above.
DISABLE_GUIDEDOG=0
if [ $DISABLE_GUIDEDOG -eq 0 ]; then
# Set the path
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin
if test -z $GUIDEDOG_VERBOSE; then
GUIDEDOG_VERBOSE=0
fi;
logger -p auth.info -t guidedog Configuring routing now.
[ $GUIDEDOG_VERBOSE -eq 1 ] && echo "Resetting routing rules."
# Shut down routing
echo 0 > /proc/sys/net/ipv4/ip_forward 2> /dev/null
iptables -t nat -P PREROUTING DROP
iptables -t nat -P POSTROUTING DROP
iptables -t nat -P OUTPUT DROP
iptables -t mangle -P PREROUTING DROP
iptables -t mangle -P POSTROUTING DROP
# Delete any existing chains
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X

# Enable/disable routing
[ $GUIDEDOG_VERBOSE -eq 1 ] && echo "Enabling routing."
echo 1 > /proc/sys/net/ipv4/ip_forward 2> /dev/null

[ $GUIDEDOG_VERBOSE -eq 1 ] && echo "Loading kernel modules."
modprobe iptable_nat
# Port forwarding/Tunnelling
iptables -t nat -N gforward
iptables -t nat -N ftolocal
iptables -t mangle -N gforward
iptables -t mangle -N ftolocal

# Switch the current language for a moment
GUIDEDOG_BACKUP_LANG=$LANG
GUIDEDOG_BACKUP_LC_ALL=$LC_ALL
LANG=US
LC_ALL=US
export LANG
export LC_ALL
# Work out our local IPs.
LOCAL_IP="`ifconfig | gawk '/inet addr:/ { match(\$0,/inet addr:[[:digit:]\\.]+/)
printf \"%s\\n\",substr(\$0,RSTART+10,RLENGTH-10) }'`"
# Restore the language setting
LANG=$GUIDEDOG_BACKUP_LANG
LC_ALL=$GUIDEDOG_BACKUP_LC_ALL
export LANG
export LC_ALL
for X in $LOCAL_IP ; do
iptables -t nat -A gforward -d $X -j ftolocal
iptables -t mangle -A gforward -d $X -j ftolocal
done

# LockOnTCP
iptables -t mangle -A ftolocal -p tcp --dport 10308 -j MARK --set-mark 1
iptables -t nat -A ftolocal -p tcp --dport 10308 -j DNAT --to-destination 192.168.0.42:10308
# LockonUDP
iptables -t mangle -A ftolocal -p udp --dport 10308 -j MARK --set-mark 1
iptables -t nat -A ftolocal -p udp --dport 10308 -j DNAT --to-destination 192.168.0.42:10308

iptables -t nat -A PREROUTING -j gforward
iptables -t nat -A OUTPUT -j gforward
iptables -t mangle -A PREROUTING -j gforward
# Marked packets are in the process of being port forwarded.
# We also need to source Nat them too.
iptables -t nat -A POSTROUTING -m mark --mark 1 -j MASQUERADE
[ $GUIDEDOG_VERBOSE -eq 1 ] && echo "Inserting masquerade rules."
iptables -t nat -N fromprivate
# Packets from the private IP range to another private IP range are untouched.
iptables -t nat -A fromprivate -d 192.168.0.0/16 -j ACCEPT
iptables -t nat -A fromprivate -d 172.16.0.0/12 -j ACCEPT
iptables -t nat -A fromprivate -d 10.0.0.0/8 -j ACCEPT
# Packets that get here are from the private address range
# and are trying to get out to the internet. We NAT them.
iptables -t nat -A fromprivate -j MASQUERADE

# No-masquerade addresses.
# Siphon off any packets that are from the private IP range.
iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -j fromprivate
iptables -t nat -A POSTROUTING -s 172.16.0.0/12 -j fromprivate
iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -j fromprivate
# packets that get here can just hit the default policy.

iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P POSTROUTING ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
[ $GUIDEDOG_VERBOSE -eq 1 ] && echo "Finished."
fi;
true

zillion42
Beiträge: 5
Registriert: 09.04.2006 18:22:18

Beitrag von zillion42 » 09.04.2006 19:59:48

... mhh

An der interfaces wirds wohl nicht liegen... und ich nehm an das Guidedog iptables richtig aufruft, daher denk ich das es wohl am ehesten an meinem kernel liegen könnte.

Ich weiss das es ne Menge Arbeit ist, aber wer Lust hat könnte gerne mal in meine /usr/src/kernel-source-2.6.8/.config schauen und mir unter networking options weiterhelfen... Ich nehme an ich habe eine Menge sinnloses Zeug laufen...


vielen Dank im vorraus

Benutzeravatar
mistersixt
Beiträge: 6601
Registriert: 24.09.2003 14:33:25
Lizenz eigener Beiträge: GNU Free Documentation License

Beitrag von mistersixt » 10.04.2006 08:14:11

Ist es das einzige Script, das an den iptables-Regeln rumschraubt? Ich Sepp hatte mal mittels HTB Traffic-Shaping für die 1024/128 DSL-Leitung eingerichtet, hatte dann nach langer Zeit auf 2048/192 aufgerüstet und habe die Telekom 2 Tage lang terrorisiert, dass die Leitung nicht schneller geworden ist - bis ich merkte, dass halt Traffic-Shaping noch mit den "alten" Werten aktiv war ...

Gruss, mistersixt.
--
System: Debian Bookworm, 6.11.x.-x-amd64, ext4, AMD Ryzen 7 3700X, 8 x 3.8 Ghz., Radeon RX 5700 XT, 32 GB Ram, XFCE

zillion42
Beiträge: 5
Registriert: 09.04.2006 18:22:18

Beitrag von zillion42 » 11.04.2006 23:31:28

Danke für die Antwort... nee daran lags nicht... hatte im Kernel zwar QoS und TrafficShaping(experimental) an, aber noch nicht mal tc installiert und ausser den oben gennanten iptables keine weiteren Regeln.
Habe den Kernel jetzt neu compiliert, ohne Erfolge mit diesem Problem (Ich hatte DRI für XF86 mit radeon trotz installiertem fglrx modul, wenigstens eine Sache gefixt)

Ein Freund meinte vielleicht hätte ich ein shared irq für beide Netzwerkkarten (und doch nur einen 80286er), dem ist allerdings nicht so.

Mhh. Momentan spiele ich ein bisschnen mit der MTU von meinen Interfaces rum... Da ich nicht an einer pppoe Dose hänge sonder am Fernsehkabel darf die MTU von meiner externen Karte doch 1500 sein oder ? Soll ich die interne Karte auf 1492 stellen damit da noch irgendeine andere destination oder so ranpasst ? Wie ihr merkt tapp ich jedenfalls noch immer ziemlich im Dunkeln und wäre über jede Hilfe dankbar.

Ich hab hier mal ganz interessante Resultate von einem Test bei dslreport verlinkt, einmal von Debian aus:

http://www.broadbandreports.com/tweakr/ ... via=normal

und einmal von einem WinXP:

http://www.dslreports.com/tweakr/block: ... via=normal

^Edit: In den Tests gings nicht um Geschwindigkeit sondern um Bits zählen.
^Edit2: Für denjenigen der mir helfen kann gibts ein useraccount bei mir am router :) allerdings nur zum diagnose machen, nmappen, pingen usw. und nur wer sich zu benehmen weiss...
Danke im vorraus

Antworten