Hey there. Yes you can do this, but you can only apply the policy-map ingress to an interface (not egress).
Example.
I want to rate-limit traffic coming into fastethernet 0/1. Traffic sourced from 10.1.1.x is policed/rate-limited to 1mbps and traffic sourced from 20.1.1.x is policed/rate-limited to 9mbps. Check out the config:
class-map match-all 20Network
match access-group 2
class-map match-all 10Network
match access-group 1
!
!
policy-map My-test-ratelimit
class 10Network
police 1000000 8000 exceed-action drop
class 20Network
police 9000000 8000 exceed-action drop
!
!
!
interface FastEthernet0/1
service-policy input My-test-ratelimit
!
access-list 1 permit 10.1.1.0 0.0.0.255
access-list 1 deny any
access-list 2 permit 20.1.1.0 0.0.0.255
access-list 2 deny any
!
Hope this helps. Please rate all helpful posts.
Dazzler