Skip to content

Commit a10c421

Browse files
Sergio Chavezhellt
andauthored
Document limitation of packets captures using tcpdump for SR-SIM (#2748)
* add paragraph about SR-SIM packet captures WIP * finish parahraph and provide mirror example * move packet capture down below --------- Co-authored-by: hellt <[email protected]>
1 parent 76a210a commit a10c421

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

docs/manual/kinds/sros.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,76 @@ Containerlab supports SSH key injection into the Nokia SR OS nodes prior to depl
558558

559559
Next, it will filter out public keys that are not of RSA/ECDSA type. The remaining valid public keys will be configured for the admin user of the Nokia SR OS node using key IDs from 32 downwards[^7] at startup. This will enable key-based authentication when you connect to the node.
560560

561+
## Packet Capture
562+
563+
Currently, a packet capture on the veth interfaces of the `-{{ kind_display_name }}-` will only display traffic at the ingress direction[^8]. In order to capture traffic bidirectionally, a user needs to create a [mirror service](https://documentation.nokia.com/sr/25-7/7750-sr/books/oam-diagnostics/mirror-services.html) in the SR OS configuration. A simple example topology using [bridges in container namespace](bridge.md#bridges-in-container-namespace) and mirror configuration is provided below for convenience.
564+
565+
/// tab | Topology with mirror service
566+
567+
```yaml
568+
name: "sros"
569+
mgmt:
570+
network: srsim_mgmt
571+
ipv4-subnet: 10.78.140.0/24
572+
topology:
573+
kinds:
574+
nokia_srsim:
575+
license: /opt/nokia/sros/license-sros25.txt
576+
image: nokia_srsim:25.7.R1
577+
nodes:
578+
sr-sim10:
579+
kind: nokia_srsim
580+
type: SR-1 # Implicit default
581+
sr-sim11:
582+
kind: nokia_srsim
583+
# In-namespace bridges for mirroring:
584+
mirror|sr-sim10:
585+
kind: bridge
586+
network-mode: container:sr-sim10
587+
mirror|sr-sim11:
588+
kind: bridge
589+
network-mode: container:sr-sim11
590+
links:
591+
# Data Interfaces
592+
- endpoints: ["sr-sim10:1/1/c1/1", "sr-sim11:1/1/c1/1"]
593+
- endpoints: ["sr-sim10:1/1/c1/2", "sr-sim11:1/1/c1/2"]
594+
# Mirror port mapped to in-namespace bridge:
595+
- endpoints: ["sr-sim10:1/1/c1/3", "mirror|sr-sim10:mirror0"]
596+
- endpoints: ["sr-sim11:1/1/c1/3", "mirror|sr-sim11:mirror0"]
597+
598+
```
599+
600+
///
601+
/// tab | SR OS Mirror configuration
602+
603+
```
604+
/configure port 1/1/c1/3 admin-state enable
605+
/configure port 1/1/c1/3 ethernet mode hybrid
606+
/configure mirror mirror-dest "mirror0" admin-state enable
607+
/configure mirror mirror-dest "mirror0" service-id 999
608+
/configure mirror mirror-dest "mirror0" { sap 1/1/c1/3:0 }
609+
/configure mirror mirror-source "mirror0" admin-state enable
610+
/configure mirror mirror-source "mirror0" port 1/1/c1/1 ingress true
611+
/configure mirror mirror-source "mirror0" port 1/1/c1/1 egress true
612+
/configure mirror mirror-source "mirror0" port 1/1/c1/2 ingress true
613+
/configure mirror mirror-source "mirror0" port 1/1/c1/2 egress true
614+
```
615+
616+
///
617+
618+
/// tab | tcpdump example
619+
620+
```bash
621+
$ sudo ip netns exec clab-sros-sr-sim10 tcpdump -nnei mirror0 icmp
622+
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
623+
listening on mirror0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
624+
625+
10:00:40.281090 aa:c1:ab:0b:55:94 > aa:c1:ab:d7:6e:ae, ethertype IPv4 (0x0800), length 98: 10.0.0.10 > 10.0.0.11: ICMP echo request, id 251, seq 16385, length 64
626+
10:00:40.282415 aa:c1:ab:d7:6e:ae > aa:c1:ab:0b:55:94, ethertype IPv4 (0x0800), length 98: 10.0.0.11 > 10.0.0.10: ICMP echo reply, id 251, seq 16385, length 64
627+
```
628+
629+
///
630+
561631
## License
562632

563633
Path to a valid license must be provided for all Nokia SR OS nodes with a [`license`](../nodes.md#license) directive. If no valid license is provided, the nodes will not complete the deployment phase.
@@ -650,3 +720,4 @@ The following labs feature Nokia SR OS (SR-SIM) node:
650720
[^5]: This is a change from the [Vrnetlab](../vrnetlab.md) based vSIM where line cards and MDAs were pre-provisioned for some cases.
651721
[^6]: `~` is the home directory of the user that runs containerlab.
652722
[^7]: If a user wishes to provide a custom startup-config with public keys defined, then they should use key IDs from 1 onwards. This will minimize chances of key ID collision causing containerlab to overwrite user-defined keys.
723+
[^8]: See Github issue [#2741](https://github.com/srl-labs/containerlab/issues/2741)

0 commit comments

Comments
 (0)