Coder Social home page Coder Social logo

otgen's People

Contributors

biplamal avatar bortok avatar dependabot[bot] avatar lemoncrust avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

otgen's Issues

default location for `otgen create device -p p2` is incorrect

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

CI with traffic

Add traffic test to the CI pipeline:

  • docker compose with two ixia-c-te ports b2b raw traffic
  • docker compose with two ixia-c-te & pe ports and FRR DUT with traffic between two emulated devices for ARP & BGP

start protocols capability with waiting for BGPv4 to converge

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:

  • BGPv4
  • BGPv6 - moved to a separate task

add `flow --dmac auto` for ARP/ND

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 

`create device` function to build OTG device config

Device TODO:

  • name
  • port and location for ethernets, with a limitation of a single ethernet per device
  • mac, with a limitation of a single ethernet per device
  • ip, gw and prefix, with a limitation of a single ethernet per device

Flow TODO:

  • link flows to devices via --tx/--rx using device names, with a limitation of a single ethernet per device

`create flow` function to build OTG flow config

Example 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 TCP
  • dst parameter - single value
  • src parameter - single value
  • smac/dmac params - single value
  • rate parameter
  • count parameter - fixed_packets
  • size parameter - fixed
  • port parameter
  • flow name
  • metrics enable
    • latency modes
  • tcp | udp selector
  • ipv4 | ipv6 selector
  • icmp proto
  • review env vars for envsubst
  • mac address env vars
  • ip address env vars
  • select tx and rx ports
  • add alternative to create to read config from stdin and add to it
  • swap

Moved these to #19

  • delay parameter for flows
  • make flow a default subcommand
  • add array of values
  • add increment and decrement values

`create flow` enhancements

  • delay parameter for flows
  • make flow a default subcommand
  • add array of values
  • add increment and decrement values

KNE Lab con BGP, error with p1 and p2

Hi, 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...

`run` todo

  • checkResponse for FlowMetric (if needed) - not needed
  • PortMetrics
  • read from stdin
  • json input
  • reporting interval as a parameter
  • ignore x.509 validation
  • default API endpoint to https://localhost
  • log level option --log
  • read API URL from ENV:OTG_API, if no --api is given

Next Release

  • option to report multiple metrics types (port, flow)
  • timeout for running time

Backlog

  • metrics header, with on/off via a parameter
  • grpc for API endpoint
  • timeout for API communications
  • pcap recording
  • non-zero exit codes on failure
  • only report final stats, no intermediate

Add `export` command to convert OTG input to human-readable format

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` capability: IPv4 implementation

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

  • --device (emulated device)
  • --id (router_id)
  • --asn
  • --peer
  • --type ebgp|ibgp
  • --route
  • use default gw for peer by default

Copy SMAC from a TX device into a flow

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

`transform` todo

  • built-in pass-through template
  • template --file parameter
  • built-in template for PortMetric: frames
  • built-in template for PortMetric: bytes, rate
  • built-in template for FlowMetric

Next release

  • flow latency
  • built-in table templates

Backlog

  • flow timestamps
  • export to csv

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.