Tc Snmp Monitor

These scenarios show how to configure a traffic control discipline in different interfaces to monitor its statistics using SNMP protocol.

Test Traffic Control OIDs On Ethernet Interface

Description

In this scenario, traffic control disciplines are attached to an Ethernet interface.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 192.168.100.1/24
set interfaces ethernet eth0 traffic control in NETEM
set interfaces ethernet eth0 traffic control out HTB
set service snmp community TEST
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic control HTB type htb bandwidth 2.5
set traffic control HTB type htb class 1 bandwidth percentage 100
set traffic control HTB type htb default-class 1
set traffic control NETEM type network-emulator packet-loss 0.5

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=0.534 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.534/0.534/0.534/0.000 ms

Step 4: Initiate a bandwidth test from DUT1 to DUT0

admin@DUT0$ monitor test performance server port 5001
admin@DUT1$ monitor test performance client 192.168.100.1 duration 5 port 5001 parallel 1
Expect this output in DUT1:
Connecting to host 192.168.100.1, port 5001
[  5] local 192.168.100.2 port 53982 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  39.5 MBytes   331 Mbits/sec  152   15.6 KBytes
[  5]   1.00-2.00   sec  29.5 MBytes   247 Mbits/sec  109   17.0 KBytes
[  5]   2.00-3.00   sec  31.5 MBytes   264 Mbits/sec  122   22.6 KBytes
[  5]   3.00-4.00   sec  42.6 MBytes   357 Mbits/sec  164   21.2 KBytes
[  5]   4.00-5.00   sec  64.7 MBytes   543 Mbits/sec  221   9.90 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   208 MBytes   349 Mbits/sec  768             sender
[  5]   0.00-5.00   sec   207 MBytes   348 Mbits/sec                  receiver

iperf Done.

Step 5: Initiate a bandwidth test from DUT0 to DUT1

admin@DUT1$ monitor test performance server port 5001
admin@DUT0$ monitor test performance client 192.168.100.2 duration 5 port 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.2, port 5001
[  5] local 192.168.100.1 port 48182 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   587 KBytes  4.81 Mbits/sec   14   9.90 KBytes
[  5]   1.00-2.00   sec   255 KBytes  2.08 Mbits/sec   15   5.66 KBytes
[  5]   2.00-3.00   sec   382 KBytes  3.13 Mbits/sec   15   7.07 KBytes
[  5]   3.00-4.00   sec   255 KBytes  2.08 Mbits/sec   16   8.48 KBytes
[  5]   4.00-5.00   sec   255 KBytes  2.08 Mbits/sec   21   5.66 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.69 MBytes  2.84 Mbits/sec   81             sender
[  5]   0.00-5.01   sec  1.46 MBytes  2.45 Mbits/sec                  receiver

iperf Done.

Step 6: Run command service snmp walk local-agent v1 TEST oid "1.3.6.1.4.1.2007.6.3.1" | grep TrafficControl at DUT0 and check if output matches the following regular expressions:

OutKind\.[^=]+ = STRING: htb
OutPackets\.[^=]+ = INTEGER: [1-9]d*
OutBytes\.[^=]+ = INTEGER: [1-9]d*
InKind\.[^=]+ = STRING: netem
InPackets\.[^=]+ = INTEGER: [1-9]d*
InBytes\.[^=]+ = INTEGER: [1-9]d*
OutPps\.[^=]+ = INTEGER: [1-9]d*
OutDrops\.[^=]+ = INTEGER: [1-9]d*
OutOverlimits\.[^=]+ = INTEGER: [1-9]d*
InPps\.[^=]+ = INTEGER: [1-9]d*
InDrops\.[^=]+ = INTEGER: [1-9]d*
InOverlimits\.[^=]+ = INTEGER: 0
Show output
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutPackets."eth0" = INTEGER: 24809
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutPps."eth0" = INTEGER: 1112
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutBytes."eth0" = INTEGER: 3215023
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutDrops."eth0" = INTEGER: 28
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutKind."eth0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutBps."eth0" = INTEGER: 215893
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutOverlimits."eth0" = INTEGER: 15997
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInPackets."eth0" = INTEGER: 150811
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInPps."eth0" = INTEGER: 6828
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInBytes."eth0" = INTEGER: 227325918
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInDrops."eth0" = INTEGER: 771
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInKind."eth0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInBps."eth0" = INTEGER: 10251818
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInOverlimits."eth0" = INTEGER: 0

