Limitar Velocidad por Grupos y por tipo de Servicio

Tema en 'Queues' comenzado por Howard Smith, 28 de Mayo de 2017.

  1. Howard Smith

    Howard Smith Member

    CLASIFICAMOS EL TRÁFICO
    Código (Text):
    /ip firewall mangle
    add chain=forward comment=Libre src-address-list=libre
    add action=mark-packet chain=forward comment="RED1 -1.1.1.0/24" dst-address-list=Red1 in-interface=ether1_WAN_90 \
        new-packet-mark=red1_dow passthrough=no
    add action=mark-packet chain=forward new-packet-mark=red1_up out-interface=ether1_WAN_90 passthrough=no src-address-list=Red1
    add action=mark-packet chain=forward comment="RED2- 2.2.2.0/24" dst-address-list=Red2 in-interface=ether1_WAN_90 \
        new-packet-mark=red2_dow passthrough=no
    add action=mark-packet chain=forward new-packet-mark=red2_up out-interface=ether1_WAN_90 passthrough=no src-address-list=Red2
    add action=mark-packet chain=forward comment="RED3 -3.3.3.0/24" dst-address-list=Red3 in-interface=ether1_WAN_90 \
        new-packet-mark=red3_dow passthrough=no
    add action=mark-packet chain=forward new-packet-mark=red3_up out-interface=ether1_WAN_90 passthrough=no src-address-list=Red3
    add action=mark-connection chain=forward comment=Youtube dst-address-list=Red_Total layer7-protocol=googlevideo log=yes \
        new-connection-mark=mark-conn-gvideo
    add action=mark-connection chain=forward disabled=yes layer7-protocol=Youtube1 log=yes new-connection-mark=mark-conn-gvideo
    add action=mark-packet chain=forward connection-mark=mark-conn-gvideo new-packet-mark=mark-pkt-gvideo_Subida out-interface=\
        ether1_WAN_90 passthrough=no src-address-list=Red_Total
    add action=mark-packet chain=forward connection-mark=mark-conn-gvideo dst-address-list=Red_Total in-interface=ether1_WAN_90 \
        new-packet-mark=mark-pkt-gvideo_bajada passthrough=no
    add action=mark-connection chain=forward comment=Mega new-connection-mark=mega_conn src-address-list=Mega
    add action=mark-packet chain=forward connection-mark=mega_conn dst-address-list=Red_Total in-interface=ether1_WAN_90 \
        new-packet-mark=mega_bajada passthrough=no
    add action=mark-packet chain=forward connection-mark=mega_conn new-packet-mark=mega_subida out-interface=ether1_WAN_90 \
        passthrough=no src-address-list=Red_Total
    add action=mark-connection chain=forward comment=Facebook-Video dst-address-list=face_video new-connection-mark=facebook_video
    add action=mark-packet chain=forward connection-mark=facebook_video dst-address-list=Red_Total in-interface=ether1_WAN_90 \
        new-packet-mark=face_video_bajada passthrough=no
    add action=mark-packet chain=forward connection-mark=facebook_video new-packet-mark=face_video_Subida out-interface=\
        ether1_WAN_90 passthrough=no src-address-list=Red_Total
    add action=mark-connection chain=forward comment="100 megas" connection-bytes=100000000-0 new-connection-mark=\
        descarga_10mb_conn protocol=tcp
    add action=mark-packet chain=forward connection-mark=descarga_10mb_conn dst-address-list=Red_Total in-interface=ether1_WAN_90 \
        new-packet-mark=descarga10mb_bajada passthrough=no
    add action=mark-connection chain=forward comment=Otros connection-mark=no-mark new-connection-mark=otros_conn
    add action=mark-packet chain=forward connection-mark=otros_conn dst-address-list=Red_Total in-interface=ether1_WAN_90 \
        new-packet-mark=otros_bajada passthrough=no
    add action=mark-packet chain=forward connection-mark=otros_conn new-packet-mark=otros_subida out-interface=ether1_WAN_90 \
        passthrough=no src-address-list=Red_Total
    ARMAMOS EL HTB
    Código (Text):
    /queue tree
    add name=Grobal_download parent=global priority=1 queue=default
    add name=Global_Upload parent=global priority=1 queue=default
    add max-limit=30k name=RED1_ packet-mark=red1_up parent=Global_Upload priority=1 queue=default
    add max-limit=800k name=RED2 packet-mark=red2_dow parent=Grobal_download priority=1 queue=red2_dow_800k
    add max-limit=1500k name=RED3 packet-mark=red3_dow parent=Grobal_download priority=1 queue=red3_dow_1500K
    add max-limit=70k name=RED2_ packet-mark=red2_up parent=Global_Upload priority=1 queue=red2_up
    add max-limit=100k name=RED3_ packet-mark=red3_up parent=Global_Upload priority=1 queue=red3_up
    add name="youtube " packet-mark=mark-pkt-gvideo_bajada parent=Grobal_download queue=youtube_bajada_pcq
    add name=youtube packet-mark=mark-pkt-gvideo_Subida parent=Global_Upload priority=1 queue=default
    add max-limit=3M name=mega_subida packet-mark=mega_subida parent=Global_Upload queue=default
    add max-limit=5M name=mega_bajada packet-mark=mega_bajada parent=Grobal_download queue=mega_bajada_pcq
    add max-limit=18M name=otros packet-mark=otros_bajada parent=Grobal_download queue=otros_bajada_pcq
    add max-limit=7M name=face_video packet-mark=face_video_bajada parent=Grobal_download queue=face_video_bajada
    add max-limit=1M name=face_video_subida packet-mark=face_video_Subida parent=Global_Upload queue=face_video_subida
    add name=otros_subida packet-mark=otros_subida parent=Global_Upload queue=default
    add limit-at=1M max-limit=2M name=descarga10mb_bajada packet-mark=descarga10mb_bajada parent=Grobal_download queue=default
    add max-limit=500k name=RED1 packet-mark=red1_dow parent=Grobal_download priority=1 queue=Red1_dow_400K
     
    USUARIOS QUE PASARAN POR EL PROCESO

    Código (Text):
    /ip firewall address-list
    add address=10.0.0.0/24 list=Red_Total
    add address=31.216.144.0/21 list=Mega
    add address=1.1.1.0/24 list=Red1
    add address=2.2.2.0/24 list=Red2
    add address=3.3.3.0/24 list=Red3
    add address=31.0.0.0/8 disabled=yes list=Mega
    add address=10.0.0.249 list=Libre
    add address=31.13.73.14 list=face_video
    add address=31.13.73.0/24 list=face_video
    add address=31.13.66.0/24 list=face_video

    ALGORITMO QUE ADMINISTRARÁ LA VELOCIDAD
    AUTOMÁTICAMENTE

    Código (Text):
    /queue type

    add kind=pcq name=Red1_dow_400K pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=Red1_up_30k pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=red2_up pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=red2_dow_800k pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=red3_dow_1500K pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=red3_up pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=youtube_bajada_pcq pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-rate=400k pcq-src-address6-mask=64
    add kind=pcq name=face_video_bajada pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=face_video_subida pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=mega_bajada_pcq pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
    add kind=pcq name=otros_bajada_pcq pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64


     
  2. renatoeames

    renatoeames Member

    Hola man disculpa las molestias tu crees que puedas ayudarme con mi balanceo o algo en mi configuracion de mi Mikoritk y asi compartir conocimientos
     

Comparte esta página