Skip to content

Commit

Permalink
Merge pull request #1 from open-traffic-generator/doc-ixiac
Browse files Browse the repository at this point in the history
Document enhancement
  • Loading branch information
ashutshkumr authored Apr 6, 2022
2 parents 741695a + a321b2e commit b797319
Show file tree
Hide file tree
Showing 15 changed files with 966 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ jobs:
- name: Install robotframework
run: |
pip install -r tests/requirements.txt
- name: Run ixia-c-one tests
- name: Run keysight_ixia-c-one tests
run: |
bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/04-basic-ixiacone
# upload test reports as a zip file
Expand Down
2 changes: 1 addition & 1 deletion clab/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var kinds = []string{
"mysocketio",
"host",
"cvx",
"ixia-c-one",
"keysight_ixia-c-one",
}

// Config defines lab configuration as it is provided in the YAML file
Expand Down
590 changes: 590 additions & 0 deletions docs/images/ixia-c-one-ceos.drawio

Large diffs are not rendered by default.

340 changes: 225 additions & 115 deletions docs/lab-examples/ixiacone-ceos.md

Large diffs are not rendered by default.

106 changes: 93 additions & 13 deletions docs/manual/kinds/ixia-c-one.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,113 @@
# Ixia-c-one
# Keysight ixia-c-one

