Friday, August 2, 2013

Set QoS CAR on Juniper

Previous posting about set CAR on Cisco, Another example for Juniper.

#### Set CAR rate policies for 1 Mbps or 1024 Kbps

set firewall policer Set-1M if-exceeding bandwidth-limit 1024000
set firewall policer Set-1M if-exceeding burst-size-limit 128k
set firewall policer Set-1M then discard

#### Set CAR rate policies for 4 Mbps or 4096 Kbps

set firewall policer Set-4M if-exceeding bandwidth-limit 4096000
set firewall policer Set-4M if-exceeding burst-size-limit 512k
set firewall policer Set-4M then discard

#### Create filter with rate policies

set firewall filter Car-1M term To-Router-1M then policer Set-1M
set firewall filter Car-1M term To-Router-1M then accept

After set CAR rate policies and filter, apply filter to interface?

#### Apply CAR to interface

set interfaces ge-1/0/0 unit 0 description "To-Router"
set interfaces ge-1/0/0 unit 0 family inet filter input Car-1M
set interfaces ge-1/0/0 unit 0 family inet filter output Car-1M
set interfaces ge-1/0/0 unit 0 family inet address 192.168.100.1/30

#### Verify filter (add count parameter)

[edit]
user@JunOS# set firewall filter Car-1M term To-Router-1M then count Car-1M

user@JunOS> show firewall filter Car-1M counter Car-1M 


Filter: Car-1M                                                 

Counters:
Name                                                Bytes              Packets
Car-1M                                               3952                   58

user@JunOS> show firewall filter Car-1M counter Car-1M    


Filter: Car-1M                                                 

Counters:
Name                                                Bytes              Packets
Car-1M                                               4224                   62

No comments: