{"id":18678205,"url":"https://github.com/srl-labs/srl-sros-telemetry-lab","last_synced_at":"2025-04-12T02:40:41.096Z","repository":{"id":110641754,"uuid":"558699279","full_name":"srl-labs/srl-sros-telemetry-lab","owner":"srl-labs","description":"Interactive Streaming Telemetry lab with  Nokia SR Linux and Nokia SR OS","archived":false,"fork":false,"pushed_at":"2023-05-24T13:49:51.000Z","size":49212,"stargazers_count":22,"open_issues_count":1,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-05T22:08:19.362Z","etag":null,"topics":["clab-topo"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/srl-labs.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":"2022-10-28T05:04:05.000Z","updated_at":"2025-02-17T08:53:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"105183f3-a26d-471f-a236-81bc334f06c9","html_url":"https://github.com/srl-labs/srl-sros-telemetry-lab","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/srl-labs%2Fsrl-sros-telemetry-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-sros-telemetry-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-sros-telemetry-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-sros-telemetry-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srl-labs","download_url":"https://codeload.github.com/srl-labs/srl-sros-telemetry-lab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248507465,"owners_count":21115605,"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":["clab-topo"],"created_at":"2024-11-07T09:36:21.636Z","updated_at":"2025-04-12T02:40:41.089Z","avatar_url":"https://github.com/srl-labs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SR Linux/SROS Streaming Telemetry Lab\n\nSR Linux has first-class Streaming Telemetry support thanks to 100% YANG coverage of state and config data. The wholistic coverage enables SR Linux users to stream **any** data off of the NOS with on-change, sample, or target-defined support. A discrepancy in visibility across APIs is not about SR Linux.\n\nThe Nokia Service Router Operating System (SR OS) is robust and scalable OS and provides the foundation of Nokia's comprehensive portfolio of physical and virtualized routers. Provides Streaming Telemetry based on the OpenConfig gnmi.proto and the proprietary NOKIA SR OS YANG data models suporting sample, target-defined, on-change telemetry based on dial-in or dial-out calls.\n\nThis lab is a small augmentation of the original srl-telemetry-lab \u003chttps://github.com/srl-labs/srl-telemetry-lab\u003e wich basically represents a small Clos fabric with [Nokia SR Linux](https://learn.srlinux.dev/) switches running as containers and a DC gateways layer composed by [Nokia SROS](https://www.nokia.com/networks/technologies/service-router-operating-system/) DC Gateways on a containerized vSIM image connected through a \"tc mirred function\" that is very well described in the @hellt forum (https://netdevops.me/2021/transparently-redirecting-packetsframes-between-interfaces/). The lab topology consists of a Clos/DCI, plus a Streaming Telemetry stack comprised of gnmic, prometheus and grafana applications.\n\nGoals of this lab:\n\n1. Demonstrate how a telemetry stack can be incorporated into the same clab topology file.\n2. Explain SR Linux wholistic telemetry support.\n3. Demonstrate SR Linux and SROS interoperability in the DC Fabric.\n4. Explain what a SROS based telemetry subscription is.\n5. Provide practical configuration examples for the gnmic collector to subscribe to fabric nodes and export metrics to Prometheus TSDB.\n6. Introduce advanced Grafana dashboarding with FlowChart plugin rendering port speeds and statuses.\n\n## Deploying the lab\n\nThe lab is deployed with [containerlab](https://containerlab.dev) project where [`st.clab.yml`](st.clab.yml) file declaratively describes the lab topology.\n\n```bash\n# deploy a lab\nclab deploy\n```\n\nOnce the lab is completed, it can be removed with the destroy command.\n\n```bash\n# destroy a lab\nclab destroy\n```\n\n## Accessing the network elements\n\nOnce the lab has been deployed, the different SR Linux/SROS nodes can be accessed via SSH through their management IP address, given in the summary displayed after the execution of the deploy command. It is also possible to reach those nodes directly via their hostname, defined in the topology file. Linux clients cannot be reached via SSH, as it is not enabled, but it is possible to connect to them with a docker exec command.\n\n```bash\n# reach a SR Linux leaf, spine or a dcgw via SSH\nssh admin@leaf1\nssh admin@spine1\nssh admin@dcgw1\n\n# reach a Linux client via Docker\ndocker exec -it client1 bash\n```\n\n## Fabric configuration\n\nThe DC fabric used in this lab consists of three leaves, two spines and two DC gateways interconnected with each other as shown in the diagram.\n\n![pic1](https://user-images.githubusercontent.com/86619221/205601635-609eb772-833b-4ac9-b2ab-dc3ed661c4a1.JPG)\n\nLeaves and spines use Nokia SR Linux IXR-D2 and IXR-D3L chassis respectively, DC gateways uses SR-1 chassis. Each network element of this topology is equipped with a [Fabric startup configuration file](configs/fabric) and [DCI startup configuration file](configs/dci) that is applied at the node's startup.\n\nOnce booted, network nodes will come up with interfaces, underlay protocols and overlay service configured. The fabric is configured with Layer 2 EVPN service between the leaves and DC gateways.\n\n### Verifying the underlay and overlay status\n\nThe underlay network is provided by eBGP, and the overlay network, by iBGP. By connecting via SSH to one of the leaves, it is possible to verify the status of those BGP sessions.\n\n```\nA:leaf1# show network-instance protocols bgp neighbor  \n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\nBGP neighbor summary for network-instance \"default\"\nFlags: S static, D dynamic, L discovered by LLDP, B BFD enabled, - disabled, * slow\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n+-----------------------+----------------------------------+-----------------------+--------+------------+-------------------+-------------------+-----------------+----------------------------------+\n|       Net-Inst        |               Peer               |         Group         | Flags  |  Peer-AS   |       State       |      Uptime       |    AFI/SAFI     |          [Rx/Active/Tx]          |\n+=======================+==================================+=======================+========+============+===================+===================+=================+==================================+\n| default               | 10.0.2.1                         | iBGP-overlay          | S      | 100        | established       | 0d:0h:53m:57s     | evpn            | [4/4/1]                          |\n| default               | 10.0.2.2                         | iBGP-overlay          | S      | 100        | established       | 0d:0h:53m:57s     | evpn            | [4/0/1]                          |\n| default               | 192.168.11.1                     | eBGP                  | S      | 201        | established       | 0d:0h:54m:2s      | ipv4-unicast    | [5/5/2]                          |\n| default               | 192.168.12.1                     | eBGP                  | S      | 201        | established       | 0d:0h:54m:2s      | ipv4-unicast    | [5/5/6]                          |\n+-----------------------+----------------------------------+-----------------------+--------+------------+-------------------+-------------------+-----------------+----------------------------------+\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n```\n\nBy connecting via SSH is also possible to one of the DC gateways verify the stats of those BGP sesions from the SROS perspective.\n\n```\nA:admin@dcgw1# show router bgp summary | match Summary post-lines 20\nBGP Summary\n===============================================================================\nLegend : D - Dynamic Neighbor\n===============================================================================\nNeighbor\nDescription\n                   AS PktRcvd InQ  Up/Down   State|Rcv/Act/Sent (Addr Family)\n                      PktSent OutQ\n-------------------------------------------------------------------------------\n10.0.2.1\n               100        136    0 00h52m38s 4/3/1 (Evpn)\n                          115    0           \n10.0.2.2\n               100        137    0 00h53m02s 4/0/1 (Evpn)\n                          116    0           \n192.168.41.0\n               201        116    0 00h53m45s 5/4/1 (IPv4)\n                          114    0           \n192.168.41.2\n               201        116    0 00h53m55s 5/4/1 (IPv4)\n                          113    0           \n```\n\n## Running traffic\n\nTo run traffic between the nodes, leverage `traffic.sh` control script.\n\nTo start the traffic:\n\n* `bash traffic.sh start all` - start traffic between all nodes\n* `bash traffic.sh start 1-2` - start traffic between client1 and client2\n* `bash traffic.sh start 1-3` - start traffic between client1 and client3\n* `bash traffic.sh start 4-6` - start traffic between client4 and client6\n* `bash traffic.sh start 5-6` - start traffic between client5 and client6\n\nTo stop the traffic:\n\n* `bash traffic.sh stop all` - stop traffic generation between all nodes\n* `bash traffic.sh stop 1-2` - stop traffic generation between client1 and client2\n* `bash traffic.sh stop 1-3` - stop traffic generation between client1 and client3\n* `bash traffic.sh stop 4-6` - stop traffic generation between client4 and client6\n* `bash traffic.sh stop 5-6` - stop traffic generation between client5 and client6\n\n## Telemetry stack\n\nAs the lab name suggests, telemetry is at its core. The following stack of software solutions has been chosen for this lab:\n\n| Role                | Software                              |\n| ------------------- | ------------------------------------- |\n| Telemetry collector | [gnmic](https://gnmic.openconfig.net) |\n| Time-Series DB      | [prometheus](https://prometheus.io)   |\n| Visualization       | [grafana](https://grafana.com)        |\n\n## Grafana\n\nGrafana is a key component of this lab. Lab's topology file includes grafana node along with its configuration parameters such as dashboards, datasources and required plugins.\n\nGrafana dashboard provided by this repository provides multiple views on the collected real-time data. Powered by [flowchart plugin](https://grafana.com/grafana/plugins/agenty-flowcharting-panel/) it overlays telemetry sourced data over graphics such as topology and front panel views:\n\n![pic3](https://user-images.githubusercontent.com/86619221/205601697-bd5b68f0-e2c6-49d3-a1f3-1cb5b67b34d9.JPG)\n\nUsing the flowchart plugin and real telemetry data users can create interactive topology maps (aka weathermap) with a visual indication of link rate/utilization.\n\n![pic2](https://user-images.githubusercontent.com/86619221/205601728-f3b254d1-2b03-4e75-b0e4-eb89cf54789a.JPG)\n\n## Access details\n\n* Grafana: \u003chttp://localhost:3000\u003e. Built-in user credentials: `admin/admin`\n* Prometheus: \u003chttp://localhost:9090/graph\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrl-labs%2Fsrl-sros-telemetry-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrl-labs%2Fsrl-sros-telemetry-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrl-labs%2Fsrl-sros-telemetry-lab/lists"}