Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| pcc_on_routeros_v7 [09 October 2025 / 19:23:23] – created kadek | pcc_on_routeros_v7 [10 October 2025 / 07:03:29] (current) – kadek | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| * On this example here is the case: | * On this example here is the case: | ||
| - | - Eth1 connect to ISP1 | + | - Eth1 connect to ISP1 (192.168.0.2/ |
| - | - Eth2 connect to ISP2 | + | - Eth2 connect to ISP2 (192.168.1.2/ |
| - | - Eth3 connect to Local Network | + | - Eth3 connect to Local Network |
| * First, set the IP addresses: | * First, set the IP addresses: | ||
| - If using DHCP, add them on IP > DHCP Client | - If using DHCP, add them on IP > DHCP Client | ||
| Line 26: | Line 26: | ||
| Action: masquerade | Action: masquerade | ||
| Click OK | Click OK | ||
| + | |||
| + | * Set DHCP Server for the Local network. | ||
| + | * Accept the connection, IP > Firewall > tab Mangle: | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | Dst Address: 192.168.1.0/ | ||
| + | on tab Action: | ||
| + | Action: accept | ||
| + | Click OK | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | Dst Address: 192.168.1.1/ | ||
| + | on tab Action: | ||
| + | Action: accept | ||
| + | Click OK | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | Dst Address: 10.1.1.0/24 (The Local Network) | ||
| + | on tab Action: | ||
| + | Action: accept | ||
| + | Click OK | ||
| + | |||
| + | * Mark the connection, IP > Firewall > tab Mangle: | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | In Interface: ether1 | ||
| + | Connection Mark: no-mark | ||
| + | on tab Action: | ||
| + | Action: mark connection | ||
| + | New Connection Mark: ISP1 | ||
| + | Click OK | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | In Interface: ether2 | ||
| + | Connection Mark: no-mark | ||
| + | on tab Action: | ||
| + | Action: mark connection | ||
| + | New Connection Mark: ISP2 | ||
| + | Click OK | ||
| + | |||
| + | * Set the PCC, on IP > Firewall > tab Mangle: | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | In Interface: ether3 | ||
| + | Connection Mark: ISP1 | ||
| + | on tab Advance: | ||
| + | Per Connection Classifier: both addresses | 2 / 0 | ||
| + | on tab Extra: | ||
| + | Dst Address Type: ! local | ||
| + | on tab Action: | ||
| + | Action: mark connection | ||
| + | New Connection Mark: ISP1 | ||
| + | Passthrough (checked) | ||
| + | Click OK | ||
| + | | ||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | In Interface: ether3 | ||
| + | Connection Mark: ISP2 | ||
| + | on tab Advance: | ||
| + | Per Connection Classifier: both addresses | 2 / 1 | ||
| + | on tab Extra: | ||
| + | Dst Address Type: ! local | ||
| + | on tab Action: | ||
| + | Action: mark connection | ||
| + | New Connection Mark: ISP2 | ||
| + | Passthrough (checked) | ||
| + | Click OK | ||
| + | |||
| + | * Create the Routing Table, on Routing > Tables: | ||
| + | |||
| + | Add (+) | ||
| + | Name: to-ISP1 | ||
| + | FIB (checked) | ||
| + | |||
| + | Add (+) | ||
| + | Name: to-ISP2 | ||
| + | FIB (checked) | ||
| + | |||
| + | |||
| + | * Set the PCC Mark Routing, on IP > Firewall > tab Mangle: | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | In Interface: ether3 | ||
| + | Connection Mark: ISP1 | ||
| + | on tab Action: | ||
| + | Action: mark routing | ||
| + | New Routing Mark: to-ISP1 | ||
| + | Passthrough (unchecked) | ||
| + | Click OK | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: prerouting | ||
| + | In Interface: ether3 | ||
| + | Connection Mark: ISP2 | ||
| + | on tab Action: | ||
| + | Action: mark routing | ||
| + | New Routing Mark: to-ISP2 | ||
| + | Passthrough (unchecked) | ||
| + | Click OK | ||
| + | |||
| + | * Set the Output Chain, on IP > Firewall > tab Mangle: | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: output | ||
| + | Connection Mark: ISP1 | ||
| + | on tab Action: | ||
| + | Action: mark routing | ||
| + | New Routing Mark: to-ISP1 | ||
| + | Passthrough (unchecked) | ||
| + | Click OK | ||
| + | |||
| + | Add (+) | ||
| + | on tab General: | ||
| + | Chain: output | ||
| + | Connection Mark: ISP2 | ||
| + | on tab Action: | ||
| + | Action: mark routing | ||
| + | New Routing Mark: to-ISP2 | ||
| + | Passthrough (unchecked) | ||
| + | Click OK | ||
| + | |||
| + | * Set the Routes, on IP > Route: | ||
| + | |||
| + | Add (+) | ||
| + | Dst Address: 0.0.0.0/0 | ||
| + | Gateway: 192.168.0.1 | ||
| + | Routing table: to-ISP1 | ||
| + | Click Apply, OK | ||
| + | |||
| + | Add (+) | ||
| + | Dst Address: 0.0.0.0/0 | ||
| + | Gateway: 192.168.1.1 | ||
| + | Routing table: to-ISP2 | ||
| + | Click Apply, OK | ||
| + | |||
