Mailing List Archive

How to reset DSCP/TOS on LNS?
Hi All,

I'm looking for a way to re-mark customer packets as it enters/hits the
LNS.

Eg: cust_1 --upload-->> [ LNS ] --download-->> cust_2

- In my example cust_1 and cust_2 are both on the same LNS.
- cust_1 is uploading a file to cust_2.
- Is there a way to reset the DSCP/TOS value of packets coming from
cust_1?

LNS is a Cisco 7301 running 12.2(31)SB14.

Thanks.

Andy

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Please notify the sender immediately by email if you have received this
email by mistake and delete this email from your system. Please note that
any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the organisation.
Finally, the recipient should check this email and any attachments for
the presence of viruses. The organisation accepts no liability for any
damage caused by any virus transmitted by this email.
Re: How to reset DSCP/TOS on LNS? [ In reply to ]
Andy,

You can just apply a policy-map on your Virtual-Template that does "set prec
0" on class-default...

Arie

On Thu, Sep 2, 2010 at 9:22 AM, Andy Saykao <
andy.saykao@staff.netspace.net.au> wrote:

> Hi All,
>
> I'm looking for a way to re-mark customer packets as it enters/hits the
> LNS.
>
> Eg: cust_1 --upload-->> [ LNS ] --download-->> cust_2
>
> - In my example cust_1 and cust_2 are both on the same LNS.
> - cust_1 is uploading a file to cust_2.
> - Is there a way to reset the DSCP/TOS value of packets coming from cust_1?
>
> LNS is a Cisco 7301 running 12.2(31)SB14.
>
> Thanks.
>
> Andy
>
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> Please notify the sender immediately by email if you have received this
> email by mistake and delete this email from your system. Please note that
> any views or opinions presented in this email are solely those of the author
> and do not necessarily represent those of the organisation. Finally, the
> recipient should check this email and any attachments for the presence of
> viruses. The organisation accepts no liability for any damage caused by any
> virus transmitted by this email.
>
> _______________________________________________
> cisco-bba mailing list
> cisco-bba@puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-bba
>
Re: How to reset DSCP/TOS on LNS? [ In reply to ]
Hi Andy,

You could do it by applying a QoS policy via Cisco-AVPair RADIUS attributes, eg:

ip:sub-qos-policy-out=qos-policy-reset0

You would then have a policy on the 7200 something like this:
!
ip access-list extended match-ip-any
 permit ip any any
!
class-map match-any class-ip-any
 match access-group name match-ip-any
!
policy-map qos-policy-reset0
 class class-ip-any
  set ip dscp 0
!

You might be able to achieve the same without all the class-map stuff by just using "class-default" to match and set that to zero, eg:

policy-map qos-policy-reset0

 class class-default

  set ip dscp 0

You would have to test. We have found result vary depending on platform and features and so we use the "longer" way as we know it works more consistently.

Reset the users session and you should be good to go when they next connect.

Results can be seen using the normal "show policy-map" command, eg:

LNS#show policy-map int virtual-access 2053

We are doing this on 7204 running 12.2(33)SRD1 without any problems.

If you want to do some actual queuing/shaping then you should look to use a parent shaper to shape to the DSL link speed with a child policy to implement your actual QoS.


regards,
Tony.


--- On Thu, 2/9/10, Andy Saykao <andy.saykao@staff.netspace.net.au> wrote:




Hi
All,
 
I'm looking for a way to
re-mark customer packets as it enters/hits the LNS.
 
Eg: cust_1 --upload-->> [ LNS ] --download-->>
cust_2
 
- In my example cust_1
and cust_2 are both on the same LNS.
- cust_1 is
uploading a file to cust_2.
- Is there a way to reset
the DSCP/TOS value of packets coming from cust_1?
 
LNS is a Cisco 7301
running 12.2(31)SB14.
 
Thanks.
 
Andy
Re: How to reset DSCP/TOS on LNS? [ In reply to ]
Many thanks to Tony and Arie...and Jason too...

Will definitely give it a shot.

________________________________

