# CAR 101

## Committed Access Rate

CAR can be enabled per interface to limit the incoming and outgoing traffic. CAR can perform classification, marking and policing.

### Configuring CAR

```
R(config-if)# rate-limit {input|output} [FILTER] CIR BC BE conform-action ACTION exceed-action ACTION
! available ACTIONs:
  continue                          scan other rate limits
  drop                              drop packet
  set-dscp-continue                 set dscp, scan other rate limits
  set-dscp-transmit                 set dscp and send it
  set-mpls-exp-imposition-continue  set exp during imposition, scan other rate
                                    limits
  set-mpls-exp-imposition-transmit  set exp during imposition and send it
  set-prec-continue                 rewrite packet precedence, scan other rate
                                    limits
  set-prec-transmit                 rewrite packet precedence and send it
  set-qos-continue                  set qos-group, scan other rate limits
  set-qos-transmit                  set qos-group and send it
  transmit                          transmit packet
```

### Filtering

If no FILTER is used, the rate-limiting parameters are applied to all incoming or outgoing traffic. You can use FILTERS to apply different rate-limiting parameters to different types of traffic, by issuing multiple CAR commands. The FILTERS can match an ACL, a rate-limit ACL, packets marked with a DSCP value or a QoS Group:

```
R(config-if)# rate-limit {input|output} [access-group ACL|access-group rate-limit RL-ACL| dscp DSCP| qos-group QOS-GROUP] ...
```

#### **Rate-limit ACL**

A rate-limit RL-ACL can be defined to match traffic based on IP Precedencem, MAC Address or MPLS EXP bits

```
! IP Precedence - RL-ACL: 0-99
R(config)# access-list rate-limit RL-ACL {IP-PREC|mask PREC-MASK}
! MAC Address - RL-ACL:100-199
R(config)# access-list rate-limit RL-ACL MAC-ADDRESS
! MPLS EXP - RL-ACL:200-299
R(config)# access-list rate-limit RL-ACL {EXP|mask EXP-MASK}
```

The mask is represented as a sum of the powers of two, but is written in Hex. The combination is unique and for each power that is used, that IP-PREC value is matched.

```
Ex: 18 = 0x12 = 00010010 => use IP Precedence: 1 and 4
```

## Verify

To verify CAR you can use:

```
R# sh interface INTERFACE rate-limit 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ccie.nyquist.eu/qos/policing-and-shaping/car-101.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
