Advice on PCC commands
Posted: Tue Jan 16, 2018 6:04 pm
Hi guys
I'm trying to adapt the code in the PCC manual (https://wiki.mikrotik.com/wiki/Manual:PCC) to send different vlans over different WAN interfaces like so:
Management network -> WAN1
Data Vlan -> WAN1
VoIP Vlan -> WAN2
From looking about the forums this seems to be the way to go about doing it, although at the moment I'm just trying to adapt, implement and test it in a lab environment and figure out mistakes as I go. What I'm trying to do is make 3 sets of each entry so I cover the MGMT subnet, data vlan and voip vlan. So instead of this:
I'd have this:
And so on and so on for the other entries.
I'm understanding what each bit of the script does apart from 2 bits of this line:
The bits I don't understand are:
and:
Can somebody explain to me what each one of those are doing? I don't think the first one is much of a problem as I'd imagine it's the same for all entries. The second bit is something I haven't seen before and I'd quite like to understand what the 2/0 bit is all about.
And if anyone has any extra pro-tips for what I'm trying to do here that would be great too
Thanks
Mark
I'm trying to adapt the code in the PCC manual (https://wiki.mikrotik.com/wiki/Manual:PCC) to send different vlans over different WAN interfaces like so:
Management network -> WAN1
Data Vlan -> WAN1
VoIP Vlan -> WAN2
From looking about the forums this seems to be the way to go about doing it, although at the moment I'm just trying to adapt, implement and test it in a lab environment and figure out mistakes as I go. What I'm trying to do is make 3 sets of each entry so I cover the MGMT subnet, data vlan and voip vlan. So instead of this:
Code: Select all
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=LAN
Code: Select all
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=MGMT
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=DATA
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=VoIP
I'm understanding what each bit of the script does apart from 2 bits of this line:
Code: Select all
add chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local \
per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ISP1_conn
The bits I don't understand are:
Code: Select all
dst-address-type=!local
Code: Select all
per-connection-classifier=both-addresses:2/0
And if anyone has any extra pro-tips for what I'm trying to do here that would be great too
Thanks
Mark