-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #643 from nik-netlox/main
Misc: changes related to SCTP MH
- Loading branch information
Showing
18 changed files
with
659 additions
and
25 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: sctp-pod-01 | ||
labels: | ||
app: sctp-pod-01 | ||
annotations: | ||
k8s.v1.cni.cncf.io/networks: '[{ | ||
"name": "macvlan1", | ||
"default-route": ["4.0.6.149"] | ||
}]' | ||
spec: | ||
containers: | ||
- name: sctp-test | ||
image: loxilbio/sctp-darn:latest | ||
imagePullPolicy: Always | ||
#command: ["/bin/sh", "-ec", "while :; do echo '.'; sleep 6 ; done"] | ||
command: ["sctp_darn","-H", "0.0.0.0","-P", "9999", "-l"] | ||
ports: | ||
- containerPort: 9999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: multus-sctp-service | ||
annotations: | ||
loxilb.io/num-secondary-networks: "2" | ||
loxilb.io/multus-nets: macvlan1,macvlan2 | ||
loxilb.io/lbmode: "fullnat" | ||
spec: | ||
externalTrafficPolicy: Local | ||
loadBalancerClass: loxilb.io/loxilb | ||
selector: | ||
app: sctp-pod-01 | ||
ports: | ||
- port: 55002 | ||
protocol: SCTP | ||
targetPort: 9999 | ||
type: LoadBalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/bin/bash | ||
|
||
source ../common.sh | ||
|
||
echo "#########################################" | ||
echo "Spawning all hosts" | ||
echo "#########################################" | ||
|
||
spawn_docker_host --dock-type loxilb --dock-name llb1 | ||
spawn_docker_host --dock-type host --dock-name ep1 | ||
spawn_docker_host --dock-type host --dock-name r1 | ||
spawn_docker_host --dock-type host --dock-name r2 | ||
spawn_docker_host --dock-type host --dock-name r3 | ||
spawn_docker_host --dock-type host --dock-name r4 | ||
spawn_docker_host --dock-type host --dock-name sw1 | ||
spawn_docker_host --dock-type host --dock-name sw2 | ||
spawn_docker_host --dock-type host --dock-name user | ||
|
||
echo "#########################################" | ||
echo "Connecting and configuring hosts" | ||
echo "#########################################" | ||
|
||
connect_docker_hosts user r1 | ||
connect_docker_hosts user r2 | ||
connect_docker_hosts r1 sw1 | ||
connect_docker_hosts r2 sw1 | ||
connect_docker_hosts sw1 llb1 | ||
connect_docker_hosts llb1 sw2 | ||
connect_docker_hosts sw2 r3 | ||
connect_docker_hosts sw2 r4 | ||
connect_docker_hosts r3 ep1 | ||
connect_docker_hosts r4 ep1 | ||
|
||
create_docker_host_cnbridge --host1 sw1 --host2 llb1 | ||
create_docker_host_cnbridge --host1 sw1 --host2 r1 | ||
create_docker_host_cnbridge --host1 sw1 --host2 r2 | ||
|
||
create_docker_host_cnbridge --host1 sw2 --host2 llb1 | ||
create_docker_host_cnbridge --host1 sw2 --host2 r3 | ||
create_docker_host_cnbridge --host1 sw2 --host2 r4 | ||
|
||
#node1 config | ||
config_docker_host --host1 user --host2 r1 --ptype phy --addr 1.1.1.1/24 --gw 1.1.1.254 | ||
config_docker_host --host1 user --host2 r2 --ptype phy --addr 2.2.2.1/24 | ||
config_docker_host --host1 r1 --host2 user --ptype phy --addr 1.1.1.254/24 | ||
config_docker_host --host1 r2 --host2 user --ptype phy --addr 2.2.2.254/24 | ||
|
||
create_docker_host_vlan --host1 llb1 --host2 sw1 --id 11 --ptype untagged | ||
create_docker_host_vlan --host1 r1 --host2 sw1 --id 11 --ptype untagged | ||
create_docker_host_vlan --host1 r2 --host2 sw1 --id 11 --ptype untagged | ||
config_docker_host --host1 r1 --host2 sw1 --ptype vlan --id 11 --addr 11.11.11.253/24 --gw 11.11.11.1 | ||
config_docker_host --host1 r2 --host2 sw1 --ptype vlan --id 11 --addr 11.11.11.254/24 --gw 11.11.11.1 | ||
config_docker_host --host1 llb1 --host2 sw1 --ptype vlan --id 11 --addr 11.11.11.1/24 | ||
|
||
create_docker_host_vlan --host1 llb1 --host2 sw2 --id 10 --ptype untagged | ||
create_docker_host_vlan --host1 r3 --host2 sw2 --id 10 --ptype untagged | ||
create_docker_host_vlan --host1 r4 --host2 sw2 --id 10 --ptype untagged | ||
|
||
config_docker_host --host1 llb1 --host2 sw2 --ptype vlan --id 10 --addr 10.10.10.1/24 | ||
config_docker_host --host1 r3 --host2 sw2 --ptype vlan --id 10 --addr 10.10.10.253/24 --gw 10.10.10.1 | ||
config_docker_host --host1 r4 --host2 sw2 --ptype vlan --id 10 --addr 10.10.10.254/24 --gw 10.10.10.1 | ||
|
||
config_docker_host --host1 ep1 --host2 r3 --ptype phy --addr 31.31.31.1/24 --gw 31.31.31.254 | ||
config_docker_host --host1 ep1 --host2 r4 --ptype phy --addr 32.32.32.1/24 | ||
config_docker_host --host1 r3 --host2 ep1 --ptype phy --addr 31.31.31.254/24 | ||
config_docker_host --host1 r4 --host2 ep1 --ptype phy --addr 32.32.32.254/24 | ||
|
||
$hexec user ip route change default via 1.1.1.254 | ||
$hexec ep1 ip route change default via 31.31.31.254 | ||
|
||
# Backup paths in user | ||
$hexec user ip route add 124.124.124.1/32 via 2.2.2.254 | ||
$hexec user ip route add 125.125.125.1/32 via 2.2.2.254 | ||
$hexec user ip route add 134.134.134.1/32 via 2.2.2.254 | ||
$hexec user ip route add 135.135.135.1/32 via 2.2.2.254 | ||
|
||
$hexec ep1 ip route add 124.124.124.1/32 via 32.32.32.254 | ||
$hexec ep1 ip route add 125.125.125.1/32 via 32.32.32.254 | ||
$hexec ep1 ip route add 134.134.134.1/32 via 32.32.32.254 | ||
$hexec ep1 ip route add 135.135.135.1/32 via 32.32.32.254 | ||
|
||
$hexec llb1 ip route add 1.1.1.0/24 via 11.11.11.253 | ||
$hexec llb1 ip route add 2.2.2.0/24 via 11.11.11.254 | ||
|
||
$hexec llb1 ip route add 31.31.31.0/24 via 10.10.10.253 | ||
$hexec llb1 ip route add 32.32.32.0/24 via 10.10.10.254 | ||
|
||
sleep 20 | ||
##Create LB rule user->ep1 | ||
create_lb_rule llb1 123.123.123.1 --secips=124.124.124.1,125.125.125.1 --sctp=2020:9999 --endpoints=31.31.31.1:1 --mode=fullnat | ||
|
||
##Create LB rule ep1->user | ||
create_lb_rule llb1 133.133.133.1 --secips=134.134.134.1,135.135.135.1 --sctp=2020:9999 --endpoints=1.1.1.1:1 --mode=fullnat | ||
|
||
$dexec llb1 loxicmd create ep 1.1.1.1 --name=1.1.1.1_sctp_9999 --probetype=none | ||
$dexec llb1 loxicmd create ep 31.31.31.1 --name=31.31.31.1_sctp_9999 --probetype=none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
echo "#########################################" | ||
echo "Removing testbed" | ||
echo "#########################################" | ||
|
||
source ../common.sh | ||
|
||
disconnect_docker_hosts user r1 | ||
disconnect_docker_hosts user r2 | ||
disconnect_docker_hosts r1 sw1 | ||
disconnect_docker_hosts r2 sw1 | ||
disconnect_docker_hosts sw1 llb1 | ||
disconnect_docker_hosts llb1 sw2 | ||
disconnect_docker_hosts sw2 r3 | ||
disconnect_docker_hosts sw2 r4 | ||
disconnect_docker_hosts r3 ep1 | ||
disconnect_docker_hosts r4 ep1 | ||
|
||
delete_docker_host llb1 | ||
delete_docker_host user | ||
delete_docker_host r1 | ||
delete_docker_host r2 | ||
delete_docker_host r3 | ||
delete_docker_host r4 | ||
delete_docker_host sw1 | ||
delete_docker_host sw2 | ||
delete_docker_host ep1 | ||
|
||
echo "#########################################" | ||
echo "Removed testbed" | ||
echo "#########################################" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
echo "SCTP Multihoming - Test case #1" | ||
echo -e "*********************************************************************************" | ||
./validation1.sh | ||
echo -e "\n\n\nSCTP Multihoming - Test case #2" | ||
echo -e "*********************************************************************************" | ||
./validation2.sh | ||
echo -e "\n\n\nSCTP Multihoming - Test case #3" | ||
echo -e "*********************************************************************************" | ||
./validation3.sh | ||
echo -e "\n\n\nSCTP Multihoming - Test case #4" | ||
echo -e "*********************************************************************************" | ||
./validation4.sh | ||
echo -e "\n\n\n*********************************************************************************" |
Oops, something went wrong.