Manual:Packet Flow: Difference between revisions
No edit summary |
|||
Line 28: | Line 28: | ||
===Basic Concepts=== | ===Basic Concepts=== | ||
[[Image:Input_interface.jpg|Input Interface|100px]] - starting point in packets way | [[Image:Input_interface.jpg|Input Interface|100px]] - starting point in packets way throught the router facilities. It does not matter what interface (physical or virtual) packet is received it will start its way from here. | ||
[[Image:output_interface.jpg|Output Interface|100px]] - last point in packets way | [[Image:output_interface.jpg|Output Interface|100px]] - last point in packets way throught the router facilities. Just before the packet is actually sent out. | ||
[[Image:local_process-_in.jpg|Local Process IN|100px]] - last point in packets way '''to''' router itself, after this packet is discarded | [[Image:local_process-_in.jpg|Local Process IN|100px]] - last point in packets way '''to''' router itself, after this packet is discarded | ||
Line 64: | Line 64: | ||
[[Image:accounting.jpg|Accounting|100px]] - '''/ip accounting''' | [[Image:accounting.jpg|Accounting|100px]] - '''/ip accounting''' | ||
[[Image:use_ip_firewall.jpg|Use IP Firewall|100px]] - '''/interface bridge settings''' - available only for traffic that go ''' | [[Image:use_ip_firewall.jpg|Use IP Firewall|100px]] - '''/interface bridge settings''' - available only for traffic that go '''throught''' the bridge. For all other traffic default value is '''Yes''' | ||
[[Image:bridge_input.jpg|Bridge Input|100px]] | [[Image:bridge_input.jpg|Bridge Input|100px]] | ||
Line 79: | Line 79: | ||
[[Image:hotspot_in.jpg|Hotspot In|100px]] - allow to capture traffic witch otherwise would be discarded by connection tracking - this way our Hotspot feature are able to provide connectivity even if networks settings are in complete mess | [[Image:hotspot_in.jpg|Hotspot In|100px]] - allow to capture traffic witch otherwise would be discarded by connection tracking - this way our Hotspot feature are able to provide connectivity even if networks settings are in complete mess | ||
[[Image:Bridge Desicion.jpg|Bridge Decision|100px]] - bridge goes | [[Image:Bridge Desicion.jpg|Bridge Decision|100px]] - bridge goes throught the MAC address table in order to find a match to destination MAC address of packet. When match is found - packet will be send out via corresponding bridge port. In case of no match - multiple copies of packet will be created and packet will be sent out via all bridge ports | ||
[[Image:bridge_decision.jpg|Bridge Decision|100px]] - this is a workaround, allows to use "out-bridge-port" before actual bridge decision. | [[Image:bridge_decision.jpg|Bridge Decision|100px]] - this is a workaround, allows to use "out-bridge-port" before actual bridge decision. | ||
[[Image:routing_decision.JPG|Routing Decision|100px]] - router goes | [[Image:routing_decision.JPG|Routing Decision|100px]] - router goes throught the route n order to find a match to destination IP address of packet. When match is found - packet will be send out via corresponding port or to the router itself . In case of no match - packet will be discarded. | ||
[[Image:routing_adjustment.jpg|Routing Adjustment|100px]] - this is a workaround that allows to set-up policy routing in mangle chain output | [[Image:routing_adjustment.jpg|Routing Adjustment|100px]] - this is a workaround that allows to set-up policy routing in mangle chain output |
Revision as of 14:04, 6 October 2009
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.
Analysis
Basic Concepts
- starting point in packets way throught 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 throught 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 Facilities
Each and every facilities in this section corresponds with one particular menu in RouterOS. Users are able to access those menu and configure these facilities directly
- /ip firewall connection tracking
- /queue simple and /queue tree
- /interface bridge settings - available only for traffic that go throught the bridge. For all other traffic default value is Yes
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 our Hotspot feature are able to provide connectivity even if networks settings are in complete mess
- bridge goes throught the MAC address table in order to find a match to destination MAC address of packet. When match is found - packet will be send out via corresponding bridge port. In case of no match - multiple copies 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 throught the route n order to find a match to destination IP address of packet. When match is found - packet will be send out via corresponding port or to the router itself . In case of no match - packet will 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 become 0 packet will be discarded
- 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.
Examples
Bridging with use-ip-firewall=yes