+ All Categories
Home > Documents > Manual:Packet Flow - PL Computers Flow.pdf · Manual:Packet Flow 3 - /queue simple and /queue tree...

Manual:Packet Flow - PL Computers Flow.pdf · Manual:Packet Flow 3 - /queue simple and /queue tree...

Date post: 10-May-2019
Category:
Upload: vuongkhanh
View: 221 times
Download: 0 times
Share this document with a friend
7
Manual:Packet Flow 1 Manual:Packet Flow Applies to RouterOS: v3, v4 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. Diagram As it was impossible to get everything in one diagram, Packet flow diagram for Mikrotik RouterOS v3.x was created in 2 parts: Bridging or Layer-2 (MAC) where Routing part is simplified to one "Layer-3" box Routing or Layer-3 (IP) where Bridging part is simplified to one "Bridging" box The packet flow diagram is also available as a PDF [1] .
Transcript

Manual:Packet Flow 1

Manual:Packet FlowApplies to RouterOS: v3, v4

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 Hotspotconfiguration 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 morethan 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.

DiagramAs it was impossible to get everything in one diagram, Packet flow diagram for Mikrotik RouterOS v3.x wascreated in 2 parts:• Bridging or Layer-2 (MAC) where Routing part is simplified to one "Layer-3" box• Routing or Layer-3 (IP) where Bridging part is simplified to one "Bridging" boxThe packet flow diagram is also available as a PDF [1].

Manual:Packet Flow 2

Analysis

Basic Concepts

- starting point in packets way through the router facilities. It does not matter what interface(physical or virtual) packet is received it will start its way from here.

- last point in packets way through the router facilities. Just before the packet is actually sent out.

- last point in packets way to router itself, after this packet is discarded

- starting point for packets generated by router itself

Configurable FacilitiesEach and every facilities in this section corresponds with one particular menu in RouterOS. Users are able to accessthose menu and configure these facilities directly

- /ip firewall connection tracking

- /ip firewall filter

- /ip firewall nat

- /ip firewall mangle

Manual:Packet Flow 3

- /queue simple and /queue tree

- /ip ipsec policy

- /ip accounting

- /interface bridge settings - available only for traffic that go through the bridge. For all othertraffic default value is Yes

- /interface bridge filter

- /interface bridge nat

Automated processes and decisions

- check if the actual input interface is a port for bridge OR checks if input interface is bridge

- allow to capture traffic witch otherwise would be discarded by connection tracking - this way ourHotspot feature are able to provide connectivity even if networks settings are in complete mess

- bridge goes through the MAC address table in order to find a match to destination MAC address ofpacket. When match is found - packet will be send out via corresponding bridge port. In case of no match - multiplecopies of packet will be created and packet will be sent out via all bridge ports

- this is a workaround, allows to use "out-bridge-port" before actual bridge decision.

- router goes through the route n order to find a match to destination IP address of packet. Whenmatch is found - packet will be send out via corresponding port or to the router itself . In case of no match - packetwill be discarded.

- this is a workaround that allows to set-up policy routing in mangle chain output

- indicates exact place where Time To Live (TTL) of the routed packet is reduced by 1. If it become0 packet will be discarded

- self explainatory

- check if the actual output interface is a port for bridge OR checks if output interface is bridge

- undo all that was done by hotspot-in for the packets that is going back to client.

Manual:Packet Flow 4

Examples

Bridging with use-ip-firewall=yes

Routing - from Ethernet to Ethernet interface

Manual:Packet Flow 6

IPsec decryption

References[1] http:/ / wiki. mikrotik. com/ images/ 1/ 1b/ Traffic_Flow_Diagram_RouterOS_3. x. pdf

Article Sources and Contributors 7

Article Sources and ContributorsManual:Packet Flow  Source: http://wiki.mikrotik.com/index.php?oldid=16925  Contributors: Janisk, Marisb, Megis, Normis

