aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tg23/templates/r1.stand.conf
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tg23/templates/r1.stand.conf')
-rw-r--r--examples/tg23/templates/r1.stand.conf513
1 files changed, 513 insertions, 0 deletions
diff --git a/examples/tg23/templates/r1.stand.conf b/examples/tg23/templates/r1.stand.conf
new file mode 100644
index 0000000..60a7480
--- /dev/null
+++ b/examples/tg23/templates/r1.stand.conf
@@ -0,0 +1,513 @@
+{# Query parameters: ?switch=e1-1 #}
+{%- if options["switch"] %}
+{% set switch_name = options["switch"] %}
+{% import "vars.conf" as v with context %}
+{% include "global.conf" %}
+
+{%- set pve_nodes = [
+ 'speilegg',
+ 'punchknapp',
+ 'sorbis',
+ 'hobby',
+ 'dumle',
+ ]
+%}
+
+virtual-chassis {
+ preprovisioned;
+ no-split-detection;
+ member 0 {
+ role routing-engine;
+ serial-number <removed>;
+ }
+ member 1 {
+ role routing-engine;
+ serial-number <removed>;
+ }
+}
+
+chassis {
+ redundancy {
+ graceful-switchover;
+ }
+ aggregated-devices {
+ ethernet {
+ device-count 40;
+ }
+ }
+}
+
+protocols {
+ lldp {
+ port-id-subtype interface-name;
+ port-description-type interface-description;
+ interface all;
+ }
+ igmp-snooping {
+ vlan all;
+ }
+ rstp {
+ bridge-priority 4k;
+ }
+}
+
+groups {
+ pvehosts {
+ interfaces {
+ <ae*> {
+ vlan-tagging;
+ encapsulation flexible-ethernet-services;
+ aggregated-ether-options {
+ lacp {
+ active;
+ }
+ }
+ unit 0 {
+ family ethernet-switching {
+ interface-mode trunk;
+ vlan {
+ members [ techvm vmhosts vms ];
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+routing-options {
+ nonstop-routing;
+}
+
+protocols {
+ lldp {
+ port-id-subtype interface-name;
+ port-description-type interface-description;
+ interface all;
+ }
+ igmp-snooping {
+ vlan all;
+ }
+ rstp {
+ bridge-priority 4k;
+ }
+}
+
+vlans {
+ vmhosts {
+ vlan-id 100;
+ l3-interface irb.100;
+ }
+ techvm {
+ vlan-id 101;
+ l3-interface irb.101;
+ }
+ vms {
+ vlan-id 102;
+ l3-interface irb.102;
+ }
+ tghack {
+ vlan-id 200;
+ l3-interface irb.200;
+ }
+}
+
+interfaces {
+ lo0 {
+ unit 0 {
+ family inet {
+ address 185.110.148.1/32;
+ }
+ family inet6 {
+ address 2a06:5841:f:a::1/128;
+ }
+ }
+ }
+
+ irb {
+ unit 100 {
+ family inet {
+ address 185.110.148.65/27;
+ }
+ family inet6 {
+ address 2a06:5841:f:c::1/64;
+ }
+ }
+ unit 101 {
+ family inet {
+ address 185.110.148.129/27;
+ }
+ family inet6 {
+ address 2a06:5841:f:e::1/64;
+ }
+ }
+ unit 102 {
+ family inet {
+ address 151.216.249.1/24;
+ }
+ family inet6 {
+ address 2a06:5841:100:1::1/64 ;
+ }
+ }
+ unit 200 {
+ family inet {
+ address 151.216.252.1/27;
+ }
+ family inet6 {
+ address 2a06:5841:200:a::1/64;
+ }
+ }
+ }
+
+
+ xe-0/0/10 {
+ description "C: krokodille (storage) (ae3)";
+ gigether-options {
+ 802.3ad ae3;
+ }
+ }
+ xe-0/0/11 {
+ description "C: krokodille (storage) (ae3)";
+ gigether-options {
+ 802.3ad ae3;
+ }
+ }
+ xe-1/0/10 {
+ description "C: krokodille (storage) (ae3)";
+ gigether-options {
+ 802.3ad ae3;
+ }
+ }
+ xe-1/0/11 {
+ description "C: krokodille (storage) (ae3)";
+ gigether-options {
+ 802.3ad ae3;
+ }
+ }
+
+ xe-0/0/12 {
+ description "C: rekrutt (GPU) (ae7)";
+ gigether-options {
+ 802.3ad ae7;
+ }
+ }
+
+ xe-1/0/12 {
+ description "C: rekrutt (GPU) (ae7)";
+ gigether-options {
+ 802.3ad ae7;
+ }
+ }
+
+ xe-0/0/13 {
+ description "C: rekrutt (GPU) (ae7)";
+ gigether-options {
+ 802.3ad ae7;
+ }
+ }
+
+ xe-1/0/13 {
+ description "C: rekrutt (GPU) (ae7)";
+ gigether-options {
+ 802.3ad ae7;
+ }
+ }
+
+
+ xe-0/0/42 {
+ description "C: TGHACK 1";
+ gigether-options {
+ 802.3ad ae4;
+ }
+ }
+ xe-1/0/42 {
+ description "C: TGHACK 1";
+ gigether-options {
+ 802.3ad ae4;
+ }
+ }
+ xe-0/0/43 {
+ description "C: TGHACK 2";
+ gigether-options {
+ 802.3ad ae5;
+ }
+ }
+ xe-1/0/43 {
+ description "C: TGHACK 2";
+ gigether-options {
+ 802.3ad ae5;
+ }
+ }
+ xe-0/0/44 {
+ description "C: TGHACK 3";
+ gigether-options {
+ 802.3ad ae6;
+ }
+ }
+ xe-1/0/44 {
+ description "C: TGHACK 3";
+ gigether-options {
+ 802.3ad ae6;
+ }
+ }
+ xe-0/0/45 {
+ description "C: Unes";
+ gigether-options {
+ 802.3ad ae9;
+ }
+ }
+ xe-1/0/45 {
+ description "C: Unes";
+ gigether-options {
+ 802.3ad ae9;
+ }
+ }
+ et-0/0/48 {
+ description "G: r1.tele et-4/0/2 (ae0)";
+ gigether-options {
+ 802.3ad ae0;
+ }
+ }
+ et-1/0/48 {
+ description "G: r1.tele et-5/0/2 (ae0)";
+ gigether-options {
+ 802.3ad ae0;
+ }
+ }
+ ae0 {
+ description "B: r1.tele ae12";
+ aggregated-ether-options {
+ lacp {
+ active;
+ periodic fast;
+ }
+ }
+ unit 0 {
+ family inet {
+ address 185.110.148.161/31;
+ }
+ family inet6 {
+ address 2a06:5841:f:100::2/64;
+ }
+ }
+ }
+ ae3 {
+ description "C: krokodille (storage) bond0";
+ flexible-vlan-tagging;
+ encapsulation flexible-ethernet-services;
+ aggregated-ether-options {
+ lacp {
+ active;
+ periodic fast;
+ }
+ }
+ unit 100 {
+ description "C: krokodille vm-host";
+ vlan-tags outer 100;
+ family inet {
+ address 185.110.148.34/31;
+ }
+ family inet6 {
+ address 2a06:5841:f:b::2/127;
+ }
+ }
+ unit 101 {
+ description "C: krokodille vms";
+ vlan-tags outer 101;
+ family inet {
+ address 151.216.248.129/28;
+ }
+ family inet6 {
+ address 2a06:5841:100:2::1/64;
+ }
+ }
+ }
+
+ ae4 {
+ description "C: Crew-server (TG:Hack) 1";
+ aggregated-ether-options {
+ lacp {
+ active;
+ periodic fast;
+ }
+ }
+ unit 0 {
+ family ethernet-switching {
+ interface-mode access;
+ vlan {
+ members tghack;
+ }
+ }
+ }
+ }
+ ae5 {
+ description "C: Crew-server (TG:Hack) 2";
+ aggregated-ether-options {
+ lacp {
+ active;
+ periodic fast;
+ }
+ }
+ unit 0 {
+ family ethernet-switching {
+ interface-mode access;
+ vlan {
+ members tghack;
+ }
+ }
+ }
+ }
+ ae6 {
+ description "C: Crew-server (TG:Hack) 3";
+ aggregated-ether-options {
+ lacp {
+ active;
+ periodic fast;
+ }
+ }
+ unit 0 {
+ family ethernet-switching {
+ interface-mode access;
+ vlan {
+ members tghack;
+ }
+ }
+ }
+ }
+ ae7 {
+ description "C: rekrutt (GPU) bond0";
+ aggregated-ether-options {
+ lacp {
+ active;
+ periodic fast;
+ }
+ }
+ unit 0 {
+ description "C: rekrutt";
+ family inet {
+ address 151.216.248.145/28;
+ }
+ family inet6 {
+ address 2a06:5841:100:3::1/64;
+ }
+ }
+ }
+ ae9 {
+ description "C: Crew-server (Unes)";
+ aggregated-ether-options {
+ lacp {
+ active;
+ periodic fast;
+ }
+ }
+ unit 0 {
+ family inet {
+ address 151.216.252.33/27;
+ }
+ family inet6 {
+ address 2a06:5841:200:b::1/64;
+ }
+ }
+ }
+
+{% for node in pve_nodes %}
+ {% set port = (loop.index - 1) * 2 %}
+ xe-0/0/{{port}} {
+ description "C: {{ node }} enp101s0f0 (ae1{{loop.index}})";
+ gigether-options {
+ 802.3ad ae1{{loop.index}};
+ }
+ }
+ xe-1/0/{{port}} {
+ description "C: {{ node }} enp101s0f1 (ae1{{loop.index}})";
+ gigether-options {
+ 802.3ad ae1{{loop.index}};
+ }
+ }
+ {% set port = port + 1 %}
+ xe-0/0/{{port}} {
+ description "C: {{ node }} enp101s1f0 (ae1{{loop.index}})";
+ gigether-options {
+ 802.3ad ae1{{loop.index}};
+ }
+ }
+ xe-1/0/{{port}} {
+ description "C: {{ node }} enp101s1f1 (ae1{{loop.index}})";
+ gigether-options {
+ 802.3ad ae1{{loop.index}};
+ }
+ }
+ ae1{{loop.index}} {
+ apply-groups pvehosts;
+ description "C: {{ node }} bond0";
+ }
+{% endfor %}
+}
+
+protocols {
+ ospf3 {
+ realm ipv4-unicast {
+ area 0.0.0.0 {
+ interface ae0.0;
+ }
+ export [ direct-to-ospf static-to-ospf ];
+ }
+ area 0.0.0.0 {
+ interface ae0.0;
+ }
+ export [ direct-to-ospf static-to-ospf ];
+ reference-bandwidth 1000g;
+ }
+}
+
+policy-options {
+ policy-statement direct-to-ospf {
+ from protocol direct;
+ then {
+ external {
+ type 1;
+ }
+ accept;
+ }
+ }
+ policy-statement static-to-ospf {
+ from protocol static;
+ then {
+ external {
+ type 1;
+ }
+ accept;
+ }
+ }
+}
+
+firewall {
+ family inet {
+ filter 20G-POLICER-V4-FILTER {
+ term A {
+ then policer 20G-POLICER;
+ }
+ }
+ }
+ family inet6 {
+ filter 20G-POLICER-V6-FILTER {
+ term A {
+ then policer 20G-POLICER;
+ }
+ }
+ }
+ policer 20G-POLICER {
+ filter-specific;
+ if-exceeding {
+ bandwidth-limit 20g;
+ burst-size-limit 100m;
+ }
+ then discard;
+ }
+}
+
+{% else %}
+Unsupported option. Please use
+"?switch=switch_name"
+{% endif %}