Community discussions

MikroTik App
 
cyph3r
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Sun May 25, 2008 12:21 pm
Location: Pakistan
Contact:

PCC ISSUE 3 WAN

Fri Jan 20, 2012 12:25 pm

/ip address

add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local

add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1

add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2

add address=192.168.3.2/24 network=192.168.3.0 broadcast=192.168.3.255 interface=WAN3
 
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=8.8.4.4,8.8.8.8

/ip firewall mangle

add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn

add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn

add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=WAN3_conn 


add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1

add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2

add chain=output connection-mark=WAN3_conn action=mark-routing new-routing-mark=to_WAN3

add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local

add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=Local

add chain=prerouting dst-address=192.168.3.0/24 action=accept in-interface=Local

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
 

add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN1

add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN2

add chain=prerouting connection-mark=WAN3_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN3
 

/ip route

add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_WAN1 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_WAN2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=to_WAN3 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.2.1 distance=2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.3.1 distance=3 check-gateway=ping
 

/ip firewall nat

add chain=srcnat out-interface=WAN1 action=masquerade

add chain=srcnat out-interface=WAN2 action=masquerade

add chain=srcnat out-interface=WAN3 action=masquerade
this configuration is not working well
the load is not balanced properly !!!!!

Is there any error in my config ???
Regards,
Mehmood Ahmed |ĉУρĤ3г|
(+92)345-2835810
www.adminsline.com
adminsline.wordpress.com
E-mail: admin [at] adminsline.com
 
cyph3r
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Sun May 25, 2008 12:21 pm
Location: Pakistan
Contact:

Re: PCC ISSUE 3 WAN

Sat Jan 21, 2012 11:47 am

is there any one ???????????????????
Regards,
Mehmood Ahmed |ĉУρĤ3г|
(+92)345-2835810
www.adminsline.com
adminsline.wordpress.com
E-mail: admin [at] adminsline.com
 
armanalam
newbie
Posts: 47
Joined: Wed Nov 10, 2010 9:12 am

Re: PCC ISSUE 3 WAN

Sat Jan 21, 2012 3:37 pm

your configuration is all right .... no problem at all ....
 
User avatar
huigezi
newbie
Posts: 43
Joined: Sat Dec 24, 2011 4:39 am
Location: apple

Re: PCC ISSUE 3 WAN

Sun Jan 22, 2012 4:52 am

Need not be in such trouble

use the code can set all configuration
:global adsl     “9”
:global address  “172.168.1.0/24”
/interface pppoe-client
:for a from=1 to=$adsl do= {add add-default-route=no dial-on-demand=no use-peer-dns=no name=("pppoe-out".$a) user=$a password=$a interface=(“ether”.($a+1)) }
/ip firewall mangle
:for a from=1 to=$adsl do={
add action=mark-connection chain=prerouting dst-address-type=!local src-address=$address passthrough=yes new-connection-mark=(“c-“.$a) per-connection-classifier=("both-addresses:”.$adsl.”/".($a-1)) comment=(“pcc-“.$a);add action=mark-routing chain=prerouting src-address=$address passthrough=yes connection-mark=(“c-“.$a) new-routing-mark=(“r-“.$a)}
/ip firewall mangle
:for a from=1 to=$adsl do={add chain=input action=mark-connection new-connection-mark=(“c-“.$a) in-interface=("pppoe-out".$a) comment=("in-out-".$a);add chain=output connection-mark=("c-".$a) action=mark-routing new-routing-mark=("r-".$a) passthrough=no}
/ip firewall nat
:for a from=1 to=$adsl do={add action=masquerade chain=srcnat out-interface=("pppoe-out".$a) src-address=$address disabled=no comment=$a}
/ip route
:for a from=1 to=$adsl do= {add check-gateway=ping gateway=("pppoe-out".$a) routing-mark=("r-".$a) comment=("r-".$a);add check-gateway=ping distance=$a gateway=(“pppoe-out”.$a)}

If you want knowledge, you must toil for it
 
cyph3r
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Sun May 25, 2008 12:21 pm
Location: Pakistan
Contact:

Re: PCC ISSUE 3 WAN

Sun Jan 22, 2012 6:11 pm

huigezi your script is not working !!!

my conf
WAN1 = 4mb
WAN2 = 4mb
WAN3 = 4mb
Local = Lan

web sessions is breaking, i have to press enter 2 time then it will open the web site !!!!!
Regards,
Mehmood Ahmed |ĉУρĤ3г|
(+92)345-2835810
www.adminsline.com
adminsline.wordpress.com
E-mail: admin [at] adminsline.com
 
gtpro
newbie
Posts: 36
Joined: Thu Jun 03, 2010 9:05 pm

Re: PCC ISSUE 3 WAN

Sun Jan 22, 2012 7:13 pm

Hi, dont use both addresses and ports, use both addresses ONLY. Try it!
 
cyph3r
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Sun May 25, 2008 12:21 pm
Location: Pakistan
Contact:

Re: PCC ISSUE 3 WAN

Thu Jan 26, 2012 1:02 pm

Hi, dont use both addresses and ports, use both addresses ONLY. Try it!
thanks gtpro
i will try it !!
Regards,
Mehmood Ahmed |ĉУρĤ3г|
(+92)345-2835810
www.adminsline.com
adminsline.wordpress.com
E-mail: admin [at] adminsline.com

Who is online

Users browsing this forum: FurfangosFrigyes, Solaris and 44 guests