Service-policy input / service-policy output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 09:05 PM - edited 03-04-2019 05:55 AM
Hello,
I am a bit confused about input and output service-policy so just wondering if the way I understand it is correct.
Let say we have a connection between two locations
R1 --wan--R2
R1 has the following configuration
----------------------------------
int fastethernet0
service-policy output marktraffic
int serial0
service-policy output marktraffic2
First question
----------------
Packets to R2 (R1->R2) would be marked according to the serial interface policy marktraffic2 and packets from R2 (R2->R1) would be marked according to fa0 marktraffic1 policy. Is that correct?
Second question
-------------------
Now, let's say I have this config
------------------------
interface fa0
service-policy input marktraffic
int serial0
service-policy output marktraffic2
Packets going to R2 (R1->R2) would be marked with the policy marktraffic on the
fa0 interface but then would be remarked again using marktraffic2 policy on the serial interface.
No packets would be marked coming from R2. Is that correct?
Thanks a lot.
- Labels:
-
Other Routing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2009 03:03 AM
First Question - No. Packets leaving the s0 interface on R1 going to R2 will be marked. Any packets LEAVING R1 FA0 onto the LAN will be marked - not entirely just from R2.
Second Question - Yes.
HTH>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2009 03:21 PM
Thanks Andrew
Regarding question 1
What will be marking packets coming from R2 onto R1 lan will be the:
int fastethernet0
service-policy output marktraffic
not
int serial0
service-policy output marktraffic2
Is that right?
If I just had the interface serial0 output police on R1 would packets coming from R2 onto the R1 lan also be marked?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2009 12:01 AM
Joseph has given you all the information!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2009 04:27 AM
Andrew has answered your quesitions, but if you wanted to mark traffic to/from R2 on R1, you might:
int serial0
service-policy input marktraffic
service-policy output marktraffic2
I.e., you can have both an in and out policy on an interface.