From: Tony [mailto:td_miles@yahoo.com]
Sent: Thursday, 2 September 2010 5:29 PM
To: cisco-bba@puck.nether.net; Andy Saykao
Subject: Re: [cisco-bba] How to reset DSCP/TOS on LNS?


Hi Andy,

You could do it by applying a QoS policy via Cisco-AVPair RADIUS
attributes, eg:

ip:sub-qos-policy-out=qos-policy-reset0

You would then have a policy on the 7200 something like this:
!
ip access-list extended match-ip-any
permit ip any any
!
class-map match-any class-ip-any
match access-group name match-ip-any
!
policy-map qos-policy-reset0
class class-ip-any
set ip dscp 0
!

You might be able to achieve the same without all the class-map stuff by
just using "class-default" to match and set that to zero, eg:

policy-map qos-policy-reset0
class class-default
set ip dscp 0

You would have to test. We have found result vary depending on platform
and features and so we use the "longer" way as we know it works more
consistently.

Reset the users session and you should be good to go when they next
connect.

Results can be seen using the normal "show policy-map" command, eg:

LNS#show policy-map int virtual-access 2053

We are doing this on 7204 running 12.2(33)SRD1 without any problems.

If you want to do some actual queuing/shaping then you should look to
use a parent shaper to shape to the DSL link speed with a child policy
to implement your actual QoS.


regards,
Tony.


--- On Thu, 2/9/10, Andy Saykao <andy.saykao@staff.netspace.net.au>
wrote:



Hi All,

I'm looking for a way to re-mark customer packets as it
enters/hits the LNS.

Eg: cust_1 --upload-->> [ LNS ] --download-->> cust_2

- In my example cust_1 and cust_2 are both on the same LNS.
- cust_1 is uploading a file to cust_2.
- Is there a way to reset the DSCP/TOS value of packets coming
from cust_1?

LNS is a Cisco 7301 running 12.2(31)SB14.

Thanks.

Andy




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Please notify the sender immediately by email if you have received this
email by mistake and delete this email from your system. Please note that
any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the organisation.
Finally, the recipient should check this email and any attachments for
the presence of viruses. The organisation accepts no liability for any
damage caused by any virus transmitted by this email.
Re: How to reset DSCP/TOS on LNS? [ In reply to ]
You're welcome.

Slight correction, you would need to use the correct AVPair to apply the policy INBOUND. The one I gave below was for outbound policy. The one to use for inbound is:

cisco-avpair = "ip:sub-qos-policy-in=in-policy-name"

Here is some reading if you wish:
http://www.cisco.com/en/US/docs/ios/12_4t/12_4t2/htipmaaa.html

I'd suggest you try the solution from Arie first. It appears much simpler/easier and so is less likely to cause pain for you if you're not worried about doing it for all users.



regards,
Tony.


--- On Thu, 2/9/10, Andy Saykao <andy.saykao@staff.netspace.net.au> wrote:

From: Andy Saykao <andy.saykao@staff.netspace.net.au>
Subject: RE: [cisco-bba] How to reset DSCP/TOS on LNS?
To: "Tony" <td_miles@yahoo.com>, cisco-bba@puck.nether.net, "Arie Vayner" <ariev@vayner.net>
Received: Thursday, 2 September, 2010, 6:41 PM




Many thanks to Tony and Arie...and Jason
too...
 
Will definitely give it a shot.



From: Tony [mailto:td_miles@yahoo.com]

Sent: Thursday, 2 September 2010 5:29 PM
To:
cisco-bba@puck.nether.net; Andy Saykao
Subject: Re: [cisco-bba] How to
reset DSCP/TOS on LNS?






Hi Andy,

You could do it by applying a QoS policy
via Cisco-AVPair RADIUS attributes,
eg:

ip:sub-qos-policy-out=qos-policy-reset0

You would then
have a policy on the 7200 something like this:
!
ip access-list
extended match-ip-any
 permit ip any any
!
class-map
match-any class-ip-any
 match access-group name
match-ip-any
!
policy-map qos-policy-reset0
 class
class-ip-any
  set ip dscp 0
!

