MikroTik Certified Network Associate (MTCNA)
1 Introduction to Networking
1-1 Basic Networking Concepts
1-2 OSI Model
1-3 TCPIP Model
1-4 IP Addressing
1-5 Subnetting
2 Introduction to MikroTik RouterOS
2-1 RouterOS Overview
2-2 RouterOS Installation
2-3 RouterOS Licensing
2-4 RouterOS Interface Overview
2-5 RouterOS Command Line Interface (CLI)
2-6 RouterOS Graphical User Interface (GUI)
3 Basic Router Configuration
3-1 Router Identification
3-2 Interface Configuration
3-3 IP Address Assignment
3-4 Default Gateway Configuration
3-5 DNS Configuration
3-6 Basic Firewall Configuration
4 Routing
4-1 Static Routing
4-2 Dynamic Routing Protocols
4-3 OSPF Configuration
4-4 BGP Configuration
4-5 Policy-Based Routing
5 Network Address Translation (NAT)
5-1 Introduction to NAT
5-2 Basic NAT Configuration
5-3 Port Address Translation (PAT)
5-4 One-to-One NAT
5-5 Hairpin NAT
6 Firewall and Security
6-1 Firewall Basics
6-2 Firewall Rules Configuration
6-3 NAT Rules Configuration
6-4 Traffic Shaping and QoS
6-5 VPN Basics
6-6 IPsec VPN Configuration
7 Wireless Networking
7-1 Wireless Basics
7-2 Wireless Interface Configuration
7-3 Wireless Security
7-4 Wireless Bridging
7-5 Wireless Access Point Configuration
8 Advanced Topics
8-1 VLAN Configuration
8-2 DHCP Server Configuration
8-3 DHCP Relay Configuration
8-4 PPPoE Server Configuration
8-5 PPPoE Client Configuration
8-6 Hotspot Configuration
8-7 Load Balancing
8-8 High Availability (Failover)
9 Troubleshooting and Maintenance
9-1 Basic Troubleshooting Techniques
9-2 Log Analysis
9-3 Backup and Restore
9-4 Firmware Updates
9-5 System Monitoring
10 Practical Exercises
10-1 Basic Router Configuration Exercise
10-2 Static Routing Exercise
10-3 NAT Configuration Exercise
10-4 Firewall Configuration Exercise
10-5 Wireless Configuration Exercise
10-6 Advanced Configuration Exercise
10-7 Troubleshooting Exercise
Policy-Based Routing Explained

Policy-Based Routing Explained

Policy-Based Routing (PBR) is a powerful feature that allows network administrators to control the flow of data packets based on specific policies. This method is particularly useful for implementing advanced routing strategies and ensuring that traffic is directed according to predefined criteria. Understanding PBR is essential for the MikroTik Certified Network Associate (MTCNA) certification.

Key Concepts

1. Routing Policies

Routing policies are rules that determine how data packets are routed based on criteria such as source IP address, destination IP address, protocol, and port number. These policies allow for fine-grained control over traffic flow, enabling administrators to implement complex routing strategies.

2. Routing Marks

Routing marks are used to tag data packets with specific identifiers that can be used by routing policies. These marks allow the router to differentiate between different types of traffic and apply the appropriate routing policy.

3. Mangle Table

The mangle table is a part of the firewall that allows for the modification of packet headers. In the context of PBR, the mangle table is used to apply routing marks to packets, which are then used by routing policies to determine the packet's path.

Detailed Explanation

Routing Policies

Routing policies are defined using criteria such as source IP address, destination IP address, protocol, and port number. For example, a policy might route all traffic from a specific IP address to a particular gateway. This allows for customized routing based on specific needs.

Example: To create a routing policy that routes traffic from the IP address 192.168.1.10 to a specific gateway, you would use the command:

/ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=policy1 src-address=192.168.1.10

Routing Marks

Routing marks are used to tag packets with specific identifiers. These marks are then used by routing policies to determine the packet's path. For example, a packet marked with "policy1" might be routed to a specific gateway.

Example: To apply a routing mark to a packet, you would use the command:

/ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=policy1 src-address=192.168.1.10

Mangle Table

The mangle table is used to modify packet headers, including applying routing marks. This table is essential for implementing PBR, as it allows for the tagging of packets with specific routing marks that are then used by routing policies.

Example: To modify a packet header and apply a routing mark, you would use the command:

/ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=policy1 src-address=192.168.1.10

Examples and Analogies

Routing Policies

Think of routing policies as traffic signals that direct vehicles (data packets) based on specific criteria. Just as traffic signals control the flow of vehicles, routing policies control the flow of data packets.

Routing Marks

Consider routing marks as labels on packages (data packets) that indicate the destination. Just as labels on packages direct them to the correct destination, routing marks direct data packets to the appropriate path.

Mangle Table

Imagine the mangle table as a post office that adds labels (routing marks) to packages (data packets). Just as a post office adds labels to packages, the mangle table adds routing marks to data packets.

By mastering Policy-Based Routing, you can implement advanced routing strategies and control traffic flow based on specific policies, making you a proficient network administrator.