84 TRAFFIC CLASSIFICATION, POLICING,AND S HAPINGTraffic ClassificationOverviewTraffic classification Traffic classification is the prerequisite and foundation for differentiated services,which uses certain rules to identify the packets with certain features.To discriminate flows, you can set traffic classification rules using the priority bitsof ToS (type of service) field in the IP packet header. Alternatively, the networkadministrator may define a traffic classification policy, for instance, integratinginformation such as source IP address, destination IP address, MAC address, IPprotocol, or port number of the applications to classify the traffic. In general, it canbe a narrow range defined by a quintuple (source IP address, source port number,destination IP address, destination port number and the Transport Protocol), or canbe all packets to a network segment.In general, while packets being classified on the network border, the precedencebits in the ToS byte of IP header are set so that IP precedence can be used as adirect packet classification standard within the network. The queuing technologiescan use IP precedence to handle the packets. Downstream network can receivethe packets classification results from upstream network selectively, or re-classifythe packets with its own standard.Traffic classification is used to provide differentiated service, so it must beassociated with certain kinds of traffic policing or resource-assignmentmechanisms. To adopt what kind of traffic policing action will depend on thecurrent stage and load status of the network. For example, to police the packetsaccording to the committed rate when they enter the network, to make trafficshaping before they flow out the nodes, to perform queuing management in theevent of congestion and to employ congestion avoidance when congestionbecomes worse.Priority Several priorities are described as follows: