forked from aristanetworks/avd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
router-bgp-vrf-lite.yml
195 lines (191 loc) · 5.55 KB
/
router-bgp-vrf-lite.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
prefix_lists:
- name: PL-BGP-DEFAULT-BLUE-C1
sequence_numbers:
- sequence: 10
action: permit 0.0.0.0/0 le 1
- name: PL-BGP-DEFAULT-RED-OUT-C1
sequence_numbers:
- sequence: 10
action: permit 10.0.0.0/8
- name: PL-BGP-DEFAULT-RED-IN-C1
sequence_numbers:
- sequence: 10
action: permit 0.0.0.0/0
route_maps:
- name: RM-BGP-AGG-APPLY-SET
sequence_numbers:
- sequence: 10
type: permit
description: RM for BGP AGG Set
set:
- "local-preference 50"
- name: RM-BGP-EXPORT-DEFAULT-BLUE-C1
sequence_numbers:
- sequence: 10
type: permit
description: RM for BGP default route in BLUE-C1
match:
- ip address prefix-list PL-BGP-DEFAULT-BLUE-C1
router_bgp:
as: 65001
router_id: 1.0.1.1
bgp_defaults:
- no bgp default ipv4-unicast
- distance bgp 20 200 200
- graceful-restart restart-time 300
- graceful-restart
peer_groups:
- name: OBS_WAN
type: ipv4
description: 'BGP Connection to OBS WAN CPE'
remote_as: 65000
as_path:
remote_as_replace_out: true
prepend_own_disabled: true
bfd: true
- name: WELCOME_ROUTERS
type: ipv4
description: 'BGP Connection to WELCOME ROUTER 02'
remote_as: 65001
- name: SEDI
type: ipv4
description: 'BGP Connection to OBS WAN CPE'
remote_as: 65003
update_source: Loopback101
ebgp_multihop: 10
bfd: false
- name: SEDI-shut
type: ipv4
description: 'BGP Peer Shutdown'
shutdown: true
- name: TEST-PASSIVE
type: ipv4
description: 'BGP Connection in passive mode'
remote_as: 65003
passive: true
redistribute_routes:
- source_protocol: static
- source_protocol: ospf
include_leaked: true
route_map: RM-OSPF-TO-BGP
address_family_ipv4:
peer_groups:
- name: OBS_WAN
activate: true
- name: WELCOME_ROUTERS
activate: true
- name: SEDI
activate: true
route_map_out: RM-BGP-EXPORT-DEFAULT-BLUE-C1
- name: SEDI-shut
activate: true
route_map_out: RM-BGP-EXPORT-DEFAULT-BLUE-C1
vrfs:
- name: BLUE-C1
rd: 1.0.1.1:101
neighbors:
- ip_address: 10.1.1.0
peer_group: OBS_WAN
- ip_address: 10.255.1.1
peer_group: WELCOME_ROUTERS
route_reflector_client: true
weight: 65535
as_path:
remote_as_replace_out: true
- ip_address: 101.0.3.1
peer_group: SEDI
weight: 100
- ip_address: 101.0.3.2
peer_group: SEDI
shutdown: true
allowas_in:
enabled: true
- ip_address: 101.0.3.3
peer_group: SEDI-shut
allowas_in:
enabled: true
times: 5
- ip_address: 101.0.3.4
peer_group: TEST-PASSIVE
# Testing bfd false IN a peer group that should render
- ip_address: 101.0.3.5
peer_group: WELCOME_ROUTERS
passive: true
bfd: false
# Testing bfd true IN a peer group that should render
- ip_address: 101.0.3.6
peer_group: WELCOME_ROUTERS
bfd: true
# Testing bfd true OUTSIDE a peer group that should render
- ip_address: 101.0.3.7
bfd: true
# Testing bfd false OUTSIDE a peer group that should NOT render
- ip_address: 101.0.3.8
bfd: false
redistribute_routes:
- source_protocol: static
- source_protocol: ospf
include_leaked: true
aggregate_addresses:
- prefix: 193.1.0.0/16
as_set: true
summary_only: true
attribute_map: RM-BGP-AGG-APPLY-SET
advertise_only: false
- prefix: 0.0.0.0/0
as_set: true
summary_only: true
attribute_map: RM-BGP-AGG-APPLY-SET
advertise_only: false
eos_cli: |
comment
Comment created from eos_cli under router_bgp.vrfs.BLUE-C1
EOF
- name: RED-C1
rd: 1.0.1.1:102
neighbors:
- ip_address: 10.1.1.0
peer_group: OBS_WAN
address_family_ipv4:
neighbors:
- ip_address: 10.1.1.0
prefix_list_in: PL-BGP-DEFAULT-RED-IN-C1
prefix_list_out: PL-BGP-DEFAULT-RED-OUT-C1
address_family_ipv6:
neighbors:
- ip_address: 2001:cafe:192:168::4
prefix_list_in: PL-BGP-V6-RED-IN-C1
prefix_list_out: PL-BGP-V6-RED-OUT-C1
- name: YELLOW-C1
rd: 1.0.1.1:103
listen_ranges:
# should render
- prefix: 10.10.10.0/24
peer_group: my-peer-group1
peer_filter: my-peer-filter
# It shouldn't render because neither peer-filter nor as-filter are defined
- prefix: 11.10.10.0/24
peer_group: my-peer-group2
# should render with remote-as filter
- prefix: 12.10.10.0/24
peer_id_include_router_id: true
peer_group: my-peer-group3
remote_as: 65444
# should render with peer-filter because of precedence
- prefix: 13.10.10.0/24
peer_group: my-peer-group4
peer_filter: my-peer-filter
remote_as: 65444
neighbors:
- ip_address: 10.1.1.0
peer_group: OBS_WAN
static_routes:
- vrf: BLUE-C1
destination_address_prefix: 193.1.0.0/24
interface: Null0
- vrf: BLUE-C1
destination_address_prefix: 193.1.1.0/24
interface: Null0
- vrf: BLUE-C1
destination_address_prefix: 193.1.2.0/24
interface: Null0