# New Packet flow diagram

**URL:** <https://forum.mikrotik.com/t/new-packet-flow-diagram/66252>\
**Category:** General\
**Created:** [May 17, 2013, 10:21am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252 "2013-05-17T10:21:41Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![ekkas](https://forum.mikrotik.com/letter_avatar/ekkas/32/6_449c533f586939b6e5f246632a46421f.png) [@ekkas](https://forum.mikrotik.com/u/ekkas)\
**Post date:** [August 15, 2013, 7:14am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/21 "2013-08-15T07:14:49Z")

</div>

Thanks for that, but what I do not understand is if the diagram shows Global HTB in Input chain, then it’s not supposed to get any forwarding traffic?

According to diagrams:  
A) Traffic to Router(v5):  
PreRouting (ConnTrack, Mangle, DstNAT\*\*, Global HTB\*\*)  
Input (Mangle, Filter)Traffic to Router(v5):

B)Traffic forwarded(v5):  
PreRouting (ConnTrack, Mangle, DstNAT, **Global HTB** )  
Forward (Mangle, Filter)

C)Traffic to Router(v6):  
PreRouting (ConnTrack, Mangle, DstNAT)  
Input (Mangle, Filter, **Global HTB** )

D)Traffic forwarded(v6):  
PreRouting (ConnTrack, Mangle, DstNAT)  
Forward (Mangle, Filter, **?** )  
…

In scenario D, there is no Global HTB in prerouting, according to diagram it is now in Input chain, but Input chain is not used if it is forwarded traffic.  
I’m not suggesting ROS is broken, I’m suggesting that possibly the diagram is wrong, or does ROS6 process Input chain for forwarded traffic as well now?

Regards  
Ekkas

---

<div class="post-metadata">

**Author:** ![andriys](https://forum.mikrotik.com/letter_avatar/andriys/32/6_449c533f586939b6e5f246632a46421f.png) [@andriys](https://forum.mikrotik.com/u/andriys)\
**Post date:** [August 15, 2013, 8:31am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/22 "2013-08-15T08:31:24Z")

</div>

> [@ekkas](#):
>
> the diagram shows Global HTB in Input chain

It shows it not only in Input chain, but in the Postrouting chain as well.  
See above the last two blocks in postrouting.

---

<div class="post-metadata">

**Author:** ![ekkas](https://forum.mikrotik.com/letter_avatar/ekkas/32/6_449c533f586939b6e5f246632a46421f.png) [@ekkas](https://forum.mikrotik.com/u/ekkas)\
**Post date:** [August 15, 2013, 8:39am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/23 "2013-08-15T08:39:52Z")

</div>

> It shows it not only in Input chain, but in the Postrouting chain as well.

I’m talking about prerouting.  
Global has always been in postrouting(before Src-NAT, now after src-NAT), but seems to moved from prerouting to input, that’s the point I’m trying to make.  
V5:

![](http://wiki.mikrotik.com/images/thumb/2/2a/IP_final.png/700px-IP_final.png)

V6:

![](http://forum.mikrotik.com/download/file.php?id=13279)

---

<div class="post-metadata">

**Author:** ![andriys](https://forum.mikrotik.com/letter_avatar/andriys/32/6_449c533f586939b6e5f246632a46421f.png) [@andriys](https://forum.mikrotik.com/u/andriys)\
**Post date:** [August 15, 2013, 10:11am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/24 "2013-08-15T10:11:34Z")

</div>

Any kind of traffic first hits Global HTB, then Simple Tree, and it does it only once. Input traffic hits them in the Input, while Output and Forward traffic - in the Postrouting. The packet flow has changed and you will need to adopt to it.

---

<div class="post-metadata">

**Author:** ![ekkas](https://forum.mikrotik.com/letter_avatar/ekkas/32/6_449c533f586939b6e5f246632a46421f.png) [@ekkas](https://forum.mikrotik.com/u/ekkas)\
**Post date:** [August 15, 2013, 11:40am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/25 "2013-08-15T11:40:28Z")

</div>

> Any kind of traffic first hits Global HTB, then Simple Tree, and it does it only once.

Ok, that makes sense.

> The packet flow has changed and you will need to adopt to it.

I need to understand before I can adapt. 🙂

Where would you want QueueTree or Simple Queues in Input chain, except for web proxy maybe? Control is outbound?  
Anyways…

Let me put it this way…  
For normal unbridged, routed traffic a packed would travel roughly.(#=PacketMark \*=Queue)

ROS 5  
1-)Prerouting  
1a)Mangle Prerouting #1  
1b)Dst NAT  
1c)Global-In Global-Total HTB \*1  
2-)Forward  
2a)Mangle forward #2  
2b)Filter forward  
3-)PostRouting  
3a)Mangle Postrouting #2  
3b)Global-Out Global-Total HTB \*2  
3c)Src-NAT  
4-)Interface HTB \*2