ixia-c-one is a re-packaged (as a single-container) flavor of multi-container application[ixia-c](https://github.com/open-traffic-generator/ixia-c).
It is identified with `ixia-c-one` kind in the [topology file](../topo-def-file.md). A kind defines a supported feature set and a startup procedure of a `ixia-c-one` node.
Keysight ixia-c-one is a single-container distribution of [ixia-c][ixia-c], which in turn is Keysight's reference implementation of [Open Traffic Generator API][otg].
Client SDK for configuring ixia-c-one is available in various languages, most prevalent being [gosnappi][gosnappi].

The corresponding node in containerlab is identified with `keysight_ixia-c-one` kind in the [topology file](../topo-def-file.md). Upon boot up, it comes up with:
- management interface `eth0` configured with IPv4/6 addresses as assigned by docker
- hostname assigned to the node name
- HTTPS service enabled on port 443 (for client SDK to push configuration and fetch metrics)

## Managing ixia-c-one nodes
Ixia-c-one node launched with containerlab can be managed via the following:

=== "bash"
to connect to a `bash` shell of a running ixia-c-one container:
ixia-c-one is a `docker:dind` container hosting two kinds of [ixia-c][ixia-c] containers internally:
- A set of containers acting as API endpoint and managing configuration across multiple test ports
- A set of containers bound to network interface (created by containerlab), treating it as a test port (i.e. for generating or processing traffic, emulating protocols, etc.)

Request and response to the API endpoint is driven by [Open Traffic Generator API][otg], and can be exercised in following two ways:
- Using client SDK
```bash
# install go from https://go.dev/doc/install since we'll need it to run the test
# and setup test environment
mkdir tests && cd tests
go mod init tests
# gosnappi version needs to be compatible to a given release of ixia-c-one and
# can be checked from https://github.com/open-traffic-generator/ixia-c/releases
go get github.com/open-traffic-generator/snappi/gosnappi@v0.7.18
# download a basic IPv4 forwarding test
curl -kLO https://raw.githubusercontent.com/open-traffic-generator/snappi-tests/main/scripts/ipv4_forwarding.go
# run the test with MAC address obtained in previous step
go run ipv4_forwarding.go -dstMac="<MAC address>"
```
- Using curl and JSON payloads
```bash
docker exec -it <container-name/id> bash
# fetch configuration that was last pushed to ixia-c-one
curl -kL https://clab-ixia-c-ixia-c-one/config
# fetch flow metrics
curl -kL https://clab-ixia-c-ixia-c-one/results/metrics -d '{"choice": "flow"}'
```

## Interfaces mapping
ixia-c-one container uses the following mapping for its linux interfaces:

* `eth0` - management interface connected to the containerlab management network
* `eth1` - first data interface
* The other interfaces are the data interfaces which are created using same name as provided in the containerlab topology yaml file.

When containerlab launches ixia-c-one node, it will set IPv4/6 addresses as assigned by docker to the `eth0` interface and ixia-c-one node will boot with that addresses configured.

When containerlab launches ixia-c-one node, it will set IPv4/6 addresses as assigned by docker to the `eth0` interface and ixia-c-one node will boot with that addresses configured. Data interfaces `eth1+` need to be configured with IP addressing manually.
Data interfaces `eth1+` need to be configured with IP addressing manually if needed (as in the Layer3 forwarding test example).
This is needed when the test port needs to reply to ARP/ND queries from the Device Under Test.

- To configure an IPv4 address on any data link e.g. eth2 (Could be eth1 or eth3 as well, but never on eth0):
```bash
docker exec -it clab-ixia-c-ixia-c-one bash -c "./ifcfg add eth2 2.2.2.2 24"
```
- To unset an IPv4 address on any data link e.g. eth2
```bash
docker exec -it clab-ixia-c-ixia-c-one bash -c "./ifcfg del eth2 2.2.2.2 24"
```
- To configure an IPv6 address on any data link e.g. eth1 :
```bash
docker exec -it clab-ixia-c-ixia-c-one bash -c "./ifcfg add eth1 11::1 64"
```
- To unset an IPv4 address on any data link e.g. eth2
```bash
docker exec -it clab-ixia-c-ixia-c-one bash -c "./ifcfg del eth1 11::1 64"
```

## Features and options
<TBD>
The free version of ixia-c supports generation of L2 and L3 traffic to test forwarding of Ethernet, IPv4 and IPv6 traffic by switches and routers. For technical support and queries , please log requests at https://github.com/open-traffic-generator/ixia-c/issues or contact us @ https://ixia-c.slack.com/signup#/domain-signup .

The commercial version of ixia-c supports ARP/ND/Auto destination MAC resolution in data traffic, IPv4 and IPv6 BGP with IPv4 and IPv6 Routes and ISIS with IPv4 and IPv6 routes. Please contact Keysight support for further information regarding this if needed.

## Lab examples
The following labs feature ixia-c-one node:
The following labs feature Keysight ixia-c-one node:

- [Ixia-c-one and Arista cEOS](../../lab-examples/ixiacone-ceos.md)
- [Keysight ixia-c-one and Arista cEOS](../../lab-examples/ixiacone-ceos.md)

## Known issues or limitations
<TBD>
1. For L3 traffic tests using the free version , there is no in-built support of ARP and ND.
This can be worked around by manually setting IP address on the receive interface (as explained in Interfaces mapping section above) and by learning the MAC of the connected DUT using external means such as gnmi/ssh/reading it from CLI and using it when generating packets.
This limitation will be removed in the ixia-c-one free version in future releases where it is planned to support ARP/ND Request and Reply for emulated interfaces.

2. Every time a containerlab topology with an ixia-c-one node is removed, it leaves behind a persistent storage.
If there are no other persistent unlinked storages on your system, you can remove it by removing all unlinked persistent storages by giving the command:
```bash
docker volume prune
```

If you wish to be very safe:
```bash
# get the volume corresponding ot ixia-c-one node
docker inspect clab-ixia-c-ixia-c-one
# note the volume name from output
"Mounts": [
{
"Type": "volume",
"Name": "d1e87f85d3352bfb9dac3f8bac8eebee738503802cb9380966b5c4805bd791da",
"Source": "/var/lib/docker/volumes/d1e87f85d3352bfb9dac3f8bac8eebee738503802cb9380966b5c4805bd791da/_data",
"Destination": "/var/lib/docker",
# remove the volume
docker volume remove d1e87f85d3352bfb9dac3f8bac8eebee738503802cb9380966b5c4805bd791da
```
> This can be optionally be fixed in containerlab with one of the two approaches below:
> i) During docker run pass the --rm flag when starting the containers, or
> ii) During docker rm pass the -v flag when removing the containers.
[ixia-c]: https://github.com/open-traffic-generator/ixia-c
[otg]: https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/open-traffic-generator/models/master/artifacts/openapi.yaml
[gosnappi]: https://github.com/open-traffic-generator/snappi/tree/main/gosnappi
36 changes: 18 additions & 18 deletions docs/manual/kinds/kinds.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ topology:
Containerlab supports a fixed number of kinds. Within each predefined kind we store the necessary information that is used to launch the container successfully. The following kinds are supported or in the roadmap of containerlab:
| Name | Kind | Status |
| ------------------- | ------------------------------------- | ------------ |
| **Nokia SR Linux** | [`srl`](srl.md) | supported |
| **Nokia SR OS** | [`vr-sros`](vr-sros.md) | supported |
| **Arista cEOS** | [`ceos`](ceos.md) | supported |
| **Arista vEOS** | [`vr-veos`](vr-veos.md) | supported |
| **Juniper cRPD** | [`crpd`](crpd.md) | supported |
| **Juniper vMX** | [`vr-vmx`](vr-vmx.md) | supported |
| **Juniper vQFX** | [`vr-vqfx`](vr-vqfx.md) | experimental |
| **Cisco XRv9k** | [`vr-xrv9k`](vr-xrv9k.md) | supported |
| **Cisco XRv** | [`vr-xrv`](vr-xrv.md) | supported |
| **Dell FTOS** | [`vr-ftosv`](vr-ftosv.md) | supported |
| **SONiC** | [`sonic`](sonic-vs.md) | supported |
| **Linux container** | [`linux`](linux.md) | supported |
| **Linux bridge** | [`bridge`](bridge.md) | supported |
| **OvS bridge** | [`ovs-bridge`](ovs-bridge.md) | supported |
| **mysocketio node** | [`mysocketio`](../published-ports.md) | supported |
| **Ixia-c-one** | [`ixia-c-one`](ixia-c-one.md) | supported |
| Name | Kind | Status |
| ----------------------- | -------------------------------------- | ------------ |
| **Nokia SR Linux** | [`srl`](srl.md) | supported |
| **Nokia SR OS** | [`vr-sros`](vr-sros.md) | supported |
| **Arista cEOS** | [`ceos`](ceos.md) | supported |
| **Arista vEOS** | [`vr-veos`](vr-veos.md) | supported |
| **Juniper cRPD** | [`crpd`](crpd.md) | supported |
| **Juniper vMX** | [`vr-vmx`](vr-vmx.md) | supported |
| **Juniper vQFX** | [`vr-vqfx`](vr-vqfx.md) | experimental |
| **Cisco XRv9k** | [`vr-xrv9k`](vr-xrv9k.md) | supported |
| **Cisco XRv** | [`vr-xrv`](vr-xrv.md) | supported |
| **Dell FTOS** | [`vr-ftosv`](vr-ftosv.md) | supported |
| **SONiC** | [`sonic`](sonic-vs.md) | supported |
| **Linux container** | [`linux`](linux.md) | supported |
| **Linux bridge** | [`bridge`](bridge.md) | supported |
| **OvS bridge** | [`ovs-bridge`](ovs-bridge.md) | supported |
| **mysocketio node** | [`mysocketio`](../published-ports.md) | supported |
| **Keysight ixia-c-one** | [`keysight_ixia-c-one`](ixia-c-one.md) | supported |

