Hi Experts! I am trying to configure bandwidth control (only ICMP) in a ROUTER but in "both" ways. From PCA to PCB I want to configure 200K, and from PCB to PCA I want to configure 400K. This configurations are done because I want to avoid excessive traffic that can be increase the process of my router. There is other kind of traffic passing through these interfaces must not controlled:
PCA ----> G1/1 ROUTER G2/2 ----> PCB
PCA <---- G1/1 ROUTER G2/2 <---- PCB
1.- What is better? traffic-shape or policy-map?
2.- If I use traffic-shape, in wich interface do I must apply?
3.- If I use policy-map, in wich interface do I must apply?
Whether either will avoid extra traffic increasing processing to the router itself.
For the first issue, like Edison, I would recommend the newer policy-map syntax. Likely where the old and new syntax overlap in function, the same IOS code might support both, but the policy-map allows many additional featurs.
For the second issue, shaping queues traffic that exceeds the bandwidth limit and I think it can only be applied in an outbound direction. Policing, however, drops overspeed traffic and can be applied inbound. Since the shaping might only regulate outbound speed, and it still needs to contend with inbound traffic, it may not offer as much reduction to router load as policing may. Policing, though, since it does drop packets, might adversely impact the SNMP applications.
Your third issue, avoiding loading the router, might be somewhat difficult to accomplish with either shaping or policing. If there's so much traffic passing through the router, that the volume is more than the router can process, neither shaping or policing within the same router may offer enough relief. I'm unsure the impact either might have, since usage of additional QoS features tend to increase router load. However, of the two approaches, policing traffic as it immediately enters the router, I would suspect, would offer the most load reduction benefit, if there is one.
Below are example of both policing and shaping using policy maps. (I'm assuming we're using a router and not a L3 switch, and the IOS is of recent vintage. Also, my syntax might be off.)