+ Responder ao Tópico



  1. #1

    Padrão Cada rede sair por um gw diferente

    Gostaria de direcionar cada rede para um gateway diferente.

    Cenario:

    Gateways:
    192.168.1.1
    192.168.2.1

    Redes:
    192.168.20.0/24 - sair por 192.168.1.1
    192.168.21.0/24 - sair por 192.168.2.1

    Fiz através de marcação de pacotes, mas não está funcionando

    / ip firewall mangle

    add chain=prerouting src-address=192.168.20.0/24 protocol=tcp routing-mark=link1 action=mark-routing new-routing-mark=link1 \
    passthrough=yes comment="" disabled=no
    add chain=prerouting src-address=192.168.20.0/24 protocol=udp routing-mark=link1 action=mark-routing new-routing-mark=link1 \
    passthrough=yes comment="" disabled=no

    add chain=prerouting src-address=192.168.21.0/24 protocol=tcp routing-mark=link2 action=mark-routing new-routing-mark=link2 \
    passthrough=yes comment="" disabled=no
    add chain=prerouting src-address=192.168.21.0/24 protocol=udp routing-mark=link2 action=mark-routing new-routing-mark=link2 \
    passthrough=yes comment="" disabled=no


    / ip route
    add dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=255 target-scope=10 routing-mark=link1 comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=192.168.2.1 scope=255 target-scope=10 routing-mark=link2 comment="" disabled=no

  2. #2

    Padrão load

    / ip firewall mangle
    add chain=prerouting src-address=0.0.0.0/24"rede que vc quer q saia" action=mark-routing new-routing-mark=gtw1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting src-address=0.0.0.0./24"rede que vc quer q saia" action=mark-routing new-routing-mark=gtw2 passthrough=no \
    comment="" disabled=no

    / ip route
    add dst-address=0.0.0.0/0 gateway=30.30.30.1 scope=255 target-scope=10 routing-mark=lgtw1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=30.30.30.1 scope=255 target-scope=10 routing-mark=gtw2 comment="" disabled=no



  3. #3

    Padrão

    Citação Postado originalmente por edevaldo Ver Post
    / ip firewall mangle
    add chain=prerouting src-address=0.0.0.0/24"rede que vc quer q saia" action=mark-routing new-routing-mark=gtw1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting src-address=0.0.0.0./24"rede que vc quer q saia" action=mark-routing new-routing-mark=gtw2 passthrough=no \
    comment="" disabled=no

    / ip route
    add dst-address=0.0.0.0/0 gateway=30.30.30.1 scope=255 target-scope=10 routing-mark=lgtw1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=30.30.30.1 scope=255 target-scope=10 routing-mark=gtw2 comment="" disabled=no
    Opa Edivaldo...

    Estou utilizando o MK 2.9.27 Crack, a regra as vezes para de funcionar do nada... Vou baixar o MK 3.3 e deixar testando...