Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Общий по Linux (http://forum.oszone.net/forumdisplay.php?f=9)
-   -   Очередь сетевых пакетов Debian Jessie (http://forum.oszone.net/showthread.php?t=318263)

levi2ki 29-08-2016 11:30 2663859

Очередь сетевых пакетов Debian Jessie
 
Добрый день. Стоит Debian 8 в качестве шлюза.
eth1 смотрит в гигабитную сеть, eth0 ограничен до 100мб/c смотрит в коммутатор провайдера
и наблюдается дроп пакетов на обоих интерфейсах.
На простом обмене данными это не заметно, но через этот шлюз работают еще sip телефоны с удаленным астериском, на них эти потери ощутимы

Код:

netstat -i
Kernel Interface table
Iface  MTU Met  RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
br0    1500 0  389739875      0      0 0      591652095      0      0      0 BMRU
eth0      1500 0  163061755      0 13634688 0      113096028      0      0      0 BMRU
eth1      1500 0  389731453      0  28756 0      769161532      0      0      0 BMRU
lo        65536 0    12293      0      0 0        12293      0      0      0 LRU

Код:

iptables -L -n
Chain INPUT (policy ACCEPT)
target    prot opt source              destination       
fail2ban-ssh  tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 22

Код:

ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                              drv probe ifdown ifup
        Link detected: yes

Код:

ethtool eth1
Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off (auto)
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000007 (7)
                              drv probe link
        Link detected: yes

Код:

lspci -v
#eth1 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
        Kernel driver in use: r8169

#eth0 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V
        Kernel driver in use: e1000e

Ограничение скорости
Код:

cat /etc/network/if-up.d/ethtool-100mb
#!/bin/bash
ethtool -s eth0 speed 100 duplex full autoneg off

исправление UNIT-HANG на сетевых платах Intel e1000e
Код:

cat /etc/network/if-up.d/ethtool-persistent
#!/bin/bash

ifaces=`ls -1 /sys/class/net/`
for i in $ifaces; do
    if [[ ! $i =~ eth[0-9] ]]
    then
        continue
    fi
    testbytools=`ethtool -i $i | grep 'driver:' | sed 's/driver: //'`
    if [[ $testbytools == "e1000e" ]]
    then
        ethtool -K $i gso off gro off tso off
        if [[ $? != 0 ]]
        then
            logger -i -s -t if-up "WAWRNING! Configuration for $i failed! you may observe UNIT HANG for $i"
            exit 1
        fi
    fi
    logger -i -s -t if-up "OK! Configuration for $i SUCCESS! (exit=0)"
done

собственно вопрос: как настроить очередь пакетов?


Время: 03:01.

Время: 03:01.
© OSzone.net 2001-