Manual:Packet Flow: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Versions| | {{Versions| v6.0+}} | ||
==Overview== | ==Overview== | ||
MikroTik RouterOS is designed to be easy to operate in various aspects of network configuration. Therefore creating limitation for individual IP or | MikroTik RouterOS is designed to be easy to operate in various aspects of network configuration. Therefore creating limitation for individual IP or NATting internal clients to a public address or Hotspot configuration can be done without the knowledge about how the packets are processed in the router - you just go to corresponding menu and create necessary configuration. | ||
However more complicated tasks, such as traffic prioritization, routing policies, where it is necessary to utilize more than one RouterOS facility, requires knowledge: How these facilities work together? What happens when and why? | However more complicated tasks, such as traffic prioritization, routing policies, where it is necessary to utilize more than one RouterOS facility, requires knowledge: How these facilities work together? What happens when and why? | ||
Line 9: | Line 9: | ||
To address these questions we created a packet flow diagram. | To address these questions we created a packet flow diagram. | ||
== | ==Diagrams== | ||
For MikroTik RouterOS v6.0 was created detailed diagrams to ease understanding of packet flow. | |||
===Overall Packetflow Diagram=== | |||
[[Image:PacketFlowDiagram_v6_a.svg|Packet Flow Diagram|center]] | |||
===Bridging Diagram=== | |||
In this subsection you can inspect how the packet is going through the bridge. For example, if you configure <code>/interface bridge settings set use-ip-firewall=yes</code>, then the packet will go through the one of all three predefined IP firewall filter chains: [https://wiki.mikrotik.com/wiki/Manual:IP/Firewall/Filter#Chains input, output, forward.] | |||
[[Image:Bridging-Diagram.jpg|450px|thumb|Bridging Diagram|left]] | |||
<br> | |||
===MPLS Diagram=== | |||
Packet-forwarding decisions are made solely on the contents of this label, without the need to examine the packet itself. Diagram describe [https://wiki.mikrotik.com/wiki/Manual:MPLS MPLS] label movement in RouterOS. | |||
[[Image:Mpls Diagram.jpg|550px|MPLS Diagram|center]] | |||
===Routing Diagram=== | |||
Each routing protocol (except BGP) has it's own internal tables. This is where per-protocol routing decisions are made. BGP does not have internal routing tables and stores complete routing information from all peers in the [https://wiki.mikrotik.com/wiki/Manual:IP/Route#Routing_Information_Base RIB]. RIB contains routes grouped in separate routing tables based on their value of routing-mark. All routes without routing-mark are kept in the main routing table. These tables are used for best route selection. The main table is also used for nexthop lookup. | |||
[[Image:Routing Diagram.jpg|550px|Routing Diagram|center]] | |||
====Packet Flow Chains==== | |||
This diagram explains in detail each section of the Overall Packetflow Diagram. | |||
[[Image:Pfd.png|Packet Flow Chains|840px|center]] | |||
==== | |||
[[Image: | |||
==Examples== | ==Examples== | ||
In this subsection you can overview different protocol packet processing in RouterOS. | |||
[[ | ===Bridge port in with PPPoE-out=== | ||
[[ | [[File:Packetflow6-a.png|Example 1|800px|center]] | ||
[[ | ===PPPoE-in with bridge port out=== | ||
[[ | [[File:Packetflow6-b.png|Example 2|800px|center]] | ||
===Vlan Untagging/Tagging in the bridge interface=== | |||
[[File:Packetflow6-c.png|Example 3|800px|center]] | |||
===EoIP with VPLS out=== | |||
[[File:Packetflow6-d.png|Example 4|800px|center]] | |||
===Ipsec Encryption/Decryption=== | |||
[https://wiki.mikrotik.com/wiki/Manual:IP/IPsec Internet Protocol Security (IPsec)] is a set of protocols defined by the Internet Engineering Task Force (IETF) to secure packet exchange over unprotected IP/IPv6 networks such as Internet. | |||
[[Image:IpsecFlow.png|Example 5|center]] |
Revision as of 14:23, 2 November 2018
Applies to RouterOS: v6.0+
Overview
MikroTik RouterOS is designed to be easy to operate in various aspects of network configuration. Therefore creating limitation for individual IP or NATting internal clients to a public address or Hotspot configuration can be done without the knowledge about how the packets are processed in the router - you just go to corresponding menu and create necessary configuration.
However more complicated tasks, such as traffic prioritization, routing policies, where it is necessary to utilize more than one RouterOS facility, requires knowledge: How these facilities work together? What happens when and why?
To address these questions we created a packet flow diagram.
Diagrams
For MikroTik RouterOS v6.0 was created detailed diagrams to ease understanding of packet flow.
Overall Packetflow Diagram
Bridging Diagram
In this subsection you can inspect how the packet is going through the bridge. For example, if you configure /interface bridge settings set use-ip-firewall=yes
, then the packet will go through the one of all three predefined IP firewall filter chains: input, output, forward.
MPLS Diagram
Packet-forwarding decisions are made solely on the contents of this label, without the need to examine the packet itself. Diagram describe MPLS label movement in RouterOS.
Routing Diagram
Each routing protocol (except BGP) has it's own internal tables. This is where per-protocol routing decisions are made. BGP does not have internal routing tables and stores complete routing information from all peers in the RIB. RIB contains routes grouped in separate routing tables based on their value of routing-mark. All routes without routing-mark are kept in the main routing table. These tables are used for best route selection. The main table is also used for nexthop lookup.
Packet Flow Chains
This diagram explains in detail each section of the Overall Packetflow Diagram.
Examples
In this subsection you can overview different protocol packet processing in RouterOS.
Bridge port in with PPPoE-out
PPPoE-in with bridge port out
Vlan Untagging/Tagging in the bridge interface
EoIP with VPLS out
Ipsec Encryption/Decryption
Internet Protocol Security (IPsec) is a set of protocols defined by the Internet Engineering Task Force (IETF) to secure packet exchange over unprotected IP/IPv6 networks such as Internet.