Skip to content
Snippets Groups Projects
Commit 776c7647 authored by karamchandan's avatar karamchandan
Browse files

Merge branch 'feat/l3-components' of https://labs.etsi.org/rep/tfs/controller...

Merge branch 'feat/l3-components' of https://labs.etsi.org/rep/tfs/controller into feat/l3-components
parents 1f91d55f 968f6d92
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!135Fixed L3 Cybersecurity framework
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----- TeraFlowSDN ------------------------------------------------------------
# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to.
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"
# Set the list of components, separated by spaces, you want to build images for, and deploy.
#export TFS_COMPONENTS="context device pathcomp service slice compute webui load_generator"
export TFS_COMPONENTS="context device pathcomp service slice webui"
# Uncomment to activate Monitoring
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
# Uncomment to activate Automation and Policy Manager
#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy"
# Uncomment to activate Optical CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager"
# Uncomment to activate L3 CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector"
# Uncomment to activate TE
export TFS_COMPONENTS="${TFS_COMPONENTS} te"
# Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev"
# Set the name of the Kubernetes namespace to deploy TFS to.
export TFS_K8S_NAMESPACE="tfs"
# Set additional manifest files to be applied after the deployment
export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"
# Uncomment to monitor performance of components
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml"
# Uncomment when deploying Optical CyberSecurity
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml"
# Set the new Grafana admin password
export TFS_GRAFANA_PASSWORD="admin123+"
# Disable skip-build flag to rebuild the Docker images.
export TFS_SKIP_BUILD=""
# ----- CockroachDB ------------------------------------------------------------
# Set the namespace where CockroackDB will be deployed.
export CRDB_NAMESPACE="crdb"
# Set the external port CockroackDB Postgre SQL interface will be exposed to.
export CRDB_EXT_PORT_SQL="26257"
# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to.
export CRDB_EXT_PORT_HTTP="8081"
# Set the database username to be used by Context.
export CRDB_USERNAME="tfs"
# Set the database user's password to be used by Context.
export CRDB_PASSWORD="tfs123"
# Set the database name to be used by Context.
export CRDB_DATABASE="tfs"
# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/crdb.sh for additional details
export CRDB_DEPLOY_MODE="single"
# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS="YES"
# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
# ----- NATS -------------------------------------------------------------------
# Set the namespace where NATS will be deployed.
export NATS_NAMESPACE="nats"
# Set the external port NATS Client interface will be exposed to.
export NATS_EXT_PORT_CLIENT="4222"
# Set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP="8222"
# Disable flag for re-deploying NATS from scratch.
export NATS_REDEPLOY=""
# ----- QuestDB ----------------------------------------------------------------
# Set the namespace where QuestDB will be deployed.
export QDB_NAMESPACE="qdb"
# Set the external port QuestDB Postgre SQL interface will be exposed to.
export QDB_EXT_PORT_SQL="8812"
# Set the external port QuestDB Influx Line Protocol interface will be exposed to.
export QDB_EXT_PORT_ILP="9009"
# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to.
export QDB_EXT_PORT_HTTP="9000"
# Set the database username to be used for QuestDB.
export QDB_USERNAME="admin"
# Set the database user's password to be used for QuestDB.
export QDB_PASSWORD="quest"
# Set the table name to be used by Monitoring for KPIs.
export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"
# Set the table name to be used by Slice for plotting groups.
export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"
# Disable flag for dropping tables if they exist.
export QDB_DROP_TABLES_IF_EXIST="YES"
# Disable flag for re-deploying QuestDB from scratch.
export QDB_REDEPLOY=""
# ----- K8s Observability ------------------------------------------------------
# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to.
export PROM_EXT_PORT_HTTP="9090"
# Set the external port Grafana HTTP Dashboards will be exposed to.
export GRAF_EXT_PORT_HTTP="3000"
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Directory used for Netgen's operation.
# Default: "/tmp/netgen"
# netgen_runstatedir:
# Clean exit.
# Default: 'false'
# clean_exit:
# Valgrind parameters.
# Default: "--tool=memcheck"
# valgrind_params: "--tool=memcheck --leak-check=full --trace-children=yes"
# valgrind_params: "--tool=memcheck --leak-check=full"
# valgrind_params: "--tool=memcheck --leak-check=full --show-leak-kinds=all"
# valgrind_params: "--tool=callgrind --dump-instr=yes --collect-jumps=yes"
# Perf directory
# Default: [netgen_runstatedir]/perf
# perf_dir:
# Plugins configuration.
plugins:
frr:
# FRR's sysconfdir (--sysconfdir).
# Default: "/etc/frr"
# sysconfdir:
# FRR's localstatedir (--localstatedir).
# Default: "/var/run/frr"
# localstatedir:
# FRR's user (--enable-user).
# Default: "frr"
# user:
user: "root"
# FRR's group (--enable-group).
# Default: "frr"
# group:
group: "root"
# Directory to store FRR logs.
# Default: [netgen_runstatedir]/frrlogs
# logdir:
tcpdump:
# Directory to store tcpdump captures.
# Default: [netgen_runstatedir]/pcaps
# pcap_dir:
# Filter on which nodes tcpdump should run.
# Default: []
# whitelist:
# Filter on which nodes tcpdump should not run.
# Default: []
# blacklist:
tmux:
# Path of tmux script used to open a shell on all routers.
# Default: [netgen_runstatedir]/tmux.sh
# file:
# Panels per node.
# Default: 1
# panels-per-node:
bird:
# BIRD's sysconfdir (--sysconfdir).
# Default: "/etc/bird"
# sysconfdir:
# BIRD's localstatedir (--localstatedir).
# Default: "/var/run/bird"
# localstatedir:
# BIRD's user (--enable-user).
# Default: "bird"
# user:
# BIRD's group (--enable-group).
# Default: "bird"
# group:
# Directory to store BIRD logs.
# Default: [netgen_runstatedir]/birdlogs
# logdir:
bgpsimple:
# Path to bgp_simple script
# Default: "bgp_simple.pl"
# path:
iou:
# IOU working directory.
# Default: [netgen_runstatedir]/iou
# dir:
dynamips:
# dynamips working directory.
# Default: [netgen_runstatedir]/dynamips
# dir:
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# +---------+
# | |
# | SRC |
# | 9.9.9.1 |
# | |
# +---------+
# |eth-rt1 (.1)
# |
# |10.0.10.0/24
# |
# |eth-src (.2)
# +---------+ .
# | | .
# | RT1 |eth-rt1-pce (???) .
# | 1.1.1.1 +----------------------------------+
# | 16010 | . ??? |
# +---------+ . |
# |eth-sw1 . |
# | . |
# | . |
# | . |
# +---------+ | +---------+ . |
# | | | | | . |
# | RT2 |eth-sw1 | eth-sw1| RT3 | . |
# | 2.2.2.2 +----------+----------+ 3.3.3.3 | . |
# | 16020 | 10.0.1.0/24 | 16030 | . |
# +---------+ +---------+ .eth-pce-rt1|(???)
# eth-rt4-1| |eth-rt4-2 eth-rt5-1| |eth-rt5-2. +----+----+
# | | | | . | |
# 10.0.2.0/24| |10.0.3.0/24 10.0.4.0/24| |10.0.5.0/24 | PCE |
# | | | | . | ???? |
# eth-rt2-1| |eth-rt2-2 eth-rt3-1| |eth-rt3-2. | |
# +---------+ +---------+ . +----+----+
# | | | | .eth-pce-rt6|(???)
# | RT4 | 10.0.6.0/24 | RT5 | . |
# | 4.4.4.4 +---------------------+ 5.5.5.5 | . |
# | 16040 |eth-rt5 eth-rt4| 16050 | . |
# +---------+ +---------+ . |
# eth-rt6| |eth-rt6 . |
# | | . |
# 10.0.7.0/24| |10.0.8.0/24 |
# | +---------+ | . |
# +----------| |-----------+ . |
# eth-rt4| RT6 |eth-rt5 . |
# | 6.6.6.6 |eth-rt6-pce (????) . ???? |
# | 16060 +----------------------------------+
# +---------+ .
# |eth-dst (.1) .
# | .
# |10.0.11.0/24
# |
# |eth-rt6 (.2)
# +---------+
# | |
# | DST |
# | 9.9.9.2 |
# | |
# +---------+
#
---
routers:
src:
links:
lo:
ipv4: 9.9.9.1/32
ipv6: 2001:db8:1066::1/128
mpls: yes
eth-rt1:
peer: [rt1, eth-src]
ipv4: 10.0.10.1/24
mpls: yes
frr:
zebra:
run: yes
config:
shell: |
ip route add 9.9.9.2/32 encap mpls 1111 via inet 10.0.10.2 src 9.9.9.1
rt1:
links:
lo:
ipv4: 1.1.1.1/32
mpls: yes
eth-sw1:
peer: [sw1, sw1-rt1]
ipv4: 10.0.1.1/24
mpls: yes
eth-src:
peer: [src, eth-rt1]
ipv4: 10.0.10.2/24
mpls: yes
frr:
zebra:
run: yes
config:
pathd:
args: "-M pathd_pcep"
config: |
debug pathd pcep basic
segment-routing
traffic-eng
pcep
pce-config CONFIG
source-address ip 1.1.1.1
pce PCE
pce-initiated
address ip ${PCE_IP}
config CONFIG
pcc
peer PCE
!
isisd:
run: yes
config: |
interface lo
ip router isis 1
ipv6 router isis 1
isis passive
!
interface eth-sw1
ip router isis 1
ipv6 router isis 1
isis hello-multiplier 3
!
router isis 1
net 49.0000.0000.0000.0001.00
is-type level-1
redistribute ipv4 static level-1
redistribute ipv4 connected level-1
topology ipv6-unicast
segment-routing on
segment-routing global-block 16000 23999
segment-routing node-msd 8
segment-routing prefix 1.1.1.1/32 index 10 explicit-null
segment-routing prefix 2001:db8:1000::1/128 index 11 explicit-null
!
shell: |
ip route add 9.9.9.1/32 dev eth-src
ip link add eth-rt1-pce type veth peer name eth-pce-rt1
ip addr add ${RT1_PCE_INT_IF_IP}/24 dev eth-rt1-pce
ip link set eth-pce-rt1 netns ${PCE_NETNS}
ip -n ${PCE_NETNS} addr add ${RT1_PCE_EXT_IF_IP}/24 dev eth-pce-rt1
ip link set eth-rt1-pce up
ip -n ${PCE_NETNS} link set eth-pce-rt1 up
ip route add ${RT1_PCE_EXT_IF_IP}/24 via ${RT1_PCE_INT_IF_IP} dev eth-rt1-pce src 1.1.1.1
ip -n ${PCE_NETNS} route add ${RT1_PCE_INT_IF_IP}/32 via ${RT1_PCE_EXT_IF_IP} dev eth-pce-rt1
ip -n ${PCE_NETNS} route add 1.1.1.1/32 via ${RT1_PCE_EXT_IF_IP} dev eth-pce-rt1
rt2:
links:
lo:
ipv4: 2.2.2.2/32
ipv6: 2001:db8:1000::2/128
mpls: yes
eth-sw1:
peer: [sw1, sw1-rt2]
ipv4: 10.0.1.2/24
mpls: yes
eth-rt4-1:
peer: [rt4, eth-rt2-1]
ipv4: 10.0.2.2/24
mpls: yes
eth-rt4-2:
peer: [rt4, eth-rt2-2]
ipv4: 10.0.3.2/24
mpls: yes
frr:
zebra:
run: yes
config:
isisd:
run: yes
config: |
interface lo
ip router isis 1
ipv6 router isis 1
isis passive
!
interface eth-sw1
ip router isis 1
ipv6 router isis 1
isis hello-multiplier 3
!
interface eth-rt4-1
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt4-2
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
router isis 1
net 49.0000.0000.0000.0002.00
is-type level-1
topology ipv6-unicast
segment-routing on
segment-routing global-block 16000 23999
segment-routing node-msd 8
segment-routing prefix 2.2.2.2/32 index 20 no-php-flag
segment-routing prefix 2001:db8:1000::2/128 index 21 no-php-flag
!
rt3:
links:
lo:
ipv4: 3.3.3.3/32
ipv6: 2001:db8:1000::3/128
mpls: yes
eth-sw1:
peer: [sw1, sw1-rt3]
ipv4: 10.0.1.3/24
mpls: yes
eth-rt5-1:
peer: [rt5, eth-rt3-1]
ipv4: 10.0.4.3/24
mpls: yes
eth-rt5-2:
peer: [rt5, eth-rt3-2]
ipv4: 10.0.5.3/24
mpls: yes
frr:
zebra:
run: yes
config:
isisd:
run: yes
config: |
interface lo
ip router isis 1
ipv6 router isis 1
isis passive
!
interface eth-sw1
ip router isis 1
ipv6 router isis 1
isis hello-multiplier 3
!
interface eth-rt5-1
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt5-2
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
router isis 1
net 49.0000.0000.0000.0003.00
is-type level-1
topology ipv6-unicast
segment-routing on
segment-routing global-block 16000 23999
segment-routing node-msd 8
segment-routing prefix 3.3.3.3/32 index 30 no-php-flag
segment-routing prefix 2001:db8:1000::3/128 index 31 no-php-flag
!
rt4:
links:
lo:
ipv4: 4.4.4.4/32
ipv6: 2001:db8:1000::4/128
mpls: yes
eth-rt2-1:
peer: [rt2, eth-rt4-1]
ipv4: 10.0.2.4/24
mpls: yes
eth-rt2-2:
peer: [rt2, eth-rt4-2]
ipv4: 10.0.3.4/24
mpls: yes
eth-rt5:
peer: [rt5, eth-rt4]
ipv4: 10.0.6.4/24
mpls: yes
eth-rt6:
peer: [rt6, eth-rt4]
ipv4: 10.0.7.4/24
mpls: yes
frr:
zebra:
run: yes
config:
isisd:
run: yes
config: |
interface lo
ip router isis 1
ipv6 router isis 1
isis passive
!
interface eth-rt2-1
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt2-2
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt5
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt6
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
router isis 1
net 49.0000.0000.0000.0004.00
is-type level-1
topology ipv6-unicast
segment-routing on
segment-routing global-block 16000 23999
segment-routing node-msd 8
segment-routing prefix 4.4.4.4/32 index 40 no-php-flag
segment-routing prefix 2001:db8:1000::4/128 index 41 no-php-flag
!
rt5:
links:
lo:
ipv4: 5.5.5.5/32
ipv6: 2001:db8:1000::5/128
mpls: yes
eth-rt3-1:
peer: [rt3, eth-rt5-1]
ipv4: 10.0.4.5/24
mpls: yes
eth-rt3-2:
peer: [rt3, eth-rt5-2]
ipv4: 10.0.5.5/24
mpls: yes
eth-rt4:
peer: [rt4, eth-rt5]
ipv4: 10.0.6.5/24
mpls: yes
eth-rt6:
peer: [rt6, eth-rt5]
ipv4: 10.0.8.5/24
mpls: yes
frr:
zebra:
run: yes
config:
isisd:
run: yes
config: |
interface lo
ip router isis 1
ipv6 router isis 1
isis passive
!
interface eth-rt3-1
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt3-2
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt4
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt6
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
router isis 1
net 49.0000.0000.0000.0005.00
is-type level-1
topology ipv6-unicast
segment-routing on
segment-routing global-block 16000 23999
segment-routing node-msd 8
segment-routing prefix 5.5.5.5/32 index 50 no-php-flag
segment-routing prefix 2001:db8:1000::5/128 index 51 no-php-flag
!
rt6:
links:
lo:
ipv4: 6.6.6.6/32
ipv6: 2001:db8:1000::6/128
mpls: yes
eth-rt4:
peer: [rt4, eth-rt6]
ipv4: 10.0.7.6/24
mpls: yes
eth-rt5:
peer: [rt5, eth-rt6]
ipv4: 10.0.8.6/24
mpls: yes
eth-dst:
peer: [dst, eth-rt6]
ipv4: 10.0.11.1/24
mpls: yes
frr:
zebra:
run: yes
config:
pathd:
args: "-M pathd_pcep"
config: |
debug pathd pcep
segment-routing
traffic-eng
pcep
pce-config CONFIG
source-address ip 6.6.6.6
pce PCE
pce-initiated
address ip ${PCE_IP}
config CONFIG
pcc
peer PCE
!
isisd:
run: yes
config: |
interface lo
ip router isis 1
ipv6 router isis 1
isis passive
!
interface eth-rt4
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
interface eth-rt5
ip router isis 1
ipv6 router isis 1
isis network point-to-point
isis hello-multiplier 3
!
router isis 1
net 49.0000.0000.0000.0006.00
is-type level-1
redistribute ipv4 static level-1
redistribute ipv4 connected level-1
topology ipv6-unicast
segment-routing on
segment-routing global-block 16000 23999
segment-routing node-msd 8
segment-routing prefix 6.6.6.6/32 index 60 explicit-null
segment-routing prefix 2001:db8:1000::6/128 index 61 explicit-null
!
shell: |
ip route add 9.9.9.2/32 dev eth-dst
ip link add eth-rt6-pce type veth peer name eth-pce-rt6
ip addr add ${RT6_PCE_INT_IF_IP}/24 dev eth-rt6-pce
ip link set eth-pce-rt6 netns ${PCE_NETNS}
ip -n ${PCE_NETNS} addr add ${RT6_PCE_EXT_IF_IP}/24 dev eth-pce-rt6
ip link set eth-rt6-pce up
ip -n ${PCE_NETNS} link set eth-pce-rt6 up
ip route add ${RT6_PCE_EXT_IF_IP}/24 via ${RT6_PCE_INT_IF_IP} dev eth-rt6-pce src 6.6.6.6
ip -n ${PCE_NETNS} route add ${RT6_PCE_INT_IF_IP}/32 via ${RT6_PCE_EXT_IF_IP} dev eth-pce-rt6
ip -n ${PCE_NETNS} route add 6.6.6.6/32 via ${RT6_PCE_EXT_IF_IP} dev eth-pce-rt6
dst:
links:
lo:
ipv4: 9.9.9.2/32
ipv6: 2001:db8:1066::2/128
mpls: yes
eth-rt6:
peer: [rt6, eth-dst]
ipv4: 10.0.11.2/24
mpls: yes
frr:
zebra:
run: yes
config:
shell: |
ip route add 9.9.9.1/32 encap mpls 6666 via inet 10.0.11.1
switches:
sw1:
links:
sw1-rt1:
peer: [rt1, rt1-sw1]
sw1-rt2:
peer: [rt2, rt2-sw1]
sw1-rt3:
peer: [rt3, rt3-sw1]
frr:
#perf: yes
#valgrind: yes
base-configs:
all: |
hostname %(node)
password 1
log file %(logdir)/%(node)-%(daemon).log
log commands
zebra: |
debug zebra kernel
debug zebra packet
debug zebra mpls
isisd: |
debug isis events
debug isis route-events
debug isis spf-events
debug isis sr-events
debug isis lsp-gen
{
"services": [
{
"service_id": {
"context_id": {"context_uuid": {"uuid": "admin"}},
"service_uuid": {"uuid": "2c025055-bf6c-4250-8560-cf62f2d29e72"}
},
"service_type": 4, "service_status": {"service_status": 1},
"service_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid":"RT1"}}, "endpoint_uuid": {"uuid":"eth-src"}},
{"device_id": {"device_uuid": {"uuid":"RT6"}}, "endpoint_uuid": {"uuid":"eth-dst"}}
],
"service_constraints": [],
"service_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "/lsp-fw", "resource_value": {
"symbolic_name": "foo", "binding_label": 1111
}}},
{"action": 1, "custom": {"resource_key": "/lsp-bw", "resource_value": {
"symbolic_name": "bar", "binding_label": 6666
}}}
]}
}
]
}
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
ROOTDIR="$( cd $( dirname $0 ); pwd )"
RUNDIR="$( pwd )"
NETGENDIR="${RUNDIR}/netgen"
if [[ ! -f "${NETGENDIR}/exe/netgen" ]]; then
echo "Failed to find Netgen binary at ${NETGENDIR}/exe/netgen"
exit 1
fi
PCE_IP=$( kubectl --namespace tfs get $(kubectl --namespace tfs get pods --selector=app=teservice -o name) --template '{{.status.podIP}}' )
echo "Teraflow PCE IP address: $PCE_IP"
NAMESPACES=$( ip netns list | cut -d' ' -f1 )
PCE_NETNS=""
for n in $NAMESPACES; do
if sudo ip -n $n addr list | grep $PCE_IP > /dev/null; then
echo "Teraflow TE service namespace: $n"
PCE_NETNS=$n
break
fi
done
if [[ -z $PCE_NETNS ]]; then
echo "Teraflow network namespace for TE service not found"
exit1
fi
IFS=. read PCE_IP1 PCE_IP2 PCE_IP3 PCE_IP4 <<< "$PCE_IP"
export PCE_IP
export PCE_NETNS
export RT1_PCE_INT_IF_IP="$PCE_IP1.$PCE_IP2.$PCE_IP3.10"
export RT1_PCE_EXT_IF_IP="$PCE_IP1.$PCE_IP2.$PCE_IP3.11"
export RT6_PCE_INT_IF_IP="$PCE_IP1.$PCE_IP2.$PCE_IP3.12"
export RT6_PCE_EXT_IF_IP="$PCE_IP1.$PCE_IP2.$PCE_IP3.13"
cp "${ROOTDIR}/netgen-config.yml" "${RUNDIR}/config.yml"
cat "${ROOTDIR}/netgen-topology.yml.template" | envsubst > "${RUNDIR}/topology.yml"
sudo -i bash -c "\
cd ${RUNDIR}/netgen;\
sysctl -w net.ipv4.conf.all.rp_filter=0;\
PATH=/usr/lib/frr:\$PATH ./exe/netgen ../topology.yml -c ../config.yml"
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Simple script to test GRPC calls to the TE service.
# First get the TE service IP using:
# > kubectl -n tfs get services
# Change it in this script and run with:
# > PYTHONPATH=./src python test_te_service.py
import json, sys
from common.proto.context_pb2 import ConfigActionEnum, Service, ServiceStatusEnum, ServiceTypeEnum
from common.tools.grpc.Tools import grpc_message_to_json_string
from service.client.TEServiceClient import TEServiceClient
# {"name": "",
# "service_config": {
# "config_rules": [
# {
# "action": "CONFIGACTION_SET",
# "custom": {
# "resource_key": "/lsp-fw",
# "resource_value": "{\n\"binding_label\": 1111,\n\"symbolic_name\": \"foo\"\n}"}},
# {
# "action": "CONFIGACTION_SET",
# "custom": {
# "resource_key": "/lsp-bw",
# "resource_value": "{\n\"binding_label\": 6666,\n\"symbolic_name\": \"bar\"\n}"}}]},
# "service_constraints": [],
# "service_endpoint_ids": [
# {"device_id": {"device_uuid": {"uuid": "RT1"}}, "endpoint_uuid": {"uuid": "eth-src"}},
# {"device_id": {"device_uuid": {"uuid": "RT6"}}, "endpoint_uuid": {"uuid": "eth-dst"}}],
# "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}},
# "service_uuid": {"uuid": "2c025055-bf6c-4250-8560-cf62f2d29e72"}},
# "service_status": {"service_status": "SERVICESTATUS_PLANNED"},
# "service_type": "SERVICETYPE_TE"}
service = Service()
service.service_id.context_id.context_uuid.uuid = 'admin'
service.service_id.service_uuid.uuid = 'test-te-service'
service.service_type = ServiceTypeEnum.SERVICETYPE_TE
service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED
# SRC Endpoint:
src_endpoint_id = service.service_endpoint_ids.add()
src_endpoint_id.device_id.device_uuid.uuid = 'RT1'
src_endpoint_id.endpoint_uuid.uuid = 'eth-src'
# DST Endpoint:
dst_endpoint_id = service.service_endpoint_ids.add()
dst_endpoint_id.device_id.device_uuid.uuid = 'RT6'
dst_endpoint_id.endpoint_uuid.uuid = 'eth-dst'
# # Capacity SLA
# sla_capacity = service.service_constraints.add()
# sla_capacity.sla_capacity.capacity_gbps = 10.0
# # Latency SLA
# sla_latency = service.service_constraints.add()
# sla_latency.sla_latency.e2e_latency_ms = 20.0
# Example config rules:
config_rule_1 = service.service_config.config_rules.add()
config_rule_1.action = ConfigActionEnum.CONFIGACTION_SET
config_rule_1.custom.resource_key = '/lsp-fw'
config_rule_1.custom.resource_value = json.dumps({
'binding_label': 1111, 'symbolic_name': "foo"
})
config_rule_2 = service.service_config.config_rules.add()
config_rule_2.action = ConfigActionEnum.CONFIGACTION_SET
config_rule_2.custom.resource_key = '/lsp-bw'
config_rule_2.custom.resource_value = json.dumps({
'binding_label': 6666, 'symbolic_name': "bar"
})
def main():
# Connect:
te_service_client = TEServiceClient(host='XXX.XXX.XXX.XXX', port=10030)
# RequestLSP
print('request:', grpc_message_to_json_string(service))
service_status = te_service_client.RequestLSP(service)
print('response:', grpc_message_to_json_string(service_status))
# DeleteLSP
#print('request:', grpc_message_to_json_string(service))
#service_status = te_service_client.DeleteLSP(service)
#print('response:', grpc_message_to_json_string(service_status))
# Close:
te_service_client.close()
return 0
if __name__ == '__main__':
sys.exit(main())
{
"contexts": [
{
"context_id": {"context_uuid": {"uuid": "admin"}},
"topology_ids": [],
"service_ids": []
}
],
"topologies": [
{
"topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}},
"device_ids": [
{"device_uuid": {"uuid": "SW1"}},
{"device_uuid": {"uuid": "RT1"}},
{"device_uuid": {"uuid": "RT2"}},
{"device_uuid": {"uuid": "RT3"}},
{"device_uuid": {"uuid": "RT4"}},
{"device_uuid": {"uuid": "RT5"}},
{"device_uuid": {"uuid": "RT6"}}
],
"link_ids": [
{"link_uuid": {"uuid": "RT1/SW1"}},
{"link_uuid": {"uuid": "RT2/SW1"}},
{"link_uuid": {"uuid": "RT3/SW1"}},
{"link_uuid": {"uuid": "RT2/RT4/1"}},
{"link_uuid": {"uuid": "RT2/RT4/2"}},
{"link_uuid": {"uuid": "RT3/RT5/1"}},
{"link_uuid": {"uuid": "RT3/RT5/2"}},
{"link_uuid": {"uuid": "RT4/RT5"}},
{"link_uuid": {"uuid": "RT4/RT6"}},
{"link_uuid": {"uuid": "RT5/RT6"}}
]
}
],
"devices": [
{
"device_id": {"device_uuid": {"uuid": "SW1"}}, "device_type": "emu-packet-switch",
"device_operational_status": 2, "device_drivers": [0], "device_endpoints": [],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"sample_types": [], "type": "copper", "uuid": "df8bb169-2013-4b82-9455-69777f7a01d6"},
{"sample_types": [], "type": "copper", "uuid": "061119c1-2aa4-48e9-be64-3ddf465fc80a"},
{"sample_types": [], "type": "copper", "uuid": "495ea3f8-e67f-46a0-84bd-a230a4b7067d"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "RT1"}}, "device_type": "emu-packet-router",
"device_operational_status": 2, "device_drivers": [0], "device_endpoints": [],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "1.1.1.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"sample_types": [], "type": "copper", "uuid": "eth-src"},
{"sample_types": [], "type": "copper", "uuid": "eth-sw1"}
]}}},
{"action": 1, "custom": {"resource_key": "/te_data", "resource_value": {"mpls_label": 16010, "pcc_address": "1.1.1.1"}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "RT2"}}, "device_type": "emu-packet-router",
"device_operational_status": 2, "device_drivers": [0], "device_endpoints": [],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "2.2.2.2"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"sample_types": [], "type": "copper", "uuid": "eth-sw1"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt4-1"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt4-2"}
]}}},
{"action": 1, "custom": {"resource_key": "/te_data", "resource_value": {"mpls_label": 16020, "pcc_address": "2.2.2.2"}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "RT3"}}, "device_type": "emu-packet-router",
"device_operational_status": 2, "device_drivers": [0], "device_endpoints": [],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "3.3.3.3"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"sample_types": [], "type": "copper", "uuid": "eth-sw1"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt5-1"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt5-2"}
]}}},
{"action": 1, "custom": {"resource_key": "/te_data", "resource_value": {"mpls_label": 16030, "pcc_address": "3.3.3.3"}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "RT4"}}, "device_type": "emu-packet-router",
"device_operational_status": 2, "device_drivers": [0], "device_endpoints": [],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "4.4.4.4"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"sample_types": [], "type": "copper", "uuid": "eth-rt2-1"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt2-2"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt5"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt6"}
]}}},
{"action": 1, "custom": {"resource_key": "/te_data", "resource_value": {"mpls_label": 16040, "pcc_address": "4.4.4.4"}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "RT5"}}, "device_type": "emu-packet-router",
"device_operational_status": 2, "device_drivers": [0], "device_endpoints": [],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "5.5.5.5"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"sample_types": [], "type": "copper", "uuid": "eth-rt3-1"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt3-2"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt4"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt6"}
]}}},
{"action": 1, "custom": {"resource_key": "/te_data", "resource_value": {"mpls_label": 16050, "pcc_address": "5.5.5.5"}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "RT6"}}, "device_type": "emu-packet-router",
"device_operational_status": 2, "device_drivers": [0], "device_endpoints": [],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "6.6.6.6"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"sample_types": [], "type": "copper", "uuid": "eth-rt4"},
{"sample_types": [], "type": "copper", "uuid": "eth-rt5"},
{"sample_types": [], "type": "copper", "uuid": "eth-dst"}
]}}},
{"action": 1, "custom": {"resource_key": "/te_data", "resource_value": {"mpls_label": 16060, "pcc_address": "6.6.6.6"}}}
]}
}
],
"links": [
{
"link_id": {"link_uuid": {"uuid": "RT1/SW1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT1"}}, "endpoint_uuid": {"uuid": "eth-sw1"}},
{"device_id": {"device_uuid": {"uuid": "SW1"}}, "endpoint_uuid": {"uuid": "df8bb169-2013-4b82-9455-69777f7a01d6"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT2/SW1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT2"}}, "endpoint_uuid": {"uuid": "eth-sw1"}},
{"device_id": {"device_uuid": {"uuid": "SW1"}}, "endpoint_uuid": {"uuid": "061119c1-2aa4-48e9-be64-3ddf465fc80a"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT3/SW1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT3"}}, "endpoint_uuid": {"uuid": "eth-sw1"}},
{"device_id": {"device_uuid": {"uuid": "SW1"}}, "endpoint_uuid": {"uuid": "495ea3f8-e67f-46a0-84bd-a230a4b7067d"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT2/RT4/1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT2"}}, "endpoint_uuid": {"uuid": "eth-rt4-1"}},
{"device_id": {"device_uuid": {"uuid": "RT4"}}, "endpoint_uuid": {"uuid": "eth-rt2-1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT2/RT4/2"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT2"}}, "endpoint_uuid": {"uuid": "eth-rt4-2"}},
{"device_id": {"device_uuid": {"uuid": "RT4"}}, "endpoint_uuid": {"uuid": "eth-rt2-2"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT3/RT5/1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT3"}}, "endpoint_uuid": {"uuid": "eth-rt5-1"}},
{"device_id": {"device_uuid": {"uuid": "RT5"}}, "endpoint_uuid": {"uuid": "eth-rt3-1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT3/RT5/2"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT3"}}, "endpoint_uuid": {"uuid": "eth-rt5-2"}},
{"device_id": {"device_uuid": {"uuid": "RT5"}}, "endpoint_uuid": {"uuid": "eth-rt3-2"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT4/RT5"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT4"}}, "endpoint_uuid": {"uuid": "eth-rt5"}},
{"device_id": {"device_uuid": {"uuid": "RT5"}}, "endpoint_uuid": {"uuid": "eth-rt4"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT4/RT6"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT4"}}, "endpoint_uuid": {"uuid": "eth-rt6"}},
{"device_id": {"device_uuid": {"uuid": "RT6"}}, "endpoint_uuid": {"uuid": "eth-rt4"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "RT5/RT6"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "RT5"}}, "endpoint_uuid": {"uuid": "eth-rt6"}},
{"device_id": {"device_uuid": {"uuid": "RT6"}}, "endpoint_uuid": {"uuid": "eth-rt5"}}
]
}
]
}
# 1.5. Setup Erlang Environment
First we need to install Erlang. There is multiple way, for development we will
be using *ASDF*, a tool that allows the installation of multiple version of Erlang
at the same time, and switch from one version to the other at will.
## 1.5.1. Setup Erlang using asdf
First, install any missing dependencies:
sudo apt install curl git autoconf libncurses-dev build-essential m4 libssl-dev
Download *ASDF* tool to the local account:
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
Make *ASDF* activate on login by adding these lines at the end of the `~/.bashrc` file:
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
Logout and log back in to activate *ASDF*.
*ASDF* supports multiple tools by installing there corresponding plugins.
Install *ASDF* plugin for Erlang:
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
Install a version of Erlang:
asdf install erlang 24.3.4.2
Activate Erlang locally for TFS controller. This will create a local file
called `.tool-versions` defining which version of the tools to use when
running under the current directory:
cd tfs-ctrl/
asdf local erlang 24.3.4.2
Erlang projects uses a build tool called rebar3. It is used to manager project
dependenecies, compile a project and generate project releases.
Install rebar3 localy from source:
cd ~
git clone https://github.com/erlang/rebar3.git
cd rebar3
asdf local erlang 24.3.4.2
./bootstrap
./rebar3 local install
Update `~/.bashrc` to use rebar3 by adding this line at the end:
export PATH=$HOME/.cache/rebar3/bin:$PATH
Logout and log back in.
# 2.6. Traffic Engineering Demo
## Setup Test-Bed
### Setup libyang
$ sudo apt update
$ sudo apt-get install cmake libpcre2-dev git make build-essential
$ mkdir -p ~/testbed
$ cd ~/testbed
$ git clone git@github.com:CESNET/libyang.git
$ cd libyang
$ git checkout v2.0.0
$ mkdir build; cd build
$ cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="Release" ..
$ make
$ sudo make install
### Setup Free Range Routing
$ sudo apt update
$ sudo apt-get install git autoconf automake libtool make libreadline-dev texinfo pkg-config libpam0g-dev libjson-c-dev bison flex libc-ares-dev python3-dev python3-sphinx install-info build-essential libsnmp-dev perl libcap-dev python2 libelf-dev libunwind-dev protobuf-c-compiler libprotobuf-c-dev libsystemd-dev
$ mkdir -p ~/testbed
$ cd ~/testbed
$ git clone git@github.com:opensourcerouting/frr.git
$ cd frr
$ curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
$ sudo python2 ./get-pip.py
$ export CFLAGS="-I /usr/local/include -g -O2"
$ sudo rm -rf /usr/lib/frr
$ sudo rm -rf /var/run/frr
$ sudo mkdir -p /etc/frr
$ sudo mkdir -p /var/run/frr
$ sudo chown -R root:root /etc/frr
$ ./bootstrap.sh
$ ./configure \
--prefix=/usr \
--includedir=\${prefix}/include \
--enable-exampledir=\${prefix}/share/doc/frr/examples \
--bindir=\${prefix}/bin \
--sbindir=\${prefix}/lib/frr \
--libdir=\${prefix}/lib/frr \
--libexecdir=\${prefix}/lib/frr \
--localstatedir=/var/run/frr \
--sysconfdir=/etc/frr \
--with-moduledir=\${prefix}/lib/frr/modules \
--enable-configfile-mask=0640 \
--enable-logfile-mask=0640 \
--enable-snmp=agentx \
--enable-multipath=64 \
--enable-user=root \
--enable-group=root \
--enable-vty-group=root \
--enable-vtysh \
--with-pkg-git-version \
--with-pkg-extra-version=-MyOwnFRRVersion \
--enable-systemd=yes \
--enable-config-rollbacks \
--enable-pathd \
--enable-pcep
$ make
$ sudo make install
### Setup NetGen
$ sudo apt update
$ sudo apt-get install git ruby ruby-dev tmux gettext-base
$ mkdir -p ~/testbed
$ cd ~/testbed
$ git clone git@github.com:sylane/netgen.git
$ cd netgen
$ git checkout teraflow
$ sudo gem install bundler:1.15
$ bundle _1.15_ install
### Run the Test-Bed
First load the [teraflow configuration file](~/tfs-ctrl/src/te/tests/topology-descriptors.json) using the webui.
In first console:
$ cd ~/testbed
$ ../tfs-ctrl/src/te/tests/start-testbed.sh
Then in second console:
$ sudo -i
# cd /tmp/negen
# ./tmux.sh
Be sure that both PCC connected to the TE service before going further.
This can be done by looking at the TE service log:
$ kubectl --namespace tfs logs $(kubectl --namespace tfs get pods --selector=app=teservice -o name) -c server
### Setup a flow from the Erlang console
We will setup two unidirectional flow between router 1 and 6.
We will use the binding label 1111 for the flow from router 1 to router 6, and the binding label 6666 for the flow from router 6 to router 1.
$ kubectl --namespace tfs exec -ti $(kubectl --namespace tfs get pods --selector=app=teservice -o name) -c server -- /tfte/bin/tfte remote_console
1> {ok, Flow1to6} = epce_server:initiate_flow(<<"foo">>, {1, 1, 1, 1}, {6, 6, 6, 6}, 1111).
2> {ok, Flow6to1} = epce_server:initiate_flow(<<"bar">>, {6, 6, 6, 6}, {1, 1, 1, 1}, 6666).
Another option is to use the router names:
1> {ok, Flow1to6} = epce_server:initiate_flow(<<"foo">>, <<"RT1">>, <<"RT6">>, 1111).
2> {ok, Flow6to1} = epce_server:initiate_flow(<<"bar">>, <<"RT6">>, <<"RT1">>, 6666).
Now if we go to the tmux session src (Ctrl-B 0) we can ping dst:
$ ping 9.9.9.2
From the Erlang console we can update the initiated flows to change the path the packets are flowing through:
3> epce_server:update_flow(Flow6to1, [16050, 16030, 16010]).
### Setup a flow using the GRPC test script
This does the same as the the setup from the Erlang console, but through GRPC.
After deploying Teraflow (with te), get the te service ip using:
$ kubectl -n tfs get services
Replace the IP in the python script `src/te/tests/test_te_service.py`.
Be sure the topology as been loaded, and netgen started as described previously,
and run the following command from the root of the teraflow controller:
$ PYTHONPATH=./src python src/te/tests/test_te_service.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment