The solution to this complication is dependent upon the sort of site visitors distinctions you need to make, too the version of IOS you will be managing inside of your routers.
There need to be a thing that defines the various sorts of site visitors that you need to prioritize. Typically, the more simple the distinctions are for making, the higher. It's because each of the checks consider router assets and introduce processing delays. The most typical policies for distinguishing amongst site traffic variations use the packet's input interface and hassle-free IP header content like as TCP port figures. The subsequent examples exhibit tips to set an IP Precedence value of fast (2) for all FTP control website traffic that arrives thru the serial0/0 interface, and an IP Precedence of priority (one) for all FTP info customers. This distinction is possible mainly because FTP manage page views takes advantage of TCP port 21, and FTP data usages port twenty.
The newest approach for configuring this uses class maps. Cisco primary introduced this characteristic in IOS Model twelve.0(5)T. This process to start with defines a class-map that specifies how the router will discover this sort of site traffic. It then defines a policy-map that actually helps make the alterations for the packet's TOS industry:
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 have been not for sale, you could have to work with policy-based routing to change the TOS industry in a packet. Making use of this coverage with the interface tells the router make use of this policy to test 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#
Before you could tag a packet for specific remedy, you will have to obtain an incredibly apparent plan of what kinds of targeted visitors absolutely need exclusive cure, coupled with precisely what sort of wonderful remedy they're going to need. During the illustration, we've got chose to give a distinctive priority to FTP targeted visitors received on a specific serial interface. We clearly show easy methods to try this employing the two the old and new configuration procedures.
This will likely look to get a somewhat synthetic illustration. Just after all, why would you care about tagging inbound customers which you have by now obtained from a low-speed interface? In actual fact, one of the most vital ideas for implementing QoS inside a network is usually that it is best to often tag the packet as early as you possibly can, ideally with the edges belonging to the network. Then, since it passes from the network, each and every router only must study the tag, and isn't going to want to do any more classification. In this instance, we'd be certain which the FTP potential customers returning inside other intendance is tagged with the first of all router that gets it. And so the outbound customers has currently been tagged, and it is a waste of router sources to reclassify the outbound packets.
Numerous organizations realistically consider this idea of marking in the edges an individual step additionally, and remark each and every obtained packet. This allows to guarantee that end users are not requesting amazing QoS privileges that they aren't permitted to acquire. Yet, you ought to be mindful of this considering it may possibly generally disrupt legitimate markings. Such as, a real-time application can use RSVP to order bandwidth with the network. It truly is important the packets for this software possess the acceptable Expedited Forwarding (EF) DSCP marking or the network may not deal with them adequately. In spite of this, additionally you never like to permit other non-real-time apps from this same resource have the same exact EF concern degree. So, when you are heading to configure your routers to remark all incoming packets at the edges, make sure that you know what incoming markings are authentic.
In that situation, the routers are jogging DLSw to bridge SNA traffic through an IP network. So the routers themselves realistically design the IP packets. This produces an extra challenge because there exists no incoming interface. Making sure that recipe works by using neighborhood policy-based routing. The fact that the router creates the packets also gives it a significant benefit considering that it doesn't have to consider any DLSw packets that might just occur to go through.
The advantages from the newer class-map methodology are not apparent during this instance, but on the list of to start with large merits seems if you want to employ the greater fashionable DSCP tagging scheme. Because the mature policy-based routing process isn't going to instantly assist DSCP, you might have to pretend it by setting both equally the IP Precedence and the TOS independently 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 will even be valuable afterwards on this chapter after we talk about class-based weighted fair queuing and class-based site visitors shaping.
It can be crucial to notice that throughout this complete instance, now we have only put a particular worth to the packet's TOS or DSCP discipline. This, by alone, would not affect how the packet is forwarded via the network. To carry out that, you have to make certain that as every single router inside the network forwards these marked packets, the interface queues will react appropriately to this info.
Ultimately, we should always note that even when this recipe exhibits two valuable tips of marking packets, applying Committed Accessibility Amount (Auto) capabilities. Automotive tends to get a lot of reliable on greater velocity interfaces.