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.357 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.357/0.357/0.357/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 41370 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  18.1 MBytes   152 Mbits/sec   64   89.1 KBytes
[  5]   1.00-2.00   sec  23.5 MBytes   197 Mbits/sec   91   8.48 KBytes
[  5]   2.00-3.00   sec  21.4 MBytes   179 Mbits/sec   74   18.4 KBytes
[  5]   3.00-4.00   sec  22.2 MBytes   187 Mbits/sec   85   24.0 KBytes
[  5]   4.00-5.00   sec  28.8 MBytes   242 Mbits/sec  106   15.6 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   114 MBytes   191 Mbits/sec  420             sender
[  5]   0.00-5.00   sec   114 MBytes   191 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 51842 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   846 KBytes  6.93 Mbits/sec   19   29.7 KBytes
[  5]   1.00-2.00   sec   191 KBytes  1.56 Mbits/sec   12   5.66 KBytes
[  5]   2.00-3.00   sec   382 KBytes  3.13 Mbits/sec   12   8.48 KBytes
[  5]   3.00-4.00   sec   191 KBytes  1.56 Mbits/sec   18   8.48 KBytes
[  5]   4.00-5.00   sec   382 KBytes  3.13 Mbits/sec   11   8.48 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.94 MBytes  3.26 Mbits/sec   72             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::telOSDxMonDBInterfacesEthernetTrafficControlOutPackets."eth0" = INTEGER: 25001
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutPps."eth0" = INTEGER: 1314
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutBytes."eth0" = INTEGER: 3216589
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutDrops."eth0" = INTEGER: 25
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutKind."eth0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutBps."eth0" = INTEGER: 224782
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlOutOverlimits."eth0" = INTEGER: 21991
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInPackets."eth0" = INTEGER: 83139
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInPps."eth0" = INTEGER: 4407
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInBytes."eth0" = INTEGER: 124737719
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInDrops."eth0" = INTEGER: 423
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInKind."eth0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetTrafficControlInBps."eth0" = INTEGER: 6572760
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.370 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.370/0.370/0.370/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 43708 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  18.6 MBytes   156 Mbits/sec   65   11.3 KBytes
[  5]   1.00-2.00   sec  18.6 MBytes   156 Mbits/sec   60   18.4 KBytes
[  5]   2.00-3.00   sec  18.7 MBytes   157 Mbits/sec   67   11.3 KBytes
[  5]   3.00-4.00   sec  30.9 MBytes   259 Mbits/sec  106   21.2 KBytes
[  5]   4.00-5.00   sec  33.1 MBytes   277 Mbits/sec  124   25.5 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   120 MBytes   201 Mbits/sec  422             sender
[  5]   0.00-5.00   sec   119 MBytes   200 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 38386 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   658 KBytes  5.39 Mbits/sec   11   19.8 KBytes
[  5]   1.00-2.00   sec   255 KBytes  2.08 Mbits/sec   17   8.48 KBytes
[  5]   2.00-3.00   sec   255 KBytes  2.08 Mbits/sec   19   5.66 KBytes
[  5]   3.00-4.00   sec   255 KBytes  2.08 Mbits/sec   15   8.48 KBytes
[  5]   4.00-5.00   sec   382 KBytes  3.13 Mbits/sec   17   5.66 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.76 MBytes  2.95 Mbits/sec   79             sender
[  5]   0.00-5.00   sec  1.46 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::telOSDxMonDBInterfacesEthernetVifTrafficControlOutPackets."eth0"."100" = INTEGER: 24972
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutPps."eth0"."100" = INTEGER: 1325
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutBytes."eth0"."100" = INTEGER: 3213065
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutDrops."eth0"."100" = INTEGER: 27
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutKind."eth0"."100" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutBps."eth0"."100" = INTEGER: 225203
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlOutOverlimits."eth0"."100" = INTEGER: 21814
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInPackets."eth0"."100" = INTEGER: 87007
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInPps."eth0"."100" = INTEGER: 4757
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInBytes."eth0"."100" = INTEGER: 130728165
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInDrops."eth0"."100" = INTEGER: 426
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInKind."eth0"."100" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesEthernetVifTrafficControlInBps."eth0"."100" = INTEGER: 7117017
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.251 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.251/0.251/0.251/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 47428 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  32.1 MBytes   269 Mbits/sec  106   49.5 KBytes
[  5]   1.00-2.00   sec  18.6 MBytes   156 Mbits/sec   61   11.3 KBytes
[  5]   2.00-3.00   sec  24.8 MBytes   208 Mbits/sec   96   19.8 KBytes
[  5]   3.00-4.00   sec  25.6 MBytes   215 Mbits/sec  101   41.0 KBytes
[  5]   4.00-5.00   sec  19.3 MBytes   162 Mbits/sec   67   11.3 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   120 MBytes   202 Mbits/sec  431             sender
[  5]   0.00-5.00   sec   120 MBytes   201 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 51360 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   701 KBytes  5.74 Mbits/sec   23   17.0 KBytes
[  5]   1.00-2.00   sec   382 KBytes  3.13 Mbits/sec   15   7.07 KBytes
[  5]   2.00-3.00   sec   191 KBytes  1.56 Mbits/sec    6   11.3 KBytes
[  5]   3.00-4.00   sec   382 KBytes  3.13 Mbits/sec   16   2.83 KBytes
[  5]   4.00-5.00   sec   191 KBytes  1.56 Mbits/sec   19   5.66 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.80 MBytes  3.03 Mbits/sec   79             sender
[  5]   0.00-5.00   sec  1.46 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::telOSDxMonDBInterfacesBridgeTrafficControlOutPackets."br0" = INTEGER: 25010
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutPps."br0" = INTEGER: 1310
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutBytes."br0" = INTEGER: 3213777
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutDrops."br0" = INTEGER: 25
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutKind."br0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutBps."br0" = INTEGER: 226518
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlOutOverlimits."br0" = INTEGER: 21606
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInPackets."br0" = INTEGER: 87588
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInPps."br0" = INTEGER: 4398
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInBytes."br0" = INTEGER: 131421572
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInDrops."br0" = INTEGER: 437
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInKind."br0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeTrafficControlInBps."br0" = INTEGER: 6556989
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.298 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.298/0.298/0.298/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 37268 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  21.8 MBytes   183 Mbits/sec   70   8.48 KBytes
[  5]   1.00-2.00   sec  21.7 MBytes   182 Mbits/sec   50   32.5 KBytes
[  5]   2.00-3.00   sec  36.0 MBytes   302 Mbits/sec  126   15.6 KBytes
[  5]   3.00-4.00   sec  19.9 MBytes   167 Mbits/sec   67   72.1 KBytes
[  5]   4.00-5.00   sec  19.9 MBytes   167 Mbits/sec   83   79.2 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   119 MBytes   200 Mbits/sec  396             sender
[  5]   0.00-5.00   sec   118 MBytes   199 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 46004 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   761 KBytes  6.23 Mbits/sec   38   43.8 KBytes
[  5]   1.00-2.00   sec   255 KBytes  2.08 Mbits/sec   20   8.48 KBytes
[  5]   2.00-3.00   sec   382 KBytes  3.13 Mbits/sec   17   9.90 KBytes
[  5]   3.00-4.00   sec   191 KBytes  1.56 Mbits/sec   16   8.48 KBytes
[  5]   4.00-5.00   sec   382 KBytes  3.13 Mbits/sec   15   5.66 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.92 MBytes  3.23 Mbits/sec  106             sender
[  5]   0.00-5.21   sec  1.52 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: 25034
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutPps."br0"."100" = INTEGER: 1316
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutBytes."br0"."100" = INTEGER: 3281278
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutDrops."br0"."100" = INTEGER: 27
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutKind."br0"."100" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutBps."br0"."100" = INTEGER: 225737
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlOutOverlimits."br0"."100" = INTEGER: 21959
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInPackets."br0"."100" = INTEGER: 86535
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInPps."br0"."100" = INTEGER: 4433
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInBytes."br0"."100" = INTEGER: 129852410
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInDrops."br0"."100" = INTEGER: 401
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInKind."br0"."100" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBridgeVifTrafficControlInBps."br0"."100" = INTEGER: 6615671
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.336 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.336/0.336/0.336/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 35544 connected to 192.168.100.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  20.1 MBytes   169 Mbits/sec   75   65.0 KBytes
[  5]   1.00-2.00   sec  18.4 MBytes   154 Mbits/sec   59   15.6 KBytes
[  5]   2.00-3.00   sec  17.9 MBytes   150 Mbits/sec   72   14.1 KBytes
[  5]   3.00-4.00   sec  17.4 MBytes   146 Mbits/sec   72   8.48 KBytes
[  5]   4.00-5.00   sec  18.4 MBytes   154 Mbits/sec   77   7.07 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  92.2 MBytes   155 Mbits/sec  355             sender
[  5]   0.00-5.00   sec  90.9 MBytes   152 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 47850 connected to 192.168.100.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   771 KBytes  6.31 Mbits/sec    7   26.9 KBytes
[  5]   1.00-2.00   sec   191 KBytes  1.56 Mbits/sec   15   8.48 KBytes
[  5]   2.00-3.00   sec   382 KBytes  3.13 Mbits/sec   15   8.48 KBytes
[  5]   3.00-4.00   sec   191 KBytes  1.56 Mbits/sec   19   5.66 KBytes
[  5]   4.00-5.00   sec   382 KBytes  3.13 Mbits/sec   17   7.07 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.87 MBytes  3.14 Mbits/sec   73             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: 24942
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutPps."bond0" = INTEGER: 1306
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutBytes."bond0" = INTEGER: 3214370
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutDrops."bond0" = INTEGER: 26
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutKind."bond0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutBps."bond0" = INTEGER: 225092
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlOutOverlimits."bond0" = INTEGER: 22128
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInPackets."bond0" = INTEGER: 66546
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInPps."bond0" = INTEGER: 3408
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInBytes."bond0" = INTEGER: 99679941
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInDrops."bond0" = INTEGER: 356
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInKind."bond0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesBondingTrafficControlInBps."bond0" = INTEGER: 5068462
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.340 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.340/0.340/0.340/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 34934 connected to 10.0.0.1 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  50.5 MBytes   423 Mbits/sec  188   18.1 KBytes
[  5]   1.00-2.00   sec  28.7 MBytes   241 Mbits/sec   91   19.5 KBytes
[  5]   2.00-3.00   sec  41.2 MBytes   345 Mbits/sec  156   40.3 KBytes
[  5]   3.00-4.00   sec  70.2 MBytes   589 Mbits/sec  135    147 KBytes
[  5]   4.00-5.00   sec  78.6 MBytes   659 Mbits/sec  411   9.73 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   269 MBytes   452 Mbits/sec  981             sender
[  5]   0.00-5.00   sec   267 MBytes   447 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 57738 connected to 10.0.0.2 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   921 KBytes  7.54 Mbits/sec   37   30.6 KBytes
[  5]   1.00-2.00   sec   250 KBytes  2.05 Mbits/sec   30   5.56 KBytes
[  5]   2.00-3.00   sec   250 KBytes  2.05 Mbits/sec   19   6.95 KBytes
[  5]   3.00-4.00   sec   250 KBytes  2.05 Mbits/sec   14   6.95 KBytes
[  5]   4.00-5.00   sec   501 KBytes  4.10 Mbits/sec   18   6.95 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  2.12 MBytes  3.56 Mbits/sec  118             sender
[  5]   0.00-5.21   sec  1.53 MBytes  2.47 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: 31521
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutPps."tun0" = INTEGER: 1434
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutBytes."tun0" = INTEGER: 3270694
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutDrops."tun0" = INTEGER: 29
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutKind."tun0" = STRING: htb
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutBps."tun0" = INTEGER: 222124
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlOutOverlimits."tun0" = INTEGER: 25606
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInPackets."tun0" = INTEGER: 196830
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInPps."tun0" = INTEGER: 9182
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInBytes."tun0" = INTEGER: 289825362
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInDrops."tun0" = INTEGER: 244
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInKind."tun0" = STRING: netem
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInBps."tun0" = INTEGER: 13489851
TELDAT-OSDX-MONDB-INTERFACES-MIB::telOSDxMonDBInterfacesTunnelTrafficControlInOverlimits."tun0" = INTEGER: 0