Printer FriendlyEmail Article Link

Spirent TestCenter: How is the StreamBlock Frame Editor Modifier Mask used in TestCenter?

Answer

Mask indicates which bits are allowed to be modified.  It’s useful for setting the upper limit on the increment.

If you enter FF, all bits can be modified but it depends on your starting and step values.
 
From the Spirent TestCenter Application GUI Help: 

Address Masks

Spirent TestCenter can automatically generate a large number of addresses quickly based on a few configuration parameters. These include:

  • Start, the first address in the list
  • Step, the amount added to each address to make the next address
  • Mask, a value that tells Spirent TestCenter where in the address to add the step value
  • Count or End, a count value indicates the number of addresses to create; an end value indicates the last address to create

Masks

A mask is a binary value that uses a one to indicate that values in that position can be incremented and a zero indicate that values in that position must be ignored. Masks are often expressed in decimal or hexadecimal, but regardless of how they are expressed, they work at the binary level.

Mask Binary equivalent
255.255.255.0 11111111.11111111.11111111.00000000
255.255.128.0 11111111.11111111.10000000.00000000
00:00:FF:FF:FF:FF 00000000:00000000:11111111:11111111:11111111:11111111
00:00:FF:FF:00:FF 00000000:00000000:11111111:11111111:00000000:11111111
255.255.127.0 11111111.11111111.01111111.00000000

The first two examples are contiguous bitwise masks because the ones are all contiguous. At no point in the mask is a zero interposed between ones.

The last two examples are noncontiguous bitwise masks. One or more zeroes appear between sets of ones.

Note: Noncontiguous bitwise masks are not supported in all contexts or with all interfaces, as indicated by an error message when a noncontiguous bitwise mask is used in an unsupported context.

Example: IPv4 Address

Start 192.85.1.2
Step 0.0.128.0
Mask 255.255.255.0
Count 10
Generated addresses 192.85.1.2

192.85.129.2

192.86.1.2

192.86.129.2

192.87.1.2

192.87.129.2

192.88.1.2

192.88.129.2

192.89.1.2

192.89.129.2

On the first increment, the value of 128 is added to the 1 in the second octet, resulting in the value of 129. On the second increment, the sum produces a 1 in the second octet and carries over to the third octet, incrementing the 85 to an 86. The result is five addresses with a 1 in the second octet, and five with a 129 in the second octet.

Example: MAC Address

Start 00:10:94:00:00:01
Step 00:00:00:00:00:80
Mask 00:00:FF:FF:FF:FF
Count 1000
Generated addresses

00:10:94:00:00:01

00:10:94:00:00:81

00:10:94:00:01:01

00:10:94:00:01:81

00:10:94:00:02:01

00:10:94:00:02:81

:

:

00:10:94:01:f3:01

00:10:94:01:f3:81

In this example, Spirent TestCenter generates 512 addresses in the 00:10:94:00:xx:xx range and 488 in the 00:10:94:01:xx:xx range.

Example: MAC Address with a noncontiguous bit mask

Start 00:10:94:00:00:01
Step 00:00:00:00:00:80
Mask 00:00:FF:FF:00:FF
Count 1000
Generated addresses

00:10:94:00:00:01

00:10:94:00:00:81

00:10:94:00:00:01

00:10:94:00:00:81

:

:

00:10:94:01:00:01

00:10:94:01:00:81

00:10:94:01:00:01

00:10:94:01:00:81

This example uses a noncontiguous bitwise mask. Four addresses are generated.

Address Number of occurrences
00:10:94:00:00:01 256
00:10:94:00:00:81 256
00:10:94:01:00:01 244
00:10:94:01:00:81 244
 
To obtain more familiarity with the mask, I recommend you just test and make minor adjustments to the mask.

Product : Spirent TestCenter,PGA