Skip to content
Ask AI

Traffic Behavior

Table 1 Traffic Behavior View

CommandPurpose
**show traffic behavior ** [traffic_behavior_name]Display the configured CAR policy.

[Command] **show traffic behavior ** [traffic_behavior_name]

[Purpose] Display the configured CAR(Committed Access Rate) policy.

[Parameters]

ParameterDescription
traffic_behavior_nameTraffic behavior name.

[View] Privileged User View

[Use Cases]

sonic# show traffic behavior
Name Type Mode CIR CBS
------ ------ ------ ------ -----
test BYTES SR_TCM 100000 64000

Table 2 Traffic Behavior Config

CommandPurpose
traffic behavior traffic_behavior_name (Global Configuration View)Create a traffic behavior and enter Traffic Behavior View.
car {sr-tcm|tr-tcm} [meter-type bytes] cir cir [cbs cbs] [pir pir] [pbs pbs]Add a byte-mode CAR policy.
car {sr-tcm|tr-tcm} meter-typepackets cir cir [cbs cbs] [pir pir] [pbs pbs]Add a packet-mode CAR policy.
traffic-behavior traffic_behavior_name (Physical Interface Configuration View)Apply the CAR policy to an interface.

[Command] traffic behavior traffic_behavior_name

[Purpose] Create a traffic behavior and enter Traffic Behavior View.

[Parameters]

ParameterDescription
traffic_behavior_nameTraffic behavior name.

[View] Global Configuration View

[Notes] Run command no traffic behavior traffic_behavior_name to delete the traffic behavior.

[Use Cases]

sonic# configure terminal
sonic(config)# traffic behavior test
sonic(config-traffic-behavior-test)#

car {sr-tcm|tr-tcm} [meter-type bytes] cir

Section titled “car {sr-tcm|tr-tcm} [meter-type bytes] cir”

[Command] car {sr-tcm|tr-tcm} [meter-type bytes] cir cir [cbs cbs] [pir pir] [pbs pbs]

[Purpose] Add a byte-mode CAR policy.

[Parameters]

ParameterDescription
sr-tcmSingle Rate Three Color Marker mode
tr-tcmTwo Rate Three Color Marker mode
cirSpecify CIR(Committed Information Rate) in bps. The range is 62500~2400000000000.
cbsSpecify CBS(Committed Burst Size) in bytes. The range is 1000~1500000000.
pirSpecify PIR(Peak Information Rate) in bps(only for tr-tcm). The range is 62500~2400000000000.
pbsSpecify PBS(Peak Burst Size) in bytes(only for tr-tcm). The range is 1000~1500000000.

[View] traffic behavior Configuration View

[Notes] If not specified the mode, the default is byte-mode. Run command no car to delete the CAR policy.

[Use Cases]

sonic# configure terminal
sonic(config)# traffic behavior test
sonic(config-traffic-behavior-test)# car sr-tcm meter-type PACKETS cir 1000000

car {sr-tcm|tr-tcm} meter-type packets cir

Section titled “car {sr-tcm|tr-tcm} meter-type packets cir”

[Command] car {sr-tcm|tr-tcm} meter-type packets cir cir [cbs cbs] [pir pir] [pbs pbs]

[Purpose] Add a packet-mode CAR policy.

[Parameters]

ParameterDescription
sr-tcmSingle Rate Three Color Marker mode
tr-tcmTwo Rate Three Color Marker mode
cirSpecify CIR(Committed Information Rate) in pps. The range is 78 ~ 3000000000.
cbsSpecify CBS(Committed Burst Size) in packets. The range is 10 ~ 15000000.
pirSpecify PIR(Peak Information Rate) in pps(only for tr-tcm). The range is 78 ~ 3000000000.
pbsSpecify PBS(Peak Burst Size) in packets(only for tr-tcm). The range is 10 ~ 15000000.

[View] traffic behavior Configuration View

[Notes] Run command no car to delete the CAR policy.

[Use Cases]

sonic# configure terminal
sonic(config)# traffic behavior test
sonic(config-traffic-behavior-test)# car sr-tcm meter-type PACKETS cir 1000000

[Command] traffic-behavior traffic_behavior_name

[Purpose] Apply the CAR policy to an interface.

[Parameters]

ParameterDescription
traffic_behavior_nameTraffic behavior name.

[View] Physical Interface Configuration View

[Notes] Run command no traffic-behavior to unbind the CAR policy to an interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/124
sonic(config-if-0/124)# traffic-behavior TEST
sonic(config-if-0/124)# show this
!
interface ethernet 0/124
traffic-behavior TEST