Image Sources, Licenses and ContributorsImage:Version.png  Source: http://wiki.mikrotik.com/index.php?title=File:Version.png  License: unknown  Contributors: NormisImage:Bridge_final.png  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_final.png  License: unknown  Contributors: MegisImage:IP_final.png  Source: http://wiki.mikrotik.com/index.php?title=File:IP_final.png  License: unknown  Contributors: MegisImage:Input_interface.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Input_interface.jpg  License: unknown  Contributors: MegisImage:output_interface.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Output_interface.jpg  License: unknown  Contributors: MegisImage:local_process-_in.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Local_process-_in.jpg  License: unknown  Contributors: MegisImage:local_process-_out.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Local_process-_out.jpg  License: unknown  Contributors: MegisImage:connection_tracking.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Connection_tracking.jpg  License: unknown  Contributors: MegisImage:Filter_input.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Filter_input.jpg  License: unknown  Contributors: MegisImage:Filter_forward.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Filter_forward.jpg  License: unknown  Contributors: MegisImage:Filter_output.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Filter_output.jpg  License: unknown  Contributors: MegisImage:src_nat.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Src_nat.jpg  License: unknown  Contributors: MegisImage:dst_nat.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Dst_nat.jpg  License: unknown  Contributors: MegisImage:mangle_prerouting.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Mangle_prerouting.jpg  License: unknown  Contributors: MegisImage:mangle_input.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Mangle_input.jpg  License: unknown  Contributors: MegisImage:mangle_forward.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Mangle_forward.jpg  License: unknown  Contributors: MegisImage:mangle_output.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Mangle_output.jpg  License: unknown  Contributors: MegisImage:mangle_postrouting.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Mangle_postrouting.jpg  License: unknown  Contributors: MegisImage:global_in.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Global_in.jpg  License: unknown  Contributors: MegisImage:global_out.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Global_out.jpg  License: unknown  Contributors: MegisImage:Interface HTB.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Interface_HTB.jpg  License: unknown  Contributors: MegisImage:IPsec_policy.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:IPsec_policy.jpg  License: unknown  Contributors: MegisImage:accounting.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Accounting.jpg  License: unknown  Contributors: MegisImage:use_ip_firewall.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Use_ip_firewall.jpg  License: unknown  Contributors: MegisImage:bridge_input.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_input.jpg  License: unknown  Contributors: MegisImage:Bridge_forward.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_forward.jpg  License: unknown  Contributors: MegisImage:Bridge_output.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_output.jpg  License: unknown  Contributors: MegisImage:Bridge_dst_nat.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_dst_nat.jpg  License: unknown  Contributors: MegisImage:Bridge_src_nat.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_src_nat.jpg  License: unknown  Contributors: MegisImage:In-interface-bridge.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:In-interface-bridge.jpg  License: unknown  Contributors: MegisImage:hotspot_in.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Hotspot_in.jpg  License: unknown  Contributors: MegisImage:Bridge Desicion.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_Desicion.jpg  License: unknown  Contributors: MegisImage:bridge_decision.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Bridge_decision.jpg  License: unknown  Contributors: MegisImage:routing_decision.JPG  Source: http://wiki.mikrotik.com/index.php?title=File:Routing_decision.JPG  License: unknown  Contributors: MegisImage:routing_adjustment.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Routing_adjustment.jpg  License: unknown  Contributors: MegisImage:TTL=TTL-1.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:TTL=TTL-1.jpg  License: unknown  Contributors: MegisImage:IPSec_Decryption.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:IPSec_Decryption.jpg  License: unknown  Contributors: MegisImage:IPSec_Encryption.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:IPSec_Encryption.jpg  License: unknown  Contributors: MegisImage:out_interface_bridge.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Out_interface_bridge.jpg  License: unknown  Contributors: MegisImage:Hotspot_out.jpg  Source: http://wiki.mikrotik.com/index.php?title=File:Hotspot_out.jpg  License: unknown  Contributors: MegisImage:Packet_Flow_Example_1.png  Source: http://wiki.mikrotik.com/index.php?title=File:Packet_Flow_Example_1.png  License: unknown  Contributors: MegisImage:Packet_Flow_Example_2c.png  Source: http://wiki.mikrotik.com/index.php?title=File:Packet_Flow_Example_2c.png  License: unknown  Contributors: MegisImage:Packet_Flow_Example_3_1.png  Source: http://wiki.mikrotik.com/index.php?title=File:Packet_Flow_Example_3_1.png  License: unknown  Contributors: MegisImage:Packet_Flow_Example_3_2c.png  Source: http://wiki.mikrotik.com/index.php?title=File:Packet_Flow_Example_3_2c.png  License: unknown  Contributors: MegisImage:Packet_Flow_Example_4c.png  Source: http://wiki.mikrotik.com/index.php?title=File:Packet_Flow_Example_4c.png  License: unknown  Contributors: MegisImage:Packet_Flow_Example_5c.png  Source: http://wiki.mikrotik.com/index.php?title=File:Packet_Flow_Example_5c.png  License: unknown  Contributors: Megis


Recommended