TX
Transmit one or more packets
- TX
Added to the shell at runtime rather than built in.
Build packets in the shell and send them from the CPU out of switch ports. The first argument, the number of packets to send, is required. If it is missing or not a number, the command prints its help. The packet is described with
Key=<value>options. Option names abbreviate the usual way: the upper-case letters of a key are the ones you must type, sopbmmeansPortBitMapanddmmeansDestMac.txsends in the foreground; press Ctrl-C to stop it. While a backgroundTXSTArttransmission is running,txrefuses with<cmd>: Error: already active.txputs real frames on the wire, from the same CPU path that SONiC uses for its own control traffic. It does not change any switch tables. CheckPortBitMap,DestMacandVLantagbefore sending on a production network.LinkDownTXalso sends on ports whose link is down.The options (the built-in help is incomplete; this is what the shell accepts):
Option
Meaning
PortBitMap=<pbmp>,UntagBitMap=<pbmp>Ports to send to, and which of them send untagged (Ports and port bitmaps).
DATA=<hex>,Filename=<file>Packet bytes inline, or from a hex file. The built-in help shows
File=; the shell’s key isFilename, andFileworks as an abbreviation of it.Length,VLantag,VlanPrio,PrioInt,Pattern,PatternInc,PatternRandom,PerPortSrcMac,SourceMac,SourceMacInc,DestMac,DestMacInc,PurGe,McQType,TXUnitAs described in the built-in help.
Untagged=<bool>,HGSrcMod=<n>Only accepted when
HeaderModeisIeee(the default).VisibilityOptions,VisibilitySourcePortPacket-trace (visibility) options.
TxProcMh…(13 keys)CPU TX-processing header fields. These keys may not be accepted on every chip.
COSqueue=<n>,CRC=None|Recompute|Append,LinkDownTX=<n>,Spid=<n>,SpidOverride=<n>Accepted, but not listed in the built-in help.
RQEnum=<n>The built-in help shows
RQE num=<val>; the shell actually acceptsRQEnum=<val>.HGDestMod,HGDestPort,HGOpcode,HGSrcMod,HGSrcPort,PFM,EthernetPacket; HiGig2TrafficClass,McastGroupID,LoadBalID,DropPrecedence; HiGig3ClassID…LagFailoverOnly in header modes
Higig,Higig2andHigig3.EthernetPacketis not in the built-in help.SourcePortID,DestPortID,Start,LengthOnly in header mode
B5632. Not in the built-in help.Word0…Word4Only in header mode
Raw: the header words. Not in the built-in help.RplType,RplOffset,LmCtrIdxAccepted, but marked “Triumph3 only” in the help.
Unvalidated — Send ten 100-byte frames out of ce0 in VLAN 100
drivshell> tx 10 PortBitMap=ce0 VLantag=100 Length=100 DestMac=00:11:22:33:44:55 SourceMac=00:00:00:00:00:01Usage seen on other chips:
tx 10 pbm=ge0 length=100 sm=… dm=…andtx 10 pbm=ge0 file=pkt.hex(bcm cmd).Built-in help
Parameters: <Count> [options] Transmit the specified number of packets, if the contents of the packets is important, they may be specified using options. Supported options are: Untagged[yes/no] - Specify packet should be sent untagged(XGS3) TXUnit=<val> - Transmit unit number PortBitMap=<pbmp> - Specify port bitmap packet is sent to. UntagBitMap=<pbmp> - Specify untag bitmap used for DMA. File=<filename> - Load hex packet data from file and ignore various other pattern parameters below. DATA=<packet> - Parse string given by user as packet payload Length=<value> - Specify the total length of the packet, including header, possible tag, and CRC. VLantag=<value> - Specify the VLAN tag used, only the low order 16-bits are used (VLANID=0 for none) VlanPrio - VLAN Priority. PrioInt - Internal Priority. Pattern=<value> - Specify 32-bit data pattern used. PatternInc=<value> - Value by which each word of the data pattern is incremented PatternRandom[yes/no] - Use Random data pattern PerPortSrcMac=[0|1] - Associate specific (different) src macs with each source port. SourceMac=<value> - Source MAC address in packet SourceMacInc=<val> - Source MAC increment DestMac=<value> - Destination MAC address in packet. DestMacInc=<value> - Destination MAC increment. PurGe[yes/no] - Send packet with purge Indication(XGS3) McQType=[yes/no] - Send packet to MC queue(XGS3) VisibilitySourcePort=<port> - Source port for visibility trace Select 'any' to disable VisibilityOptions=<value> - Visibility options - 0x1 BCM_PKT_TRACE_LEARN - 0x2 BCM_PKT_TRACE_NO_IFP - 0x4 BCM_PKT_TRACE_FORWARD TxProcMhDestinationType=<opcode> - Case/Destination type - Choose from VLAN_FLOOD, L2MC, IPMC, DGPP ECMP, ECMP_MEMBER and NHI TxProcMhSourcePort=<port> - Packet Processing port used to gauge loopback port to send the packet to TxProcMhDestination=<value> - Destination Index/Value TxProcMhDestinationPort=<port> - Destination port TxProcMhEcmpGroup=<value> - ECMP group index value TxProcMhEcmpMember=<value> - ECMP member index value TxProcMhRoutedPkt[Yes/No] - L3 Routed packet TxProcMhMcastLbIndexValid[Yes/No] - Load balancing for Non Unicast Packets TxProcMhMcastLbIndex=<value> - Select entry in NONUCAST_TRUNK_BLOCK_MASK table Used to control load balancing for non unicast packets TxProcMhQosFieldsValid[Yes/No] - Select QoS Processing TxProcMhDropPrecedence<color> - Drop Precendence, choose packet color (green/red/yellow) TxProcMhInternalPriority=<value> - Internal Priority TxProcMhInternalCongestion=<value> - Internal Congestion Header Format-specific options (see HeaderMode command): - HiGig: HGOpcode=<val> - HiGig header opcode HGSrcMod=<val> - Source Module ID HGSrcPort=<val> - Source Port (numeric value only) HGDestMod=<val> - Destination Module ID HGDestPort=<val> - Destination Port (numeric value only) PFM=<val> - Port Filtering Mode (0, 1, 2) - HiGig2 only: TrafficClass=<val> - Traffic Class (0-15) McastGroupID=<val> - Multicast Group ID LoadBalID=<value> - Load Balancing ID DropPrecedence=<c> - Drop Precendence (green/red/yellow) - HiGig3 only: ClassID=<val> - Class ID L3Routed=<val> - L3 Routed Mirror=<val> - Mirror packet MultiPoint=<val> - MultiPoint DestVP=<val> - Destination VP SrcVP=<val> - Source VP DonotLearn=<val> - Do Not Learn LagFailover=<val> - Lag Failover - SOBH options: TRIUMPH3 only RplType=<val> - OAM replacement type RplOffset=<val> - OAM replacement offset LmCtrIdx=<val> - LM counter Index RQE num=<val>Built-in help
Parameters: <Count> [options] Transmit the specified number of packets, if the contents of the packets is important, they may be specified using options. Supported options are: Untagged[yes/no] - Specify packet should be sent untagged. PortBitMap=<pbmp> - Specify port bitmap packet is sent to. File=<filename> - Load hex packet data from file and ignore various other pattern parameters below. DATA=<packet> - Parse string given by user as packet payload Length=<value> - Specify the total length of the packet, including header, possible tag, and CRC. VLantag=<value> - Specify the VLAN tag used, only the low order 16-bits are used (VLANID=0 for none) VlanPrio - VLAN Priority. PrioInt - Internal Priority. Pattern=<value> - Specify 32-bit data pattern used. PatternInc=<value> - Value by which each word of the data pattern is incremented PatternRandom[yes/no] - Use Random data pattern PerPortSrcMac=[0|1] - Associate specific (different) src macs with each source port. SourceMac=<value> - Source MAC address in packet SourceMacInc=<val> - Source MAC increment DestMac=<value> - Destination MAC address in packet. DestMacInc=<value> - Destination MAC increment. McQType=[yes/no] - Send packet to MC queue.Further reading
SDK-6.5.20 HSDK Getting Started Guide (GS-SDK6520-R), plus SDK-6.5.20/21/22 Release Notes (RN-SDK65xx-R), SDK-6.5.20..6.5.27 Resolved-Issues-Improvements.xlsx (7 files), BCM-SDK命令的使用.pdf, bcm cmd.