11# External Peering
22
3- Hedgehog Fabric uses the Border Leaf concept to exchange VPC routes outside the Fabric and provide L3 connectivity. The
4- ` External Peering ` feature allows you to set up an external peering endpoint and to enforce several policies between
5- internal and external endpoints .
3+ A Border Leaf can be used to exchange VPC routes with external systems. The ` External Peering ` feature in Hedgehog Fabric
4+ allows users to set up an external peering endpoint and to enforce policies between internal and external endpoints.
5+ Alternatively, the Hedgehog Gateway can be used to provide connectivity via an endpoint directly connected to a Border Leaf .
66
77!!! note
88 Hedgehog Fabric does not operate Edge side devices.
@@ -16,26 +16,35 @@ Border Leaves (or Borders) can connect to several Edge devices.
1616!!! note
1717 External Peering is only available on the switch devices that are capable for sub-interfaces.
1818
19- ### Connect Border Leaf to Edge device
19+ Hedgehog Fabric supports both BGP-speaking and static externals.
2020
21- In order to distinguish VPC traffic, an Edge device should be able to:
21+ ### Connect a Border Leaf to an Edge device
2222
23+ To separate VPC traffic, the Edge device is typically connected to a Border Leaf using a VLAN.
24+ Additionally, if using the BGP speaker model for external peering, the Edge device should also be capable of:
2325
24- - Set up BGP IPv4 to advertise and receive routes from the Fabric
25- - Connect to a Fabric Border Leaf over VLAN
26- - Be able to mark egress routes towards the Fabric with BGP Communities
27- - Be able to filter ingress routes from the Fabric by BGP Communities
26+ - Setting up BGP IPv4 to advertise and receive routes from the Fabric
27+ - Marking egress routes towards the Fabric with BGP Communities
28+ - Filtering ingress routes from the Fabric by BGP Communities
2829
2930All other filtering and processing of L3 Routed Fabric traffic should be done on the Edge devices.
3031
3132### Control Plane
3233
33- The Fabric shares VPC routes with Edge devices via BGP. Peering is done over VLAN in IPv4 Unicast AFI/SAFI.
34+ For BGP externals, the Hedgehog Fabric shares VPC routes with Edge devices via BGP; peering is done over VLAN in IPv4 Unicast AFI/SAFI.
35+
36+ For static externals, static routes for the listed prefixes are installed in a VRF associated with the external
37+ in the border leaf. These routes can be exposed to VPCs either via route leaking on the border leaf itself or
38+ via the Hedgehog Gateway, which adds support for more advanced features such as source NAT. When using the Gateway,
39+ Proxy ARP is configured on the border leaf to emulate a direct connection between the external and the Gateway.
3440
3541### Data Plane
3642
37- VPC L3 routable traffic will be tagged with VLAN and sent to Edge device. Later processing of VPC traffic
38- (NAT, PBR, etc) should happen on Edge devices.
43+ For BGP and non-proxied static externals, VPC L3 routable traffic will be tagged with VLAN at a Border Leaf and sent to the Edge device.
44+ Later processing of VPC traffic (NAT, PBR, etc) should happen on Edge devices.
45+
46+ For proxied static externals, traffic will first go through the Gateway, where it will be NATed using one of the assigned IPs.
47+ It will then be forwarded to a Border Leaf, where it will be VLAN tagged and forwarded to the Edge device.
3948
4049### VPC access to Edge device
4150
@@ -44,13 +53,35 @@ the VPC can export to Edge devices and import from the Edge devices.
4453
4554## API and implementation
4655
47- ### External
56+ ### Connection
57+
58+ A ` Connection ` of type ` external ` is used to identify the switch port on Border Leaf that is cabled with an Edge device.
59+
60+ ``` yaml
61+ apiVersion : wiring.githedgehog.com/v1beta1
62+ kind : Connection
63+ metadata :
64+ name : # specified or generated
65+ spec :
66+ external :
67+ link :
68+ switch :
69+ port : ds3000/E1/1
70+ ` ` `
4871
49- General configuration starts with the specification of ` External ` objects. Each object of ` External ` type can represent
50- a set of Edge devices, or a single BGP instance on Edge device, or any other united Edge entities that can be described
51- with the following configuration:
72+ A ` Connection` object can be used with both BGP-speaking and static `Externals`.
5273
53- - Name of ` External `
74+ # ## BGP-speaking Externals
75+
76+ General configuration starts with the specification of `External` objects. In this section we will introduce the
77+ BGP-speaking externals and their attachments.
78+
79+ # ### BGP-speaking External object
80+
81+ Each object of `External` type can represent a set of Edge devices, or a single BGP instance on Edge device, or
82+ any other united Edge entities that can be described with the following configuration :
83+
84+ - Name of the `External`
5485- Inbound routes marked with the dedicated BGP community
5586- Outbound routes marked with the dedicated community
5687
6798 outboundCommunity: # BGP Standard Community required to be assigned on prefixes advertised from Fabric
6899` ` `
69100
70- ### Connection
71-
72- A ` Connection` of type `external` is used to identify the switch port on Border leaf that is cabled with an Edge device.
101+ # ### BGP-speaking External Attachment object
73102
74- ` ` ` yaml
75- apiVersion: wiring.githedgehog.com/v1beta1
76- kind: Connection
77- metadata:
78- name: # specified or generated
79- spec:
80- external:
81- link:
82- switch:
83- port: ds3000/E1/1
84- ` ` `
85-
86- # ## External Attachment
87-
88- ` External Attachment` defines BGP Peering and traffic connectivity between a Border leaf and `External`. Attachments are
103+ An `External Attachment` defines BGP Peering and traffic connectivity between a Border Leaf and `External`. Attachments are
89104bound to a `Connection` with type `external` and they specify an optional `vlan` that will be used to segregate
90105particular Edge peering.
91106
@@ -107,10 +122,67 @@ spec:
107122
108123Several `External Attachment` can be configured for the same `Connection` but for different `vlan`.
109124
125+ # ## Static Externals
126+
127+ If the edge device cannot run BGP and the reachable prefixes are known in advance, static externals can be used instead.
128+ As far as the Edge device is concerned, traffic from the Fabric should come from a directly connected
129+ device or set of devices on the same subnet as itself.
130+
131+ # ### Static External object
132+
133+ A static `External` uses the same base CRD of the BGP-speaking case, but it does away with
134+ BGP communities. However, the `External` should provide a list of prefixes that are reachable
135+ via itself, as there is no routing protocol to dynamically learn them from.
136+
137+ Like its BGP-speaking counterpart, a static `External` should be bound to an IPv4 namespace to avoid prefix overlaps.
138+
139+ ` ` ` yaml
140+ apiVersion: vpc.githedgehog.com/v1beta1
141+ kind: External
142+ metadata:
143+ name: ###
144+ spec:
145+ ipv4Namespace: # VPC IP Namespace
146+ static:
147+ prefixes:
148+ - # one or more prefixes that are reachable via the Edge device
149+ ` ` `
150+
151+ # ### Static External Attachment object
152+
153+ The same `External Attachment` object we saw previously is used for static externals; like for `Externals`, fields specific
154+ to BGP-speaking attachments will be left empty, and some additional configuration is required. Specifically, we need :
155+
156+ - the remote IP address of the external, which is used as next hop for traffic forwarded to the Edge device;
157+ - an optional VLAN to segregate traffic on the external connection, or `0` for untagged traffic;
158+ - a `proxy` flag, which should be set to `true` if the user intends to peer VPCs with the external using the Hedgehog Gateway;
159+ - the IP address to be configured on the border leaf side of the link, when the `proxy` flag is not set; it should be empty otherwise.
160+
161+ ` ` ` yaml
162+ apiVersion: vpc.githedgehog.com/v1beta1
163+ kind: ExternalAttachment
164+ metadata:
165+ name: ###
166+ spec:
167+ connection: # Name of the Connection with type external
168+ external: # Name of the External this attachment refers to
169+ static:
170+ remoteIP: # IP address of the Edge device port connected to the Border Leaf
171+ vlan: # VLAN (optional) ID to tag control and data traffic, use 0 for untagged
172+ proxy: # Flag to enable proxy-ARP, used in conjunction with Gateway peering
173+ ip: # IP address (with prefix length) to be configured on the switch when not using Proxy mode, empty otherwise
174+ ` ` `
175+
110176# ## External VPC Peering
111177
112- To allow a specific VPC to have access to Edge devices, bind the VPC to a specific `External` object. To do so, define
113- an `External Peering` object.
178+ To allow a specific VPC to have access to prefixes reachable via an Edge device, bind the VPC to the corresponding
179+ ` External` by creating an `External Peering` object.
180+
181+ !!! note
182+ External VPC Peering via this Fabric object is only supported for BGP-speaking externals or
183+ static externals without proxy ARP. For the proxied static external use case, or whenever NAT
184+ is required to access the target prefixes, Gateway peering should be used instead : see
185+ [Gateway Peering for External Connections](gateway.md#gateway-peering-for-external-connections).
114186
115187` ` ` yaml
116188apiVersion: vpc.githedgehog.com/v1beta1
@@ -134,7 +206,7 @@ spec:
134206equal to 32, effectively permitting all prefixes within the specified one. Use `0.0.0.0/0` for any route, including the
135207default route.
136208
137- This example allows _any_ IPv4 prefix that came from `External` :
209+ The following example allows _any_ IPv4 prefix learned from the `External` :
138210
139211` ` ` yaml
140212spec:
@@ -145,7 +217,7 @@ spec:
145217 - prefix: 0.0.0.0/0 # Any route will be allowed including default route
146218` ` `
147219
148- This example allows all prefixes that match the default route , with any prefix length :
220+ The following example only allows routes in the `77.0.0.0/8` prefix , with any prefix length :
149221
150222` ` ` yaml
151223spec:
@@ -158,13 +230,13 @@ spec:
158230
159231# # Examples
160232
161- This example shows how to peer with the `External` object with name `HedgeEdge`, given a Fabric VPC with name `vpc-1` on
233+ This example shows how to peer with the BGP-speaking `External` object with name `HedgeEdge`, given a Fabric VPC with name `vpc-1` on
162234the Border Leaf `switchBorder` that has a cable connecting it to an Edge device
163235on the port `E1/2`. Specifying `vpc-1` is required to receive any prefixes advertised from the `External`.
164236
165237# ## Fabric API configuration
166238
167- # ### External
239+ # ### BGP-speaking External
168240
169241` ` ` console
170242# kubectl fabric external create --name hedgeedge --ipns default --in 65102:5000 --out 5000:65102
@@ -207,7 +279,7 @@ spec:
207279 port: switchBorder/E1/2
208280` ` `
209281
210- # ### ExternalAttachment
282+ # ### BGP-speaking ExternalAttachment
211283
212284Specified in `wiring` diagram
213285
0 commit comments