Página 6 de 6 PrimeiroPrimeiro ... 23456
+ Responder ao Tópico



  1. #31

    Padrão Regra

    Nao precisa enviar o script mais nao ....

    no seu script esta assim
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst-address 10.0.1.254 flowid 1:60

    deve ficar assim:

    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 10.0.1.254 flowid 1:60
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src 10.0.1.254 flowid 1:60

    com a opcao "ip dst" vc indica que tudo que possuir destino for a maquina 10.0.1.254 deve trafegar a 100mbit.

    com a opcao "ip src" vc indica que tudo quer possuir origem 10.0.1.254 deve trafegar a 100mbit independente do destino, seja rede interna ou rede externa.

  2. #32

    Padrão

    vamos lá..então ficou assim:

    rede interna eth1:

    #!/bin/bash
    tc qdisc del dev eth1 root
    tc qdisc add dev eth1 root handle 1:0 htb default 50
    #squid
    tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100mbit
    #squid
    tc class add dev eth1 parent 1:1 classid 1:60 htb rate 100mbit prio 1
    tc class add dev eth1 parent 1:1 classid 1:10 htb rate 512kbit ceil 512kbit prio 1 # voip
    tc class add dev eth1 parent 1:1 classid 1:20 htb rate 100kbit ceil 200kbit prio 2 # DNS / ACK / SYN / FIN
    tc class add dev eth1 parent 1:1 classid 1:30 htb rate 250kbit ceil 512kbit prio 3 # Terminal service
    tc class add dev eth1 parent 1:1 classid 1:40 htb rate 128kbit ceil 300kbit prio 4 # HTTP
    tc class add dev eth1 parent 1:1 classid 1:50 htb rate 128kbit ceil 400kbit prio 5 # Geral
    #squid
    tc qdisc add dev eth1 parent 1:60 handle 60: sfq perturb 10
    tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
    tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
    tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
    tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
    tc qdisc add dev eth1 parent 1:50 handle 50: sfq perturb 10
    #squid
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 10.0.1.254 flowid 1:60
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src 10.0.1.254 flowid 1:60
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip sport 5060 0xffff flowid 1:10
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip sport 5061 0xffff flowid 1:10
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip sport 10000 0xffff flowid 1:10
    tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip sport 20000 0xffff flowid 1:10
    tc filter add dev eth1 parent 1:0 protocol ip prio 2 u32 match ip sport 53 0xffff flowid 1:20
    tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip sport 3389 0xffff flowid 1:30
    tc filter add dev eth1 parent 1:0 protocol ip prio 4 u32 match ip sport 80 0xffff flowid 1:40


    rede externa eth0:

    #!/bin/bash
    tc qdisc del dev eth0 root
    tc qdisc add dev eth0 root handle 1:0 htb default 50
    tc class add dev eth0 parent 1:0 classid 1:1 htb rate 1024kbit
    tc class add dev eth0 parent 1:1 classid 1:10 htb rate 512kbit ceil 512kbit prio 1 # voip
    tc class add dev eth0 parent 1:1 classid 1:20 htb rate 100kbit ceil 200kbit prio 2 # DNS / ACK / SYN / FIN
    tc class add dev eth0 parent 1:1 classid 1:30 htb rate 250kbit ceil 512kbit prio 3 # Terminal service
    tc class add dev eth0 parent 1:1 classid 1:40 htb rate 128kbit ceil 300kbit prio 4 # HTTP
    tc class add dev eth0 parent 1:1 classid 1:50 htb rate 128kbit ceil 400kbit prio 5 # Geral

    tc qdisc add dev eth0 parent 1:10 handle 10: pfifo limit 10
    tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
    tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10
    tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10
    tc qdisc add dev eth0 parent 1:50 handle 50: sfq perturb 10

    tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 5060 0xffff flowid 1:10
    tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 5061 0xffff flowid 1:10
    tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 10000 0xffff flowid 1:10
    tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 20000 0xffff flowid 1:10
    tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dport 53 0xffff flowid 1:20
    tc filter add dev eth0 parent 1:0 protocol ip prio 3 u32 match ip dport 3389 0xffff flowid 1:30
    tc filter add dev eth0 parent 1:0 protocol ip prio 4 u32 match ip dport 80 0xffff flowid 1:40


    e no squid adicionei as linhas:

    #CACHE FULL
    refresh_pattern (/cgi-bin/|\?) 0 0% 0
    refresh_pattern . 0 20% 4

    entào fui fazer o teste..com minha máquina limpei o cookies e etc...depois baixei o acrobat que tem 23mb no site www.baixaki.com.br...ele baixou usando 80KB/s a 90KB/s da minha rede que tem no total 100KB/s de link embratel...depois disso exluir o arquivo da minha máquina cliente, limpei novamente os cookies e etc... e fui baixar para testar o cache full...resultado:

    baixou com o mesmo tempo e na mesma velocidade..o que pode estar errado??



  3. #33

    Padrão

    amaia me ajuda por favor preciso ativar esse cache full!!

    outra coisa não teria que colocar algo do ZPH no squid.conf?
    Última edição por lfernandosg; 26-01-2009 às 20:43.