Laod balance 2 links adsl com modens roteados
Olá caros amigos do under-linux aqui estou eu com mais uma duvida que está fazendo meus neurônios ferverem... eu quero fazer um loadbanle com 2 links ADSL em os Modens estão em modo roteado. São dois modens Dlink ADSL 500b 2+ (Black), meu cenário e o seguinte!
Modem 1 link 8mb ligado ether1
Gateway 192.168.1.1
Modem 2 link 1mb ligado ether2
Gateway 192.168.1.254
Saída ether3
10.1.1.1
minha RB é uma 433 AH MK v.4.11
Já fiz todos os tutorias que ensinam no fórum e não funciona de forma alguma por ultimo fiz este que vou posta logo abaixo... gostaria de contar com ajuda de vcs para mais esse feito e desde já agradeço a colaboração de todos
minha configuração:
Citação:
/ ip address
add address=10.1.1.1/24 network=10.1.1.0 broadcast=10.1.1.255 interface=Local
add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether1
add address=192.168.1.254/24 network=192.168.1.0 broadcast=192.168.1.1 interface=ether2
/ ip firewall mangle
add chain=input in-interface=ether1 action=mark-connection new-connection-mark=ether1_conn
add chain=input in-interface=ether2 action=mark-connection new-connection-mark=ether2_conn
add chain=output connection-mark=ether1_conn action=mark-routing new-routing-mark=to_ether1
add chain=output connection-mark=ether2_conn action=mark-routing new-routing-mark=to_ether2
add chain=prerouting dst-address=192.168.1.1/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.1.254/24 action=accept in-interface=Local
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 \
action=mark-connection new-connection-mark=wlan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 \
action=mark-connection new-connection-mark=ether2_conn passthrough=yes
add chain=prerouting connection-mark=ether1_conn in-interface=Local action=mark-routing new-routing-mark=to_ether1
add chain=prerouting connection-mark=ether2_conn in-interface=Local action=mark-routing new-routing-mark=to_ether2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_ether1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.254 routing-mark=to_ether2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.254 distance=2 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade
add chain=srcnat out-interface=ether2 action=masquerade
IP Addresses
/ ip address
add address=10.1.1.1/24 network=10.1.1.0 broadcast=10.1.1.255 interface=Local
add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether1
add address=192.168.1.254/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether2
/ ip firewall mangle
add chain=input in-interface=ether1 action=mark-connection new-connection-mark=ether1_conn
add chain=input in-interface=ether2 action=mark-connection new-connection-mark=ether2_conn
add chain=output connection-mark=ether1_conn action=mark-routing new-routing-mark=to_ether1
add chain=output connection-mark=ether2_conn action=mark-routing new-routing-mark=to_ether2
add chain=prerouting dst-address=192.168.1.1/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.1.254/24 action=accept in-interface=Local
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 \
action=mark-connection new-connection-mark=wlan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 \
action=mark-connection new-connection-mark=wlan2_conn passthrough=yes
add chain=prerouting connection-mark=ether1_conn in-interface=Local action=mark-routing new-routing-mark=to_ether1
add chain=prerouting connection-mark=ether2_conn in-interface=Local action=mark-routing new-routing-mark=to_ether2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_ether1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.254 routing-mark=to_ether2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.254 distance=2 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade
add chain=srcnat out-interface=ether2 action=masquerade
esta desta forma e não conecta de geito nem um pela porta de saida ether3 com o ip 10.1.1.1/24 e nem uma outra classe de ips...:stupid:
Re: Laod balance 2 links adsl com modens roteados
ola amigo,seus modens estao na mesma rage de ips,o correto seria link 1 192.168.1.1,link 2 192.168.2.1.
Re: Laod balance 2 links adsl com modens roteados
Bom dia amigo..mude a range de ip..por ex:
192.168.0.254 (Modem 1 )
192.168.1.254 (Modem 2 )
Na RB coloque desta forma..ex:
eth1 - 192.168.0.253 (comunicar com modem 1)
eth2 - 192.168.1.253 (comunicar com modem 2)
eth3 - 192.168.254.1 (interface dos clientes)
depois bloquei o acesso ao modem na rede interna...
va em Firewall:
chain: forward; src. Adress: 192.168.254.0/24; dst. Adress: 192.168.0.254; Protocol: 6(tcp); Action: drop
criei esta mesma regra para o outro modem.. 192.168.1.254
abraço!
Re: Laod balance 2 links adsl com modens roteados
vc esqueceu dos DNS amigo:
Código :
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4
Teste ai e reporta senao funcionar.
Re: Laod balance 2 links adsl com modens roteados
ok! vou fazer as devidas alterações é posto o resultado...