Printer FriendlyEmail Article Link

How to add Vlan and Vlan priority to the Spirent TestCenter Streamblock using TCL API?

Answer

 #Create a Raw Streamblock. 

  set hStreamBlock [stc::create streamBlock -under $hPortA -insertSig true \
        -frameConfig "" -frameLengthMode FIXED -maxFrameLength 1200 -FixedFrameLength 128 \
        -loadUnit BITS_PER_SECOND -load 10240 -name StreamBlockPortA]
 
# Add EthernetII header to the Streamblock
  set hEthernet [stc::create ethernet:EthernetII -under $hStreamBlock -name sb1_eth -srcMac 00:00:94:00:10:01 \
          -dstMac 00:00:95:00:10:01]
 
 # Add a Vlan container to the Ethernet
  set hVlanContainer [stc::create vlans -under $hEthernet]
 
# Provides Reference
  set hVlan [stc::create Vlan -under $hVlanContainer -pri 000 -cfi 0 -id 500 -name vlan1]
 

Product : Spirent TestCenter,Automation,API