Test Traffic Control OIDs On Ethernet VIF-S Interface

Description

In this scenario, traffic control disciplines are attached to a VLAN-aware Ethernet interface.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 vif 100 address 192.168.100.1/24
set interfaces ethernet eth0 vif 100 traffic control in NETEM
set interfaces ethernet eth0 vif 100 traffic control out HTB
set service snmp community TEST
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic control HTB type htb bandwidth 2.5
set traffic control HTB type htb class 1 bandwidth percentage 100
set traffic control HTB type htb default-class 1
set traffic control NETEM type network-emulator packet-loss 0.5

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 vif 100 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=0.501 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.501/0.501/0.501/0.000 ms

Step 4: Initiate a bandwidth test from DUT1 to DUT0

admin@DUT0$ monitor test performance server port 5001
admin@DUT1$ monitor test performance client 192.168.100.1 duration 5 port 5001 parallel 1
Expect this output in DUT1:
Connecting to host 192.168.100.1, port 5001
[  5] local 192.168.100.2 port 54570 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  37.6 MBytes   316 Mbits/sec  125   31.1 KBytes
[  5]   1.00-2.00   sec  37.8 MBytes   317 Mbits/sec  119   22.6 KBytes
[  5]   2.00-3.00   sec  67.7 MBytes   568 Mbits/sec  222   38.2 KBytes
[  5]   3.00-4.00   sec  66.3 MBytes   556 Mbits/sec  241   14.1 KBytes
[  5]   4.00-5.00   sec  54.2 MBytes   454 Mbits/sec  192   12.7 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   264 MBytes   442 Mbits/sec  899             sender
[  5]   0.00-5.00   sec   263 MBytes   441 Mbits/sec                  receiver

iperf Done.

Step 5: Initiate a bandwidth test from DUT0 to DUT1

admin@DUT1$ monitor test performance server port 5001
admin@DUT0$ monitor test performance client 192.168.100.2 duration 5 port 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.2, port 5001
[  5] local 192.168.100.1 port 48298 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   659 KBytes  5.40 Mbits/sec   23   14.1 KBytes
[  5]   1.00-2.00   sec   255 KBytes  2.08 Mbits/sec   16   8.48 KBytes
[  5]   2.00-3.00   sec   255 KBytes  2.08 Mbits/sec   17   7.07 KBytes
[  5]   3.00-4.00   sec   255 KBytes  2.08 Mbits/sec   18   5.66 KBytes
[  5]   4.00-5.00   sec   382 KBytes  3.13 Mbits/sec   15   8.48 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.76 MBytes  2.96 Mbits/sec   89             sender
[  5]   0.00-5.00   sec  1.46 MBytes  2.45 Mbits/sec                  receiver

iperf Done.

Step 6: Run command service snmp walk local-agent v1 TEST oid "1.3.6.1.4.1.2007.6.3.1" | grep TrafficControl at DUT0 and check if output matches the following regular expressions:

