open-traffic-generator / otgen Goto Github PK
View Code? Open in Web Editor NEWOTGen: Open Traffic Generator CLI Tool
License: MIT License
OTGen: Open Traffic Generator CLI Tool
License: MIT License
According to the readme, it should be localhost:5556
but instead it is localhost:5555
:
otgen version
version: 0.4.0-rc3
commit: 769844d
date: 2022-11-28T01:03:20Z
source: https://github.com/open-traffic-generator/otgen
env | grep OTG
otgen create device -p p2
devices:
- ethernets:
- ipv4_addresses:
- address: 192.0.2.1
gateway: 192.0.2.2
name: otg1.eth[0].ipv4[0]
prefix: 24
mac: 02:00:00:00:02:aa
mtu: 1500
name: otg1.eth[0]
port_name: p2
name: otg1
ports:
- location: localhost:5555
name: p2
Add traffic test to the CI pipeline:
has to be done before ver 0.1 is released
Automatically start protocols as part of run
command if OTG configs has emulated devices. Wait for supported protocols to come up, advertise all configured routes and receive an expected number of routes.
BGP example:
otgen run --rxbgp 10|2x
Protocol support for detecting it is up and converged:
otgen create device -n otg1 -p p1 --ip 192.0.2.1 --gw 192.0.2.2 --prefix 30 --location "localhost:5555+localhost:50071" | \
otgen add device -n otg2 -p p2 --ip 192.0.2.5 --gw 192.0.2.6 --prefix 30 --location "localhost:5556+localhost:50072" | \
otgen add flow --tx otg1 --rx otg2 --dmac auto --src 192.0.2.1 --dst 192.0.2.5
Device TODO:
name
port
and location
for ethernets
, with a limitation of a single ethernet per devicemac
, with a limitation of a single ethernet per deviceip
, gw
and prefix
, with a limitation of a single ethernet per deviceFlow TODO:
--tx/--rx
using device names, with a limitation of a single ethernet per deviceExample usage:
otgen create tcp -s 1.1.1.1 -d 2.2.2.2 -p 80 --rate 1000pps
should produce an OTG config on stdout that can be further passed to otgen run
stdin
TODO:
flow
boilerplate with TCPdst
parameter - single valuesrc
parameter - single valuesmac
/dmac
params - single valuerate
parametercount
parameter - fixed_packetssize
parameter - fixedport
parametertcp | udp
selectoripv4 | ipv6
selectoricmp
protoenvsubst
add
alternative to create
to read config from stdin and add to itswap
Moved these to #19
delay
parameter for flowsflow
a default subcommanddelay
parameter for flowsflow
a default subcommandHi, I am testing the KNE Lab with BGP and I am getting this error, this corresponds to not having access to the "ghcr.io/open-traffic-generator/licensed/ixia-c-protocol-engine" image?.
When executing this:
kubectl exec -it otgen -- /bin/bash
export OTG_API="https://service-https-keng-controller.keng-ceos.svc.cluster.local:8443"
otgen create device -n otg1 -p p1 -l eth1 --ip 192.0.2.1 --prefix 30 --gw 192.0.2.2 |
otgen add device -n otg2 -p p2 -l eth2 --ip 192.0.2.5 --prefix 30 --gw 192.0.2.6 |
otgen add bgp -d otg1 --asn 1111 --route 198.51.100.0/24 |
otgen add bgp -d otg2 --asn 2222 --route 203.0.113.0/24 |
otgen add flow -n f-1-2 --tx otg1 --rx otg2 --src 198.51.100.1 --dst 203.0.113.1 --count 1000 --rate 100 --size 128 |
otgen add flow -n f-2-1 --tx otg2 --rx otg1 --dst 198.51.100.1 --src 203.0.113.1 --count 2000 --rate 200 --size 256 |
otgen --log info run -k -m flow | otgen transform -m flow | otgen display -m table
exit
this is the error
INFO[0000] Applying OTG config...
ERRO[0000] OTG API error code: 500
ERRO[0000] OTG API error kind: internal
ERRO[0000] OTG API error messages:
ERRO[0000] Protocol service for port "p2" is not registered
ERRO[0000] Error occurred while setting Protocol config for user common:Protocol service for port "p1" is not registered
FATA[0000] Fatal OTG error, exiting...
Ixia-c-controller now uses port 8443 for OTG API by default. Need to match it with otgen default OTG API port
use of device-bound flows typically implies use of protocols, otherwise raw flows would often suffice. using arp (auto) by default for such flows is logical
this would simplify the usage like this:
otgen create flow -P tcp -s 4.4.4.1 -d 4.4.4.2 -p 80 -r 100 | \
otgen run --metrics flow | otgen report --mode table
Useful to terminate for continuous mode w/o having to destroy ixia-c containers
https://localhost
--log
--api
is givenNext Release
Backlog
Add export
command to convert OTG input to human-readable format. As a start, for output use Markdown or HTML tables with each flow or device being a column, and rows representing parameters in a condensed fashion - removing unnecessary chattiness of OTG model.
Add BGP router to an existing device:
otgen create device --name r1 --ip 1.1.1.1 --gw 1.1.1.2 | \
otgen add bgp --device r1 --asn 1111 --peer 1.1.1.2 --prefix 4.4.4.0/24
TODO
Currently, ixia-c doesn't support src mac set to auto
, and treats missing src mac block as 00:00:00:00:00:00
. It is assumed that the flow has to have an src mac set explicitly. For device bound flows a good default should be a copy of the MAC from a device set as a tx
on the flow
--file
parameterNext release
Backlog
Pull current config from an OTG API and print it
Take OTG config from stdin and update values based on parameters
curl ...
with release buildExpand ${varname} in input OTG with matching env var value. Good use case is defining location param for OTH ports.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.