Mangling routing

Hi

I setup a mangle rule to place a routing mark on all traffic
emanating from a specific subnet e.g. 192.168.11.0/24.

Then I used this routing mark in a route to direct this traffic
towards a specific gateway.

I was surprised that I also had to specify a protocol and destination
port n° (e.g. tcp 80) else the traffic wasn’t properly routed.

I saw the packet count increment as the traffic was being mangled
but the routing didn’t actually occur.

Is there a minimum number of details that one must specify
for the mangling/routing to operate properly ?

thanks

yann

You need to post your configuration about the issue, so we can look at it.
It should be something like this:

/ip firewall mangle
add chain=prerouting sr-address=192.168.11.0/24 action=mark-connection new-connection-mark=whatever
add chain=prerouting connection-mark=whatever action=mark-routing new-routing-mark=whatever
/ip route
add dst-address=0.0.0.0/0 gateway=your_gateway routing-mark=whatever

(sorry for the delay)

/ip firewall mangle add action=mark-routing chain=prerouting disabled=no in-interface=
“ether4 - Admin Switch” new-routing-mark=adminsw passthrough=yes
src-address=192.168.1.0/24

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=xxx.xxx.xxx.xxx
routing-mark=adminsw scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.150.1 scope=
30 target-scope=10

The network you are trying to route is 192.168.1.0 or 192.168.11.0? Because, in your first post you have stated that wanted to route the 192.168.11.0/24 network, while in your configuration you have specified the network 192.168.1.0/24.
Ether4, is a slave port or is a stand alone port?

Are you sure you want passthrough=yes? If any later rule matches it could be overwriting the routing mark which might explain your symptoms.

have a /ip route rule to do this.

Caci99: 192.168.1.0/24
CelticComms: true, hadn’t thought of that (though in our present scenario this wouldn’t be an issue)
samsung172: thanks for the contribution

I finally replaced the ADSL modem that was acting as default gateway

  • the mangling routing rule operated properly after that - go figure

thanks for your help