Skip to content

Commit 6de2a91

Browse files
committed
readme
1 parent e666e9f commit 6de2a91

File tree

8 files changed

+327
-17
lines changed

8 files changed

+327
-17
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
clab-*
2+
*.bak

sr-linux/srl/srl.labctl.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ options:
55
layouts:
66
nodes:
77
srl1:
8-
x: -150
8+
x: -120
99
"y": 30
10-
srl2: {x: 90, "y": 30}
10+
srl2: {x: 60, "y": 30}
1111
srl3: {x: -30, "y": -60}
1212
templates:
1313
link: |

sr-os/seamless-bfd/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,19 @@ INFO[0005] Adding containerlab host entries to /etc/hosts file
3737
| 3 | clab-sros-seamless-bfd-sr3 | 2613b9de2109 | registry.srlinux.dev/pub/vr-sros:22.7.R1 | vr-sros | running | 172.20.20.14/24 | 2001:172:20:20::e/64 |
3838
+---+----------------------------+--------------+------------------------------------------+---------+---------+-----------------+----------------------+
3939
```
40+
41+
## Lab commands
42+
43+
Redo all configuration: [commit -l delete,ports,isis,sbfd-reflector](run:)
44+
45+
Create the SR-TE LSP [commit -l srte](run:) \n\n[primary](path:2) and [secondary standby](path:0,1)
46+
47+
[send -l show -f sr1](run:)
48+
49+
Check if we have LSP BFD [compare -l srte-lsp-bfd](run:)
50+
51+
Ensure we use LSP BFD on the LSP: [commit -l srte-lsp-bfd](run:)
52+
53+
Check if we have Path BFD [compare -l srte](run:)
54+
55+
Ensure we use Path BFD on the LSP: [commit -l srte](run:)

sr-os/seamless-bfd/sbfd.labctl.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
options:
2-
commands:
3-
- 'Redo all configuration: [commit -l delete,ports,isis,sbfd-reflector](run:) '
4-
- "Create the SR-TE LSP [commit -l srte](run:) \n\n[primary](path:2) and [secondary standby](path:0,1)\n"
5-
- '[send -l show -f sr1](run:)'
6-
- |-
7-
Check is we have LSP BFD [compare -l srte-lsp-bfd](run:)
2+
commands: []
83

9-
Ensure we use LSP BFD on the LSP: [commit -l srte-lsp-bfd](run:)
10-
- |-
11-
Check is we have Path BFD [compare -l srte](run:)
12-
13-
Ensure we use Path BFD on the LSP: [commit -l srte](run:)
144
height: 450
155
layout: grid
166
layouts:
177
nodes:
188
sr1:
19-
x: -300
20-
"y": -135
21-
sr2: {x: -435, "y": -30}
22-
sr3: {x: -210, "y": -15}
9+
x: 4.960054
10+
"y": -58.242813
11+
sr2: { x: -60, "y": 15 }
12+
sr3: { x: 47.952644, "y": 33.48476 }
2313
templates:
2414
link: |-
2515
source_above: {{ .source_endpoint }}

templates/common__vr-sros.tmpl

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
2+
# Common config from
3+
# https://github.com/hellt/vrnetlab/blob/master/sros/docker/launch.py#L210
4+
5+
/configure system name {name}
6+
/configure system netconf no shutdown
7+
/configure system security profile \"administrative\" netconf base-op-authorization lock
8+
/configure system login-control ssh inbound-max-sessions 30
9+
/configure system management-interface yang-modules no nokia-modules
10+
/configure system management-interface yang-modules nokia-combined-modules
11+
/configure system management-interface yang-modules no base-r13-modules
12+
/configure system grpc allow-unsecure-connection
13+
/configure system grpc gnmi auto-config-save
14+
/configure system grpc gnmi no shutdown
15+
/configure system grpc rib-api no shutdown
16+
/configure system grpc no shutdown
17+
/configure system netconf auto-config-save
18+
/configure system netconf no shutdown
19+
/configure system security profile "administrative" netconf base-op-authorization kill-session
20+
/configure system security profile "administrative" netconf base-op-authorization lock
21+
/configure system snmp packet-size 9216
22+
/configure system snmp streaming no shutdown
23+
/configure system snmp no shutdown
24+
/configure system security user "admin" access netconf
25+
/configure system security user "admin" access console
26+
/configure system security user "admin" access grpc
27+
/configure system security user "admin" access snmp
28+
/configure system security user "admin" access ftp
29+
30+
# Additional
31+
/configure system login-control ssh login-control idle-timeout 1440
32+
33+
{{ if eq .clab_type "ixr-e-big" }}
34+
/configure card 1 card-type imm24-sfp++8-sfp28+2-qsfp28
35+
/configure card 1 mda 1 mda-type m24-sfp++8-sfp28+2-qsfp28
36+
{{ end }}
37+
38+
{{ if eq .clab_type "ixr-r6" }}
39+
/configure card 1 mda 1 mda-type m6-10g-sfp++4-25g-sfp28
40+
{{ end }}
41+
42+
{{ if eq .clab_type "ixr-s" }}
43+
/configure card 1 card-type imm48-sfp++6-qsfp28
44+
/configure card 1 mda 1 mda-type m48-sfp++6-qsfp28
45+
{{ end }}
46+
47+
{{ if eq .clab_type "ixr-e-small" }}
48+
# ??? ixr-e-big
49+
/configure card 1 card-type imm24-sfp++8-sfp28+2-qsfp28
50+
/configure card 1 mda 1 mda-type m24-sfp++8-sfp28+2-qsfp28
51+
{{ end }}
52+
53+
{{ if eq .clab_type "sr-1s" }}
54+
/configure system power-shelf 1 power-shelf-type ps-a4-shelf-dc
55+
/configure system power-shelf 1 power-module 1 power-module-type ps-a-dc-6000
56+
/configure system power-shelf 1 power-module 2 power-module-type ps-a-dc-6000
57+
/configure system power-shelf 1 power-module 3 power-module-type ps-a-dc-6000
58+
/configure system power-shelf 1 power-module 4 power-module-type ps-a-dc-6000
59+
/configure card 1 card-type xcm-1s
60+
/configure card 1 mda 1 mda-type s36-100gb-qsfp28
61+
{{ end }}
62+
63+
{{ if eq .clab_type "sr-14s" }}
64+
/configure system power-shelf 1 power-shelf-type ps-a10-shelf-dc
65+
/configure system power-shelf 1 power-module 1 power-module-type ps-a-dc-6000
66+
/configure system power-shelf 1 power-module 2 power-module-type ps-a-dc-6000
67+
/configure system power-shelf 1 power-module 3 power-module-type ps-a-dc-6000
68+
/configure system power-shelf 1 power-module 4 power-module-type ps-a-dc-6000
69+
/configure system power-shelf 1 power-module 5 power-module-type ps-a-dc-6000
70+
/configure system power-shelf 1 power-module 6 power-module-type ps-a-dc-6000
71+
/configure system power-shelf 1 power-module 7 power-module-type ps-a-dc-6000
72+
/configure system power-shelf 1 power-module 8 power-module-type ps-a-dc-6000
73+
/configure system power-shelf 1 power-module 9 power-module-type ps-a-dc-6000
74+
/configure system power-shelf 1 power-module 10 power-module-type ps-a-dc-6000
75+
/configure system power-shelf 2 power-shelf-type ps-a10-shelf-dc
76+
/configure system power-shelf 2 power-module 1 power-module-type ps-a-dc-6000
77+
/configure system power-shelf 2 power-module 2 power-module-type ps-a-dc-6000
78+
/configure system power-shelf 2 power-module 3 power-module-type ps-a-dc-6000
79+
/configure system power-shelf 2 power-module 4 power-module-type ps-a-dc-6000
80+
/configure system power-shelf 2 power-module 5 power-module-type ps-a-dc-6000
81+
/configure system power-shelf 2 power-module 6 power-module-type ps-a-dc-6000
82+
/configure system power-shelf 2 power-module 7 power-module-type ps-a-dc-6000
83+
/configure system power-shelf 2 power-module 8 power-module-type ps-a-dc-6000
84+
/configure system power-shelf 2 power-module 9 power-module-type ps-a-dc-6000
85+
/configure system power-shelf 2 power-module 10 power-module-type ps-a-dc-6000
86+
/configure sfm 1 sfm-type sfm-s
87+
/configure sfm 2 sfm-type sfm-s
88+
/configure sfm 3 sfm-type sfm-s
89+
/configure sfm 4 sfm-type sfm-s
90+
/configure sfm 5 sfm-type sfm-s
91+
/configure sfm 6 sfm-type sfm-s
92+
/configure sfm 7 sfm-type sfm-s
93+
/configure sfm 8 sfm-type sfm-s
94+
/configure card 1 card-type xcm-14s
95+
/configure card 1 mda 1 mda-type s36-100gb-qsfp28
96+
{{ end }}
97+
98+
{{ if eq .clab_type "sr-1" }}
99+
/configure card 1 card-type iom-1
100+
/configure card 1 mda 1 mda-type me12-100gb-qsfp28
101+
{{ end }}
102+
103+
{{ if eq .clab_type "sr-1e" }}
104+
/configure card 1 card-type iom-e
105+
/configure card 1 mda 1 mda-type me40-1gb-csfp
106+
{{ end }}

templates/ebgp__vr-sros.tmpl

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{{- if index . "ebgp_peeras" -}}
2+
3+
{{- $peeras := default "65530" .ebgp_peeras -}}
4+
{{- $family := split "," (default "ipv4,ipv6,vpn-ipv4,vpn-ipv6" .ebgp_family) -}}
5+
6+
/configure router bgp {
7+
admin-state enable
8+
ebgp-default-reject-policy {
9+
import false
10+
export false
11+
}
12+
{{ if index . "ebgp_cli" }}
13+
{{ range .ebgp_cli }}{{ . }}
14+
{{ end }}
15+
{{end}}
16+
group "ebgp" {
17+
type external
18+
peer-as {{ $peeras }}
19+
split-horizon true
20+
21+
delete family
22+
family {
23+
{{ range $family }}{{ . }} true
24+
{{ end }}
25+
}
26+
}
27+
neighbor "{{ .ebgp_peerip }}" {
28+
group "ebgp"
29+
}
30+
31+
next-hop-resolution {
32+
labeled-routes {
33+
transport-tunnel {
34+
family vpn {
35+
resolution filter
36+
resolution-filter {
37+
sr-isis true
38+
}
39+
}
40+
}
41+
}
42+
}
43+
44+
{{ end }}

templates/ibgp__vr-sros.tmpl

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# ibgp - 0 = no RR config
2+
# ibgp_rr - a RR IP
3+
# ibgp_family - list of families - optional
4+
5+
{{ $ibgp := bool (default "1" .ibgp) }}
6+
{{ $family := split "," (default "ipv4,ipv6,vpn-ipv4,vpn-ipv6" .ibgp_family) }}
7+
8+
{{ if and .ibgp_rr $ibgp }}
9+
# Ensure this is an IP
10+
{{ expect (printf "%v/32" .ibgp_rr) "ip" }}
11+
12+
{{ $is_rr := eq .clab_system_ip (printf "%v/32" .ibgp_rr) }}
13+
14+
{{ if $is_rr }}
15+
#
16+
# RR - dynamic BGP neighbors
17+
#
18+
19+
/configure router bgp {
20+
admin-state enable
21+
path-mtu-discovery false
22+
split-horizon true
23+
advertise-inactive true
24+
dynamic-neighbor-limit 1000
25+
cluster {
26+
cluster-id {{ .ibgp_rr }}
27+
}
28+
ebgp-default-reject-policy {
29+
import false
30+
export false
31+
}
32+
group RR {
33+
type internal
34+
min-route-advertisement 5
35+
dynamic-neighbor {
36+
match {
37+
prefix 0.0.0.0/0 {
38+
}
39+
}
40+
}
41+
family {
42+
{{ range $family }}{{ . }} true
43+
{{ end }}
44+
}
45+
}
46+
delete group IBGP
47+
delete neighbor {{ .ibgp_rr }}
48+
49+
50+
{{ else }}
51+
52+
#
53+
# BGP from all PEs
54+
#
55+
/configure router bgp {
56+
admin-state enable
57+
path-mtu-discovery false
58+
split-horizon true
59+
delete group "IBGP"
60+
group "IBGP" {
61+
type internal
62+
min-route-advertisement 5
63+
family {
64+
{{ range $family }}{{ . }} true
65+
{{ end }}
66+
}
67+
}
68+
neighbor {{ .ibgp_rr }} {
69+
admin-state enable
70+
group "IBGP"
71+
}
72+
}
73+
74+
{{ end }}
75+
{{ else }}
76+
# No ibgp for this router!
77+
# ibgp = '{{ $ibgp }}'
78+
# ibgp_rr = '{{ .ibgp_rr }}'
79+
{{ end }}

templates/vprn__vr-sros.tmpl

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Configure a vprn
2+
{{ $r20 := (default 0 .r20) }}
3+
{{ $policy := (default 1 .policy) }}
4+
5+
{{ range $vprn, $ip := .vprn }}
6+
7+
{{ expect $vprn "100-10000" }}
8+
{{ expect (printf "%v/32" $ip) "ip" }}
9+
10+
/configure policy-options
11+
community "vrf{{ $vprn }}" {
12+
member "target:64500:{{ $vprn }}" { }
13+
}
14+
policy-statement "import-vrf{{ $vprn }}" {
15+
entry 10 {
16+
from {
17+
community {
18+
name "vrf{{ $vprn }}"
19+
}
20+
#delete protocol
21+
protocol {
22+
name [bgp-vpn]
23+
}
24+
}
25+
action {
26+
action-type accept
27+
delete admin-tag-policy
28+
#admin-tag-policy "no_blue"
29+
}
30+
}
31+
}
32+
33+
/configure service
34+
vprn "{{ $vprn }}" {
35+
admin-state enable
36+
customer "1"
37+
interface "lo0" {
38+
admin-state enable
39+
loopback true
40+
ipv4 {
41+
primary {
42+
address {{ ip $ip }}
43+
prefix-length 32
44+
}
45+
}
46+
}
47+
{{- if not $r20 }}
48+
bgp-ipvpn mpls {
49+
admin-state enable
50+
{{- end }}
51+
route-distinguisher "64500:{{ $vprn }}"
52+
{{- $p := eq $policy 1 }}
53+
{{- if $p }}
54+
delete vrf-target
55+
vrf-target export-community "target:64500:{{ $vprn }}"
56+
vrf-import {
57+
policy ["import-vrf{{ $vprn }}"]
58+
}
59+
{{- else }}
60+
delete vrf-import
61+
vrf-target {
62+
community "target:64500:{{ $vprn }}"
63+
}
64+
{{- end }}
65+
auto-bind-tunnel {
66+
resolution filter
67+
enforce-strict-tunnel-tagging false
68+
resolution-filter {
69+
sr-te true
70+
sr-isis true
71+
}
72+
}
73+
{{- end }}

0 commit comments

Comments
 (0)