You might be able to
achieve the same without all the class-map stuff by just using
"class-default" to match and set that to zero, eg:

policy-map
qos-policy-reset0
 class class-default
  set ip dscp
0

You would have to test. We have found result vary depending on
platform and features and so we use the "longer" way as we know it works
more consistently.

Reset the users session and you should be good
to go when they next connect.

Results can be seen using the normal
"show policy-map" command, eg:

LNS#show policy-map int
virtual-access 2053

We are doing this on 7204 running 12.2(33)SRD1
without any problems.

If you want to do some actual queuing/shaping
then you should look to use a parent shaper to shape to the DSL link speed
with a child policy to implement your actual
QoS.


regards,
Tony.


--- On Thu, 2/9/10, Andy
Saykao <andy.saykao@staff.netspace.net.au> wrote:




Hi
All,
 
I'm
looking for a way to re-mark customer packets as it enters/hits the LNS.

 
Eg: cust_1
--upload-->> [ LNS ] --download-->>
cust_2
 
- In
my example cust_1 and cust_2 are both on the same
LNS.
- cust_1 is uploading a file to
cust_2.
- Is
there a way to reset the DSCP/TOS value of packets coming from
cust_1?
 
LNS
is a Cisco 7301 running 12.2(31)SB14.
 
Thanks.
 
