This documentation is done using MkDocs with multiple plugins enabled. It's based on the Markdown, you can find basic syntax overview here.
In order to contribute to the documentation, you'll need to have Git and Docker installed on your machine as well as any editor of your choice, preferably supporting Markdown preview. You can run the preview server using following command:
make serve\n
Now you can open continuosly updated preview of your edits in browser at http://127.0.0.1:8000. Pages will be automatically updated while you're editing.
Additionally you can run
make build\n
to make sure that your changes will be built correctly and doesn't break documentation.
If you want to quick edit any page in the documentation, you can press the Edit this page icon at the top right of the page. It'll open the page in the GitHub editor. You can edit it and create a pull request with your changes.
Please, never push to the master or release/* branches directly. Always create a pull request and wait for the review.
Each pull request will be automatically built and preview will be deployed. You can find the link to the preview in the comments in pull request.
Documentation is organized in per-release branches:
master - ongoing development, not released yet, referenced as dev version in the documentation
release/alpha-1/release/alpha-2 - alpha releases, referenced as alpha-1/alpha-2 versions in the documentation, if patches released for alpha-1, they'll be merged into release/alpha-1 branch
release/v1.0 - first stable release, referenced as v1.0 version in the documentation, if patches (e.g. v1.0.1) released for v1.0, they'll be merged into release/v1.0 branch
Latest release branch is referenced as latest version in the documentation and will be used by default when you open the documentation.
All documentation files are located in docs directory. Each file is a Markdown file with .md extension. You can create subdirectories to organize your files. Each directory can have a .pages file that overrides the default navigation order and titles.
For example, top-level .pages in this repository looks like this:
Where you can add pages by file name like index.md and page title will be taked from the file (first line with #). Additionally, you can reference the whole directory to created nested section in navigation. You can also add custom titles by using : separator like Wiring Diagram: wiring where Wiring Diagram is a title and wiring is a file/directory name.
You can find abbreviations in includes/abbreviations.md file. You can add various abbreviations there and all usages of the defined words in the documentation will get a highlight.
For example, we have following in includes/abbreviations.md:
*[HHFab]: Hedgehog Fabricator - a tool for building Hedgehog Fabric\n
It'll highlight all usages of HHFab in the documentation and show a tooltip with the definition like this: HHFab.
We're using MkDocs Material theme with multiple extensions enabled. You can find detailed reference here, but here you can find some of the most useful ones.
To view code for examples, please, check the source code of this page.
Text can be deleted and replacement text added. This can also be combined into onea single operation. Highlighting is also possible and comments can be added inline.
Formatting can also be applied to blocks by putting the opening and closing tags on separate lines and adding new lines between the tags and the content.
Admonitions, also known as call-outs, are an excellent choice for including side content without significantly interrupting the document flow. Different types of admonitions are available, each with a unique icon and color. Details can be found here.
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.
Simple code block with line nums and higlighted lines:
bubble_sort.py
def bubble_sort(items):\n for i in range(len(items)):\n for j in range(len(items) - 1 - i):\n if items[j] > items[j + 1]:\n items[j], items[j + 1] = items[j + 1], items[j]\n
"},{"location":"contribute/docs/#tables","title":"Tables","text":"Method Description GET Fetch resource PUT Update resource DELETE Delete resource"},{"location":"contribute/docs/#diagrams","title":"Diagrams","text":"
You can directly include Mermaid diagrams in your Markdown files. Details can be found here.
graph LR\n A[Start] --> B{Error?};\n B -->|Yes| C[Hmm...];\n C --> D[Debug];\n D --> B;\n B ---->|No| E[Yay!];
sequenceDiagram\n autonumber\n Alice->>John: Hello John, how are you?\n loop Healthcheck\n John->>John: Fight against hypochondria\n end\n Note right of John: Rational thoughts!\n John-->>Alice: Great!\n John->>Bob: How about you?\n Bob-->>John: Jolly good!
A single controller connecting to each switch management port. No redundancy.
Controller requirements:
One 1 gig port per switch
One+ 1 gig+ ports connecting to the external management network.
4 Cores, 12GB RAM, 100GB SSD.
Seeder:
Seeder and Controller functions co-resident on the control node. Switch booting and ZTP on management ports directly connected to the controller.
HHFab - the fabricator:
An operational tool to generate, initiate, and maintain the fabric software appliance. Allows fabrication of the environment-specific image with all of the required underlay and security configuration baked in.
DHCP Service:
A simple DHCP server for assigning IP addresses to hosts connecting to the fabric, optimized for use with VPC overlay.
Topology:
Support for a Collapsed Core topology with 2 switch nodes.
Underlay:
A simple single-VRF network with a BGP control plane. IPv4 support only.
External connectivity:
An edge router must be connected to selected ports of one or both switches. IPv4 support only.
Dual-homing:
L2 Dual homing with MCLAG is implemented to connect servers, storage, and other devices in the data center. NIC bonding and LACP configuration at the host are required.
VPC overlay implementation:
VPC is implemented as a set of ACLs within the underlay VRF. External connectivity to the VRF is performed via internally managed VLANs. IPv4 support only.
VPC Peering:
VPC peering is performed via ACLs with no fine-grained control.
NAT
DNAT + SNAT are supported per VPC. SNAT and DNAT can\u2019t be enabled per VPC simultaneously.
Hardware support:
Please see the supported hardware list.
Virtual Lab:
A simulation of the two-node Collapsed Core Topology as a virtual environment. Designed for use as a network simulation, a configuration scratchpad, or a training/demonstration tool. Minimum requirements: 8 cores, 24GB RAM, 100GB SSD
Limitations:
40 VPCs max
50 VPC peerings
[ 768 ACL entry platform limitation from Broadcom ]
"},{"location":"wiring/overview/","title":"Wiring Diagram","text":""}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":""},{"location":"concepts/overview/","title":"Concepts","text":""},{"location":"contribute/docs/","title":"Documentation","text":""},{"location":"contribute/docs/#getting-started","title":"Getting started","text":"
This documentation is done using MkDocs with multiple plugins enabled. It's based on the Markdown, you can find basic syntax overview here.
In order to contribute to the documentation, you'll need to have Git and Docker installed on your machine as well as any editor of your choice, preferably supporting Markdown preview. You can run the preview server using following command:
make serve\n
Now you can open continuosly updated preview of your edits in browser at http://127.0.0.1:8000. Pages will be automatically updated while you're editing.
Additionally you can run
make build\n
to make sure that your changes will be built correctly and doesn't break documentation.
If you want to quick edit any page in the documentation, you can press the Edit this page icon at the top right of the page. It'll open the page in the GitHub editor. You can edit it and create a pull request with your changes.
Please, never push to the master or release/* branches directly. Always create a pull request and wait for the review.
Each pull request will be automatically built and preview will be deployed. You can find the link to the preview in the comments in pull request.
Documentation is organized in per-release branches:
master - ongoing development, not released yet, referenced as dev version in the documentation
release/alpha-1/release/alpha-2 - alpha releases, referenced as alpha-1/alpha-2 versions in the documentation, if patches released for alpha-1, they'll be merged into release/alpha-1 branch
release/v1.0 - first stable release, referenced as v1.0 version in the documentation, if patches (e.g. v1.0.1) released for v1.0, they'll be merged into release/v1.0 branch
Latest release branch is referenced as latest version in the documentation and will be used by default when you open the documentation.
All documentation files are located in docs directory. Each file is a Markdown file with .md extension. You can create subdirectories to organize your files. Each directory can have a .pages file that overrides the default navigation order and titles.
For example, top-level .pages in this repository looks like this:
Where you can add pages by file name like index.md and page title will be taked from the file (first line with #). Additionally, you can reference the whole directory to created nested section in navigation. You can also add custom titles by using : separator like Wiring Diagram: wiring where Wiring Diagram is a title and wiring is a file/directory name.
You can find abbreviations in includes/abbreviations.md file. You can add various abbreviations there and all usages of the defined words in the documentation will get a highlight.
For example, we have following in includes/abbreviations.md:
*[HHFab]: Hedgehog Fabricator - a tool for building Hedgehog Fabric\n
It'll highlight all usages of HHFab in the documentation and show a tooltip with the definition like this: HHFab.
We're using MkDocs Material theme with multiple extensions enabled. You can find detailed reference here, but here you can find some of the most useful ones.
To view code for examples, please, check the source code of this page.
Text can be deleted and replacement text added. This can also be combined into onea single operation. Highlighting is also possible and comments can be added inline.
Formatting can also be applied to blocks by putting the opening and closing tags on separate lines and adding new lines between the tags and the content.
Admonitions, also known as call-outs, are an excellent choice for including side content without significantly interrupting the document flow. Different types of admonitions are available, each with a unique icon and color. Details can be found here.
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.
Simple code block with line nums and higlighted lines:
bubble_sort.py
def bubble_sort(items):\n for i in range(len(items)):\n for j in range(len(items) - 1 - i):\n if items[j] > items[j + 1]:\n items[j], items[j + 1] = items[j + 1], items[j]\n
"},{"location":"contribute/docs/#tables","title":"Tables","text":"Method Description GET Fetch resource PUT Update resource DELETE Delete resource"},{"location":"contribute/docs/#diagrams","title":"Diagrams","text":"
You can directly include Mermaid diagrams in your Markdown files. Details can be found here.
graph LR\n A[Start] --> B{Error?};\n B -->|Yes| C[Hmm...];\n C --> D[Debug];\n D --> B;\n B ---->|No| E[Yay!];
sequenceDiagram\n autonumber\n Alice->>John: Hello John, how are you?\n loop Healthcheck\n John->>John: Fight against hypochondria\n end\n Note right of John: Rational thoughts!\n John-->>Alice: Great!\n John->>Bob: How about you?\n Bob-->>John: Jolly good!
A single controller connecting to each switch management port. No redundancy.
Controller requirements:
One 1 gig port per switch
One+ 1 gig+ ports connecting to the external management network.
4 Cores, 12GB RAM, 100GB SSD.
Seeder:
Seeder and Controller functions co-resident on the control node. Switch booting and ZTP on management ports directly connected to the controller.
HHFab - the fabricator:
An operational tool to generate, initiate, and maintain the fabric software appliance. Allows fabrication of the environment-specific image with all of the required underlay and security configuration baked in.
DHCP Service:
A simple DHCP server for assigning IP addresses to hosts connecting to the fabric, optimized for use with VPC overlay.
Topology:
Support for a Collapsed Core topology with 2 switch nodes.
Underlay:
A simple single-VRF network with a BGP control plane. IPv4 support only.
External connectivity:
An edge router must be connected to selected ports of one or both switches. IPv4 support only.
Dual-homing:
L2 Dual homing with MCLAG is implemented to connect servers, storage, and other devices in the data center. NIC bonding and LACP configuration at the host are required.
VPC overlay implementation:
VPC is implemented as a set of ACLs within the underlay VRF. External connectivity to the VRF is performed via internally managed VLANs. IPv4 support only.
VPC Peering:
VPC peering is performed via ACLs with no fine-grained control.
NAT
DNAT + SNAT are supported per VPC. SNAT and DNAT can\u2019t be enabled per VPC simultaneously.
Hardware support:
Please see the supported hardware list.
Virtual Lab:
A simulation of the two-node Collapsed Core Topology as a virtual environment. Designed for use as a network simulation, a configuration scratchpad, or a training/demonstration tool. Minimum requirements: 8 cores, 24GB RAM, 100GB SSD
Limitations:
40 VPCs max
50 VPC peerings
[ 768 ACL entry platform limitation from Broadcom ]
Hedgehog Fabric uses Border Leaf concept to exchange VPC routes outside the Fabric and providing L3 connectivity. External Peering feature allows to set up an external peering endpoint and to enforce several policies between internal and external endpoints.
Hedgehog Fabric does not operate Edge side devices.
Traffic exit from the Fabric is done on Border Leafs that are connected with Edge devices. Border Leafs are suitable to terminate l2vpn connections and distinguish VPC L3 routable traffic towards Edge device as well as to land VPC servers. Border Leafs (or Borders) can connect to several Edge devices.
External Peering is only available on the switch devices that are capable for sub-interfaces.
"},{"location":"user-guide/external/#connect-border-leaf-to-edge-device","title":"Connect Border Leaf to Edge device","text":"
In order to distinguish VPC traffic Edge device should be capable for - Set up BGP IPv4 to advertise and receive routes from the Fabric - Connect to Fabric Border Leaf over Vlan - Be able to mark egress routes towards the Fabric with BGP Communities - Be able to filter ingress routes from the Fabric by BGP Communities
All other filtering and processing of L3 Routed Fabric traffic should be done on the Edge devices.
VPC L3 routable traffic will be tagged with Vlan and sent to Edge device. Later processing of VPC traffic (NAT, PBR, etc) should happen on Edge devices.
"},{"location":"user-guide/external/#vpc-access-to-edge-device","title":"VPC access to Edge device","text":"
Each VPC within the Fabric can ba allowed to access Edge devices. Additional filtering can be applied to the routes that VPC can export to Edge devices and import from the Edge devices.
"},{"location":"user-guide/external/#api-and-implementation","title":"API and implementation","text":""},{"location":"user-guide/external/#external","title":"External","text":"
General configuration starts with specification of External objects. Each object of External type can represent a set of Edge devices, or a single BGP instance on Edge device, or any other united Edge entities that can be described with following config
Name of External
Inbound routes are marked with dedicated BGP community
Outbound routes are required to be marked with dedicated community
Each External should be bound to some VPC IP Namespace, otherwise prefixes overlap may happen.
apiVersion: vpc.githedgehog.com/v1alpha2\nkind: External\nmetadata:\n name: default--5835\nspec:\n inboundCommunity: # BGP Standard Community of routes from Edge devices\n ipv4Namespace: # VPC IP Namespace\n outboundCommunity: # BGP Standard Community required to be assigned on prefixes advertised from Fabric\n
External Attachment is a definition of BGP Peering and traffic connectivity between a Border leaf and External. Attachments are bound to Connection with type external and specify Vlan that will be used to segregate particular Edge peering.
apiVersion: vpc.githedgehog.com/v1alpha2\nkind: ExternalAttachment\nmetadata:\n name: #\nspec:\n connection: # Name of the Connection with type external\n external: # Name of the External to pick config\n neighbor:\n asn: # Edge device ASN\n ip: # IP address of Edge device to peer with\n switch:\n ip: # IP Address on the Border Leaf to set up BGP peering\n vlan: # Vlan ID to tag control and data traffic\n
Several External Attachment can be configured for the same Connection but for different vlan.
To allow specific VPC have access to Edge devices VPC should be bound to specific External object. This is done via External Peering object.
apiVersion: vpc.githedgehog.com/v1alpha2\nkind: ExternalPeering\nmetadata:\n name: # Name of ExternalPeering\nspec:\n permit:\n external:\n name: # External Name\n prefixes: # List of prefixes(routes) to be allowed to pick up from External\n - # IPv4 Prefix\n vpc:\n name: # VPC Name\n subnets: # List of VPC subnets name to be allowed to have access to External (Edge)\n - # Name of the subnet within VPC\n
Prefixes can be specified as exact match or with mask range indicators le and ge keywords. le is identifying prefixes lengths that are less than or equal and ge for prefixes lengths that are greater than or equal.
Example: Allow ANY IPv4 prefix that came from External - allow all prefixes that match default route with any prefix length
For instance, 77.42.0.0/18 will be matched for given prefix rule above, but 77.128.77.128/25 or 77.10.0.0/16 won't."},{"location":"user-guide/external/#examples","title":"Examples","text":"
This example will show peering with External object with name HedgeEdge given Fabric VPC with name vpc-1 on the Border Leaf switchBorder that has a cable between an Edge device on the port Ethernet42. vpc-1 is required to receive any prefixes advertised from the External.
"},{"location":"user-guide/external/#fabric-api-configuration","title":"Fabric API configuration","text":""},{"location":"user-guide/external/#external_1","title":"External","text":"
"},{"location":"user-guide/external/#example-edge-side-bgp-configuration-based-on-sonic-os","title":"Example Edge side BGP configuration based on SONiC OS","text":"
NOTE: Hedgehog does not recommend to use SONiC OS as an Edge device. This example is used only as example of Edge Peer config
Interface config
interface Ethernet2.100\n encapsulation dot1q vlan-id 100\n description switchBorder--Ethernet42\n no shutdown\n ip vrf forwarding VrfHedge\n ip address 100.100.0.6/24\n
route-map HedgeIn permit 10\n match community Hedgehog\n!\nroute-map HedgeOut permit 10\n set community 65102:5000\n!\n\nbgp community-list standard HedgeIn permit 5000:65102\n
Hedgehog Fabric uses Border Leaf concept to exchange VPC routes outside the Fabric and providing L3 connectivity.
+External Peering feature allows to set up an external peering endpoint and to enforce several policies between internal
+and external endpoints.
+
+
Hedgehog Fabric does not operate Edge side devices.
+
+
Overview
+
Traffic exit from the Fabric is done on Border Leafs that are connected with Edge devices. Border Leafs are suitable to
+terminate l2vpn connections and distinguish VPC L3 routable traffic towards Edge device as well as to land VPC servers. Border Leafs
+(or Borders) can connect to several Edge devices.
+
+
External Peering is only available on the switch devices that are capable for sub-interfaces.
+
+
Connect Border Leaf to Edge device
+
In order to distinguish VPC traffic Edge device should be capable for
+- Set up BGP IPv4 to advertise and receive routes from the Fabric
+- Connect to Fabric Border Leaf over Vlan
+- Be able to mark egress routes towards the Fabric with BGP Communities
+- Be able to filter ingress routes from the Fabric by BGP Communities
+
All other filtering and processing of L3 Routed Fabric traffic should be done on the Edge devices.
+
Control Plane
+
Fabric is sharing VPC routes with Edge devices via BGP. Peering is done over Vlan in IPv4 Unicast AFI/SAFI.
+
Data Plane
+
VPC L3 routable traffic will be tagged with Vlan and sent to Edge device. Later processing of VPC traffic (NAT, PBR, etc) should
+happen on Edge devices.
+
VPC access to Edge device
+
Each VPC within the Fabric can ba allowed to access Edge devices. Additional filtering can be applied to the routes that
+VPC can export to Edge devices and import from the Edge devices.
+
API and implementation
+
External
+
General configuration starts with specification of External objects. Each object of External type can represent a set of
+Edge devices, or a single BGP instance on Edge device, or any other united Edge entities that can be described with following config
+
+
Name of External
+
Inbound routes are marked with dedicated BGP community
+
Outbound routes are required to be marked with dedicated community
+
+
Each External should be bound to some VPC IP Namespace, otherwise prefixes overlap may happen.
+
apiVersion:vpc.githedgehog.com/v1alpha2
+kind:External
+metadata:
+name:default--5835
+spec:
+inboundCommunity:# BGP Standard Community of routes from Edge devices
+ipv4Namespace:# VPC IP Namespace
+outboundCommunity:# BGP Standard Community required to be assigned on prefixes advertised from Fabric
+
+
Connection
+
Connection of type external is used to identify switch port on Border leaf that is cabled with an Edge device.
External Attachment is a definition of BGP Peering and traffic connectivity between a Border leaf and External.
+Attachments are bound to Connection with type external and specify Vlan that will be used to segregate particular
+Edge peering.
+
apiVersion:vpc.githedgehog.com/v1alpha2
+kind:ExternalAttachment
+metadata:
+name:#
+spec:
+connection:# Name of the Connection with type external
+external:# Name of the External to pick config
+neighbor:
+asn:# Edge device ASN
+ip:# IP address of Edge device to peer with
+switch:
+ip:# IP Address on the Border Leaf to set up BGP peering
+vlan:# Vlan ID to tag control and data traffic
+
+
Several External Attachment can be configured for the same Connection but for different vlan.
+
External VPC Peering
+
To allow specific VPC have access to Edge devices VPC should be bound to specific External object. This is done via
+External Peering object.
+
apiVersion:vpc.githedgehog.com/v1alpha2
+kind:ExternalPeering
+metadata:
+name:# Name of ExternalPeering
+spec:
+permit:
+external:
+name:# External Name
+prefixes:# List of prefixes(routes) to be allowed to pick up from External
+-# IPv4 Prefix
+vpc:
+name:# VPC Name
+subnets:# List of VPC subnets name to be allowed to have access to External (Edge)
+-# Name of the subnet within VPC
+
+Prefixes can be specified as exact match or with mask range indicators le and ge keywords.
+le is identifying prefixes lengths that are less than or equal and ge for prefixes lengths that are greater than or equal.
+
Example: Allow ANY IPv4 prefix that came from External - allow all prefixes that match default route with any prefix length
+
+For instance, 77.42.0.0/18 will be matched for given prefix rule above, but 77.128.77.128/25 or 77.10.0.0/16 won't.
+
Examples
+
This example will show peering with External object with name HedgeEdge given Fabric VPC with name vpc-1 on the Border
+Leaf switchBorder that has a cable between an Edge device on the port Ethernet42. vpc-1 is required to receive any prefixes
+advertised from the External.