Refer to a specific kind documentation article to see the details about it.
10 changes: 8 additions & 2 deletions lab-examples/ixiac/enable_ssh_ceos.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
! Command: show running-config
! device: localhost (cEOSLab, EOS-4.26.0F-21792469.4260F (engineering build))
transceiver qsfp default-mode 4x10G
!
service routing protocols model ribd
!
Expand All @@ -20,4 +19,11 @@ username admin privilege 15 role network-admin nopassword
!
management api gnmi
transport grpc default
ssl profile octa-ssl-profile
provider eos-native
!
management security
ssl profile octa-ssl-profile
certificate gnmiCert.pem key gnmiCertKey.pem
!
end
19 changes: 19 additions & 0 deletions lab-examples/ixiac/ixiacone-ceos.clab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ixia-c

topology:
kinds:
keysight_ixia-c-one:
image: ghcr.io/open-traffic-generator/ixia-c-one:0.0.1-2738
ceos:
image: ceos:4.26.1F
nodes:
ixia-c-one:
kind: keysight_ixia-c-one
ceos:
kind: ceos
startup-config: enable_ssh_ceos.cfg
enforce-startup-config: true

links:
- endpoints: ["ixia-c-one:eth1", "ceos:eth1"]
- endpoints: ["ixia-c-one:eth2", "ceos:eth2"]
19 changes: 0 additions & 19 deletions lab-examples/ixiac/ixiaconeceos.clab.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nav:
- linux - Linux container: manual/kinds/linux.md
- bridge - Linux bridge: manual/kinds/bridge.md
- ovs-bridge - Openvswitch bridge: manual/kinds/ovs-bridge.md
- ixia-c-one - Ixia-c: manual/kinds/ixia-c-one.md
- keysight_ixia-c-one - Keysight ixia-c-one: manual/kinds/ixia-c-one.md
- Configuration artifacts: manual/conf-artifacts.md
- Network wiring concepts: manual/network.md
- Packet capture & Wireshark: manual/wireshark.md
Expand Down Expand Up @@ -80,7 +80,7 @@ nav:
- Cumulus Linux and FRR: lab-examples/cvx01.md
- Cumulus Linux (docker runtime) and Host: lab-examples/cvx02.md
- BGP VPLS between Nokia and Juniper: lab-examples/bgp-vpls-nok-jun.md
- Ixia-c-one and Arista cEOS: lab-examples/ixiacone-ceos.md
- Keysight ixia-c-one and Arista cEOS: lab-examples/ixiacone-ceos.md
- Multi-node labs: lab-examples/multinode.md
- Templated labs:
- Leaf-spine topology: lab-examples/templated01.md
Expand Down
4 changes: 2 additions & 2 deletions nodes/ixiac_one/ixiac-one.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (l *ixiacOne) Deploy(ctx context.Context) error {
}

