@@ -33,6 +33,9 @@ be based on flow state. How does this interact with other configuration?
33
33
34
34
### VPC1 <> VPC2 with overlapping subnets
35
35
36
+ - vpc-1 with a single subnet 10.1.1.0/24 named subnet-1
37
+ - vpc-2 with a the same subnet 10.1.1.0/24 named subnet-1
38
+
36
39
``` yaml
37
40
apiVersion : gateway.githedgehog.com/v1alpha1
38
41
kind : Peering
47
50
- 192.168.1.0/24
48
51
vpc-2 :
49
52
ips :
50
- - cidr : 10.1.1.0/24
53
+ - vpcSubnet : subnet-1 # just a shorthand for the VPC subnet, equivalent to ` cidr: 10.1.1.0/24`
51
54
as :
52
55
- 192.168.2.0/24
53
56
` ` `
@@ -139,7 +142,7 @@ GW will receive routes for the whole internet (or whatever the external is peere
139
142
- It will filter all routes for 192.168.0.0/16
140
143
- It will filter all routes for internally routed subnets (regardless of public or private IP)
141
144
- In this case, filter all routes for 1.2.3.0/24
142
- - This is an issue between VTEPs inside the gateway as well, probably don't want to replicate the whole internet
145
+ - This is an issue between VTEPs inside the gateway as well, probably don't want to replicate the whole internet
143
146
routing table inside the gateway
144
147
145
148
>[NOTE] The meaning of *not* is different when talking to an external, it is a route filter, not syntactic sugar
@@ -162,25 +165,25 @@ kind: Peering
162
165
metadata :
163
166
name : vpc-1--vpc-2
164
167
spec :
165
- vpc1 :
166
- ips :
167
- - cidr : 10.1.1.0/24
168
- # - fromVPCSubnet: subnet1 # just a shorthand for the above
169
- as : # Means static Src/Dst NAT for vpc1
170
- - 192.168.1.0/24
171
- ingress :
172
- - allow :
173
- stateless : true # it's the only options supported in the first release
174
- tcp :
175
- dstPort : 443
176
- vpc2 :
177
- ips :
178
- - cidr : 10.2.1.1/32
179
- ingress :
180
- - allow :
181
- stateless : true
182
- tcp :
183
- srcPort : 443
168
+ peering :
169
+ vpc-1 :
170
+ ips :
171
+ - cidr : 10.1.1.0/24
172
+ as : # Means static Src/Dst NAT for vpc1
173
+ - 192.168.1.0/24
174
+ ingress :
175
+ - allow :
176
+ stateless : true # it's the only options supported in the first release
177
+ tcp :
178
+ dstPort : 443
179
+ vpc-2 :
180
+ ips :
181
+ - cidr : 10.2.1.1/32
182
+ ingress :
183
+ - allow :
184
+ stateless : true
185
+ tcp :
186
+ srcPort : 443
184
187
` ` `
185
188
186
189
### Other examples
@@ -193,18 +196,17 @@ kind: Peering
193
196
metadata :
194
197
name : vpc-e1--vpc-e2
195
198
spec :
196
- vpc-e1 :
197
- ips :
198
- - cidr : 0.0.0.0/0
199
- - not : 10.0.0.0/8
200
- - not : 192.168.0.0/16
201
- - not : 1.2.3.0/24
202
- vpc-e2 :
203
- ips :
204
- - cidr : 0.0.0.0/0
205
- - not : 10.0.0.0/8
206
- - not : 192.168.0.0/16
207
- - not : 3.2.1.0/30
199
+ peering :
200
+ vpc-e1 :
201
+ ips :
202
+ - not : 10.0.0.0/8
203
+ - not : 192.168.0.0/16
204
+ - not : 1.2.3.0/24
205
+ vpc-e2 :
206
+ ips :
207
+ - not : 10.0.0.0/8
208
+ - not : 192.168.0.0/16
209
+ - not : 3.2.1.0/30
208
210
` ` `
209
211
210
212
` ` ` yaml
@@ -214,18 +216,18 @@ kind: Peering
214
216
metadata :
215
217
name : vpc-1--vpc-e1
216
218
spec :
217
- vpc-1 :
218
- ips :
219
- - cidr : 10.1.1.0/24
220
- as :
221
- - 192.168.1.0/30
222
- natType : stateful # as there are not enough IPs in the "as" pool
223
- vpc-e1 :
224
- ips :
225
- - cidr : 0.0.0.0/0
226
- - not : 10.0.0.0/8
227
- - not : 192.168.0.0/16
228
- - not : 3.2.1.0/30
219
+ peering :
220
+ vpc-1 :
221
+ ips :
222
+ - cidr : 10.1.1.0/24
223
+ as :
224
+ - 192.168.1.0/30
225
+ natType : stateful # as there are not enough IPs in the "as" pool
226
+ vpc-e1 :
227
+ ips :
228
+ - not : 10.0.0.0/8
229
+ - not : 192.168.0.0/16
230
+ - not : 3.2.1.0/30
229
231
` ` `
230
232
231
233
` ` ` yaml
@@ -235,61 +237,38 @@ kind: Peering
235
237
metadata :
236
238
name : vpc-1--vpc-e1
237
239
spec :
238
- vpc-1 :
239
- ips :
240
- - cidr : 10.1.1.0/24
241
- as :
242
- - 192.168.1.0/30
243
- natType : stateful
244
- vpc-e1 :
245
- metric : 0 # add 0 to the advertised route metrics
246
- # At what point do we not advertise these routes to the switch, how do we decide?
247
- ips :
248
- - cidr : 0.0.0.0/0
249
- - not : 10.0.0.0/8
250
- - not : 192.168.0.0/16
251
- - not : 1.2.3.0/30
240
+ peering :
241
+ vpc-1 :
242
+ ips :
243
+ - cidr : 10.1.1.0/24
244
+ as :
245
+ - 192.168.1.0/30
246
+ natType : stateful
247
+ vpc-e1 :
248
+ metric : 0 # add 0 to the advertised route metrics
249
+ # At what point do we not advertise these routes to the switch, how do we decide?
250
+ ips :
251
+ - not : 10.0.0.0/8
252
+ - not : 192.168.0.0/16
253
+ - not : 1.2.3.0/30
252
254
---
253
255
apiVersion : gateway.githedgehog.com/v1alpha1
254
256
kind : Peering
255
257
metadata :
256
258
name : vpc-1--vpc-e2
257
259
spec :
258
- vpc-1 :
259
- ips :
260
- - cidr : 10.1.1.0/24
261
- as :
262
- - 192.168.1.0/30
263
- natType : stateful
264
- vpc-e2 :
265
- metric : 10 # add 10 to the route metric advertised externally
266
- # At what point do we not advertise these routes to the switch, how do we decide?
267
- ips :
268
- - cidr : 0.0.0.0/0
269
- - not : 10.0.0.0/8
270
- - not : 192.168.0.0/16
271
- - not : 3.2.1.0/30
272
- ` ` `
273
-
274
- ` ` ` yaml
275
- # vpc-1 <> vpc-1 with overlapping subnets
276
- apiVersion : gateway.githedgehog.com/v1alpha1
277
- kind : Peering
278
- metadata :
279
- name : vpc-1--vpc-2
280
- spec :
281
- vpc-1 :
282
- ips :
283
- - cidr : 10.1.1.0/24
284
- - not : 10.1.1.42/32
285
- as :
286
- - 192.168.1.0/24
287
- vpc-2 :
288
- ips :
289
- - cidr : 10.1.1.0/24
290
- as :
291
- - 192.168.2.0/24
292
-
293
- # { src: vpc-1,10.1.1.0/24 ; dst: 192.168.2.0/24 }
294
- # { src: vpc-2,10.1.1.0/24 ; dst: 192.168.1.0/24 }
260
+ peering :
261
+ vpc-1 :
262
+ ips :
263
+ - cidr : 10.1.1.0/24
264
+ as :
265
+ - 192.168.1.0/30
266
+ natType : stateful
267
+ vpc-e2 :
268
+ metric : 10 # add 10 to the route metric advertised externally
269
+ # At what point do we not advertise these routes to the switch, how do we decide?
270
+ ips :
271
+ - not : 10.0.0.0/8
272
+ - not : 192.168.0.0/16
273
+ - not : 3.2.1.0/30
295
274
` ` `
0 commit comments