Skip to content

Commit

Permalink
Merge pull request #68 from open-traffic-generator/clab-lag-fix
Browse files Browse the repository at this point in the history
Container lab static lag fix
  • Loading branch information
bortok committed Mar 20, 2024
2 parents 337c236 + 8683c07 commit 9ef075f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clab/ixia-c-b2b-lag/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ install-clab: /usr/bin/containerlab

install-otgen: /usr/local/bin/otgen
/usr/local/bin/otgen:
bash -c "$$(curl -sL https://get.otgcdn.net/otgen)" -- -v 0.6.2
bash -c "$$(curl -sL https://get.otgcdn.net/otgen)" -- -v 0.6.3

install-clean:
-sudo rm -f `command -v otgen`
Expand Down
6 changes: 5 additions & 1 deletion clab/ixia-c-b2b-lag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In this lab two Ixia-c Traffic Engines have a pairs of traffic ports each connec
1. Install `otgen`

```Shell
bash -c "$(curl -sL https://get.otgcdn.net/otgen)" -- -v 0.6.2
bash -c "$(curl -sL https://get.otgcdn.net/otgen)" -- -v 0.6.3
```

## Deploy a lab
Expand All @@ -48,12 +48,16 @@ sudo -E containerlab deploy -t topo.yml
otgen run --insecure --file otg.yaml --yaml --metrics flow | otgen transform --metrics flow | otgen display -m table
```

**Expectation** : Tx frames/bytes should be equal to Rx frames/bytes

2. Individual port statistics showing packet distribution over the LAG members

```Shell
otgen run --insecure --file otg.yaml --yaml --metrics port | otgen transform --metrics port | otgen display -m table
```

**Expectation** : On both Rx and Tx LAG, packets should be distributed equally between the two member ports of the LAG. To achieve this, and to enable hashing of Tx packets between the two member ports, the destination address is varied by using 'values' with two distinct values, to allow two constituent flows to be created. Similar hashing can be achieved by also varying other fields such as Source IPv4 address or Src/Dst UDP port numbers.

## Destroy the lab

```Shell
Expand Down
14 changes: 7 additions & 7 deletions clab/ixia-c-b2b-lag/otg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ flows:
- choice: ipv4
ipv4:
dst:
choice: value
value: 1.1.1.2
choice: values
values: [1.1.1.2, 1.1.1.3]
src:
choice: value
value: 1.1.1.1
Expand All @@ -43,7 +43,7 @@ flows:
tx_rx:
choice: port
port:
rx_name: l2
rx_names: [l2]
tx_name: l1
lags:
- min_links: 1
Expand Down Expand Up @@ -91,11 +91,11 @@ layer1:
promiscuous: true
speed: speed_1_gbps
ports:
- location: te1:5555
- location: te1:5555;1
name: p1
- location: te1:5555
- location: te1:5555;2
name: p2
- location: te2:5555
- location: te2:5555;1
name: p3
- location: te2:5555
- location: te2:5555;2
name: p4

0 comments on commit 9ef075f

Please sign in to comment.