TGN User Guide
TGN User Guide
User Manual
Getting Started
The Pagent Traffic GeNerator (TGN) is an IOS-based program in the Pagent test tool set. It defines
and sends packets on any combination of supported interfaces on a router.
TGN has predefined templates for specific packet types. Packet definitions can also be imported
from the PKTS program capture buffer.
TGN also provides IP ARP and AppleTalk ARP responders, in addition to VINES, DECnet, and
CLNS end-node hello generators, so that the routers under test can forward packets.
2 Select the interface you want to send packets on. Make sure the interface is not shut. Use show
interface to see the current status of the interfaces.
<interface_name> Selecting an Interface (page 2-1)
show interface Displaying Interface Status (page 2-49)
3 Create traffic streams using the add or insert-at commands. Each traffic stream can be thought
of as a separate process to create specific types of packets and send the packets in a specific way.
You can add as many traffic streams as the router memory allows. You can create traffic streams
for any number of supported interfaces.
add Adding a Traffic Stream (page 2-10)
insert-at Inserting a Traffic Stream (page 2-27)
You can create traffic streams based on packets in the PKTS program capture buffer. Both add
and insert-at support this.
You can also create traffic streams by cloning existing ones, using the add or insert-at
commands.
4 Use the TGN command prompt to get the current status of the program.
incrementing, or random. The L2 commands update datalink header fields. The L3 commands
update network header fields. The L4 commands update transport header fields.
Decimal and Hex Fields (page 3-1)
MAC Address Fields (page 3-2)
IP Address Fields (page 3-2)
L2-.... Updating the Datalink Header Definition (page 2-1)
L3-.... Updating the Network Header Definition (page 2-4)
L4-.... Updating the Transport Header Definition (page 2-7)
7 You can nest incrementing header fields, which means that one field increments only when the
incrementing field it links to has gone through its entire range. This ensures that all combinations
of the incrementing field values are generated.
Nested Increments (page 3-3)
8 You can set header length fields and IP checksum fields automatically to their correct values.
Automatic Setting of Length and Checksum Fields (page 3-4)
9 You can define in hex the data that comes after the headers.
17 Use the start and stop commands to start and stop traffic generation. The s command toggles
between the two states. The start send command causes traffic streams with defined send
amounts to send the specified number of packets.
start/stop Starting and Stopping Traffic Generation (page 2-59)
send Sending Packets (page 2-38)
18 Some IOS hardware is implemented with a PRIMARY processor and multiple SECONDARY
processors, for example the RSP (PRIMARY processor) with VIPs (SECONDARY processors).
On this hardware, either the PRIMARY processor or the SECONDARY processor (this is the
default) can transmit the packets.
secondary Selecting a SECONDARY Processor for Transmission (page 2-37)
show secondary Displaying Activity Status of SECONDARY Processors (page 2-56)
19 There are many summary commands that give an overview of traffic stream configurations. Use
the show command to review the current traffic stream configuration. The show packet
command displays what a packet looks like, as defined by a traffic stream configuration. The
show pagent-format displays a packet in a format that can be input to the classic Pagent
program.
show Displaying Traffic Stream and Summary Information (page 2-38)
show packet Displaying Packet Sent by Traffic Stream (page 2-52)
show pagent-format Displaying a Packet in Pagent Format (page 2-54)
20 Use the all option to update all traffic steams on an interface or a subset of them.
4 In flow mode, use the show command to display individual flow members or a summary of flow
packets.
show Displaying Traffic Stream and Summary Information (page 2-38)
In TGN mode, use the show flow to display a summary of packet flows.
show flow Displaying Summary of Packet Flows (page 2-47)
Note Packet flows are designed to replace TGN packet sequences, so use TGN packet flows instead
of packet sequences. (Packet sequences will not be developed further and are being maintained for
backward compatibility only.) See Defining and Sending TGN Packet Flows, (page 1-3).
There are a number of advantages to packet flows over sequences. Packet flows offer an unequal
intermember interval (which can be random), and you can specify a delayed start for the flow. You
can configure and view flow members separately as a group, since each flow maintains it own list
of members. Sequence items are part of a traffic stream list.
Packet sequences are special traffic streams comprised of packets that must be transmitted in the
order configured. The following summarizes the steps involved in defining and sending packet
sequences. For more information on a particular procedure, refer to the references provided.
1 Define a regular traffic stream that contains definitions of packets.
3 Define and send regular traffic streams that contain definitions of packets.
The timestamp is a special configurable field type that is updated just before the packet is
transmitted. You can use it in combination with the PKTS program for network latency
measurements.
field Adding and Updating Configurable Fields (page 2-21)
Using TGN and PKTS Timestamps to Measure Latency (page 5-1)
For every show command that displays information on the console, there is an equivalent write
command to write the same information to the IOS file system (IFS) log file.
write Writing Information to an IFS Log File (page 2-61)
open-logfile Opening an IFS Log File (page 2-31)
close-logfile Closing an Open IFS Log File (page 2-17)
The save command saves the current TGN configuration to an IFS file. The load command loads
a saved configuration from the IFS.
replace - Selectively replacing IP Address and TCP/UDP Port Number (page 2-36)
load-config Loading a Configuration from IFS (page 2-29)
Use the add sniffer-file command to create traffic streams by reading in a sniffer file via IFS.
add Adding a Traffic Stream (page 2-10)
Routers need end stations to forward packets to. TGN supports the definition of ARP responders
and hello generators to act like destination stations.
ARP-Responder and Hello-Generator Commands (page 4-1)
ARP Responder and Hello-Generator Traffic Streams (page A-21)
By default, traffic steams send packets continuously. Use the burst commands to send packets
in user-defined bursts.
burst Sending Traffic Stream in Bursts (page 2-16)
Use the delete command to delete one or more traffic streams.
delete Deleting One or Several Traffic Streams (page 2-19)
Use the clear all command to delete all traffic stream configurations on all interfaces.
clear Clearing Configurations or Counters (page 2-16)
Use the expand command to make multiple copies of a traffic stream, with the new copies having
constant fields and lengths.
expand Expanding a Traffic Stream into Multiple Copies (page 2-20)
Use the repeat command to send multiple copies of a packet in a fast burst.
repeat Resending Packets Repeatedly (page 2-35)
Use the variability command to maintain the basic packet rate but introduce variability in the
time intervals between packets.
variability Defining the Variability in Packet Intervals (page 2-60)
Use the ordered-traffic command to toggle between ordered traffic scheduling and the default
style of scheduling each traffic stream independently of one another. This feature is configured
on a per interface basis.
ordered-traffic Setting Ordered-Traffic Scheduling (page 2-32)
Use the verbose command to control the generation of activity messages and the verbose
logging-to command to control where the activity messages will appear.
Note that the hostname is shortened. The command prompt option field (in parenthesis) is used
extensively in TGN to report current status and location in the program. TGN allows 20 characters
for the option field. Since IOS limits the hostname plus option field to 27 characters, TGN limits the
hostname display to seven characters so that 20 characters are available for the option field. If the
option field exceeds 20 characters, only the last 20 are displayed because it contains the most
immediate information. The full hostname is restored when TGN is exited.
The option field shows the following (the information in the parenthesis refers to the example
above):
Program (TGN)
Note When TGN is in a special mode, such as SRE or mixed interface, a suffix is added to TGN.
For example: TGN-SRE.
This example shows that traffic is being generated, that three traffic streams have been created on
the interface, and that traffic stream 2 of 3 is currently selected.
When traffic streams are sending their requested number of packets (start send is active), the
command prompt displays the following:
hostnam(TGN:SEND,Et0/0/0:2/3)#
When broadcast mode is selected, a command can be applied to all traffic streams on all interfaces,
instead of just a single selected traffic stream on a specific interface.
The TGN prompt in broadcast mode is:
hostnam(TGN:OFF,Broadcast)#
If a wait-to-release time is set on a 4500 or 4700, the command prompt indicates whether the wait
period is on after a stop command. For example:
hostnam(TGN:ON,Et0/0/0:2/3)#stop
hostnam(TGN:WAIT,Et0/0/0:2/3)#
hostnam(TGN:WAIT,Et0/0/0:2/3)#
hostnam(TGN:OFF,Et0/0/0:2/3)#
The TGN prompt command changes the format of the command prompt to a static format, with a
full hostname and PAGENT in the option field. This format can be useful for test automation
scripts.
hostname(PAGENT)#
Note that the prompt has changed. Flow mode information is appended to the normal TGN prompt.
As explained above, if the option field exceeds 20 characters, only the last 20 are displayed. It returns
to the normal TGN prompt when you exit flow mode.
In the above example, the information pertaining to flow mode starts with the characters FLOW.
It shows the following (the information in the parenthesis refers to the example above):
Flow mode (FLOW)
How many members have been configured on the interface and which member is currently
selected (NONE)
Once members are added to the flow, the prompt changes to the following:
hostnam(ON,Et0:2/3,FLOW:4/6)#
This example shows: traffic is being generated; three traffic streams have been created on the
interface Et0; traffic stream 2 of 3 is currently selected, and that it is a flow traffic stream; and six
members are in the flow, and member 4 is currently selected.
When the command start send is used, the prompt changes to:
hostnam(ND,Et0:2/3,FLOW:4/6)#
Note On some platforms, the flow prompt might look like this:
hostnam(,Et0:2/3/2,FLOW:2/3)#
This prompt does not display if the traffic generation is on or off (due to the 20 character limitation
mentioned above). In such cases, you can verify the program status with the show program-status
command.
You can use the tgn show program-status command in a TCL script to display the information
available in the TGN command prompt options. See show program-status Displaying Current
Program Status (page 2-54).
There are also show commands that display TGN-generated data in a TCL-friendly format using the
tcl-output option. With TCL-friendly format, it is easy to extract data from the output text because
it follows a unique keyword and is not row- and column-position dependent, which can change with
Pagent releases.
The following display commands support the tcl-output option:
show Displaying a Traffic Stream or Flow Member (page 2-40)
show interface tcl-output Displaying Interface Info in TCL-Friendly Format (page 2-50)
Test automation scripts can use the prompt command to set a static command prompt format so that
scripts can enter commands as if from the NQR program command prompt instead of the IOS exec.
TGN Command Prompt Modes (page 1-7)
prompt Setting Command Prompt Format (page 2-34)
TFTP
When using TFTP for file transfers, note the following:
The TFTP session closes if there is more than 10 seconds of inactivity. This is not a problem
when saving or loading a configuration file, but it makes TFTP awkward for logging. There
cannot be more then 10 seconds between the completion of writing the information of one write
command to completing the entry of the next write command.
You must configure the Pagent router so that there is an IP network path from the router to the
TFTP server. You should be able to ping the TFTP server.
The file name can include directory names, but the directory path must be relative to the /tftpboot
directory on the TFTP server.
On most TFTP servers, the file to be written must exist and have world write permissions. Use
the UNIX touch and chmod commands to create the file and assign access permissions.
You can specify a TFTP server host name instead of an address if your Pagent router has been
configured with the appropriate ip host ... alias command.
RCP
When using RCP for file transfers, note the following:
The TFTP session closes if there is more than 15 seconds of inactivity. This is not a problem
when saving or loading a configuration file, but it makes TFTP awkward for logging. There
cannot be more then 15 seconds between the completion of writing the information of one write
command to completing the entry of the next write command.
When RCP opens a file, it needs to know the file length. When TGN saves a configuration, the
program can determine the length of the configuration file but the program does not know what
the length of a log file will be. For this reason, when a RCP log file is opened, it prompts the user
for the file length. This prompt occurs even when a complete URL is entered, which makes RCP
logging unusable for scripts.
If the user writes out more information than the specified file length, the file will close when the
file size is reached and additional output data will be dropped. If the file is closed before the file
size is reached, the TGN program writes out spaces to complete the file to the specified length.
In the Cisco testing environment, RCP files are written relative to the users home directory.
The user must enter a user id in the URL. You can use the router configuration command:
ip rcmd remote-username myuserid
If this is not entered, the default will be the router hostname when using IFS prompts. If this
command is configured, the prompt default will be myuserid.
You must add the Pagent routers hostname to the .rhosts file in the myuserid home directory. The
router hostname must be preceded with a + and space. When TGNs command prompt is
active, it shortens hostnames to seven characters, so if the router hostname is more than seven
characters long, you need to enter both the full hostname and the shortened seven-character
hostname.
Example of an .rhosts file:
+ c7513a-pagent
+ c7513a-
+ c4700-pagent
+ c4700-p
dirt.cisco.com
yorkie.cisco.com
autons-dev-server1.cisco.com
Flash
Flash is available only if the router supports it.
Flash can keep a file open indefinitely. This is an advantage for logging, compared to TFTP and RCP,
which close after about 10 to 15 seconds of inactivity.
FTP
IFS logs onto FTP as anonymous. Within the Cisco testing environment, FTP servers are rarely
configured to accept an anonymous login. The man pages state, The anonymous account is
inherently dangerous and should be avoided when possible.
FTP has not been tested and is not recommended.
Command Reference
This chapter lists the TGN commands and how to define and update header information.
All other L2 commands are used to set the value in a header field. The commands that are
available depend on the media and the encapsulation.
For an example, see Example of Unknown Datalink Header with IP and TCP Headers (page A-1).
For an example, see Example of Ethernet with ARPA Encapsulation Traffic Stream (page A-2).
For an example, see Example of Ethernet with SNAP Encapsulation Traffic Stream (page A-2).
For an example, see Example of Ethernet with SAP Encapsulation Traffic Stream (page A-3).
For an example, see Example of Ethernet with Novell-Ether Encapsulation Traffic Stream
(page A-3).
For an example, see Example of Token Ring with SNAP Encapsulation Traffic Stream (page A-4).
For an example, see Example of Token Ring with SAP Encapsulation Traffic Stream (page A-4).
For an example, see Example of FDDI with SNAP Encapsulation Traffic Stream (page A-5).
For an example, see Example of FDDI with SAP Encapsulation Traffic Stream (page A-5).
For an example, see Example of Serial HDLC Traffic Streams (page A-6).
The default configuration for L3-header-length is auto. If the header length is configured to a
constant value > 4, TGN adds 4-byte ip-options (not shown in the config) to the outgoing packet. If
L3-header-length is set to incrementing/random, TGN generates erroneous packets if there is an
L4-header.
show ip Displaying IP Header Information (page 2-50)
Example of IP Traffic Stream (page A-6)
Explanation of IP Header Fields (page B-1)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| unused |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Internet Header + 64 bits of Original Data Datagram |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Redirect Message
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Gateway Internet Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Internet Header + 64 bits of Original Data Datagram |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Replaces the template of the numbered layer with the specified layer template. The layer template
options are:
EthernetEthernet layer template
HDLCHDLC layer template
PPPPoint to Point Protocol layer template
dataHEX string layer template
icmpv6ICMPv6 layer template
ipv6IPv6 layer template
rtpReal Time Protocol layer template
layer layer-number undo
Undoes the template of the numbered layer and reinitializes the layer according to the packet
template.
layer max-level number
Sets the maximum number of layers that can be configured. The minimum is 4, and the maximum
is 255. The default is 4.
Note For more information on using header templates available through the layer command, see the
Layer Templates document on the Pagent Web page.
add icmpv6
add icmp
layer 4 icmpv6
add cdp
add ip
layer 3 cdp
If the timestamp keyword is included, a timestamp configurable field is added to the data array
of the packet. The TGN program writes a timestamp in this field just before transmitting the
packet. For more information on timestamps, see field type timestamp in field Adding and
Updating Configurable Fields (page 2-21).
add pkts-packet [pkt# [to to-pkt#]] [filter-with {active-display-filters | pkts-filter-name}] [tag]
[timestamp]
Creates a traffic stream based on an existing packet in the PKTS program capture buffer. pkt# is
the number of the packet in the currently active capture buffer in the PKTS program, or a range
of packets.
Use the filter-with option to select packets by applying the active display filters to the specified
range, or to apply a specific filter.
The tag option selects the tagged packets in the PKTS buffer in the specified range.
TGN picks a best match template for the packet. Any additional packet data beyond the template
headers is copied into the data array. For IP, TCP, UDP, ICMP and IGMP headers, the length and
checksum fields are set to auto in the new traffic streams.
If the packet from PKTS is for a different media than the TGN interface, you must update and
correct the datalink header.
When a packet is captured with subinterface (ios-dependent) capture, PKTS does not know the
L2-header for the packet. Hence, it is not copied into the traffic stream.
If the timestamp keyword is included, a timestamp configurable field is added to the data array
of the packet. The TGN program writes a timestamp in this field just before transmitting the
packet. For more information on timestamps, see field type timestamp in field Adding and
Updating Configurable Fields (page 2-21).
add interface ts-name-or-number
Creates a traffic steam by cloning an existing traffic stream. The traffic stream to be cloned is
identified by the interface it is configured on and its name or number.
If the cloned interfaces are on different media than the original, the datalink header cannot be
duplicated, and you must define the datalink fields in the cloned traffic stream (see L2-....
Updating the Datalink Header Definition (page 2-1)).
add mixed-interface [primary | secondary slot-number] ts-name-or-number
Creates a traffic stream by cloning an existing traffic stream from a mixed interface.
add {arp | aarp} responder
Creates a process that responds to ARP requests for a specific IP or AppleTalk address with an
ARP response. This allows a router under test to fill its ARP cache, so it can forward a packet
onto a local network.
add {decnet | clns} hello-generator
Creates a process that sends end-node hello packets every 30 seconds to simulate an active station
for the DECnet and CLNS protocols. A router needs to receive end-node hellos for these
protocols, so it knows which interface a station is on and the stations MAC address.
add sniffer-file url
Adds a batch of traffic streams from an .ENC sniffer file or a .pcap/.cap libpcap file or a .cap
netxray file to the currently selected interface, regardless of the media type. The file is read in
using the IOS File System (IFS). The use of url is similar to loading a configuration from IFS
(see load-config Loading a Configuration from IFS (page 2-29)).
add sequence
Creates a traffic stream containing a sequence of packets. Each packet in the sequence is defined
with a separate traffic stream. The sequence is defined with a list of references to traffic streams
with packet definitions (see sequence Adding and Updating Packet Sequences (page 2-38)).
add flow
Creates a traffic stream containing a sequence of packets. Each packet (member) in the flow is
defined with a separate traffic stream (see flow Adding and Updating Packet Flows
(page 2-25)).
clear Clearing Configurations or Counters (page 2-16)
delete Deleting One or Several Traffic Streams (page 2-19)
expand Expanding a Traffic Stream into Multiple Copies (page 2-20)
insert-at Inserting a Traffic Stream (page 2-27)
Preceding a command that updates a traffic stream configuration with the keyword all causes the
command to be applied to all traffic streams.
In non-broadcast mode, the command is applied to all TGN traffic streams on the selected
interface.
In broadcast mode, all is implied, and the command is applied to all TGN traffic streams on all
interfaces (see bit-rate - Setting the transmission Rate in bits per second (page 2-15)). For how
broadcast mode works on flow traffic streams, see Effect of Broadcast Mode and all Commands
on Flow Traffic Streams (page 2-15).
In both cases, commands that update header field definitions only apply to traffic streams of the
same template as the currently selected traffic stream. For example, if the currently selected
traffic stream is a TCP template, the command updates TCP traffic streams only.
template
Limits the command to only traffic streams of a specific template. Valid templates are:
datalink
ip
arp
arp responder
tcp
udp
icmp
igmp
appletalk
aarp
aarp responder
ipx
decnet
decnet hello-generator
clns
clns hello-generator
from ts-name-or-number [to ts-name-or-number]
Limits the command to a specific range of traffic streams. You can identify the traffic streams by
name or number. If identifying by name, you must enter the full exact name.
If you are in broadcast mode, both traffic stream names must refer to traffic streams on the same
interface. The command is applied to the selected range on all interfaces.
If in non-broadcast mode, traffic stream names must be on the currently selected interface.
Examples
all length 1000
Sets all traffic streams to send packets of 1000 byte length.
all ip L3-dest-addr 100.1.1.1
Sets all traffic streams with an ip template (note that this excludes tcp, udp, icmp, and igmp
templates) to have a destination IP address of 100.1.1.1.
all from 5 to 10 rate 3000
Sets all traffic streams from number 5 to 10 to send packets at 3000 packets per second (pps).
all tcp from 10 L4-dest-port 68
Sets all traffic streams with a tcp template, starting with number 10 to the last traffic stream on
the interface, to have a TCP destination port address of 68.
In the following example, the off, on, and delayed-start commands (which are all commands and
broadcast mode commands) update flow traffic stream 4, but not its members. However, the repeat
command does not affect the flow or the flow members, because the command is not available for
flow traffic streams or flow members. The last command in the example updates all members of the
flow with tcp templates.
k4700-p(TGN:OFF,Et0:2/8)#all from 2 to 6 off
k4700-p(TGN:OFF,Et0:2/8)#all from 2 to 6 delayed-start 4
k4700-p(TGN:OFF,Et0:2/8)#br on
k4700-p(TGN:OFF,Broadcast)#all from 2 to 6 on
k4700-p(TGN:OFF,Broadcast)#all from 2 to 6 delayed-start 4
k4700-p(TGN:OFF,Broadcast)#all from 2 to 6 repeat 4
k4700-p(TGN:OFF,Et0:2/8)#br on
k4700-p(TGN:OFF,Et0:2/8)#all from 2 to 6 repeat 4
k4700-p(TGN:OFF,Et0:2/8)#all tcp from 2 to 6 send 20
This combination of commands causes the traffic stream to send packets at 1000 pps for one
second, wait for 5 to 10 seconds, send packets for one second, wait for 5 to 10 seconds, and so on.
show burst Displaying Burst Configurations (page 2-44)
clear count
Traffic streams keep a count of the number of packets they have sent. This sets the send count for
all traffic streams to zero.
This example creates a data array 26 bytes long, writes the hex number 24 into location 24, and the
hex number 11 into location 25. Since this is creating the array, the locations from 0 to 23 are set to
zero.
If the example was updating an existing data array of at least 26 bytes length, only locations 24 and
25 would be updated.
If we display the traffic stream configuration, we will see the following:
!
data-length 26
! 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
data 0 "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
data 20 "00 00 00 00 24 11"
!
If the data command is used to add data to the data array and it increases the size of the array,
data-length is updated to the new data array size.
data Setting Data in a Data Array (page 2-17)
show name Displaying Traffic Stream Names and Delayed-Start Information (page 2-51)
You can use this command with a flow member to send out the IMIX traffic in order.
Note The expand command makes it easy to create lots of traffic streams, but each traffic stream
takes up router memory. If you use up all the free memory, the router crashes. The number of traffic
streams you can safely create depends on the amount of router free memory (use show memory at
exec) and the size and complexity of the packet definitions. Leave a couple of megabytes of memory
free for router processes and stacks.
Makes copies of the currently selected traffic stream. In flow mode or when using the flow
command, the expand command makes copies of the currently selected flow member. If the
original traffic stream has incrementing, random, or iterating fields, the new traffic streams have
constant values in the fields, but are incremented, iterated, or random for each additional traffic
stream.
This command helps send out complex traffic more quickly. Updating a packet with changing
length and data can cause length fields to be updated and checksums to be recalculated, which
reduces the maximum send rate. If the memory is available, you can create multiple traffic
streams that do not need to be updated so that they can be sent at a faster rate.
expand n
Expands the currently selected traffic stream into the specified number of traffic streams.
expand imix [packet-mix packet_length_list]
Expands the currently selected traffic stream by creating a set of IMIX traffic streams. If
packet-mix is specified, the traffic stream is expanded into the specified number of streams with
the specified lengths in packet_length_list.
If packet-mix is not specified, the traffic stream is expanded into 12 traffic streams of the
following lengths in this order:
64 64 570 64 64 570 64 1518 570 64 64 570
You can use this command with a flow member to send out the IMIX traffic in order.
Note The expand command makes it easy to create lots of traffic streams, but each traffic stream
takes up router memory. If you use up all the free memory, the router crashes. The number of traffic
streams you can safely create depends on the amount of router free memory (use show memory at
exec) and the size and complexity of the packet definitions. Leave a couple of megabytes of memory
free for router processes and stacks.
When you use the [field# | select field-name] option, the specified field becomes the current field.
If you do not specify a field number or field name, the command is applied to the current field
(the field last accessed or modified).
field add field-name
Adds a configurable field, which becomes the current field. You must give the field a name. The
limit is 20 alpha-numeric characters; spaces are allowed.
field insert-at [field# | field-name] name
Creates a configurable field that is inserted in front of an existing field, identified by its number
or name. The new field becomes the current field. You must give the new field a name. The limit
is 20 alpha-numeric characters; spaces are allowed.
field [field# | select field-name] delete
Deletes an existing configurable field, identified by its number or name. The next lower field
becomes the current field.
field [field# | select field-name] name field-name
Changes the name assigned to a field.
field [field# | select field-name] type ip
field [field# | select field-name] type n {decimal | hex | bcd} bytes
field [field# | select field-name] type timestamp
field [field# | select field-name] type ascii
These commands define the field type. It can be an IP address field, a hex number, decimal field,
BCD field from 1 to 4 bytes long, or an 8 byte timestamp or an ASCII string.
For hex and decimal fields, there is no difference in data entry. Decimal or hex (with leading 0x)
values can be input into either type. This only affects how the field data is displayed.
For ASCII fields, the data is entered in the form of an ASCII string.
For BCD fields, the value entered is treated as BCD data. For example, these commands
configure the first byte of the field as 8 and the second byte as 9:
field type 2 bcd
field data 89
Timestamp field data cannot be entered. The TGN program updates this field with the IOS
timestamp before the packet is transmitted. This occurs before any transport checksums are
calculated, so that the timestamp can be added into a valid TCP or UDP packet. Turn off transport
checksumming if the checksum is not important to the test. For more information, see Using
TGN and PKTS Timestamps to Measure Latency (page 5-1).
field [field# | select field-name] start-at sign-post offset bytes
Defines where the field starts in the packet relative to well-known locations or sign posts, and
what the positive offset is from the sign post. Valid arguments for sign-post are:
packet-start
mac-address-start
dsap-address-start
network-start
transport-start
data-array-start
packet-end
Note For packet-end, the offset has be entered as a positive integer but is used as negative offset
from the end of packet.
Note If there are spaces between the comma separated values, they are ignored, and the entire
set of values must be enclosed in quotes. For example: L4-dest-port start-index 0 values 1, 2, 3,
4.
All incrementing and random fields are reset when traffic generation is started, unless the
no-reset option is specified.
Examples
field add internal-nets
Adds a configurable field named internal-nets.
field 1 start-at data-array-start offset 0
field select internal-nets start-at data-array-start offset 0
field start-at data-array-start offset 0
All three commands do the same thing: they start the field internal-nets (field number 1) at the
beginning of the data array.
field 1 data 25
Assigns the field a value of 25.
field 1 type 2 decimal bytes
field select internal-nets type 2 decimal bytes
field type 2 decimal bytes
All three commands do the same thing: they make the field 2 bytes long, with its data displayed
in decimal.
The above commands result in a configurable field that displays as follows:
field 1
field name "internal-nets"
field type 2 decimal bytes
field start-at data-array-start offset 0
field data 25
In the following example, assume that there are already five configurable fields, and we want to
insert a field into the sequence at number 3.
field insert-at 3 server-address
Inserts a new configurable field named server-address in front of the current configurable field
3. The new field becomes field number 3.
field 3 start-at data-array-start offset 10
Starts the field server-address at data array byte 10.
field 3 type ip
Specifies that the field will have IP address data.
field data random 100.200.1.1 to 100.200.1.255
Specifies that the IP address data is random from 100.200.1.1 to 100.200.1.255.
The above commands result in a configurable field that displays as follows:
field 3
field name "server address"
field type ip
field start-at data-array-start offset 10
field data random 100.200.1.1 to 100.200.1.255
Iterating fields:
field type ip
field iterate-thru start-index 0 values 1.1.1.1,2.2.2.2,3.3.3.3
ASCII field:
field type ascii
field data "string-value"
The fill pattern is not random. It is defined by a starting byte value and an increment value that
all subsequent bytes are incremented by. By default, start-byte is 0x0, and increment-by is 0x01.
The limitation is that the hardware also updates most of the ISL datalink header with valid
information. This helps create a valid ISL packet, but overwrites the datalink header data set in
the NQR traffic stream definition.
If you are using datalink ios-dependent isl-subinterface, you must activate this mode if you are
using output-mode fast or output-mode dedicated. This mode does not work with
output-mode optimal. See datalink Specifying the Datalink Header Encapsulation (page 2-18)
and output-mode Setting the Output Mode (page 2-32).
isl-crc-added software
Uses a software routine in Pagent to calculate and add the ISL CRC. The value of this mode is
that the datalink header defined by NQR is not changed by the transmission hardware, but there
is a performance impact.
This mode does not work on a 7500 VIP. If you need to use this mode on a 7500 VIP interface,
you must use the RP (primary processor) and not the VIP (secondary processor) to transmit the
packets. See secondary Selecting a SECONDARY Processor for Transmission (page 2-37).
This mode does not work with output-mode optimal.
Note On Ethernet interfaces, if length is specified as > 1514 bytes, TGN automatically truncates the
packet to 1514 bytes without warning. An exception to this behavior is only when fragmentation is
enabled.
If you enter just the file system name, the program prompts you for the remaining information. For
example, you want to load a TGN configuration from TFTP server 192.1.1.2, and read the file
/tftpboot/tgn/test/traffic1.
c7513a-(TGN:Et0/0/0:2 of 2)#load tftp
Address or name of remote host []? 192.1.1.2
IFS filename []? tgn/test/traffic1
Please wait until 'Load Complete' message.
c7513a-(TGN:Et0/0/0:none)#
Loading tgn/test/traffic1 from 192.1.1.2 (via Ethernet0/0/0): !
[OK - 2360/4096 bytes]
Load Complete.
If the complete URL is entered, the program does not prompt for more information. In a TCL script,
you must use the complete URL, because CSCCON does not know how to respond to TGN IFS
prompts.
The following example shows using the command from the router exec with a complete URL.
c7513a-pagent#tgn load tftp://192.1.1.2/tgn/test/traffic1
Please wait until 'Load Complete' message.
c7513a-pagent#
Loading tgn/test/traffic1 from 192.1.1.2 (via Ethernet0/0/0): !
[OK - 2360/4096 bytes]
Load Complete.
If you need help in creating a URL, first open a file using the IFS prompts. You can then use the
show global command to see the complete URL.
replace - Selectively replacing IP Address and TCP/UDP Port Number (page 2-36)
IOS File System (page 1-10)
show global Displaying Global Parameters (page 2-47)
In TGN mode, the primary purpose of this is to make it easy for a test script to select a traffic
stream for updating.
In Stimulus Response Engine (SRE) mode, the name is required, because SRE accesses packet
definitions by name.
select Selecting a Traffic Stream by Name (page 2-37)
show name Displaying Traffic Stream Names and Delayed-Start Information (page 2-51)
If you enter just the file system name, the program prompts you for the remaining information. For
example, you want to log to TFTP server 192.1.1.2 and the file /tftpboot/tgn/test/log1.
c7513a-(TGN:Et0/0/0:2 of 2)#open tftp
Address or name of remote host []? 192.1.1.2
IFS filename []? tgn/test/log1
!
If you need help in creating a URL, first open a file using the IFS prompts. You can then use the
show global command to see the complete URL.
write Writing Information to an IFS Log File (page 2-61)
IOS File System (page 1-10)
close-logfile Closing an Open IFS Log File (page 2-17)
process
In this mode, every time a traffic stream needs to send out a packet, it allocates a paktype
structure, copies in the packet headers, data array, and fill pattern, updates any incrementing
or random fields, updates any length or checksum fields, sends the packet, and then releases
the paktype.
Note For non-IOS programmers, IOS handles all incoming and outgoing packets through a data
structure called paktype, along with memory allocated through the paktype, to hold the packet.
The primary advantage of process mode is that traffic streams can be added, inserted,
deleted, and updated while traffic is being generated. This cannot be done in fast and
dedicated modes.
You can increase the output levels of this mode significantly using the repeat command.
repeat Resending Packets Repeatedly (page 2-35)
fast
This is the default output mode. In this mode, when traffic generation is started, a paktype
structure is allocated to every active traffic stream and the packet headers, data array, and fill
pattern are copied in. The paktype is not released until traffic generation is stopped.
When it is time for a traffic stream to send out a packet, fast mode updates incrementing,
random, length, and checksum fields, if needed, and sends the packet out.
Fast mode is faster that process mode, since it does not need to repeatedly allocate and delete
paktypes. In fast mode, the TGN program regularly releases to IOS, so that operating system,
router processes, and other test programs can run.
Traffic stream packets cannot be created, deleted, or updated while traffic is being output.
dedicated
Dedicated mode is like fast mode, except it does not release to the operating system until
traffic generation is stopped. In this mode, operating system, routing processes, and other test
programs do not get processing cycles.
When this mode is started, it posts the following message:
You have started traffic generation in dedicated output-mode.
TGN will go into a send loop that locks out all other processes.
Enter control-6 or shift-control-6 to stop traffic generation.
When this mode is selected, the program posts a message indicating what limitations that
implementation has. For example:
c7513a-(TGN:OFF,Et0/0/0:1/1)#output-mode secondary 3 optimal
SECONDARY processor 3 optimal send:
This is a special VIP optimal send packet generation mode that sacrifices the
ability to update packet lengths, incrementing and random fields and bursting
for faster packet generation.
Does not update packets while in the repeat loop (the default).
Caution Do not use a repeat greater than 1 on the 4500 and 4700 routers if using process output
mode, because it does not release I/O packet memory. After I/O memory is used up, all you see is
error messages and trace-backs. This is not a problem that affects router operation; it affects only
programs like this that try to send the same packet repeatedly in a tight loop.
If you enter just the file system name, the program prompts you for the remaining information. For
example, you want to save the configuration to TFTP server 192.1.1.2 and the file
/tftpboot/tgn/test/traffic1.
c7513a-(TGN:Et0/0/0:2 of 2)#save tftp
Address or name of remote host []? 192.1.1.2
IFS filename []? tgn/test/traffic1
!!
Save complete.
If the complete URL is entered, the program does not prompt for more information. In a TCL script,
you must use the complete URL, because CSCCON does not know how to respond to TGN IFS
prompts.
The following example shows using the command from the router exec with a complete URL.
c7513a-pagent#tgn save tftp://192.1.1.2/tgn/test/traffic1
!!
Save complete.
If you need help in creating a URL, first open a file using the IFS prompts. You can then use the
show global command to see the complete URL.
load-config Loading a Configuration from IFS (page 2-29)
IOS File System (page 1-10)
Note Packet flows are designed to replace TGN packet sequences. (Packet sequences will not be
developed further and are being maintained for backward compatibility only). You are strongly
encouraged to use TGN flows instead of TGN sequences (see flow Adding and Updating Packet
Flows (page 2-25)).
There are a number of advantages to packet flows over sequences. Packet flows offer an unequal
intermember interval (which can be random), and you can specify a delayed start for the flow. You
can configure and view flow members separately as a group, since each flow maintains it own list
of members. Sequence items are part of a traffic stream list.
In the above output, FL in the ts# column indicate flow members by their flow number. For example,
FL-3.1 indicates member 1 in flow 3; FL-6.2 indicates member 2 in flow 6. Flow members do not
have a rate; they only have an interval to the next member.
L3-option-length 0
!
L4-type 0
L4-code 0
L4-checksum auto
L4-option 0x00000000
!
data-length 0
!
fill-pattern 0x00 0x01
If the tcl-output option is used, the configuration information to identify the traffic stream and
non-configuration information from the show rate and show send commands is displayed in a
TCL-friendly format.With TCL-friendly format, data is easy to extract from the output text because
it follows a unique keyword and is not row- and column-position dependent, which can change with
Pagent releases.
For example:
c7200-p(TGN:OFF,Et1/0:1/1)#sh tcl
interface Ethernet1/0
traffic-stream-number 1
name ip-test1
measured-rate 25779.917
packets-sent 368201
left-to-send 0
AARP (AppleTalk ARP) Network Header Field Update Commands (page 2-6)
Example of AARP (AppleTalk ARP) Traffic Stream (page A-12)
Explanation of IP ARP and Appletalk ARP Header Fields (page B-14)
16 0.0 0011.2222.3333
17 0.0 0011.2222.3333
18 0.0 0011.2222.3333
Displays a summary of AppleTalk header field configurations. For the selection options, see
show Displaying Traffic Stream and Summary Information (page 2-38).
For example:
k4700-p(TGN:OFF,Et0:28/42)#sh appl
k4700-p(TGN:OFF,Et0:3/3)#
For example:
tools75(TGN:OFF,Et2/2:54/54)#sh igmp
Summary of IGMP traffic streams on Ethernet2/2
ts# version type checksum group.address
28 0 0 0x0000 0.0.0.0
29 0 0 0x0000 0.0.0.0
30 0 0 0x0000 0.0.0.0
interface Ethernet1/0
admin-state up
operational-state up
traffic-stream-count 1
ordered-traffic off
max-bit-rate off
measured-rate 10856.200
packets-sent 369361
Processor identifies the processor. Current output-mode lists the current mode on the processor
(see ordered-traffic Setting Ordered-Traffic Scheduling (page 2-32)). Optimal output-mode
states whether the optimal mode is available on this processor. If optimal output mode is available,
only-optimal send states if it is the only mode available. Some SECONDARY processors cannot
run a full IOS, but might have an optimal output mode implemented in microcode. Concurrent
optimal-send identifies whether this optimal mode implementation allows other IOS processes to
run concurrently (yes) or does it grab all processor cycles (no).
Urgent Pointer: 0
0 : 0000 0000 0000 0000 0000 0000 0800 4500 0028 0000 ..............E..(..
20 : 0000 3C06 7ED1 0000 0000 0000 0000 0000 0000 0000 ....................
40 : 0000 0000 0000 5000 0000 0000 0000 0000 0000 0000 ......P.............
Original Packet:
Data:
0 : 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F 1011 1213 ....................
<snip>
140 : 8C8D 8E8F 9091 ......
Fragment 1:
Data:
0 : 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F 1011 1213 ....................
20 : 1415 1617 1819 1A1B 1C1D 1E1F 2021 2223 2425 2627 ............ !"#$%.
40 : 2829 2A2B 2C2D 2E2F 3031 3233 3435 3637 3839 3A3B ()*+,-./0123456789:;
Fragment 2:
Data:
0 : 3C3D 3E3F 4041 4243 4445 4647 4849 4A4B 4C4D 4E4F .=.?@ABCDEFGHIJKLMNO
20 : 5051 5253 5455 5657 5859 5A5B 5C5D 5E5F 6061 6263 PQRSTUVWXYZ[\
40 : 6465 6667 6869 6A6B 6C6D 6E6F 7071 7273 7475 7677 defghijklmnop
60 : 7879 7A7B 7C7D 7E7F 8081 8283 8485 8687 8889 8A8B xyz{|}..............
Fragment 3:
Data:
0 : 8C8D 8E8F 9091 ......
r4500a-(TGN:OFF,Et0:1/1)#
interface Ethernet0/0/0
add $$ byte 0
00E0F759 E50700E0 34C5E800 08004500 00640001 0000FF01 79758009 0116C001
01020800 6B630798 1A440000 00000002 F108ABCD ABCDABCD ABCDABCD ABCDABCD
ABCDABCD ABCDABCD ABCDABCD ABCDABCD ABCDABCD ABCDABCD ABCDABCD ABCDABCD
ABCDABCD ABCDABCD ABCDABCD ABCDABCD ABCD
quit
Displays the same information available in the TGN option prompt. This command is useful
when running a script from the router exec prompt, and the program option prompt is not
available.
For example:
k4700-p(TGN:OFF,Et0:22/22)#sh prog
Program: TGN
State: OFF
Broadcast: OFF
Flow_mode: OFF
Selected Interface: Ethernet0
Selected Traffic Stream: 22 of 22
The rates are since the last rate change during traffic generation.
Traffic generation is currently off.
These rates are from the last time traffic generation was active.
The following example shows output during traffic generation. Note that the rate or interval is
measured by taking the time at which traffic generation is started and when it is stopped, and the
number of packets sent during that period. This means that the measurement can be badly off when
the time between packets is long, and the transmit period is short (for example the interval
measurement here).
c4700-p(TGN:OFF,Et1:5/5)#sh rate
on = SECONDARY to transmit
off = PRIMARY to transmit
SECONDARY-Transmit-Active
SECONDARY slot 0 on
SECONDARY slot 1 on
SECONDARY slot 2 on
SECONDARY slot 3 on
SECONDARY slot 5 on
The SECONDARY processors that are set to ON will transmit packets out their active interfaces.
The SECONDARY processes that are set to OFF will let the PRIMARY transmit the packets through
the SECONDARY for the SECONDARYs active interfaces.
secondary Selecting a SECONDARY Processor for Transmission (page 2-37)
c4700-p(TGN:OFF,Et1:3/4)#start send
c4700-p(TGN:SEND,Et1:3/4)#
TGN will go into a send loop that locks out all other process.
Enter shift-control-6 to stop traffic generation or wait for completion.
c4700-p(TGN:OFF,Et1:3/4)#sh send
c4700-p(TGN:OFF,Et1:3/4)#sh rate
c4700-p(TGN:OFF,Et1:1/4)#sh name
L3-version 4
L3-header-length auto
L3-tos 0x00
L3-length auto
L3-id 0x0000
L3-fragmentation 0x0000
L3-ttl 60
L3-protocol 0
L3-checksum auto
L3-src-addr 0.0.0.0
L3-dest-addr 0.0.0.0
L3-option-length 0
!
data-length 0
!
fill-pattern 0x00 0x01
If this is set for ios-logging, the activity messages are passed to the IOS logging facility as level
6 (informational) messages. Depending on how IOS logging is configured, these messages can
have timestamps added and be posted to the console and/or log file and/or system log. For more
information on how to configure IOS logging, see the logging commands in the Cisco IOS
Configuration Fundamentals Command Reference -> Cisco IOS System Management
Commands -> Troubleshooting Commands.
IP Address Fields
Ln-... value
Ln-... increment min-value to max-value [by inc-by] [subnet subnet-mask]
Ln-... random min-value to max-value [by inc-by] [subnet subnet-mask]
Fields with IP addresses are entered just like the decimal and hex values defined in Decimal and Hex
Fields (page 3-1), except that all values are entered as full IP addresses, including the inc-by value.
It can include a subnet mask, so subnet broadcast addresses are not generated.
The following are examples of setting IP address fields:
L3-src-addr 100.1.1.1
L3-dest-addr increment 1.1.1.1 to 1.1.1.255
L3-dest-addr increment 1.1.1.1 to 1.1.255.1 by 0.0.1.0
L3-dest-addr random 192.1.1.1 to 192.1.255.255
L3-src-addr random 192.1.1.1 to 192.1.1.255 by 0.0.0.5
If you need to generate a wide range of IP addresses that span several subnets, you probably do not
want to send subnet broadcast packets. If you configure a subnet mask for incrementing and random
IP addresses, the TGN program will not generate addresses where the subnet address bits are all
zeros or all ones.
The following is a repeat of the above examples with subnet masks added:
L3-dest-addr increment 1.1.1.1 to 1.1.1.255 subnet 255.255.255.0
L3-dest-addr increment 1.1.1.1 to 1.1.255.1 by 0.0.1.0 subnet 255.255.128.0
L3-dest-addr random 192.1.1.1 to 192.1.255.255 subnet 255.255.255.240
L3-src-addr random 192.1.1.1 to 192.1.1.255 by 0.0.0.5 subnet 255.255.255.192
Nested Increments (page 3-3)
Note that the incrementing or random field is identified by the number of bytes from the start of
the header. In the IPv6 header, the source address starts 8 from the start of the header.
The last four bytes of the 16-byte IPv6 source address (bytes 13 to 16) start 8 + 12 bytes from the
start of the network header.
Example 2:
To make the seventh and eighth bytes of the destination IPv6 address random from 0 to 0xFFFF:
field add rand_dest_ipv6
field start-at network-start offset 30
field type 2 hex
field data random 0 to 0xFFFF
In the IPv6 header, the destination address starts 24 bytes from the start of the header, so the
seventh byte in the address starts 24 + 6 = 30 bytes from the start of the header.
Nested Increments
Any header field that can be set to increment over a range also has the ability to be linked to another
incrementing field. This is the nest-over option and looks like this:
... increment min to max [nest-over field-name]
With this option, the incrementing field increments only when the incrementing field it points to
wraps from its max to min value. This allows the traffic stream to step through all possible
combinations of the two fields.
The field-name can be any L2-, L3-, L4-, or configurable field name, but it must adhere to the
following rules:
Entered correctly in full
Valid within the template
Set to increment before traffic generation or expand
Nested incrementing fields can nest several deep, and several incrementing fields can nest to a single
incrementing field.
An incrementing packet length can be set to nest-over an incrementing header field, and
incrementing header fields can be set to nest-over length. This is an exception, because packet
length is not a header field.
In this example, every time the IP destination address increments through its range of addresses, the
IP source address increments by 1.
L3-src-addr increment 22.1.1.1 to 22.1.1.10 nest-over L3-dest-addr
L3-dest-addr increment 100.1.1.1 to 100.1.1.100
IP ARP Responder
The IP ARP Responder responds to ARP requests for one IP address or a range of them.
The ARP Responder is typically used to act as a fictitious end station. If you are using a traffic
generator (like TGN) to send packets to a non-existent end station or IP address, you need the ARP
responder to act as the end station so that the router forwards the test packets on the destination
network.
If the ARP responder is not used and the end-station IP address has not been statically configured in
the ARP cache, the router sends out an ARP request for each test packet. After timeout, it sends an
ICMP host unreachable message back to the source IP address.
With the ARP responder, the first test packet results in an ARP request. The ARP responder sends a
reply giving a MAC address to which the router can forward packets. With the destination address
now in the routers ARP cache, all subsequent packets to that IP address are forwarded immediately.
To create the ARP Responder, first use the add arp responder command (see add Adding a Traffic
Stream (page 2-10)). Similar to regular traffic streams, multiple ARP responders can be created on
each interface.
Use one of the following commands to define which IP address or range of IP addresses the ARP
responder will respond to:
ip-address a.b.c.d
ip-address a.b.c.d to a.b.c.d
The following is the fictitious MAC address in the ARP response. It can be any MAC address. It is
not related to the bia address of the interface (though in most cases, you configure it to be the MAC
address of the interface). If the ARP responder is to respond to a range of IP addresses, you can
configure it to respond with a constant MAC address for all the IP addresses in the range or with an
equal range of MAC addresses starting with this configured MAC address:
mac-address hhhh.hhhh.hhhh [constant]
The following activates or deactivates the ARP responder:
on | off
VINES Hello-Generator
To create the VINES hello-generator, first use the add vines hello-generator command (see add
Adding a Traffic Stream (page 2-10)). The following commands configure the VINES
hello-generator.
hello-address network:subnet
VINES address the hello-generator advertises as an active end station.
mac-address hhhh.hhhh.hhhh
Fictitious MAC address the router is to send the packets to.
on | off
Activates or deactivates the VINES hello-generator.
Example of VINES Hello-Generator (page A-21)
sre Defining Traffic Streams for TGN or SRE (page 2-59)
CLNS Hello-Generator
To create the CLNS hello-generator, first use the add clns hello-generator command (see add
Adding a Traffic Stream (page 2-10)). The following commands configure the CLNS
hello-generator.
hello-address 47.0000.0000.0000.0011.2222.3333.00
CLNS address the hello-generator advertises as an active end station. It shows the command with
an example CLNS address. The MAC address is extracted from the CLNS address. In this
example, the MAC address is 0011.2222.3333.
on | off
DECnet Hello-Generator
To create the CLNS hello-generator, first use the add decnet hello-generator command (see add
Adding a Traffic Stream (page 2-10)). The following commands configure the DECnet
hello-generator.
hello-address area.node
DECnet address the hello-generator advertises as an active end station. In the DECnet protocol,
the area node address defines the MAC address.
designated-router area.node
The DECnet end station hello packet includes a field that identifies the designated router the end
station sends its packets to.
on | off
Activates or deactivates the DECnet hello-generator.
Example of DECnet Hello-Generator (page A-21)
show decnet-hello Displaying DECnet Hello-Generators (page 2-46)
Cisco Company Confidential Using TGN and PKTS Timestamps to Measure Latency 5-1
Example of Using Timestamps
Statistics are displayed at the end of the summary. If you want to display only the statistics and
not all the packets, include the stats-only keyword.
For example:
p4700a-(PKTS:1 of 21739)#sh tim from 1 to 15
# interface summary relative time time-diff
1 Et2 IP 0.000990 0.000354
2 Et2 IP 0.001211 0.000476
3 Et2 IP 0.001320 0.000479
4 Et2 IP 0.001419 0.000535
5 Et2 IP 0.001869 0.000321
6 Et2 IP 0.002587 0.000339
7 Et2 IP 0.002793 0.000374
8 Et2 IP 0.002904 0.000433
9 Et2 IP 0.003006 0.000496
10 Et2 IP 0.003819 0.000355
11 Et2 IP 0.004042 0.000502
12 Et2 IP 0.004152 0.000542
13 Et2 IP 0.004255 0.000586
14 Et2 IP 0.004356 0.000628
15 Et2 IP 0.005198 0.000333
Packets with timestamps = 15
Minimum time difference = 0.000321
Maximum time difference = 0.000628
Average time difference = 0.000450
Median time difference = 0.000476
Standard Deviation = 0.000291
On the router running Pagent, the following configuration makes sure the two interfaces we are using
are not shut. It also sets a MAC address on the receiving interface.
interface eth1
not shut
interface eth2
mac-address 0000.2222.2222
not shut
The following commands are entered into the p4700-pagent router, the router running the TGN and
PKTS programs. These command create three IP traffic streams. The add commands include the
timestamp keyword, so that a timestamp field is put into the first 8 bytes of the data array. Each
traffic stream is set to a different type of service and a different source IP address. The source IP
address is used to help identify each stream on the receive side.
tgn
ethernet1
add ip timestamp
l3-src-addr 1.1.1.30
l3-tos 0x10
add ip timestamp
l3-src-addr 1.1.1.31
l3-tos 0x20
add ip timestamp
l3-src-addr 1.1.1.32
l3-tos 0x40
Cisco Company Confidential Using TGN and PKTS Timestamps to Measure Latency 5-3
Example of Using Timestamps
This creates an ARP responder on the receiving interface to respond to the routers ARP requests.
ethernet2
add arp responder
ip-address 1.1.2.20
mac-address 0000.2222.2222
At this point, start TGN traffic generation, start PKTS capture, wait until the capture buffer is full,
then stop TGN traffic generation.
The following are examples of using show timestamp to view the differences between the transmit
and receive timestamps.
First, a quick overview of the captured packets:
p4700a-(PKTS:1 of 21739)#sh all
# TD interface summary relative time length
1 I Et2 IP 0.000990 60
2 I Et2 IP 0.001211 60
3 I Et2 IP 0.001320 60
4 I Et2 IP 0.001419 60
5 I Et2 IP 0.001869 60
6 I Et2 IP 0.002587 60
7 I Et2 IP 0.002793 60
8 I Et2 IP 0.002904 60
9 I Et2 IP 0.003006 60
10 I Et2 IP 0.003819 60
11 I Et2 IP 0.004042 60
12 I Et2 IP 0.004152 60
13 I Et2 IP 0.004255 60
14 I Et2 IP 0.004356 60
15 I Et2 IP 0.005198 60
16 I Et2 IP 0.005392 60
17 I Et2 IP 0.005500 60
18 I Et2 IP 0.005602 60
19 I Et2 IP 0.005705 60
20 I Et2 IP 0.006548 60
21 I Et2 IP 0.006747 60
--More--
Cisco Company Confidential Using TGN and PKTS Timestamps to Measure Latency 5-5
Example of Using Timestamps
An overview of timestamp information for one section of the capture buffer so we also get statistics:
p4700a-(PKTS:1 of 21739)#sh tim from 1 to 15
# interface summary relative time time-diff
1 Et2 IP 0.000990 0.000354
2 Et2 IP 0.001211 0.000476
3 Et2 IP 0.001320 0.000479
4 Et2 IP 0.001419 0.000535
5 Et2 IP 0.001869 0.000321
6 Et2 IP 0.002587 0.000339
7 Et2 IP 0.002793 0.000374
8 Et2 IP 0.002904 0.000433
9 Et2 IP 0.003006 0.000496
10 Et2 IP 0.003819 0.000355
11 Et2 IP 0.004042 0.000502
12 Et2 IP 0.004152 0.000542
13 Et2 IP 0.004255 0.000586
14 Et2 IP 0.004356 0.000628
15 Et2 IP 0.005198 0.000333
Packets with timestamps = 15
Minimum time difference = 0.000321
Maximum time difference = 0.000628
Average time difference = 0.000450
Median time difference = 0.000476
Standard Deviation = 0.000291
Timestamp information for one selected stream from a section of the capture buffer:
p4700a-(PKTS:1 of 21739)#sh tim ip-src 1.1.1.30 from 1 to 40
# interface summary relative time time-diff
1 Et2 IP 0.000990 0.000354
4 Et2 IP 0.001419 0.000535
7 Et2 IP 0.002793 0.000374
10 Et2 IP 0.003819 0.000355
13 Et2 IP 0.004255 0.000586
16 Et2 IP 0.005392 0.000455
19 Et2 IP 0.005705 0.000574
22 Et2 IP 0.006854 0.000505
25 Et2 IP 0.007927 0.000364
28 Et2 IP 0.008348 0.000578
31 Et2 IP 0.009485 0.000441
34 Et2 IP 0.010249 0.000378
37 Et2 IP 0.011321 0.000494
40 Et2 IP 0.012674 0.000331
Packets with timestamps = 14
Minimum time difference = 0.000331
Maximum time difference = 0.000586
Average time difference = 0.000451
Median time difference = 0.000455
Standard Deviation = 0.000288
Timestamp information for a different stream and a different section of the capture buffer:
p4700a-(PKTS:1 of 21739)#sh tim ip ip-src 1.1.1.31 from 1000 to 1040
# interface summary relative time time-diff
1001 Et2 IP 0.288738 0.000582
1004 Et2 IP 0.289848 0.000488
1007 Et2 IP 0.290867 0.000333
1010 Et2 IP 0.292413 0.000457
1013 Et2 IP 0.292732 0.000583
1016 Et2 IP 0.293849 0.000493
1019 Et2 IP 0.294871 0.000329
1022 Et2 IP 0.296428 0.000466
1025 Et2 IP 0.296746 0.000593
1028 Et2 IP 0.298178 0.000450
1031 Et2 IP 0.298499 0.000573
1034 Et2 IP 0.300411 0.000446
1037 Et2 IP 0.301059 0.000899
1040 Et2 IP 0.302057 0.000450
Packets with timestamps = 14
Minimum time difference = 0.000329
Maximum time difference = 0.000899
Average time difference = 0.000510
Median time difference = 0.000488
Standard Deviation = 0.000293
This uses the stats-only keyword to not display all the individual timestamps:
p4700a-(PKTS:1 of 21739)#sh tim ip ip-src 1.1.1.32 stats-only
Packets with timestamps = 7246
Minimum time difference = 0.000305
Maximum time difference = 0.001022
Average time difference = 0.000456
Median time difference = 0.000481
Standard Deviation = 0.000289
Cisco Company Confidential Using TGN and PKTS Timestamps to Measure Latency 5-7
Example of Using Timestamps
!
data-length 0
!
fill-pattern 0x00 0x01
Ethernet ARPA Encap Datalink Header Field Update Commands (page 2-2)
show mac Displaying MAC Addresses (page 2-51)
Ethernet SNAP Encap Datalink Header Field Update Commands (page 2-2)
Ethernet SAP Encap Datalink Header Field Update Commands (page 2-2)
Ethernet Novell-Ether Encap Datalink Header Field Update Commands (page 2-2)
Token Ring SNAP Encap Datalink Header Field Update Commands (page 2-3)
Token Ring SAP Encap Datalink Header Field Update Commands (page 2-3)
FDDI SNAP Encap Datalink Header Field Update Commands (page 2-3)
FDDI SAP Encap Datalink Header Field Update Commands (page 2-3)
L2-protocol 0x809B
!
L3-phase 2
L3-hopcount 0
L3-length auto
L3-checksum 0x0000
L3-dest-net 0
L3-src-net 0
L3-dest-node 0
L3-src-node 0
L3-dest-socket 0
L3-src-socket 0
L3-ddp-type 0
!
data-length 0
!
fill-pattern 0x00 0x01
L3-dest-area 47.0000.0000.0000
L3-dest-host 0000.0000.0000
L3-dest-protocol 0x00
L3-src-length auto
L3-src-area 47.0000.0000.0000
L3-src-host 0000.0000.0000
L3-src-protocol 0x00
L3-option-length 0
!
data-length 0
!
fill-pattern 0x00 0x01
!
data-length 0
!
fill-pattern 0x00 0x01
Fragment:
16 bit field
What bit positions indicate
0x4000 : Dont Fragment indication
0x2000 : More Fragments indication
0x1FFF : Fragment Offset Indicates start of this fragment in original IP header
Time To Live (TTL):
8 bit field
Specifies how long, in seconds, the datagram is allowed to live on the Internet. Each router either
decrements this field by 1 or by the number of seconds it holds the packet. A datagram is
discarded if this field reaches zero.
Protocol:
8 bit field
Identifies the higher level data
A few common protocols:
1: ICMP
2: IGMP
6: TCP
8: EGP
9: IGRP
17: UDP
88: EIGRP
89: OSPF
Header Checksum:
16 bit field
Used to ensure integrity of IP header Ones complement arithmetic of IP header as sequence of
16-bit integers. Does not include IP data.
Source IP Address:
32 bit field
IP address of the datagram sender
Destination IP Address:
32 bit field
IP address of the datagram intended recipient
Option:
Variable length up to 40 bytes max
Used to record routes, timestamps
Code:
8 bit field
Further information on ICMP message
0: Network Unreachable
1: Host Unreachable
2: Protocol Unreachable
3: Port Unreachable
4: Fragmentation Needed and DF set
5: Source Route Field
6: Destination network unknown
7: Destination host unknown
8: Source host isolated
9: Communication with destination network administratively prohibited
10: Communication with destination host administratively prohibited
11: Network unreachable for type of service
12: host unreachable for type of service
Checksum:
16 bit field
1s complement checksum calculated on ICMP header and ICMP data
Group Address:
32 bit field
Hosts use this field to report their membership to a particular multicast group.
Destination Socket
16 bit field
Specifies process within destination station
0x0001: Routing Information Packet
0x0002: Echo Protocol Packet
0x0003: Error Handler Packet
0x0451: File Service Packet
0x0452: Service Advertising Packet
0x0453: Routing Information Packet
0x0455: NetBIOS Packet
0x0456: Diagnostic Packet
Source Network
32 bit field
Indicates which network the source station is on
Source Address
48 bit field
MAC address of source station
Source Socket
16 bit field
Process sending packet See Destination Socket for values
Packet Type
8 bit field
Defines higher level data
0: Unknown Packet Type
1: RIP
2: Echo Packet
3: Error Packet
4: Packet Exchange Protocol (PEP)
5: Sequenced Packet Protocol (SPP)
Destination Network
32 bit field
Indicates which network the destination station is on
Destination Address
48 bit field
MAC address of destination station
Destination Socket
16 bit field
Specifies process within destination station
0x0001: Routing Information Packet
0x0002: Echo Protocol Packet
0x0003: Error Handler Packet
Source Network
32 bit field
Indicates which network the source station is on
Source Address
48 bit field
MAC address of source station
Source Socket
16 bit field
Process sending packet (see Destination Socket for values)
Type
8 bit field
Identification of higher level data
1: RTMP Response or Data
2: NBP
3: ATP
4: AEP
5: RTMP Request
6: ZIP
7: ADSP
Source SubArea
8 bit field
Not used Keep at 0
Source Address
48 bit field
MAC address of Source station Station area and node are encoded in the MAC address
NL2
8 bit field
Next Level Router
Visits
8 bit field
The number of routers the packet has passed through
Class
8 bit field
Service Class Not used Keep at 0
Protocol
8 bit field
Protocol Type Not used Keep at 0
Flags
8 bit field
10000000: SP = Segmentation permitted
01000000: MS = More segments
00100000: E/R = Error Report Requested
00011111: Type = Packet Type
00011100: Data Packet
00000001: Error Packet
Segment Length
16 bit field
Length of Header and data
Checksum
16 bit field
Checksum on Header. If checksum not calculated, set to 0x0000.
Destination Length
8 bit field
This the length of the destination address in number of bytes. Normally, the destination address
is considered to be a single number. Here it is split into Area, Address, and Protocol, This length
covers all three together,
Destination Area
Variable length
This is the area of the destination station
Destination Address
48 bit field
This is the MAC address of the destination station
Destination Protocol
8 bit field
This is the process on the destination station that should receive this packet
Source Length
8 bit field
This the length of the destination address in number of bytes, Normally, the destination address
is considered to be a single number. Here it is split into Area, Address, and Protocol. This length
covers all three together.
Source Area
Variable length
This is the area of the source station
Source Address
48 bit field
This is the MAC address of the source station
Source Protocol
8 bit field
This is the process on the source station sending the packet