Community discussions

MikroTik App
 
antonioff
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 82
Joined: Sat Jan 12, 2008 1:02 am
Location: Roma

PCC AND pppoe-server

Thu Jan 07, 2010 9:01 pm

Hi all,
i have problem with pcc and pppoe-server.
i have routeros 3.30
two wan ADSL (1 ip dynamic, 1 ip public)
1 LAN with 120 client connected through PPPOE server.

all traffic is only 1 wan alternative.

this my mangle


ip firewall mangle print

0 chain=input action=mark-connection new-connection-mark=wlan3_conn
passthrough=yes in-interface=ether3

1 chain=input action=mark-connection new-connection-mark=wlan2_conn
passthrough=yes in-interface=ether2

2 chain=output action=mark-routing new-routing-mark=to_wlan2 passthrough=ye>
connection-mark=wlan2_conn

3 chain=output action=mark-routing new-routing-mark=to_wlan3 passthrough=ye>
connection-mark=wlan3_conn

4 chain=prerouting action=accept dst-address=192.168.1.0/24
in-interface=ether1

5 chain=prerouting action=accept dst-address=87.*.*.*/29
in-interface=ether1

6 chain=prerouting action=mark-connection new-connection-mark=wlan2_conn
passthrough=yes dst-address-type=!local in-interface=ether1
per-connection-classifier=both-addresses:2/0

7 chain=prerouting action=mark-connection new-connection-mark=wlan3_conn
passthrough=yes dst-address-type=!local in-interface=ether1
per-connection-classifier=both-addresses:2/1

8 chain=prerouting action=mark-routing new-routing-mark=to_wlan2
passthrough=yes in-interface=ether1 connection-mark=wlan2_conn

9 chain=prerouting action=mark-routing new-routing-mark=to_wlan3
passthrough=yes in-interface=ether1 connection-mark=wlan3_conn

/ip route print

0 A S dst-address=0.0.0.0/0 gateway=87.*.*.* interface=ether3
check-gateway=ping gateway-state=reachable distance=1 scope=30
target-scope=10 routing-mark=to_wan3

1 A S dst-address=0.0.0.0/0 gateway=192.168.1.1 interface=ether2
check-gateway=ping gateway-state=reachable distance=1 scope=30
target-scope=10

2 A S dst-address=0.0.0.0/0 gateway=192.168.1.1 interface=ether2
check-gateway=ping gateway-state=reachable distance=1 scope=30
target-scope=10 routing-mark=to_wan2

3 S dst-address=0.0.0.0/0 gateway=87.*.*.* interface=ether3
check-gateway=ping gateway-state=reachable distance=2 scope=30
target-scope=10


thanks for your suggestion
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC AND pppoe-server

Thu Jan 07, 2010 9:20 pm

in 6,7 rules replace 'in-interface=ether1' with 'src-address=your_pppoe_pool'
 
antonioff
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 82
Joined: Sat Jan 12, 2008 1:02 am
Location: Roma

Re: PCC AND pppoe-server

Thu Jan 07, 2010 9:39 pm

in 6,7 rules replace 'in-interface=ether1' with 'src-address=your_pppoe_pool'
changed , now matching more packet.

but i noticed rules 0,1 matching 1/2 packet example rule matche match 43 packet and rule 1 match 96 pacjet
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC AND pppoe-server

Thu Jan 07, 2010 11:20 pm

0,1 catch packets destined to your router from the Internet

6,7 are main rules for your users

p.s. with 8,9 do the same
 
antonioff
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 82
Joined: Sat Jan 12, 2008 1:02 am
Location: Roma

Re: PCC AND pppoe-server

Thu Jan 07, 2010 11:23 pm

0,1 catch packets destined to your router from the Internet

6,7 are main rules for your users

p.s. with 8,9 do the same
i have resolved , replace all rules with LOCAL interface changed in pool-client-ppp
 
linux2010
newbie
Posts: 25
Joined: Sun Mar 01, 2009 10:02 pm

Re: PCC AND pppoe-server

Fri Jan 29, 2010 10:48 pm

0,1 catch packets destined to your router from the Internet

6,7 are main rules for your users

p.s. with 8,9 do the same

thanks mr chupaka
but
replace 'in-interface=ether1' with 'src-address=your_pppoe_pool' ======>src-address or src-address list???
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC AND pppoe-server

Fri Jan 29, 2010 11:46 pm

anything
 
linux2010
newbie
Posts: 25
Joined: Sun Mar 01, 2009 10:02 pm

Re: PCC AND pppoe-server

Sat Jan 30, 2010 5:38 pm

thanks mr chupaka for your replay

i have 2 link first link 2Mb/s and second link is 512 Kb/s
i want to use pcc what the needed change in mangle rules to match this unequal speeds
to make best performance
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC AND pppoe-server

Sat Jan 30, 2010 6:18 pm

