working in your own routers
January 16th, 2012 by Bramwell
The answer to this condition is dependent upon the type of targeted traffic distinctions you are looking for for making, at the same time the version of IOS that you're working inside of your routers.
There have to be one thing that defines the different styles of site traffic you want to prioritize. In general, the less difficult the distinctions are to create, the better. This is because every one of the assessments just take router sources and introduce processing delays. The most prevalent guidelines for distinguishing between targeted traffic sorts use the packet's input interface and painless IP header related information these types of as TCP port numbers. The next examples clearly show methods to set an IP Precedence value of quick (two) for all FTP manage targeted traffic that arrives through the serial0/0 interface, and an IP Precedence of priority (one) for all FTP knowledge site visitors. This distinction is possible because FTP handle site traffic utilizes TCP port 21, and FTP data makes use of port 20.
The new approach for configuring this takes advantage of course maps. Cisco primary released this aspect in IOS Model 12.0(five)T. This method first defines a class-map that specifies how the router will determine this type of site visitors. It then defines a policy-map that actually helps make the variations to your 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 earlier IOS versions, exactly where class-maps were not offered, you might have to utilize policy-based routing to change the TOS area in the packet. Applying this policy for the interface tells the router to employ 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 advance of you possibly can tag a packet for specific treatment, you may have to possess an extremely clear notion of what forms of site visitors really need specific treatment, in addition to precisely what kind of unique therapy they will will want. While in the instance, we have decided to give a unique concern to FTP traffic received on a precise serial interface. We display methods to try this implementing each the previous and new configuration solutions.
This might show up for being a somewhat synthetic case in point. After all, why would you treatment about tagging inbound targeted traffic that you have already acquired from a low-speed interface? Ultimately, on the list of most important concepts for employing QoS in a very network is always that you must forever tag the packet as early as is possible, preferably in the edges on the network. Then, as it passes through the network, each router only must examine the tag, and does not really need to do any additional classification. In cases like this, we would make certain the FTP site visitors returning with the other fonction publique is tagged by the number one router that receives it. Therefore the outbound targeted traffic has presently been tagged, and it's a waste of router sources to reclassify the outbound packets.
Most organizations realistically take this idea of marking on the edges one particular move further more, and remark each and every received packet. This may help to guarantee that consumers aren't requesting particular QoS privileges which they aren't allowed to have. Nonetheless, you have to be mindful of this since it might every so often disrupt legitimate markings. By way of example, a real-time software may very well use RSVP to order bandwidth in the network. It's critical that the packets for this software have the suitable Expedited Forwarding (EF) DSCP marking or even the network may not handle them properly. At the same time, additionally you do not want to allow other non-real-time apps from this same resource hold the very same EF priority amount. So, in case you are going to configure your routers to remark all incoming packets with the edges, confirm you perceive what incoming markings are reliable.
In that circumstance, the routers are jogging DLSw to bridge SNA potential customers by an IP network. Therefore the routers on their own ultimately construct the IP packets. This makes an additional challenge considering there is no incoming interface. Making sure that recipe takes advantage of area policy-based routing. The actual fact that the router generates the packets also provides it a significant edge mainly because it doesn't have to think about any DLSw packets that may just take place to pass through.
The benefits within the more recent class-map technique are not evident within this instance, but among the list of foremost great advantages seems in order for you to utilize the greater contemporary DSCP tagging scheme. Because the more mature policy-based routing methodology isn't going to immediately support DSCP, you've gotten to fake it by setting each the IP Precedence together with 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 may even be invaluable later on in this particular chapter when we discuss class-based weighted reasonable queuing and class-based customers shaping.
It is important to note that in the course of this complete example, we now have only place a particular price in to the packet's TOS or DSCP field. This, by itself, doesn't affect how the packet is forwarded by using the network. To do that, you ought to make sure that as every single router inside network forwards these marked packets, the interface queues will react appropriately to this data.
Last but not least, we must always observe that even when this recipe reveals two handy ideas of marking packets, utilizing Dedicated Accessibility Charge (Car) attributes. Auto tends to be more productive on larger speed interfaces.
Post in CCIE SP