OutKind\.[^=]+ = STRING: htb
OutPackets\.[^=]+ = INTEGER: [1-9]d*
OutBytes\.[^=]+ = INTEGER: [1-9]d*
InKind\.[^=]+ = STRING: netem
InPackets\.[^=]+ = INTEGER: [1-9]d*
InBytes\.[^=]+ = INTEGER: [1-9]d*
OutPps\.[^=]+ = INTEGER: [1-9]d*
OutDrops\.[^=]+ = INTEGER: [1-9]d*
OutOverlimits\.[^=]+ = INTEGER: [1-9]d*
InPps\.[^=]+ = INTEGER: [1-9]d*
InDrops\.[^=]+ = INTEGER: [1-9]d*
InOverlimits\.[^=]+ = INTEGER: 0
Show output
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutPackets."eth0"."100" = INTEGER: 24740
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutPps."eth0"."100" = INTEGER: 1246
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutBytes."eth0"."100" = INTEGER: 3217891
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutDrops."eth0"."100" = INTEGER: 28
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutKind."eth0"."100" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutBps."eth0"."100" = INTEGER: 226230
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutOverlimits."eth0"."100" = INTEGER: 12525
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInPackets."eth0"."100" = INTEGER: 191016
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInPps."eth0"."100" = INTEGER: 9680
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInBytes."eth0"."100" = INTEGER: 288271564
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInDrops."eth0"."100" = INTEGER: 900
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInKind."eth0"."100" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInBps."eth0"."100" = INTEGER: 14574286
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInOverlimits."eth0"."100" = INTEGER: 0

Test Traffic Control OIDs On Bridge Interface

Description

In this scenario, traffic control disciplines are attached to a Bridge interface.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces bridge br0 address 192.168.100.1/24
set interfaces bridge br0 traffic control in NETEM
set interfaces bridge br0 traffic control out HTB
set interfaces ethernet eth0 bridge-group bridge br0
set service snmp community TEST
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic control HTB type htb bandwidth 2.5
set traffic control HTB type htb class 1 bandwidth percentage 100
set traffic control HTB type htb default-class 1
set traffic control NETEM type network-emulator packet-loss 0.5

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=0.444 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.444/0.444/0.444/0.000 ms

Step 4: Initiate a bandwidth test from DUT1 to DUT0