So here (if I understand it correctly), you could:  
new-packet-mark @ ManglePrerouting(1a), then queue @ Global-In/Global-total(1c)  
Then re-mark the packet @ MangleForward(2a) or ManglePostrouting(3a), then queue @Global-out(3b) or Interface HTB(4-)  
Correct?

ROS 6:  
1-)Prerouting  
1a)Mangle Prerouting #1  
1b)Dst NAT  
2-)Forward  
2a)Mangle forward  
2b)Filter forward  
3-)PostRouting  
3a)Mangle Postrouting  
3b)src-NAT  
3c)Global HTB \*1?  
3d)Simple queues  
4-)Interface HTB

Here, the first queue that you reach, is only in Global HTB(3c), after prerouting, forward, postrouting Mangles. There is no mangle opportunity after that to re-mark the packet before Interface HTB(4-)?  
I guess my question is then, can a packet carry more than one mark? Otherwise, how does a packet get remarked if the sequence above is correct?

Thanks for your patience  
Ekkas

---

<div class="post-metadata">

**Author:** ![Chupaka](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/chupaka/32/215_2.png) [@Chupaka](https://forum.mikrotik.com/u/Chupaka)\
**Post date:** [August 15, 2013, 12:40pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/26 "2013-08-15T12:40:07Z")

</div>

> [@ekkas](#):
>
> There is no mangle opportunity after that to re-mark the packet before Interface HTB(4-)?

no opportunity

> [@ekkas](#):
>
> can a packet carry more than one mark?

it cannot

---

<div class="post-metadata">

**Author:** ![ekkas](https://forum.mikrotik.com/letter_avatar/ekkas/32/6_449c533f586939b6e5f246632a46421f.png) [@ekkas](https://forum.mikrotik.com/u/ekkas)\
**Post date:** [August 15, 2013, 2:30pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/27 "2013-08-15T14:30:46Z")

</div>

Thanks Chupaka,  
it would seem then a big downgrade from ROS5?  
How can you do double-control QoS, i.e. shape by client type and QoS by traffic type on one router?

---

<div class="post-metadata">

**Author:** ![Chupaka](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/chupaka/32/215_2.png) [@Chupaka](https://forum.mikrotik.com/u/Chupaka)\
**Post date:** [August 15, 2013, 10:17pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/28 "2013-08-15T22:17:56Z")

</div>

you may use dynamic Simple Queues for shaping, one queue per user - they are speedy now 🙂

---

<div class="post-metadata">

**Author:** ![ekkas](https://forum.mikrotik.com/letter_avatar/ekkas/32/6_449c533f586939b6e5f246632a46421f.png) [@ekkas](https://forum.mikrotik.com/u/ekkas)\
**Post date:** [August 16, 2013, 12:15am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/29 "2013-08-16T00:15:53Z")

</div>

That is all fine and well, but the question is how to do it twice.  
1)Per user (Throttling)  
2)Total outgoing (QoS)  
Where to mark and queue it second time?

Regards  
Ekkas

---

<div class="post-metadata">

**Author:** ![macgaiver](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/macgaiver/32/104_2.png) [@macgaiver](https://forum.mikrotik.com/u/macgaiver)\
**Post date:** [August 16, 2013, 6:33am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/30 "2013-08-16T06:33:46Z")

</div>

1. mark by traffic type in any mangle chain… - i suggest “forward”
2. prioritize traffic by traffic type in HTB global
3. use simple queues to apply individual user limits (use target as individual IP, or network and PCQ queue type)

---

<div class="post-metadata">

**Author:** ![infused](https://forum.mikrotik.com/letter_avatar/infused/32/6_449c533f586939b6e5f246632a46421f.png) [@infused](https://forum.mikrotik.com/u/infused)\
**Post date:** [September 1, 2013, 11:34pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/31 "2013-09-01T23:34:18Z")

</div>

Can anyone chuck this in a nice, printable pdf?

---

<div class="post-metadata">

**Author:** ![Toby7](https://forum.mikrotik.com/letter_avatar/toby7/32/6_449c533f586939b6e5f246632a46421f.png) [@Toby7](https://forum.mikrotik.com/u/Toby7)\
**Post date:** [September 3, 2013, 3:39pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/32 "2013-09-03T15:39:12Z")

</div>

One addon from my point of view: I would like to have colours in the picture, they make the boxes much more clearer! 🙂  
PDF is also a good point. Please publish a vector graphics inside the PDF so that we can enjoy a real wallpaper 😃

Thank you!

---

<div class="post-metadata">

**Author:** ![ojsa](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/ojsa/32/566_2.png) [@ojsa](https://forum.mikrotik.com/u/ojsa)\
**Post date:** [September 3, 2013, 8:27pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/33 "2013-09-03T20:27:12Z")

</div>

Is it possible to get this flow chart pictures in SVG or other vectorbased picture format?

---

<div class="post-metadata">

**Author:** ![normis](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/normis/32/8_2.png) [@normis](https://forum.mikrotik.com/u/normis)\
**Post date:** [September 5, 2013, 6:33am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/34 "2013-09-05T06:33:18Z")

</div>

> [@ojsa](#):
>
> Is it possible to get this flow chart pictures in SVG or other vectorbased picture format?

The original is in Open Office, so no. You could re-draw it as vector and share 🙂

---

<div class="post-metadata">

**Author:** ![sergey](https://forum.mikrotik.com/letter_avatar/sergey/32/6_449c533f586939b6e5f246632a46421f.png) [@sergey](https://forum.mikrotik.com/u/sergey)\
**Post date:** [September 5, 2013, 8:43am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/35 "2013-09-05T08:43:19Z")

</div>

Guys

Thank you very much for for the diagram. They are very useful and clear. Well done!

Questions:

1. Could you add they to official documentation (WiKi)?
2. Is it possible to get originals for personal use? I’d want to add comments to the diagrams and print.

Thank you.

---

<div class="post-metadata">

**Author:** ![mrz](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/mrz/32/308_2.png) [@mrz](https://forum.mikrotik.com/u/mrz)\
**Post date:** [September 25, 2013, 1:01pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/36 "2013-09-25T13:01:02Z")

</div>

Svg files for those who requested:

![](http://wiki.mikrotik.com/images/6/67/PacketFlowDiagram_v6_a.svg)

![](http://wiki.mikrotik.com/images/2/26/PacketFlowDiagram_v6_b.svg)

![](http://wiki.mikrotik.com/images/f/f3/PacketFlowDiagram_v6_c.svg)

---

<div class="post-metadata">

**Author:** ![AlArenal](https://forum.mikrotik.com/letter_avatar/alarenal/32/6_449c533f586939b6e5f246632a46421f.png) [@AlArenal](https://forum.mikrotik.com/u/AlArenal)\
**Post date:** [September 25, 2013, 2:05pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/37 "2013-09-25T14:05:35Z")

</div>

Great, thx alot!

P.S.:  
This would should go into the wiki 😉

---

<div class="post-metadata">

**Author:** ![mrz](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/mrz/32/308_2.png) [@mrz](https://forum.mikrotik.com/u/mrz)\
**Post date:** [September 25, 2013, 2:19pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/38 "2013-09-25T14:19:33Z")

</div>

It is already there. Images you see here are linked to wiki 🙂

---

<div class="post-metadata">

**Author:** ![macgaiver](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/macgaiver/32/104_2.png) [@macgaiver](https://forum.mikrotik.com/u/macgaiver)\
**Post date:** [September 26, 2013, 6:45am UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/39 "2013-09-26T06:45:01Z")

</div>

Yes, thanks, finally i can replace my old packet flow diagram printouts that hangs on the wall just across the workplace.

Added PDF that i will use if someone wants to do the same 🙂  
[Packet Flow Diagram v6.pdf](https://forum.mikrotik.com/uploads/short-url/xP0fBchon3c9IvowTz8rt9WCeG4.pdf) (204 KB)

---

<div class="post-metadata">

**Author:** ![arahim52](https://forum.mikrotik.com/letter_avatar/arahim52/32/6_449c533f586939b6e5f246632a46421f.png) [@arahim52](https://forum.mikrotik.com/u/arahim52)\
**Post date:** [November 7, 2013, 3:16pm UTC](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252/40 "2013-11-07T15:16:38Z")

</div>

Thanks for sharing this post to us. This is really nice information.  
[IT Network Support](http://www)

[Previous page](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252.md?page=1)

[Next page](https://forum.mikrotik.com/t/new-packet-flow-diagram/66252.md?page=3)
