2009年3月13日 星期五

Priority tag

昨天看 test plan 發現要測 priority tag 的 traffic forwarding,

花點時間查一一下這是什麼東西



page 25 of the IEEE Std 802.1Q-2005

##

3.23 Priority-tagged frame: A tagged frame whose tag header carries priority information but carries no VLAN identification information.

##



另外在網路上爬到的



http://www.devicescape.com/docs/wip/package_guide/pkg_ieee80211.php#wp157858



##

802.1q Priority Tag Setup



Out of the box Linux 2.4 and 2.6 support 802.1q tags for vlan-id. They do not support 802.1q priority tags - i.e. tags where that vlan-id is set to 0, and the tag is used just to add priority information to the frame. Devicescape adds 802.1q priority tag support through the ebtables strip1q extension. Ebtables is a mechanism which allows packets to be inspected and processed during various stages of forwarding through a Linux Bridge. All packets received on a linux bridge pass through the 'broute chain' before any other processing. To use the strip1q module you add it to the broute chain or nat chain on a Linux bridge that will be forwarding 802.1q priority tagged frames. This command does this:



$ ebtables -t broute -A BROUTING -p 802_1Q --vlan-id 0 -j strip1q



Note



You must use the provided version of the ebtables user space command. This version has been extended to support the strip1q target.



This command registers the Devicescape strip1q module to be called for all frames received on the bridge which have an Ethernet protocol of 802_1Q (as all 802.1q tagged frames do), and where the vlan-id is equal to 0. When the strip1q module receives one of these frames it removes the 802.1q tag from the frame, while recording the priority from the tag in the skb->priority field. The now untagged frame is forwarded by the bridge appropriately. The value in the skb->priority field can be used later on when the frame reaches the 802.11 qdisc to select which wireless hardware queue to use to transmit the frame.



By default the strip1q modules maps 802.1q priority values (0-7) to skb->priority values of 256->263.

##



但是我還不知道這東西在真實環境中會被用在啥地方 =.=

沒有留言:

張貼留言