admin@DUT0$ monitor test performance server port 5001
admin@DUT1$ monitor test performance client 192.168.100.1 duration 5 port 5001 parallel 1
Expect this output in DUT1:
Connecting to host 192.168.100.1, port 5001
[  5] local 192.168.100.2 port 41642 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  33.3 MBytes   279 Mbits/sec  129   26.9 KBytes
[  5]   1.00-2.00   sec  32.6 MBytes   274 Mbits/sec  107   24.0 KBytes
[  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec  128   11.3 KBytes
[  5]   3.00-4.00   sec  33.7 MBytes   283 Mbits/sec  104   9.90 KBytes
[  5]   4.00-5.00   sec  34.7 MBytes   291 Mbits/sec  132   12.7 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   171 MBytes   287 Mbits/sec  600             sender
[  5]   0.00-5.00   sec   170 MBytes   285 Mbits/sec                  receiver

iperf Done.

Step 5: Initiate a bandwidth test from DUT0 to DUT1

admin@DUT1$ monitor test performance server port 5001
admin@DUT0$ monitor test performance client 192.168.100.2 duration 5 port 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.2, port 5001
[  5] local 192.168.100.1 port 49464 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   574 KBytes  4.70 Mbits/sec   21   18.4 KBytes
[  5]   1.00-2.00   sec   389 KBytes  3.19 Mbits/sec   17   7.07 KBytes
[  5]   2.00-3.00   sec   255 KBytes  2.09 Mbits/sec   17   8.48 KBytes
[  5]   3.00-4.00   sec   255 KBytes  2.08 Mbits/sec   15   5.66 KBytes
[  5]   4.00-5.00   sec   255 KBytes  2.08 Mbits/sec   15   7.07 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.69 MBytes  2.83 Mbits/sec   85             sender
[  5]   0.00-5.00   sec  1.46 MBytes  2.45 Mbits/sec                  receiver

iperf Done.

Step 6: Run command service snmp walk local-agent v1 TEST oid "1.3.6.1.4.1.2007.6.3.1" | grep TrafficControl at DUT0 and check if output matches the following regular expressions:

OutKind\.[^=]+ = STRING: htb
OutPackets\.[^=]+ = INTEGER: [1-9]d*
OutBytes\.[^=]+ = INTEGER: [1-9]d*
InKind\.[^=]+ = STRING: netem
InPackets\.[^=]+ = INTEGER: [1-9]d*
InBytes\.[^=]+ = INTEGER: [1-9]d*
OutPps\.[^=]+ = INTEGER: [1-9]d*
OutDrops\.[^=]+ = INTEGER: [1-9]d*
OutOverlimits\.[^=]+ = INTEGER: [1-9]d*
InPps\.[^=]+ = INTEGER: [1-9]d*
InDrops\.[^=]+ = INTEGER: [1-9]d*
InOverlimits\.[^=]+ = INTEGER: 0
Show output
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutPackets."br0" = INTEGER: 24867
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutPps."br0" = INTEGER: 1250
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutBytes."br0" = INTEGER: 3215310
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutDrops."br0" = INTEGER: 27
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutKind."br0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutBps."br0" = INTEGER: 226693
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutOverlimits."br0" = INTEGER: 19162
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInPackets."br0" = INTEGER: 123717
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInPps."br0" = INTEGER: 6103
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInBytes."br0" = INTEGER: 186332048
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInDrops."br0" = INTEGER: 606
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInKind."br0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInBps."br0" = INTEGER: 9156380
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInOverlimits."br0" = INTEGER: 0

Test Traffic Control OIDs On Bridge VIF-S Interface

Description

In this scenario, traffic control disciplines are attached to a VLAN-aware bridge interface.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces bridge br0 vif 100 address 192.168.100.1/24
set interfaces bridge br0 vif 100 traffic control in NETEM
set interfaces bridge br0 vif 100 traffic control out HTB
set interfaces bridge br0 vlan 100
set interfaces ethernet eth0 bridge-group bridge br0
set interfaces ethernet eth0 bridge-group vlan 100
set service snmp community TEST
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic control HTB type htb bandwidth 2.5
set traffic control HTB type htb class 1 bandwidth percentage 100
set traffic control HTB type htb default-class 1
set traffic control NETEM type network-emulator packet-loss 0.5

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 vif 100 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=0.486 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.486/0.486/0.486/0.000 ms

Step 4: Initiate a bandwidth test from DUT1 to DUT0

admin@DUT0$ monitor test performance server port 5001
admin@DUT1$ monitor test performance client 192.168.100.1 duration 5 port 5001 parallel 1
Expect this output in DUT1:
Connecting to host 192.168.100.1, port 5001
[  5] local 192.168.100.2 port 45214 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  27.6 MBytes   231 Mbits/sec  109   18.4 KBytes
[  5]   1.00-2.00   sec  30.3 MBytes   254 Mbits/sec  134   24.0 KBytes
[  5]   2.00-3.00   sec  40.9 MBytes   343 Mbits/sec  159   25.5 KBytes
[  5]   3.00-4.00   sec  38.9 MBytes   326 Mbits/sec  130   18.4 KBytes
[  5]   4.00-5.00   sec  47.7 MBytes   400 Mbits/sec  175   8.48 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   185 MBytes   311 Mbits/sec  707             sender
[  5]   0.00-5.00   sec   184 MBytes   309 Mbits/sec                  receiver

iperf Done.

Step 5: Initiate a bandwidth test from DUT0 to DUT1

admin@DUT1$ monitor test performance server port 5001
admin@DUT0$ monitor test performance client 192.168.100.2 duration 5 port 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.2, port 5001
[  5] local 192.168.100.1 port 40236 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   833 KBytes  6.82 Mbits/sec   52   29.7 KBytes
[  5]   1.00-2.00   sec   255 KBytes  2.08 Mbits/sec   10   9.90 KBytes
[  5]   2.00-3.00   sec   191 KBytes  1.56 Mbits/sec   18   8.48 KBytes
[  5]   3.00-4.00   sec   382 KBytes  3.13 Mbits/sec   15   4.24 KBytes
[  5]   4.00-5.00   sec   191 KBytes  1.56 Mbits/sec   14   7.07 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.81 MBytes  3.03 Mbits/sec  109             sender
[  5]   0.00-5.00   sec  1.46 MBytes  2.45 Mbits/sec                  receiver

iperf Done.

Step 6: Run command service snmp walk local-agent v1 TEST oid "1.3.6.1.4.1.2007.6.3.1" | grep TrafficControl at DUT0 and check if output matches the following regular expressions:

OutKind\.[^=]+ = STRING: htb
OutPackets\.[^=]+ = INTEGER: [1-9]d*
OutBytes\.[^=]+ = INTEGER: [1-9]d*
InKind\.[^=]+ = STRING: netem
InPackets\.[^=]+ = INTEGER: [1-9]d*
InBytes\.[^=]+ = INTEGER: [1-9]d*
OutPps\.[^=]+ = INTEGER: [1-9]d*
OutDrops\.[^=]+ = INTEGER: [1-9]d*
OutOverlimits\.[^=]+ = INTEGER: [1-9]d*
InPps\.[^=]+ = INTEGER: [1-9]d*
InDrops\.[^=]+ = INTEGER: [1-9]d*
InOverlimits\.[^=]+ = INTEGER: 0
Show output
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutPackets."br0"."100" = INTEGER: 18320
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutPps."br0"."100" = INTEGER: 960
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutBytes."br0"."100" = INTEGER: 2781672
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutDrops."br0"."100" = INTEGER: 25
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutKind."br0"."100" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutBps."br0"."100" = INTEGER: 201381
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutOverlimits."br0"."100" = INTEGER: 492
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInPackets."br0"."100" = INTEGER: 134134
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInPps."br0"."100" = INTEGER: 6924
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInBytes."br0"."100" = INTEGER: 202193462
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInDrops."br0"."100" = INTEGER: 708
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInKind."br0"."100" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInBps."br0"."100" = INTEGER: 10409802
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInOverlimits."br0"."100" = INTEGER: 0

Test Traffic Control OIDs On Bonding Interface

Description

In this scenario, traffic control disciplines are attached to a Bonding interface.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces bonding bond0 address 192.168.100.1/24
set interfaces bonding bond0 miimon 1
set interfaces bonding bond0 traffic control in NETEM
set interfaces bonding bond0 traffic control out HTB
set interfaces ethernet eth0 bond-group bond0
set interfaces ethernet eth1 bond-group bond0
set service snmp community TEST
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic control HTB type htb bandwidth 2.5
set traffic control HTB type htb class 1 bandwidth percentage 100
set traffic control HTB type htb default-class 1
set traffic control NETEM type network-emulator packet-loss 0.5

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=0.489 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.489/0.489/0.489/0.000 ms

Step 4: Initiate a bandwidth test from DUT1 to DUT0

admin@DUT0$ monitor test performance server port 5001
admin@DUT1$ monitor test performance client 192.168.100.1 duration 5 port 5001 parallel 1
Expect this output in DUT1:
Connecting to host 192.168.100.1, port 5001
[  5] local 192.168.100.2 port 37754 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  34.7 MBytes   291 Mbits/sec  117   19.8 KBytes
[  5]   1.00-2.00   sec  37.2 MBytes   312 Mbits/sec  130   18.4 KBytes
[  5]   2.00-3.00   sec  34.2 MBytes   287 Mbits/sec  119   7.07 KBytes
[  5]   3.00-4.00   sec  31.9 MBytes   267 Mbits/sec  117   26.9 KBytes
[  5]   4.00-5.00   sec  30.4 MBytes   255 Mbits/sec  122   14.1 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   168 MBytes   283 Mbits/sec  605             sender
[  5]   0.00-5.00   sec   167 MBytes   281 Mbits/sec                  receiver

iperf Done.

Step 5: Initiate a bandwidth test from DUT0 to DUT1

admin@DUT1$ monitor test performance server port 5001
admin@DUT0$ monitor test performance client 192.168.100.2 duration 5 port 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.2, port 5001
[  5] local 192.168.100.1 port 33686 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   611 KBytes  5.00 Mbits/sec   21   17.0 KBytes
[  5]   1.00-2.00   sec   255 KBytes  2.09 Mbits/sec   18   9.90 KBytes
[  5]   2.00-3.00   sec   382 KBytes  3.13 Mbits/sec   15   7.07 KBytes
[  5]   3.00-4.00   sec   255 KBytes  2.09 Mbits/sec   18   5.66 KBytes
[  5]   4.00-5.00   sec   255 KBytes  2.09 Mbits/sec   13   8.48 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.72 MBytes  2.88 Mbits/sec   85             sender
[  5]   0.00-5.00   sec  1.46 MBytes  2.45 Mbits/sec                  receiver

iperf Done.

Step 6: Run command service snmp walk local-agent v1 TEST oid "1.3.6.1.4.1.2007.6.3.1" | grep TrafficControl at DUT0 and check if output matches the following regular expressions:

OutKind\.[^=]+ = STRING: htb
OutPackets\.[^=]+ = INTEGER: [1-9]d*
OutBytes\.[^=]+ = INTEGER: [1-9]d*
InKind\.[^=]+ = STRING: netem
InPackets\.[^=]+ = INTEGER: [1-9]d*
InBytes\.[^=]+ = INTEGER: [1-9]d*
OutPps\.[^=]+ = INTEGER: [1-9]d*
OutDrops\.[^=]+ = INTEGER: [1-9]d*
OutOverlimits\.[^=]+ = INTEGER: [1-9]d*
InPps\.[^=]+ = INTEGER: [1-9]d*
InDrops\.[^=]+ = INTEGER: [1-9]d*
InOverlimits\.[^=]+ = INTEGER: 0
Show output
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutPackets."bond0" = INTEGER: 24841
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutPps."bond0" = INTEGER: 1256
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutBytes."bond0" = INTEGER: 3211521
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutDrops."bond0" = INTEGER: 23
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutKind."bond0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutBps."bond0" = INTEGER: 227394
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutOverlimits."bond0" = INTEGER: 18136
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInPackets."bond0" = INTEGER: 121844
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInPps."bond0" = INTEGER: 5946
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInBytes."bond0" = INTEGER: 183616189
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInDrops."bond0" = INTEGER: 608
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInKind."bond0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInBps."bond0" = INTEGER: 8928040
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInOverlimits."bond0" = INTEGER: 0

Test Traffic Control OIDs On Tunnel Interface

Description

In this scenario, traffic control disciplines are attached to a Tunnel interface.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 192.168.100.1/24
set interfaces tunnel tun0 address 10.0.0.1/24
set interfaces tunnel tun0 encapsulation gre
set interfaces tunnel tun0 local-address 192.168.100.1
set interfaces tunnel tun0 remote-address 192.168.100.2
set interfaces tunnel tun0 traffic control in NETEM
set interfaces tunnel tun0 traffic control out HTB
set service snmp community TEST
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic control HTB type htb bandwidth 2.5
set traffic control HTB type htb class 1 bandwidth percentage 100
set traffic control HTB type htb default-class 1
set traffic control NETEM type network-emulator packet-loss 0.5

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces tunnel tun0 address 10.0.0.2/24
set interfaces tunnel tun0 encapsulation gre
set interfaces tunnel tun0 local-address 192.168.100.2
set interfaces tunnel tun0 remote-address 192.168.100.1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 10.0.0.1 from DUT1:

admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1
Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.592 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.592/0.592/0.592/0.000 ms

Step 4: Initiate a bandwidth test from DUT1 to DUT0

admin@DUT0$ monitor test performance server port 5001
admin@DUT1$ monitor test performance client 10.0.0.1 duration 5 port 5001 parallel 1
Expect this output in DUT1:
Connecting to host 10.0.0.1, port 5001
[  5] local 10.0.0.2 port 35894 connected to 10.0.0.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  68.5 MBytes   574 Mbits/sec  293    150 KBytes
[  5]   1.00-2.00   sec  88.0 MBytes   739 Mbits/sec  186    216 KBytes
[  5]   2.00-3.00   sec   104 MBytes   874 Mbits/sec  381   72.3 KBytes
[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec  411    129 KBytes
[  5]   4.00-5.00   sec  99.1 MBytes   831 Mbits/sec  598   79.3 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   472 MBytes   792 Mbits/sec  1869             sender
[  5]   0.00-5.00   sec   470 MBytes   789 Mbits/sec                  receiver

iperf Done.

Step 5: Initiate a bandwidth test from DUT0 to DUT1

admin@DUT1$ monitor test performance server port 5001
admin@DUT0$ monitor test performance client 10.0.0.2 duration 5 port 5001 parallel 1
Expect this output in DUT0:
Connecting to host 10.0.0.2, port 5001
[  5] local 10.0.0.1 port 34536 connected to 10.0.0.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   791 KBytes  6.48 Mbits/sec   45   29.2 KBytes
[  5]   1.00-2.00   sec   250 KBytes  2.05 Mbits/sec   21   5.56 KBytes
[  5]   2.00-3.00   sec   375 KBytes  3.08 Mbits/sec   14   8.34 KBytes
[  5]   3.00-4.00   sec   250 KBytes  2.05 Mbits/sec   22   5.56 KBytes
[  5]   4.00-5.00   sec   375 KBytes  3.08 Mbits/sec   16   8.34 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  2.00 MBytes  3.35 Mbits/sec  118             sender
[  5]   0.00-5.00   sec  1.45 MBytes  2.44 Mbits/sec                  receiver

iperf Done.

Step 6: Run command service snmp walk local-agent v1 TEST oid "1.3.6.1.4.1.2007.6.3.1" | grep TrafficControl at DUT0 and check if output matches the following regular expressions:

OutKind\.[^=]+ = STRING: htb
OutPackets\.[^=]+ = INTEGER: [1-9]d*
OutBytes\.[^=]+ = INTEGER: [1-9]d*
InKind\.[^=]+ = STRING: netem
InPackets\.[^=]+ = INTEGER: [1-9]d*
InBytes\.[^=]+ = INTEGER: [1-9]d*
OutPps\.[^=]+ = INTEGER: [1-9]d*
OutDrops\.[^=]+ = INTEGER: [1-9]d*
OutOverlimits\.[^=]+ = INTEGER: [1-9]d*
InPps\.[^=]+ = INTEGER: [1-9]d*
InDrops\.[^=]+ = INTEGER: [1-9]d*
InOverlimits\.[^=]+ = INTEGER: 0
Show output
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutPackets."tun0" = INTEGER: 12626
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutPps."tun0" = INTEGER: 626
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutBytes."tun0" = INTEGER: 2198525
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutDrops."tun0" = INTEGER: 27
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutKind."tun0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutBps."tun0" = INTEGER: 175609
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutOverlimits."tun0" = INTEGER: 357
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInPackets."tun0" = INTEGER: 346737
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInPps."tun0" = INTEGER: 15992
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInBytes."tun0" = INTEGER: 511271492
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInDrops."tun0" = INTEGER: 136
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInKind."tun0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInBps."tun0" = INTEGER: 23556454
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInOverlimits."tun0" = INTEGER: 0