Andy

 
Re: How to reset DSCP/TOS on LNS? [ In reply to ]
Sorry to re-open this again but is there a way to reset the entire TOS
byte. Our Billing System uses the TOS value (bits 3-6) of the TOS byte
for billing purposes to classify different traffic types (yes I know TOS
value is outdated and we should move to DSCP but that's another story).
If we reset the DSCP value (bits 0-5) or IP Precedence field, this
doesn't really solve our problem of resetting the TOS value to zero.

Take for example where a customer sets TOS Byte to 3.

TOS Byte = 0000 0011

The policy-map applied on the virtual-template will reset the DSCP
fields to 0.

policy-map QOS-POLICY-RESET-0
class CLASS-IP-ANY
set ip dscp 0

The TOS value will now be xxx0 001x because the policy-map only resets
bits 0-5 (a 1 remains in bit 6). We are left with a TOS value of 1.

We can probably get the Billing System to ignore any TOS value of 1 it
sees but I was just wondering if there was a way to reset the entire TOS
byte or TOS value to zero on the LNS???

Thanks.

Andy


This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Please notify the sender immediately by email if you have received this
email by mistake and delete this email from your system. Please note that
any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the organisation.
Finally, the recipient should check this email and any attachments for
the presence of viruses. The organisation accepts no liability for any
damage caused by any virus transmitted by this email.


_______________________________________________
cisco-bba mailing list
cisco-bba@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-bba
Re: How to reset DSCP/TOS on LNS? [ In reply to ]
Hi Andy,

From my reading of it that is correct. Bits 0-5 are used for TOS and bits 6-7 are used for Explicit Congestion Notification (ECN) or are UNUSED.

Some reading material:
http://en.wikipedia.org/wiki/IP_precedence
http://tools.ietf.org/html/rfc2474
http://tools.ietf.org/html/rfc3168

The router is correctly setting the TOS bits to all zero as the TOS bits are only the first 6 and don't include the last two in this 8-bit header field. If your billing system is looking at all 8 bits as a TOS value then it could be suggested that it might not be an entirely correct implementation (or very old ?).

I've spent a few minutes googling and I can't find any way to explicitly changes the two ECN bits in IOS QoS. Doesn't mean it's not possible, just that nothing jumped out at me.


regards,
Tony.

--- On Mon, 6/9/10, Andy Saykao <andy.saykao@staff.netspace.net.au> wrote:

> Sorry to re-open this again but is
> there a way to reset the entire TOS
> byte. Our Billing System uses the TOS value (bits 3-6) of
> the TOS byte
> for billing purposes to classify different traffic types
> (yes I know TOS
> value is outdated and we should move to DSCP but that's
> another story).
> If we reset the DSCP value (bits 0-5) or IP Precedence
> field, this
> doesn't really solve our problem of resetting the TOS value
> to zero.
>
> Take for example where a customer sets TOS Byte to 3.
>
> TOS Byte = 0000 0011
>
> The policy-map applied on the virtual-template will reset
> the DSCP
> fields to 0.
>
> policy-map QOS-POLICY-RESET-0
> class CLASS-IP-ANY
>   set ip dscp 0
>
> The TOS value will now be xxx0 001x because the policy-map
> only resets
> bits 0-5 (a 1 remains in bit 6). We are left with a TOS
> value of 1.
>
> We can probably get the Billing System to ignore any TOS
> value of 1 it
> sees but I was just wondering if there was a way to reset
> the entire TOS
> byte or TOS value to zero on the LNS???
>
> Thanks.
>
> Andy
>
>





_______________________________________________
cisco-bba mailing list
cisco-bba@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-bba
Re: How to reset DSCP/TOS on LNS? [ In reply to ]
Hi Tony,

Took me ages to work it out, but the TOS I'm talking about or what we used in our Billing System is defined in RFC 1349 as being bits 3-6. It's a fairly old implementation and has been deprecated and replaced by RFC 2747

http://www.ietf.org/rfc/rfc1349.txt


0 1 2 3 4 5 6 7
+-----+-----+-----+-----+-----+-----+-----+-----+
| | | |
| PRECEDENCE | TOS | MBZ |
| | | |
+-----+-----+-----+-----+-----+-----+-----+-----+

Thanks for looking into it.

Cheers.

Andy


-----Original Message-----
From: Tony [mailto:td_miles@yahoo.com]
Sent: Monday, 6 September 2010 3:27 PM
To: cisco-bba@puck.nether.net; Andy Saykao
Subject: Re: [cisco-bba] How to reset DSCP/TOS on LNS?

Hi Andy,

From my reading of it that is correct. Bits 0-5 are used for TOS and bits 6-7 are used for Explicit Congestion Notification (ECN) or are UNUSED.

Some reading material:
http://en.wikipedia.org/wiki/IP_precedence
http://tools.ietf.org/html/rfc2474
http://tools.ietf.org/html/rfc3168

The router is correctly setting the TOS bits to all zero as the TOS bits are only the first 6 and don't include the last two in this 8-bit header field. If your billing system is looking at all 8 bits as a TOS value then it could be suggested that it might not be an entirely correct implementation (or very old ?).

I've spent a few minutes googling and I can't find any way to explicitly changes the two ECN bits in IOS QoS. Doesn't mean it's not possible, just that nothing jumped out at me.


regards,
Tony.

--- On Mon, 6/9/10, Andy Saykao <andy.saykao@staff.netspace.net.au> wrote:

> Sorry to re-open this again but is
> there a way to reset the entire TOS
> byte. Our Billing System uses the TOS value (bits 3-6) of the TOS byte
> for billing purposes to classify different traffic types (yes I know
> TOS value is outdated and we should move to DSCP but that's another
> story).
> If we reset the DSCP value (bits 0-5) or IP Precedence field, this
> doesn't really solve our problem of resetting the TOS value to zero.
>
> Take for example where a customer sets TOS Byte to 3.
>
> TOS Byte = 0000 0011
>
> The policy-map applied on the virtual-template will reset the DSCP
> fields to 0.
>
> policy-map QOS-POLICY-RESET-0
> class CLASS-IP-ANY
>   set ip dscp 0
>
> The TOS value will now be xxx0 001x because the policy-map only resets
> bits 0-5 (a 1 remains in bit 6). We are left with a TOS value of 1.
>
> We can probably get the Billing System to ignore any TOS value of 1 it
> sees but I was just wondering if there was a way to reset the entire
> TOS byte or TOS value to zero on the LNS???
>
> Thanks.
>
> Andy
>
>





______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Please notify the sender immediately by email if you have received this
email by mistake and delete this email from your system. Please note that
any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the organisation.
Finally, the recipient should check this email and any attachments for
the presence of viruses. The organisation accepts no liability for any
damage caused by any virus transmitted by this email.


_______________________________________________
cisco-bba mailing list
cisco-bba@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-bba