-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
264d5a2
commit e911b1c
Showing
20 changed files
with
713 additions
and
1 deletion.
There are no files selected for viewing
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 @@ | ||
clab-pop |
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,4 @@ | ||
#!/bin/bash | ||
|
||
curl -s 'http://admin:NokiaSrl1!@clab-pop-cdn/jsonrpc' -d @cdn.json | ||
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,152 @@ | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 0, | ||
"method": "set", | ||
"params": { | ||
"commands": [ | ||
{ | ||
"action": "update", | ||
"path": "/", | ||
"value": | ||
{ | ||
"interface": [ | ||
{ | ||
"name": "ethernet-1/1", | ||
"subinterface": [ | ||
{ | ||
"index": 0, | ||
"admin-state": "enable", | ||
"ipv4": { | ||
"admin-state": "enable", | ||
"address": [ | ||
{ | ||
"ip-prefix": "169.254.20.1/30", | ||
"primary": [null] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "ethernet-1/2", | ||
"subinterface": [ | ||
{ | ||
"index": 0, | ||
"type": "routed", | ||
"admin-state": "enable", | ||
"ipv4": { | ||
"admin-state": "enable", | ||
"address": [ | ||
{ | ||
"ip-prefix": "2.3.4.5/24" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"network-instance": [ | ||
{ | ||
"name": "default", | ||
"interface": [ | ||
{ | ||
"name": "ethernet-1/1.0" | ||
}, | ||
{ | ||
"name": "ethernet-1/2.0" | ||
} | ||
], | ||
"protocols": { | ||
"bgp": { | ||
"admin-state": "enable", | ||
"autonomous-system": 64501, | ||
"export-policy": "all", | ||
"router-id": "2.3.4.5", | ||
"afi-safi": [ | ||
{ | ||
"afi-safi-name": "ipv4-unicast", | ||
"admin-state": "enable" | ||
} | ||
], | ||
"group": [ | ||
{ | ||
"group-name": "oxpop", | ||
"admin-state": "enable", | ||
"afi-safi": [ | ||
{ | ||
"afi-safi-name": "ipv4-unicast", | ||
"admin-state": "enable" | ||
} | ||
], | ||
"trace-options": { | ||
"flag": [ | ||
{ | ||
"name": "events" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"neighbor": [ | ||
{ | ||
"peer-address": "169.254.20.2", | ||
"description": "oxide point of presence", | ||
"peer-as": 65547, | ||
"peer-group": "oxpop", | ||
"authentication": { | ||
"password": "$aes1$ATTuNB0NU2L7AW8=$HpBACI63gldrmF9SBkiuPQ==" | ||
}, | ||
"multihop": { | ||
"admin-state": "enable", | ||
"maximum-hops": 255 | ||
}, | ||
"local-as": { | ||
"as-number": 64501 | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"static-routes": { | ||
"admin-state": "enable", | ||
"route": [ | ||
{ | ||
"prefix": "0.0.0.0/0", | ||
"admin-state": "enable", | ||
"next-hop-group": "upstream" | ||
} | ||
] | ||
}, | ||
"next-hop-groups": { | ||
"group": [ | ||
{ | ||
"name": "upstream", | ||
"admin-state": "enable", | ||
"nexthop": [ | ||
{ | ||
"index": 1, | ||
"ip-address": "2.3.4.1" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"routing-policy": { | ||
"policy": [ | ||
{ | ||
"name": "all", | ||
"default-action": { | ||
"policy-result": "accept" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
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,17 @@ | ||
#!/bin/bash | ||
|
||
curl -s 'http://admin:NokiaSrl1!@clab-pop-transit/jsonrpc' -d @- <<EOF | jq | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 0, | ||
"method": "get", | ||
"params": { | ||
"commands": [ | ||
{ | ||
"path": "/network-instance[name=default]/protocols/bgp", | ||
"datastore": "state" | ||
} | ||
] | ||
} | ||
} | ||
EOF |
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,17 @@ | ||
#!/bin/bash | ||
|
||
curl -s 'http://admin:NokiaSrl1!@clab-pop-transit/jsonrpc' -d @- <<EOF | jq | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 0, | ||
"method": "get", | ||
"params": { | ||
"commands": [ | ||
{ | ||
"path": "/network-instance[name=default]/protocols/bgp/neighbor[peer-address=169.254.20.2]/afi-safi[afi-safi-name=ipv4-unicast]/received-routes", | ||
"datastore": "state" | ||
} | ||
] | ||
} | ||
} | ||
EOF |
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,17 @@ | ||
#!/bin/bash | ||
|
||
curl -s 'http://admin:NokiaSrl1!@clab-pop-transit/jsonrpc' -d @- <<EOF | jq | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 0, | ||
"method": "get", | ||
"params": { | ||
"commands": [ | ||
{ | ||
"path": "/network-instance[name=default]/bgp-rib/afi-safi[afi-safi-name=ipv4-unicast]", | ||
"datastore": "state" | ||
} | ||
] | ||
} | ||
} | ||
EOF |
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 @@ | ||
#!/bin/bash | ||
|
||
./transit-set-config.sh | ||
./cdn-set-config.sh | ||
./pcloud-set-config.sh | ||
./mgd-setup.sh |
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,3 @@ | ||
#!/bin/bash | ||
|
||
addr=`host -t A -4 clab-pop-oxpop | awk '{print $4}'` |
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,11 @@ | ||
#!/bin/bash | ||
|
||
addr=`host -t A -4 clab-pop-oxpop | awk '{print $4}'` | ||
|
||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-router 65547 1701 0.0.0.0:0 | ||
|
||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-neighbor 65547 transit 169.254.20.1 qsfp0 \ | ||
--remote-asn 64502 \ | ||
--min-ttl 255 |
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,17 @@ | ||
#!/bin/bash | ||
|
||
addr=`host -t A -4 clab-pop-oxpop | awk '{print $4}'` | ||
|
||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-router 64501 1701 0.0.0.0:0 | ||
|
||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-neighbor 64501 transit 169.254.20.1 qsfp0 \ | ||
--remote-asn 64501 \ | ||
--min-ttl 255 \ | ||
--md5-auth-key hypermuffin \ | ||
--hold-time 900 \ | ||
--keepalive-time 300 \ | ||
--communities 3081893 \ | ||
--local-pref 47 \ | ||
--med 99 |
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,39 @@ | ||
#!/bin/bash | ||
|
||
addr=`host -t A -4 clab-pop-oxpop | awk '{print $4}'` | ||
|
||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-router 65547 1701 0.0.0.0:0 | ||
|
||
# transit | ||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-neighbor 65547 transit 169.254.10.1 qsfp0 \ | ||
--remote-asn 64500 \ | ||
--min-ttl 255 \ | ||
--md5-auth-key hypermuffin \ | ||
--hold-time 900 \ | ||
--keepalive-time 300 \ | ||
--communities 1287493 \ | ||
--med 99 | ||
|
||
# cdn | ||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-neighbor 65547 cdn 169.254.20.1 qsfp1 \ | ||
--remote-asn 64501 \ | ||
--min-ttl 255 \ | ||
--md5-auth-key hypermuffin \ | ||
--hold-time 900 \ | ||
--keepalive-time 300 \ | ||
--communities 3081893 \ | ||
--med 99 | ||
|
||
# public cloud | ||
~/src/maghemite/target/debug/mgadm -a $addr \ | ||
bgp add-neighbor 65547 pcloud 169.254.30.1 qsfp2 \ | ||
--remote-asn 64502 \ | ||
--min-ttl 255 \ | ||
--md5-auth-key hypermuffin \ | ||
--hold-time 900 \ | ||
--keepalive-time 300 \ | ||
--communities 8675309 \ | ||
--med 99 |
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,30 @@ | ||
name: pop | ||
topology: | ||
nodes: | ||
transit: | ||
kind: nokia_srlinux | ||
image: ghcr.io/nokia/srlinux | ||
cdn: | ||
kind: nokia_srlinux | ||
image: ghcr.io/nokia/srlinux | ||
pcloud: | ||
kind: nokia_srlinux | ||
image: ghcr.io/nokia/srlinux | ||
oxpop: | ||
kind: linux | ||
image: ubuntu:22.04 | ||
binds: | ||
- /home/ry/src/maghemite/target/debug/mgd:/opt/oxide/mgd | ||
- ./run-mgd.sh:/opt/oxide/run-mgd.sh | ||
ports: | ||
- 4676:4676/tcp | ||
cmd: /opt/oxide/run-mgd.sh | ||
links: | ||
- endpoints: ["transit:e1-1", "oxpop:eth1"] | ||
- endpoints: ["transit:e1-2", "host:transit_e1-2"] | ||
|
||
- endpoints: ["cdn:e1-1", "oxpop:eth2"] | ||
- endpoints: ["cdn:e1-2", "host:cdn_e1-2"] | ||
|
||
- endpoints: ["pcloud:e1-1", "oxpop:eth3"] | ||
- endpoints: ["pcloud:e1-2", "host:pcloud_e1-2"] |
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,4 @@ | ||
#!/bin/bash | ||
|
||
curl -s 'http://admin:NokiaSrl1!@clab-pop-pcloud/jsonrpc' -d @pcloud.json | ||
echo; |
Oops, something went wrong.