0

The Medium Access Control sublayer appends 3 bits for the priority of the frame. The possible choices for the priority are

Traffic Type Priority
Background 0 (lowest)
Best effort 1 (default)
Excellent effort 2
Critical applications 3
Video (< 100 ms latency and jitter) 4
Voice (< 10 ms latency and jitter) 5
Internetwork control 6
Network control 7 (highest)

These can be found in the table here. This leads to several related questions:

  1. Where is the priority level for a particular frame set? (whose code decides and in what device)
  2. Since the MAC layer does not inspect the contents of a packet, how does the MAC layer know what priority to assign to a packet? (video vs. best effort)
  3. What prevents abuse of the priority system? If I want my application to provide lightning-fast speeds to users, what prevents me from requesting the highest-priority delivery?
3
  • That is for frames with VLAN tags on trunk links, not on normal ethernet frames. The priorities are set by configuration on a switch, not by an application on a host. how a switch determines and assigns the priorities is dependent on the switch model. Switches have only a few very tiny buffers, and this does not give you such a great advantage over other traffic as you seem to think.
    – Ron Maupin
    Jun 27, 2022 at 0:07
  • @RonMaupin My book (Tanenbaum) suggests that newer ethernet cards on workstations should be VLAN aware (transmit frames with VLAN tags). Presumably the switch trusts the value set by the ethernet card over it's own "judgement."
    – user84425
    Jun 27, 2022 at 0:14
  • Yes, newer cards can be configured for trunk links, but that is really only used for some servers that connect via trunk links so that they have addresses in multiple VLANs, e.g. a DHCP server that serves multiple VLANs can have a trunk with multiple virtual interfaces with addresses in each VLAN served. Normal access switch interfaces to which hosts connect do not support VLAN tags, they are only used on trunk links (except for the native VLAN on the trunk).
    – Ron Maupin
    Jun 27, 2022 at 0:40

2 Answers 2

1

From the Catalyst 4000 documentation:

ISL or 802.1Q frames are not classified or marked at the ingress port; the existing CoS value is honored.

When an 802.1Q frame enters the switch through a supported ingress port, QoS accepts the User Priority bits as the CoS value.

QoS classifies and marks all other frame types that enter the switch with the default CoS value that is configured for the entire switch. You cannot mark traffic on a per-port basis.

According to other answers, this information is only used on the local network and can only be "abused" on this network.

0

Edited:

Where is the priority level for a particular frame set? (whose code decides and in what device) Since the MAC layer does not inspect the contents of a packet, how does the MAC layer know what priority to assign to a packet? (video vs. best effort)

Typically, the access switch sets the frame priority. Switches can use higher layer information (such as IP address or port) to set the priority. In some cases, the transmitting host, if trusted, can set its own priority.

What prevents abuse of the priority system? If I want my application to provide lightning-fast speeds to users, what prevents me from requesting the highest-priority delivery?

Switches typically set the priority, and they will overwrite any priority setting from the host. Remember that the frame priority only affects the local layer 2 link. The frame information is discarded when the data passes through a router.

4
  • I appreciate the answer, but it skips an important component of the question: "Since the MAC layer does not inspect the contents of a packet, how does the MAC layer know what priority to assign to a packet?" or, rather, how does the switch know that video rather than email is being transmitted? If it doesn't always know, how could it ever know?
    – user84425
    Jun 27, 2022 at 12:06
  • Edited my answer.
    – Ron Trunk
    Jun 27, 2022 at 12:10
  • Protocols for assigning CoS bits will be proprietary of course, but for CISCO hardware, CoS bits cannot be assigned on a per-port basis. see my answer.
    – user84425
    Jun 27, 2022 at 12:40
  • C4000 is a very old switch.
    – Ron Trunk
    Jun 27, 2022 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.