you should do 5 'virtual' lines of 512k, 4 of them will be redirected to 2M link, and 5th - to 0.5M link

classifier=both-addresses:5/0 mark=line1
classifier=both-addresses:5/1 mark=line2
classifier=both-addresses:5/2 mark=line2
classifier=both-addresses:5/3 mark=line2
etc.
 
linux2010
newbie
Posts: 25
Joined: Sun Mar 01, 2009 10:02 pm

Re: PCC AND pppoe-server

Sat Jan 30, 2010 10:15 pm

thanks mr chupaka for your replay
i use MT V 3.30
HOW I CAN MAKE THIS VIRTUAL LINKS .
PLEASE IN DETAILS
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC AND pppoe-server

Sat Jan 30, 2010 10:18 pm

classifier=both-addresses:5/0 mark=line1
classifier=both-addresses:5/1 mark=line2
classifier=both-addresses:5/2 mark=line2
classifier=both-addresses:5/3 mark=line2
etc.
post your current PCC config
 
linux2010
newbie
Posts: 25
Joined: Sun Mar 01, 2009 10:02 pm

Re: PCC AND pppoe-server

Sat Jan 30, 2010 10:46 pm

# jan/30/2010 22:41:49 by RouterOS 3.30
# software id = RM58-U69Q
#
/ip address
add address=192.168.0.1/24 broadcast=192.168.0.255 comment="" disabled=no \
interface=Local network=192.168.0.0
add address=212.12.252.1/30 broadcast=212.12.252.3 comment="" disabled=no \
interface=wlan1 network=212.12.252.0
add address=212.12.230.21/30 broadcast=212.12.230.23 comment="" disabled=no \
interface=wlan2 network=212.12.230.20
/ip firewall mangle
add action=mark-connection chain=input comment="" disabled=no in-interface=\
wlan1 new-connection-mark=wlan1_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\
wlan2 new-connection-mark=wlan2_conn passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=wlan1_conn \
disabled=no new-routing-mark=to_wlan1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=wlan2_conn \
disabled=no new-routing-mark=to_wlan2 passthrough=yes
add action=accept chain=prerouting comment="" disabled=no dst-address=\
212.12.252.0/30 in-interface=Local
add action=accept chain=prerouting comment="" disabled=no dst-address=\
212.12.230.20/30 in-interface=Local
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan1_conn \
passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting comment="" connection-mark=\
wlan1_conn disabled=no in-interface=Local new-routing-mark=to_wlan1 \
passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=\
wlan2_conn disabled=no in-interface=Local new-routing-mark=to_wlan2 \
passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no out-interface=wlan1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=wlan2
/ip route
add check-gateway=ping comment="" disabled=no distance=1 dst-address=\
0.0.0.0/0 gateway=212.12.230.22 routing-mark=to_wlan2 scope=30 \
target-scope=10
add check-gateway=ping comment="" disabled=no distance=2 dst-address=\
0.0.0.0/0 gateway=212.12.230.22 scope=30 target-scope=10
add check-gateway=ping comment="" disabled=no distance=1 dst-address=\
0.0.0.0/0 gateway=212.12.252.2 routing-mark=to_wlan1 scope=30 \
target-scope=10
add check-gateway=ping comment="" disabled=no distance=1 dst-address=\
0.0.0.0/0 gateway=212.12.252.2 scope=30 target-scope=10


this is my config
212.12.252.1 =========>wlan1 is 512 Kb/s
212.12.230.21=========>wlan2 is 2Mb/s
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC AND pppoe-server

Sun Jan 31, 2010 1:10 am

replace with
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan1_conn \
passthrough=yes per-connection-classifier=both-addresses:5/0
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses:5/1
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses:5/2
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses:5/3
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses:5/4
p.s. it's if wlan2 is 2Mbps
 
linux2010
newbie
Posts: 25
Joined: Sun Mar 01, 2009 10:02 pm

Re: PCC AND pppoe-server

Mon Feb 08, 2010 6:02 pm

thanks mr chupaka for your reply
and i'm sorry for more questions


i use one pc for mikrotik (pppoe server + load balance )
i want to config my mikrotik as pppoe server
for this situation i want to config my pppoe profiles for clients
what are the config for local IP & remote IP ?

NOTE :
when i use one line (link) my config was local IP : my wan IP
AND remote IP: MY REAL IP pool
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC AND pppoe-server

Mon Feb 08, 2010 6:10 pm

set local-ip to any ip address (for example, 192.168.111.1) and remote-ip to a pool you created (for example, /ip pool add name=my-pppoe ranges=192.168.111.2-192.168.111.111)
 
User avatar
moazdabsheh
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Mon Mar 24, 2014 3:10 am
Location: Palestine

Re: PCC AND pppoe-server

Sat May 03, 2014 3:20 pm

thanks Chupka for the assistance, worked very well for me :D

Who is online

Users browsing this forum: Paltri34, Strange0ne and 116 guests