Giter Site home page Giter Site logo

ixia-c's Introduction


Ixia-c

A powerful traffic generator based on Open Traffic Generator API

Release v0.0.1-2543 Open Traffic Generator v0.7.2 snappi v0.7.3 news news Slack Status

Quick Demo  •  Quick Start  •  Key Features  •  Documentation  •  Use Cases  •  Roadmap  •  FAQ

What is Ixia-c ?

Ixia-c is a modern, powerful and API-driven traffic generator designed to cater to the needs of hyperscalers, network hardware vendors and hobbyists alike.

It is available for free and distributed / deployed as a multi-container application consisting of a controller, a traffic-engine and an app-usage-reporter.

As a reference implementation of Open Traffic Generator API, Ixia-c supports client SDKs in various languages, most prevalent being snappi (Python SDK).

Ixia-c Deployment for Bidirectional Traffic

Keysight also offers a well supported version with no restrictions on performance and scalability (e.g. Keysight's Hardware Traffic Generators). Scripts written for the free version are compatible with this version.

Quick Demo

Quick Demo

Quick Start

Before proceeding, please ensure system prerequisites are met.

  • Deploy Ixia-c

    # start ixia-c controller
    docker run -d --network=host ixiacom/ixia-c-controller --accept-eula
    docker run --net=host -d ixiacom/ixia-c-app-usage-reporter
    
    # start ixia-c traffic engine on eth1 interface
    docker run -d --network=host --privileged     \
      -e ARG_IFACE_LIST="virtual@af_packet,eth1"  \
      -e OPT_NO_HUGEPAGES="Yes"                   \
      ixiacom/ixia-c-traffic-engine

    Once the containers are up, accessing https://controller-ip/docs/ will open up an interactive REST API documentation. Check out deployment guide for more details.

  • Generate Traffic using snappi

    # clone repo for test suites, useful helper scripts, deployment files, etc.
    git clone --recurse-submodules https://github.com/open-traffic-generator/ixia-c && cd ixia-c
    
    # install snappi
    python -m pip install --upgrade snappi==0.7.3
    # run a standalone script to generate TCP traffic and fetch metrics
    python snappi-tests/scripts/quickstart_snappi.py

    Upon successful run, you should see port metrics printed on console.

    Expand this section for overview of the script we just ran. For more details on snappi, checkout hello-snappi.
    import snappi
    # create a new API instance where location points to controller
    api = snappi.api(location="https://localhost", verify=False)
    
    # create a config object to be pushed to controller
    config = api.config()
    # add a port with location pointing to traffic engine
    prt = config.ports.port(name='prt', location='localhost:5555')[-1]
    # add a flow and assign endpoints
    flw = config.flows.flow(name='flw')[-1]
    flw.tx_rx.port.tx_name = prt.name
    
    # configure 100 packets to be sent, each having a size of 128 bytes
    flw.size.fixed = 128
    flw.duration.fixed_packets.packets = 100
    
    # add Ethernet, IP and TCP protocol headers with defaults
    flw.packet.ethernet().ipv4().tcp()
    
    # push configuration
    api.set_config(config)
    
    # start transmitting configured flows
    ts = api.transmit_state()
    ts.state = ts.START
    api.set_transmit_state(ts)
    
    # fetch & print port metrics
    req = api.metrics_request()
    req.port.port_names = [prt.name]
    print(api.get_metrics(req))
  • Optionally, Generate Traffic Using curl

    We can also pass equivalent JSON configuration directly to ixia-c controller, without installing snappi, using curl.
    The detailed description of each node (and their attributes) in JSON configuration are well documented here.

    # push the contents of config file snappi-tests/configs/quickstart_snappi.json
    curl -k https://localhost/config -H "Content-Type: application/json" -d @snappi-tests/configs/quickstart_snappi.json
    # start transmitting configured flows
    curl -k https://localhost/control/transmit -H  "Content-Type: application/json" -d '{"state": "start"}'
    # fetch all port metrics
    curl -k https://localhost/results/metrics -H  "Content-Type: application/json" -d '{"choice": "port"}}'

Key Features

  • High Performance
    • Run on servers or Keysight hardware
    • Generate kbps to Tbps of traffic using same script
    • 10Gbps @ 64 byte frame size using one Xeon class core
    • Built using DPDK
  • Fast REST API for automation
    • Easily integrate with test frameworks like pytest
    • Easily integrate into CI/CD pipelines with Jenkins, GitHub, GitLab
  • Up to 256 flows per port. Each Flow supports:
    • Packet Templates for Ethernet, VLAN, VXLAN, GTPv1, GTPv2, IPv4, IPv6, ICMP, ICMPv6, GRE, UDP, & TCP. More protocols are on the way.
    • Ability to use tools like Scapy to add headers for unsupported protocols.
    • Manipulation of any field in the packet headers
    • Patterns to modify common packet header fields to generate millions of unique packets
    • Ability to track flows based on common packet header fields
    • Configurable frame size
    • Rate specification in pps (packets per second) or % line-rate
    • Ability to send bursts
  • Statistics
    • Per port or per flow
    • One way latency measurements (min, max, average) on a per flow basis
  • Capture
    • Packets with filters
    • Write to PCAP or redirect to tcpdump

ixia-c's People

Contributors

ashutshkumr avatar shramroy avatar ankur-sheth avatar biplamal avatar rudranil-das avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.