func (l *ixiacOne) PostDeploy(ctx context.Context, _ map[string]nodes.Node) error {
log.Infof("Running postdeploy actions for ixia-c-one '%s' node", l.cfg.ShortName)
log.Infof("Running postdeploy actions for keysight_ixia-c-one '%s' node", l.cfg.ShortName)
return ixiacPostDeploy(ctx, l.runtime, l.cfg)
}

Expand All @@ -80,7 +80,7 @@ func (*ixiacOne) SaveConfig(_ context.Context) error {
return nil
}

// ixiacPostDeploy runs postdeploy actions which are required for ixia-c-one node
// ixiacPostDeploy runs postdeploy actions which are required for keysight_ixia-c-one node
func ixiacPostDeploy(ctx context.Context, r runtime.ContainerRuntime, cfg *types.NodeConfig) error {
ixiacOneCmd := fmt.Sprintf("ls %s", ixiacStatusConfig.readyFileName)
statusInProgressMsg := fmt.Sprintf("ls: %s: No such file or directory", ixiacStatusConfig.readyFileName)
Expand Down
2 changes: 1 addition & 1 deletion nodes/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
NodeKindVrXRV = "vr-xrv"
NodeKindVrXRV9K = "vr-xrv9k"
NodeKindVrNXOS = "vr-nxos"
NodeKindIXIACONE = "ixia-c-one"
NodeKindIXIACONE = "keysight_ixia-c-one"
)

// a map of node kinds overriding the default global runtime
Expand Down
4 changes: 2 additions & 2 deletions schemas/clab.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ovs-bridge",
"mysocketio",
"host",
"ixia-c-one"
"keysight_ixia-c-one"
]
},
"license": {
Expand Down Expand Up @@ -452,7 +452,7 @@
"host": {
"$ref": "#/definitions/node-config"
},
"ixia-c-one": {
"keysight_ixia-c-one": {
"$ref": "#/definitions/node-config"
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/04-basic-ixiacone/01-ixiacone.robot
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ Get node mgmt IP
... sudo docker inspect clab-${lab-name}-${node1-name} -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
Should Be Equal As Integers ${rc} 0

Verify link eth1 in ixia-c-one node n1
Verify link eth1 in keysight_ixia-c-one node n1
${rc} ${output} = Run And Return Rc And Output
... sudo containerlab --runtime ${runtime} exec -t ${CURDIR}/${lab-file-name} --label clab-node-name\=n1 --cmd "docker exec -t ixia-c-port-dp-${ifc1-name} ip link show ${ixiacone-ns-ifc-name}"
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} state UP

Verify link eth2 in ixia-c-one node n1
Verify link eth2 in keysight_ixia-c-one node n1
${rc} ${output} = Run And Return Rc And Output
... sudo containerlab --runtime ${runtime} exec -t ${CURDIR}/${lab-file-name} --label clab-node-name\=n1 --cmd "docker exec -t ixia-c-port-dp-${ifc2-name} ip link show ${ixiacone-ns-ifc-name}"
Log ${output}
Expand Down
4 changes: 2 additions & 2 deletions tests/04-basic-ixiacone/04-ixiacone01-clab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ name: 04-01-ixiacone

topology:
kinds:
ixia-c-one:
keysight_ixia-c-one:
image: ghcr.io/open-traffic-generator/ixia-c-one:0.0.1-2610
nodes:
n1:
kind: ixia-c-one
kind: keysight_ixia-c-one

links:
- endpoints: ["n1:eth1", "n1:eth2"]

0 comments on commit b797319

Please sign in to comment.