{"id":22220818,"url":"https://github.com/nokia/twampy","last_synced_at":"2025-04-05T20:04:35.923Z","repository":{"id":26366389,"uuid":"100684362","full_name":"nokia/twampy","owner":"nokia","description":"Python tools for TWAMP and TWAMP light (STAMP)","archived":false,"fork":false,"pushed_at":"2025-03-10T10:13:22.000Z","size":32,"stargazers_count":87,"open_issues_count":3,"forks_count":46,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T19:01:45.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nokia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-18T07:14:33.000Z","updated_at":"2025-03-12T17:22:46.000Z","dependencies_parsed_at":"2024-12-23T09:26:51.670Z","dependency_job_id":"a435d506-17b1-4445-b096-d05ec1d97ca5","html_url":"https://github.com/nokia/twampy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Ftwampy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Ftwampy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Ftwampy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Ftwampy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nokia","download_url":"https://codeload.github.com/nokia/twampy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393566,"owners_count":20931812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T23:10:04.841Z","updated_at":"2025-04-05T20:04:35.886Z","avatar_url":"https://github.com/nokia.png","language":"Python","funding_links":[],"categories":["Testing"],"sub_categories":["GPS, Time"],"readme":"# Python tools for TWAMP and TWAMP light\nTwampy is a Python implementation of the Two-Way Active Measurement\nProtocol (TWAMP and TWAMP light) as defined in RFC5357. This tool\nwas developed to validate the Nokia SR OS TWAMP implementation.\n\n## Supported features\n* unauthenticated mode\n* IPv4 and IPv6\n* Support for DSCP, Padding, JumboFrames, IMIX\n* Support to set DF flag (don't fragment)\n* Basic Delay, Jitter, Loss statistics (jitter according to RFC1889)\n\n##  Modes of operation\n* TWAMP Controller\n* TWAMP Control Client\n* TWAMP Test Session Sender\n* TWAMP light Reflector\n\n## Installation\n```\n$ git clone https://github.com/nokia/twampy\nCloning into 'twampy'...\n```\n\n##  Usage Notes\nUse padding to configure bidirectional packet/frame sizes:\n\nIP Version | Padding | Packet Size | Frame Size\n:---:|:---:| --- | ---\nIPv4 | \u003e=27 | Padding+42 | Padding+56\nIPv6 | \u003e=27 | Padding+62 | Padding+76\n\nPadding default is 27 bytes (to enforce bidirectional behavior).\n\nUse padding value '-1' for IMIX traffic generation:\n\nL2 Size | Packets | Ratio(Packets) | Ratio(Volume)\n---:|:---:| ---:| ---:\n64 | 7 | 58% | 10%\n590 | 4 | 33% | 55%\n1514 | 1 | 8% | 35%\n\nTOS/DSCP user settings neet to be enabled on WINDOWS:\n1. Open Registry Editor\n2. Go to key:\n      HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\TcpIp\\Parameters\n3. Create new DWORD value:\n\nEntryName | Value\n--- | ---\nDisableUserTOSSetting | 0x00000000 (0)\n\n4. Quit Registry Editor\n5. Restart you computer\n6. Command prompt for validation (capture needed)\n\n      $ ping \u003cipaddress\u003e -v 8\n      \nReference: http://support.microsoft.com/kb/248611\n\nDF flag implementation supports Linux und Windows. To support other\nOperating Systems such as OS X (darwin) or FreeBSD the according\ncode such as sockopts need to be added and validated.\n\n## Possible Improvements\n* authenticated and encrypted mode\n* sending intervals variation\n* enhanced statistics\n  * bining and interim statistics\n  * late arrived packets\n  * smokeping like graphics\n  * median on latency\n  * improved jitter (rfc3393, statistical variance formula):\n    jitter:=sqrt(SumOf((D[i]-average(D))^2)/ReceivedProbesCount)\n* daemon mode: NETCONF/YANG controlled, ...\n* enhanced failure handling (catch exceptions)\n* per probe time-out for statistics (late arrival)\n* Validation with other operating systems (such as FreeBSD)\n* Support for RFC 5938 Individual Session Control\n* Support for RFC 6038 Reflect Octets Symmetrical Size\n\n## Error codes (as per RFC 4656)\nError Code | Description\n--- | ---\n0 | OK\n1 | Failure, reason unspecified (catch-all).\n2 | Internal error.\n3 | Some aspect of request is not supported.\n4 | Cannot perform request due to permanent resource limitations.\n5 | Cannot perform request due to temporary resource limitations.\n\n## Usage example: getting help\nHelp on modes of operation:\n```\n$ ./twampy.py --help\nusage: twampy.py [-h] [-v]\n                 {responder,sender,controller,controlclient,dscptable} ...\n\npositional arguments:\n  {responder,sender,controller,controlclient,dscptable}\n                        twampy sub-commands\n    responder           TWL responder\n    sender              TWL sender\n    controller          TWAMP controller\n    controlclient       TWAMP control client\n    dscptable           print DSCP table\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n```\n\nSpecific help:\n```\n$ ./twampy.py sender --help\nusage: twampy.py sender [-h] [-l filename] [-q | -v | -d]\n                        [--tos type-of-service] [--dscp dscp-value]\n                        [--ttl time-to-live] [--padding bytes]\n                        [--do-not-fragment] [-i msec] [-c packets]\n                        [remote-ip:port] [local-ip:port]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -q, --quiet           disable logging\n  -v, --verbose         enhanced logging\n  -d, --debug           extensive logging\n\nDebug Options:\n  -l filename, --logfile filename\n                        Specify the logfile (default: \u003cstdout\u003e)\n\nIP socket options:\n  --tos type-of-service        IP TOS value\n  --dscp dscp-value            IP DSCP value\n  --ttl time-to-live           [1..128]\n  --padding bytes              IP/UDP mtu value\n  --do-not-fragment            keyword (do-not-fragment)\n\nTWL sender options:\n  remote-ip:port\n  local-ip:port\n  -i msec, --interval msec     [100,1000]\n  -c packets, --count packets  [1..9999]\n```\n\n\n\n## Usage example against SR OS TWAMP server\nRouter configuration:\n```\nA:VSR# configure test-oam\nA:VSR\u003econfig\u003etest-oam\u003e# info\n----------------------------------------------\n        twamp\n            server\n                prefix 0.0.0.0/0 create\n                exit\n                no shutdown\n            exit\n        exit\n----------------------------------------------\n```\nRunning the test:\n```\n$ ./twampy.py controller 192.168.255.2\n===============================================================================\nDirection         Min         Max         Avg          Jitter     Loss\n-------------------------------------------------------------------------------\n  Outbound:       92.89ms    196.63ms     95.15ms       576us      0.0%\n  Inbound:            0us         0us         0us         0us      0.0%\n  Roundtrip:        339us    103.53ms      1.91ms       638us      0.0%\n-------------------------------------------------------------------------------\n                                                    Jitter Algorithm [RFC1889]\n===============================================================================\n```\n\n\n## License\n\nThis project is licensed under the BSD-3-Clause license - see the [LICENSE](https://github.com/nokia/twampy/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Ftwampy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnokia%2Ftwampy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Ftwampy/lists"}