Setting the DSCP or TOS Discipline
January 6th, 2012 by Bramwell
The solution to this trouble varies according to the type of targeted traffic distinctions you want to create, too the version of IOS that you're working in your routers.
There should be some thing that defines the different styles of website traffic you need to prioritize. Typically, the less complicated the distinctions are to build, the higher. It's because all of the checks consider router assets and introduce processing delays. The most common rules for distinguishing somewhere between targeted traffic styles use the packet's input interface and easy to understand IP header detail this sort of as TCP port numbers. The following examples indicate the way to set an IP Precedence price of rapid (two) for all FTP command page views that arrives through the serial0/0 interface, and an IP Precedence of priority (one) for all FTP data targeted traffic. This distinction is feasible as a result of FTP regulate site visitors employs TCP port 21, and FTP knowledge makes use of port 20.
The brand new process for configuring this usages course maps. Cisco first of all released this characteristic in IOS Version twelve.0(five)T. This method first defines a class-map that specifies how the router will establish this sort of targeted visitors. It then defines a policy-map that truly makes the improvements to the packet's TOS subject:
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 before IOS versions, where class-maps happen to be not obtainable, you have got make use of policy-based routing to change the TOS discipline within a packet. Applying this policy into the interface tells the router to employ this policy to check all incoming packets on this interface and rewrite those 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#
Right before you could tag a packet for exclusive treatment method, you've gotten to have an extremely very clear notion of what forms of page views ought wonderful remedy, and even precisely what kind of wonderful remedy they'll will be needing. Inside instance, now we have chose to give a distinctive priority to FTP customers acquired on a targeted serial interface. We display the right way to try this applying each the old and new configuration ways.
This will likely look to be a considerably artificial case in point. As a result of all, why would you treatment about tagging inbound website traffic you have previously obtained from a low-speed interface? Literally, amongst the most important ideas for implementing QoS inside of a network is usually that it is advisable to continuously tag the packet as early as feasible, ideally with the edges in the network. Then, because it passes through the network, every router only has to investigate the tag, and does not really need to do any extra classification. In cases like this, we might assure which the FTP page views returning around the other administration is tagged by the earliest router that gets it. Therefore the outbound potential customers has presently been tagged, and it is a waste of router assets to reclassify the outbound packets.
Loads of organizations actually consider this concept of marking with the edges a particular step further more, and remark each and every obtained packet. This assists to make sure that users are not requesting distinctive QoS privileges that they are not permitted to get. Nevertheless, you have to be mindful of this simply because it could possibly from time to time disrupt reliable markings. One example is, a real-time software could use RSVP to reserve bandwidth from the network. It truly is vital that the packets for this application have the suitable Expedited Forwarding (EF) DSCP marking or the network might not manage them competently. Though, additionally you never desire to permit other non-real-time purposes from this same supply hold the very same EF priority stage. So, if you are heading to configure your routers to remark all incoming packets in the edges, ensure that you appreciate what incoming markings are reliable.
In that case, the routers are jogging DLSw to bridge SNA website traffic by means of an IP network. And so the routers themselves genuinely formulate the IP packets. This generates a further challenge for the reason that there is no incoming interface. To ensure recipe employs lieu policy-based routing. The very fact that the router creates the packets also offers it a vital edge considering that it does not have to look at any DLSw packets that may just take place to go through.
The advantages in the more recent class-map method are not obvious during this case in point, but among the number one gigantic rewards appears if you'd like to use the greater current DSCP tagging scheme. Because the more mature policy-based routing solution doesn't immediately help DSCP, you could have to fake it by environment both the IP Precedence together with 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 also be useful later on during this chapter when we talk about class-based weighted fair queuing and class-based site visitors shaping.
It is important to note that all over this whole instance, we have only put a wonderful price into your packet's TOS or DSCP industry. This, by alone, won't have an affect on how the packet is forwarded by way of the network. To carry out that, you have got to be certain that as every router with the network forwards these marked packets, the interface queues will react appropriately to this advice.
At long last, we should always notice that even while this recipe reveals two helpful procedures of marking packets, implementing Dedicated Access Fee (Auto) features. Car tends to become even more successful on greater velocity interfaces.
Post in CCIE Security Tags: CCIE Bootcamps • CCIE in Security • CCIE SP