Setting the DSCP or TOS Discipline
The solution to this trouble is determined by the sort of website traffic distinctions you wish to help make, in addition the edition of IOS you could be working in the routers.
There ought to be anything that defines the various forms of potential customers which you desire to prioritize. Generally speaking, the easier the distinctions are to build, the better. It's because all the exams get router resources and introduce processing delays. The most prevalent policies for distinguishing somewhere between site visitors sorts make use of the packet's input interface and relatively easy IP header detail like as TCP port quantities. The following examples demonstrate best ways to set an IP Precedence worth of fast (two) for all FTP handle potential customers that arrives by way of the serial0/0 interface, and an IP Precedence of concern (1) for all FTP info traffic. This distinction is possible as FTP handle customers employs TCP port 21, and FTP knowledge employs port twenty.
The new approach for configuring this works by using course maps. Cisco first of all introduced this aspect in IOS Version twelve.0(5)T. This process number one defines a class-map that specifies how the router will determine this sort of website traffic. It then defines a policy-map that truly makes the modifications to your packet's TOS field:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#access-list 101 permit any eq ftp any
Router(config)#access-list 101 permit any any eq ftp
Router(config)#access-list 102 permit any eq ftp-data any
Router(config)#access-list 102 permit any any eq ftp-data
Router(config)#class-map match-all ser00-ftpcontrol
Router(config-cmap)#description branch ftp control traffic
Router(config-cmap)#match input-interface serial0/0
Router(config-cmap)#match access-group 101
Router(config-cmap)#exit
Router(config)#class-map match-all ser00-ftpdata
Router(config-cmap)#description branch ftp data traffic
Router(config-cmap)#match input-interface serial0/0
Router(config-cmap)#match access-group 102
Router(config-cmap)#exit
Router(config)#policy-map serialftppolicy
Router(config-pmap)#description branch ftp traffic policy
Router(config-pmap)#class ser00-ftpcontrol
Router(config-pmap-c)#set ip precedence immediate
Router(config-pmap-c)#exit
Router(config-pmap)#class ser00-ftpdata
Router(config-pmap-c)#set ip precedence priority
Router(config-pmap-c)#exit
Router(config-pmap)#exit
Router(config)#interface serial0/0
Router(config-if)#ip route-cache policy
Router(config-if)#service-policy input serialftppolicy
Router(config-if)#exit
Router(config)#end
Router#
For earlier IOS variations, where class-maps had been not obtainable, you may have to implement policy-based routing to alter the TOS industry in a packet. Making use of this policy towards the interface tells the router to implement this policy to check all incoming packets on this interface and rewrite the ones that match the route map:Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#access-list 101 permit any eq ftp any
Router(config)#access-list 101 permit any any eq ftp
Router(config)#access-list 102 permit any eq ftp-data any
Router(config)#access-list 102 permit any any eq ftp-data
Router(config)#route-map serialftp-rtmap permit 10
Router(config-route-map)#match ip address 101
Router(config-route-map)#set ip precedence immediate
Router(config-route-map)#exit
Router(config)#route-map serialftp-rtmap permit 20
Router(config-route-map)#match ip address 102
Router(config-route-map)#set ip precedence priority
Router(config-route-map)#exit
Router(config)#interface serial0/0
Router(config-if)#ip policy route-map serialftp-rtmap
Router(config-if)#ip route-cache policy
Router(config-if)#exit
Router(config)#end
Router#
In the past you'll tag a packet for special procedure, you might have to acquire an especially obvious plan of what styles of targeted visitors absolutely need distinctive therapy, and even specifically what sort of particular therapy they are going to might need. Around the example, we've made a decision to give a amazing priority to FTP potential customers obtained on a targeted serial interface. We display the best way to do that utilizing both the aged and new configuration tactics.
This will likely look to get a considerably artificial illustration. As a result of all, why would you care about tagging inbound website traffic that you have by now received from a low-speed interface? Genuinely, among the list of most critical concepts for applying QoS in a very network is it is advisable to normally tag the packet as early as feasible, preferably for the edges from the network. Then, as it passes from the network, just about every router only needs to examine the tag, and doesn't really need to do any further classification. In cases like this, we'd be sure the FTP page views returning inside other bureaucratie is tagged because of the 1st router that receives it. So the outbound traffic has by now been tagged, and it's a waste of router resources to reclassify the outbound packets.
A great number of organizations ultimately get this idea of marking on the edges one action even more, and remark every last received packet. This may help to ensure that users aren't requesting exceptional QoS privileges they aren't authorized to obtain. Having said that, you have to be cautious of this considering the fact that it could possibly often times disrupt respectable markings. For example, a real-time application might use RSVP to reserve bandwidth through the network. It can be important the packets for this application have the acceptable Expedited Forwarding (EF) DSCP marking or even the network might not deal with them accordingly. Yet, additionally you will not aspire to permit other non-real-time programs from this identical supply have the same exact EF concern amount. So, for anyone who is going to configure your routers to remark all incoming packets in the edges, ensure you fully understand what incoming markings are genuine.
In that circumstance, the routers are operating DLSw to bridge SNA targeted traffic by using an IP network. And so the routers their selves ultimately construct the IP packets. This generates a further problem considering the fact that you can find no incoming interface. To make sure that recipe makes use of local policy-based routing. The fact that the router creates the packets also presents it an important edge on the grounds that it doesn't have to take into account any DLSw packets which may just occur to pass through.
The advantages of this newer class-map technique aren't evident within this instance, but among the many earliest large merits appears if you would like to utilize the greater modern DSCP tagging scheme. Since the more mature policy-based routing system does not right support DSCP, you've gotten to faux it by setting both equally the IP Precedence and then the TOS separately as follows.
Router(config)#route-map serialftp-rtmap permit 10
Router(config-route-map)#match ip address 115
Router(config-route-map)#set ip precedence immediate
Router(config-route-map)#set ip tos max-throughput
In this case, the packet will wind up with an IP Precedence value of immediate, or 2 (010 in binary), and TOS of max-throughput, or 4 (0100 in binary).
Doing the same thing with the class-map method is much more direct:
Router(config)#policy-map serialftppolicy
Router(config-pmap)#class serialftpclass
Router(config-pmap-c)#set ip dscp af21
Class-maps may even be valuable later on in this chapter after we mention class-based weighted reasonable queuing and class-based traffic shaping.
It's important to notice that through this entire example, we've got only place a unique value in to the packet's TOS or DSCP discipline. This, by alone, does not impact how the packet is forwarded by the network. To accomplish that, you ought to make sure that as every single router inside the network forwards these marked packets, the interface queues will react appropriately to this information and facts.
Last but not least, we must always notice that as this recipe reveals two advantageous techniques of marking packets, applying Committed Accessibility Fee (Automobile) elements. Auto tends to become significantly more successful on bigger speed interfaces.
