{"id":235,"date":"2026-05-14T00:00:00","date_gmt":"2026-05-13T20:30:00","guid":{"rendered":"https:\/\/www.anynet.ir\/blog\/%d8%aa%d9%88%d9%84%db%8c%d8%af%da%a9%d9%86%d9%86%d8%af%d9%87-%d8%aa%d8%b1%d8%a7%d9%81%db%8c%da%a9-%d8%af%d8%a7%d8%ae%d9%84%db%8c-%d8%af%d8%b1-%d8%b1%d9%88%d8%aa%d8%b1%d9%87%d8%a7%db%8c-%d8%b3%d8%b1-en\/"},"modified":"2026-05-14T00:00:00","modified_gmt":"2026-05-13T20:30:00","slug":"%d8%aa%d9%88%d9%84%db%8c%d8%af%da%a9%d9%86%d9%86%d8%af%d9%87-%d8%aa%d8%b1%d8%a7%d9%81%db%8c%da%a9-%d8%af%d8%a7%d8%ae%d9%84%db%8c-%d8%af%d8%b1-%d8%b1%d9%88%d8%aa%d8%b1%d9%87%d8%a7%db%8c-%d8%b3%d8%b1-en","status":"publish","type":"post","link":"https:\/\/www.anynet.ir\/blog\/en\/%d8%aa%d9%88%d9%84%db%8c%d8%af%da%a9%d9%86%d9%86%d8%af%d9%87-%d8%aa%d8%b1%d8%a7%d9%81%db%8c%da%a9-%d8%af%d8%a7%d8%ae%d9%84%db%8c-%d8%af%d8%b1-%d8%b1%d9%88%d8%aa%d8%b1%d9%87%d8%a7%db%8c-%d8%b3%d8%b1-en\/","title":{"rendered":"Built-in Traffic Generator on Cisco 8000 Series Routers II"},"content":{"rendered":"<div><\/div>\n<div>\n<div><\/div>\n<\/div>\n<div>\n<div>\n<div>\n<h1 style=\"color: rgb(26, 26, 26); font-weight: 700\">Built-in Traffic Generator on Cisco 8000 Series Routers<\/h1>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">What Is the Built-in Traffic Generator?<\/h2>\n<p>The Cisco 8000 series routers running IOS XR include a <strong style=\"color: rgb(26, 26, 26)\">built-in packet generator<\/strong> that allows operators to generate traffic directly from the router itself \u2014 no external traffic generator hardware or software required.<\/p>\n<p>This diagnostic tool lets you:<\/p>\n<ul>\n<li>Inject crafted packets into the router&#8217;s data plane for troubleshooting and network diagnostics.<\/li>\n<li>Create packets up to <strong style=\"color: rgb(26, 26, 26)\">4K bytes<\/strong> (A100\/K100 NPUs based systems)<\/li>\n<li>Run <strong style=\"color: rgb(26, 26, 26)\">multiple traffic generator sessions simultaneously<\/strong>, each identified by a unique session name.<\/li>\n<li>Number of simultenous sessions and max throughput per session depends on packet size\/pps\/interface speed<\/li>\n<li>Inject packets in the <strong style=\"color: rgb(26, 26, 26)\">ingress<\/strong>, <strong style=\"color: rgb(26, 26, 26)\">egress<\/strong>, or <strong style=\"color: rgb(26, 26, 26)\">both directions<\/strong> at the same time.<\/li>\n<li>Define packet contents either <strong style=\"color: rgb(26, 26, 26)\">inline on the command line<\/strong> or <strong style=\"color: rgb(26, 26, 26)\">from a pcap file<\/strong>.<\/li>\n<\/ul>\n<p>The packet definitions use a Scapy-like syntax, giving you full control over Layer 3\/4 headers including IPv4\/IPv6 addresses, TTL, DSCP\/TOS, and payload.<\/p>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">When to Use the Built-in Traffic Generator<\/h2>\n<p>The built-in traffic generator is ideal in scenarios where you need to quickly validate or troubleshoot network behavior without relying on external test equipment:<\/p>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Scenario<\/th>\n<th>How the Traffic Generator Helps<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Link or interface validation<\/strong><\/td>\n<td>Verify that a newly provisioned link is forwarding traffic correctly end-to-end.<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Routing verification<\/strong><\/td>\n<td>Confirm that packets destined for a specific prefix follow the expected path.<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">QoS and DSCP testing<\/strong><\/td>\n<td>Inject packets with specific DSCP\/TOS values to validate classification, queuing, and scheduling policies.<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Troubleshooting packet drops<\/strong><\/td>\n<td>Generate a controlled stream of traffic and observe counters to isolate where drops occur.<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Lab and staging environments<\/strong><\/td>\n<td>Simulate traffic during pre-deployment testing of a service without dedicated traffic generators<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">When NOT to Use the Built-in Traffic Generator<\/h2>\n<p>While the built-in packet generator is a valuable tool for debugging and troubleshooting, it is important to set the right expectations. <strong style=\"color: rgb(26, 26, 26)\">It is not a replacement for a third-party traffic generator.<\/strong> Keep the following limitations in mind:<\/p>\n<ul>\n<li><strong style=\"color: rgb(26, 26, 26)\">Not for stress testing or benchmarking<\/strong> \u2014 The built-in generator shares ASIC resources with production forwarding. It should not be used to stress-test a service, a line card, or the system as a whole. Results under synthetic internal load do not reflect real-world forwarding capacity.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Not a throughput validation tool<\/strong> \u2014 Standards-based service validation tests such as <strong style=\"color: rgb(26, 26, 26)\">ITU-T Y.1564<\/strong> (Ethernet service activation) require precise, calibrated, bidirectional traffic streams with strict measurement of throughput, latency, jitter, and frame loss. The built-in generator does not meet those requirements and should never be substituted for a certified test instrument.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Not for production traffic simulation<\/strong> \u2014 The generator produces simple, uniform packet streams. It cannot replicate realistic traffic mixes (varying packet sizes, application protocols, burst patterns) that a dedicated traffic generator or network emulator can produce.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Not for long-running load tests<\/strong> \u2014 Running high-rate generator sessions for extended periods consumes forwarding resources and may impact production traffic on the same ASIC pipeline. Use it for short, targeted diagnostic sessions.<\/li>\n<\/ul>\n<blockquote>\n<p><strong style=\"color: rgb(26, 26, 26)\">Bottom line:<\/strong> Use the built-in traffic generator for on-box diagnostics and troubleshooting. For anything that requires accurate performance measurement, service-level compliance, or sustained load, use a proper external traffic generator.<\/p>\n<\/blockquote>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">How It Works<\/h2>\n<p>The built-in traffic generator is implemented within the <strong style=\"color: rgb(26, 26, 26)\">NPU Host (NPUH)<\/strong> block of the Silicon One ASIC. It leverages the NPUH to inject user-defined packets directly into the forwarding pipeline \u2014 either at ingress or egress \u2014 without requiring any external device.<\/p>\n<p>Because the NPUH block is shared with other ASIC applications (such as BFD, PFC, CFM etc), and the traffic generator must share internal resources like packet data memory. Each traffic generator session allocates memory in fixed <strong style=\"color: rgb(26, 26, 26)\">16-byte chunks<\/strong>, and packet data blocks cannot be partially allocated. This means that the actual resource consumption per session depends on the packet size, the configured stream rate, and the number of concurrent sessions.<\/p>\n<p>As a result, the maximum number of flows and achievable bandwidth are governed by the interplay of packet size, per-stream rate, port speed, and the internal resources available to the generator at any given time. Higher stream rates consume more resources, leaving room for fewer simultaneous flows. The generator supports a maximum bandwidth of up to 50 Gbps and a maximum packet size of 4K bytes. For maximum flow counts we support up to 256 flows on 8712 (K100) and 160 flows on 8011(A100) (at low PPS per-flow).<\/p>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">How to Use the Built-in Traffic Generator<\/h2>\n<p>The workflow follows four steps: <strong style=\"color: rgb(26, 26, 26)\">Create<\/strong> a session, <strong style=\"color: rgb(26, 26, 26)\">Start<\/strong> it, <strong style=\"color: rgb(26, 26, 26)\">Verify<\/strong> the status, and <strong style=\"color: rgb(26, 26, 26)\">Stop\/Delete<\/strong> when done.<\/p>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Step 1: Create a Traffic Generator Session<\/h3>\n<p>Use the <code>diagnostic packet-generator create<\/code> command to define a session. You specify:<\/p>\n<ul>\n<li><strong style=\"color: rgb(26, 26, 26)\">Session name<\/strong> \u2014 a unique identifier (e.g., <code>t6<\/code>)<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Rate<\/strong> \u2014 packets per second<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Duration<\/strong> \u2014 <code>infinite<\/code> or a fixed duration<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Packet definition<\/strong> \u2014 Using scapy library for packet construction<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Direction<\/strong> \u2014 <code>ingress<\/code> or <code>egress<\/code><\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Interface<\/strong> \u2014 the interface where packets are injected<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Location<\/strong> \u2014 the RP\/LC node<\/li>\n<\/ul>\n<p><strong style=\"color: rgb(26, 26, 26)\">Basic IPv4 example:<\/strong><\/p>\n<pre><code><span>diagnostic packet-generator create t6 rate 10000 duration infinite packet IP(src=\"20.4.1.10\",dst=\"20.5.1.10\",ttl=64)\/UDP()\/Raw(load=\"a\"*100) ingress interface TwentyFiveGigE0\/0\/0\/4 location 0\/RP0\/CPU0\n<\/span><\/code><\/pre>\n<p>This creates a session named <code>t6<\/code> that sends 10,000 IPv4\/UDP packets per second with a 100-byte payload through <code>TwentyFiveGigE0\/0\/0\/4<\/code> in the ingress direction.<\/p>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Step 2: Start the Session<\/h3>\n<pre><code><span>diagnostic packet-generator start t6 location all\n<\/span><\/code><\/pre>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Step 3: Verify the Session<\/h3>\n<pre><code><span>show diagnostic packet-generator status t6 location 0\/RP0\/CPU0\n<\/span><\/code><\/pre>\n<p>When the session is healthy, look for these indicators:<\/p>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Expected Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>Run_State<\/code><\/td>\n<td><code>running<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>Applied rate<\/code><\/td>\n<td>Matches\/Close to your configured rate<\/td>\n<\/tr>\n<tr>\n<td><code>Duration<\/code><\/td>\n<td><code>infinite<\/code> (or configured value)<\/td>\n<\/tr>\n<tr>\n<td>Packets \/ Bytes counters<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">Incrementing<\/strong> over time<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>To check <strong style=\"color: rgb(26, 26, 26)\">all<\/strong> active sessions at once:<\/p>\n<pre><code><span>show diagnostic packet-generator status all location 0\/RP0\/CPU0\n<\/span><\/code><\/pre>\n<p>In case of Ingress injection and packet getting dropped due to forwarding mismatch\/no route etc. The packet\/byte counters will not increment.<\/p>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Step 4: Stop and Clean Up<\/h3>\n<pre><code><span>! Stop a running session\n<\/span><span>diagnostic packet-generator stop t6 location all\n<\/span><span>! Delete the session entirely\n<\/span><span>diagnostic packet-generator delete t6 location all\n<\/span><\/code><\/pre>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Default MAC Addresses and Forwarding Requirements<\/h2>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Default Source and Destination MAC Addresses<\/h3>\n<p>The built-in traffic generator automatically assigns default MAC addresses to injected packets based on the injection direction:<\/p>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Direction<\/th>\n<th>Source MAC<\/th>\n<th>Destination MAC<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Ingress<\/strong><\/td>\n<td><code>00:00:00:00:00:01<\/code> (generic host MAC)<\/td>\n<td>Interface MAC of the ingress port<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Egress<\/strong><\/td>\n<td>Must be defined<\/td>\n<td>Must be Defined<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For <strong style=\"color: rgb(26, 26, 26)\">ingress-injected<\/strong> sessions, the packet is crafted as if it arrived from an external host \u2014 the destination MAC is set to the router&#8217;s own interface MAC so the packet is accepted and forwarded through the normal pipeline.<\/p>\n<p>For <strong style=\"color: rgb(26, 26, 26)\">egress-injected<\/strong> sessions, the packet is placed directly into the egress path, and for proper functioning of generated traffic the Ether header must be defined.<\/p>\n<blockquote>\n<p><strong style=\"color: rgb(26, 26, 26)\">Note:<\/strong> If your test scenario requires specific MAC addresses (e.g., to match an ACL or policy), you can override the defaults by including an Ether header in the packet definition:<\/p>\n<pre><code><span>packet Ether(src=\"aa:bb:cc:dd:ee:01\",dst=\"aa:bb:cc:dd:ee:02\")\/IP(...)\/UDP()\/Raw(...)\n<\/span><\/code><\/pre>\n<\/blockquote>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Automatic VLAN Tagging for Sub-interfaces<\/h3>\n<p>When traffic is injected on a <strong style=\"color: rgb(26, 26, 26)\">L3 sub-interface as the ingress interface<\/strong>, the packet generator automatically adds the required <strong style=\"color: rgb(26, 26, 26)\">VLAN header<\/strong> (802.1Q tag) to the packet based on the sub-interface&#8217;s VLAN configuration. You do not need to manually include a Dot1Q layer in the packet definition \u2014 the generator handles it for you.<\/p>\n<blockquote>\n<p><strong style=\"color: rgb(26, 26, 26)\">Note:<\/strong> Sub-interface as the egress interface is not supported as egress injected traffic is always placed on the wire. To Match such scenario, always use defined Ethernet Header with VLAN Tag.<\/p>\n<\/blockquote>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Forwarding Table Requirement<\/h3>\n<p><strong style=\"color: rgb(26, 26, 26)\">Ingress Inject Traffic on L3 interface:<\/strong><br \/>\nFor the generated traffic to be forwarded correctly, the router&#8217;s forwarding table (FIB) <strong style=\"color: rgb(26, 26, 26)\">must have a valid entry<\/strong> for the destination address in the packet. If there is no matching route for the packet&#8217;s destination IP, the packet will be dropped.<\/p>\n<blockquote>\n<p>Before starting a traffic generator session, verify that the destination prefix is reachable:<\/p>\n<pre><code><span>show route &lt;destination-ip&gt;\n<\/span><span>show cef &lt;destination-ip&gt;\n<\/span><\/code><\/pre>\n<\/blockquote>\n<p>This applies to both IPv4 and IPv6 packets. Without a corresponding FIB entry, the generated packets may not egress or get forwarded as expected \u2014 regardless of the configured rate or session state.<\/p>\n<p><strong style=\"color: rgb(26, 26, 26)\">Ingress Inject Traffic on L2 interface:<\/strong><br \/>\nFor ingress TGEN in a layer2 setup, auto fill of the the ethernet header is not supported, which is for L3 only. User needs to specify the Ether header and associated VLAN headers to inject traffic towards an Layer 2 interface.<\/p>\n<blockquote>\n<p>Example<\/p>\n<pre><code><span> Ether(src=\"1:2:3:1:2:3\",dst=\"1:2:3:a:b:c\")\/Dot1Q(vlan=2)\/IP(src=\"10.1.1.1\",dst=\"20.1.1.1\",ttl=64,tos=184)\/UDP()\n<\/span><\/code><\/pre>\n<\/blockquote>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Example Scenarios<\/h2>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Example 1: Basic IPv4 Traffic Between Two Routers<\/h3>\n<p><strong style=\"color: rgb(26, 26, 26)\">Topology:<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.anynet.ir\/blog\/wp-content\/uploads\/2026\/10\/npuh-tgen-1778748550539.webp\" alt=\"Image description\"><\/p>\n<p><strong style=\"color: rgb(26, 26, 26)\">Create and start a packet stream from R2 to simulate traffic from R1 toward R3:<\/strong><\/p>\n<pre><code><span>! Create the session\n<\/span><span>diagnostic packet-generator create t6 duration 600 rate 1000 packet IP(src=\"20.4.1.10\",dst=\"20.5.1.10\",ttl=64)\/UDP()\/Raw(load=\"a\"*200) ingress interface TwentyFiveGigE0\/0\/0\/4 location 0\/RP0\/CPU0\n<\/span><span>! Start the session\n<\/span><span>diagnostic packet-generator start t6 location all\n<\/span><span>! Verify packets are flowing\n<\/span><span>show diagnostic packet-generator status t6 location 0\/RP0\/CPU0\n<\/span><\/code><\/pre>\n<p>Confirm that <code>Run_State<\/code> shows <code>running<\/code> and packet\/byte counters are incrementing as shown below:<\/p>\n<pre><code><span>RP\/0\/RP0\/CPU0:N1#show diagnostic packet-generator status t6 location 0\/RP0\/CPU0\n<\/span><span>Thu May 14 13:35:40.463 IST\n<\/span><span>0\/RP0\/CPU0:\n<\/span><span>Name Run_State Type Capture Set_Rate(pps) Applied_Rate(pps) Duration(sec) TC Phy_Interface NPU Slice IFG Packets Bytes \n<\/span><span>================================================================================================================================================================\n<\/span><span>T6 Running Ingress False 1000 998 600 0 TF0\/0\/0\/4 0 0 0 12562 3529922 \n<\/span><span>----------------------------------------------------------------------------------------------------------------------------------------------------------------\n<\/span><span>Packet Details: \n<\/span><span>###[ Ethernet]### \n<\/span><span> dst = f4:33:92:91:57:15\n<\/span><span> src = 00:00:00:00:00:01\n<\/span><span> type = IPv4\n<\/span><span>###[ IP]### \n<\/span><span> version = 4\n<\/span><span> ihl = 5\n<\/span><span> tos = 0x0\n<\/span><span> len = 228\n<\/span><span> id = 1\n<\/span><span> flags = \n<\/span><span> frag = 0\n<\/span><span> ttl = 64\n<\/span><span> proto = udp\n<\/span><span> chksum = 0x4fec\n<\/span><span> src = 20.4.1.10\n<\/span><span> dst = 20.5.1.10\n<\/span><span> \\options \\\n<\/span><span>!! Output truncated for brevity\n<\/span><\/code><\/pre>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Example 2: IPv4 Packet with DSCP Marking<\/h3>\n<p>To test QoS policies, inject packets with a specific <strong style=\"color: rgb(26, 26, 26)\">DSCP<\/strong> value. The DSCP value is encoded in the <code>tos<\/code> field of the IP header. For example, DSCP <strong style=\"color: rgb(26, 26, 26)\">EF (46)<\/strong> maps to TOS value <strong style=\"color: rgb(26, 26, 26)\">184<\/strong> (<code>46 &lt;&lt; 2 = 184<\/code>).<\/p>\n<pre><code><span>diagnostic packet-generator create t8 duration 600 rate 1000 packet IP(src=\"20.4.1.10\",dst=\"20.5.1.10\",tos=184,ttl=64)\/UDP()\/Raw(load=\"a\"*200) ingress interface TwentyFiveGigE0\/0\/0\/4 location 0\/RP0\/CPU0\n<\/span><\/code><\/pre>\n<hr>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Example 3: IPv6 Packet with Traffic Class (DSCP)<\/h3>\n<p>For IPv6, the DSCP is carried in the <strong style=\"color: rgb(26, 26, 26)\">Traffic Class<\/strong> (<code>tc<\/code>) field. The same EF (46) DSCP maps to <code>tc=184<\/code>.<\/p>\n<pre><code><span>diagnostic packet-generator create t1 rate 10000 duration infinte packet IPv6(src=\"2001:db8:1::2\",dst=\"2001:db8:2::2\",tc=184,hlim=16)\/UDP()\/Raw(load=\"f\"*900) ingress interface TwentyFiveGigE0\/0\/0\/4 location 0\/RP0\/CPU0\n<\/span><\/code><\/pre>\n<hr>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Example 4: Running Multiple Sessions Simultaneously<\/h3>\n<p>You can run multiple sessions at the same time, each with different parameters. In this example, two IPv4 streams are created with different IP Precedence values (4 and 5):<\/p>\n<pre><code><span>! Session 1: IPv4 with Precedence 4 (TOS=128) for 10 minutes\n<\/span><span>diagnostic packet-generator create t1 rate 10000 duration 600 packet IP(src=\"20.4.1.10\",dst=\"20.5.1.10\",tos=128,ttl=64)\/UDP()\/Raw(load=\"f\"*900) ingress interface TwentyFiveGigE0\/0\/0\/4 location 0\/RP0\/CPU0\n<\/span><span>! Session 2: IPv4 with Precedence 5 (TOS=160) for 15 minutes\n<\/span><span>diagnostic packet-generator create t2 rate 10000 duration 900 packet IP(src=\"20.4.1.10\",dst=\"20.5.1.10\",tos=160,ttl=64)\/UDP()\/Raw(load=\"f\"*900) ingress interface TwentyFiveGigE0\/0\/0\/4 location 0\/RP0\/CPU0\n<\/span><span>! Start both\n<\/span><span>diagnostic packet-generator start t1 location all\n<\/span><span>diagnostic packet-generator start t2 location all\n<\/span><span>! you can Also use \n<\/span><span>diagnostic packet-generator start all location all\n<\/span><span>! Verify all sessions\n<\/span><span>show diagnostic packet-generator status all location 0\/RP0\/CPU0\n<\/span><\/code><\/pre>\n<pre><code><span>RP\/0\/RP0\/CPU0:N1#show diagnostic packet-generator status all location all \n<\/span><span>Thu May 14 13:57:29.497 IST\n<\/span><span>0\/RP0\/CPU0:\n<\/span><span>Name Run_State Type Capture Set_Rate(pps) Applied_Rate(pps) Duration(sec) TC Phy_Interface NPU Slice IFG Packets Bytes \n<\/span><span>================================================================================================================================================================\n<\/span><span>T1 Running Ingress False 10000 10000 600 0 TF0\/0\/0\/4 0 0 0 352815 346111515 \n<\/span><span>T2 Running Ingress False 10000 10000 900 0 TF0\/0\/0\/4 0 0 0 352804 346100724 \n<\/span><span>----------------------------------------------------------------------------------------------------------------------------------------------------------------\n<\/span><span>Total packet generators: 2\n<\/span><\/code><\/pre>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Quick Reference: Session Management Commands<\/h2>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Action<\/th>\n<th>Command<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Create<\/strong> a session<\/td>\n<td><code>diagnostic packet-generator create &lt;name&gt; rate &lt;pps&gt; duration &lt;seconds|infinite&gt; packet &lt;definition&gt; ingress|egress interface &lt;intf&gt; location &lt;node&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Start<\/strong> a session<\/td>\n<td><code>diagnostic packet-generator start &lt;name&gt; location all<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Verify<\/strong> a session<\/td>\n<td><code>show diagnostic packet-generator status &lt;name|all&gt; location &lt;node&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Stop<\/strong> a session<\/td>\n<td><code>diagnostic packet-generator stop &lt;name&gt; location &lt;node&gt;|all<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Delete<\/strong> a session<\/td>\n<td><code>diagnostic packet-generator delete &lt;name&gt; location &lt;node&gt;|all<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Key Constraints and Limits<\/h2>\n<ul>\n<li><strong style=\"color: rgb(26, 26, 26)\">Maximum rate:<\/strong> depends on the port speed but low-rate flows are recommended. More pps takes more memory resources.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Maximum Bandwidth:<\/strong> Depends on the port speed, stream rate and internal memory resources. Maximum BW tested is 50G with 8 simultaneous sessions.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Maximum packet size:<\/strong> 4K bytes<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Maximum number of flows:<\/strong> Depends on pps, packet size and internal memory resources. On 8712, with low pps and consistent packet size, we have tested upto 256 flows. On 8011, we have tested upto 160 flows.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Packet syntax:<\/strong> Scapy-style \u2014 <code>IP()<\/code>, <code>IPv6()<\/code>, <code>UDP()<\/code>, <code>TCP()<\/code>, <code>Raw()<\/code><\/li>\n<li>No <strong style=\"color: rgb(26, 26, 26)\">capture<\/strong> capability support<\/li>\n<\/ul>\n<p>Below table captures some scale we characterized in our lab with packet headers including auto generated headers not exceeding 62 bytes and payload filled with the same byte:<\/p>\n<div style=\"max-width: 100%\" class=\"table-responsive\">\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>PID<\/th>\n<th>NPU<\/th>\n<th>Packet Size<\/th>\n<th>Interface Speed<\/th>\n<th>Max Flows<\/th>\n<th>PPS\/Flow<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>8712-MOD<\/td>\n<td>K100<\/td>\n<td>64, 1K,2K,4K<\/td>\n<td>1G<\/td>\n<td>256<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">100<\/strong><\/td>\n<\/tr>\n<tr>\n<td>8712-MOD<\/td>\n<td>K100<\/td>\n<td>64, 1K,2K,4K<\/td>\n<td>10G<\/td>\n<td>256<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">1000<\/strong><\/td>\n<\/tr>\n<tr>\n<td>8712-MOD<\/td>\n<td>K100<\/td>\n<td>64, 1K,2K,4K<\/td>\n<td>100G<\/td>\n<td>256<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">1000<\/strong><\/td>\n<\/tr>\n<tr>\n<td>8011-4G24Y4H<\/td>\n<td>A100<\/td>\n<td>64, 1K,2K,4K<\/td>\n<td>1G<\/td>\n<td>256<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">100<\/strong><\/td>\n<\/tr>\n<tr>\n<td>8011-4G24Y4H<\/td>\n<td>A100<\/td>\n<td>64, 1K,2K,4K<\/td>\n<td>10G<\/td>\n<td>160<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">1000<\/strong><\/td>\n<\/tr>\n<tr>\n<td>8011-4G24Y4H<\/td>\n<td>A100<\/td>\n<td>64, 1K,2K,4K<\/td>\n<td>100G<\/td>\n<td>160<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">1000<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Additional Resources<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/iosxr\/cisco8000\/system-monitoring\/b-system-monitoring-cr-cisco8k\/tgen-commands.html#diagnostic-packet-generator-create\" style=\"color: rgb(0, 102, 204)\">Cisco 8000 Traffic Generator Command Reference<\/a> \u2014 official IOS XR command reference for <code>diagnostic packet-generator<\/code>.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Built-in Traffic Generator on Cisco 8000 Series Routers What Is the Built-in Traffic Generator? The Cisco 8000 series routers running IOS XR include a\u2026<\/p>\n","protected":false},"author":1,"featured_media":233,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[220,69,229],"tags":[],"class_list":["post-235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-8000-en","category-iosxr-en-en","category-sione-en"],"_links":{"self":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/posts\/235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":0,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/media\/233"}],"wp:attachment":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}