Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Policy routing for routing Routes-learn RouterOS Series 1 from scratch

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

This tutorial focuses on how RouterOS policy routing is implemented.

We talked about static routing in the previous chapter, but static routing has a downside, because once we specify a static route, it is globally controlled. That is to say, when we access 114.114.114.114 in the entire network segment of 192.168.11.0/24, the entire IP will go out through the telecom gateway, but if we only need to use this gateway to go out, then we need to implement it through policy routing.

Policy routing is a special type of static routing that takes precedence over static reasons.

The topology is still this:

Let's start with the route trace information for our PC access to 114.114.114.114:

At this point, we want to route PC2 to 114.114.114.114 to exit the connected network.

This is where Mangle's mark-routing comes in.

PC2 IP is 192.168.11.250

We want to create a new mangle rule in IP>firewall>mangle.

labeled as routing labeled 250Routing

At this point we also drag this rule to the second position, because our previous package tag is canceled Passthrough, so the new rule at the end of the words, you will not see any data.

At this point we have finished labeling the route, but we still need to specify the exit for this route in the routing table.

Click IP-Routes to create a new rule

Test to see how PC1 and PC2 access 114.114.114.114 route tracers:

You can see that PC1 and PC2 access 114.114.114.114 IP outgoing interface is different, indicating that we have successfully implemented the policy for 192.168.11.250 access 114.114.114, which is based on mark routing policy routing.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report