Packet classification is one of the key elements of a routers to implement traffic control techniques.
As an example, let us consider an IPv6 packet such as the following one :
What are the fields of the packet that you can match if you want to implement Layer-2 classification ?
Next header
Ethernet type
Source IP address
Destination port
Ethernet source address
Ethernet destination address
Destination IP address
Internet protocol version
Source port
Hop Limit
Traffic class
TLS record type
What are the fields of the packet that you can match if you want to implement Layer-3 classification ?
What are the fields of the packet that you can match if you want to implement Layer-4 classification ?
What are the fields of the packet that you can match if you want to implement application-level (or layer 7) classification ?