Skip to content

Commit 3a0224c

Browse files
mrbojangles3Frostman
authored andcommitted
docs: new dhcp behaviour
Signed-off-by: Logan Blyth <[email protected]>
1 parent 8b2725f commit 3a0224c

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

docs/user-guide/vpcs.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A Virtual Private Cloud (VPC) is similar to a public cloud VPC. It provides an isolated private network with support for multiple subnets,
66
each with user-defined VLANs and optional DHCP services.
77

8-
```yaml
8+
```{.yaml .annotate linenums="1" title="vpc.yaml"}
99
apiVersion: vpc.githedgehog.com/v1beta1
1010
kind: VPC
1111
metadata:
@@ -33,6 +33,13 @@ spec:
3333
timeServers: # (optional) configure Time (NTP) Servers
3434
- 1.1.1.1
3535
interfaceMTU: 1500 # (optional) configure the MTU (default is 9036); doesn't affect the actual MTU of the switch interfaces
36+
leaseTimeSeconds: 3600 # The default duration of a DHCP lease
37+
disableDefaultRoute: false # set to true if the fabric DHCP server should not manage the default route on the end host
38+
advertisedRoutes: # Array of routes to be sent to each host in this subnet
39+
- destination: 10.12.10.0/24
40+
gateway: 10.10.1.2
41+
- destination: 10.13.10.0/24
42+
gateway: 10.10.1.3
3643
subnet: 10.10.1.0/24 # User-defined subnet from ipv4 namespace
3744
gateway: 10.10.1.1 # User-defined gateway (optional, default is .1)
3845
vlan: 1001 # User-defined VLAN from VLAN namespace
@@ -71,10 +78,28 @@ _Restricted subnet_ means that all hosts in the subnet are isolated from each ot
7178

7279
A Permit list contains a list. Every element of the list is a set of subnets that can communicate with each other.
7380

81+
### DHCP Server
82+
83+
The included DHCP server sets the option for the default route pointing to the gateway
84+
address of the VPC. If the default route of the end hosts should not be managed by the fabric
85+
DHCP server, add `disableDefaultRoute: true` to the DHCP subnet spec inside of the VPC.
86+
87+
If additional routes are to be distributed to the end hosts inside of a VPC add
88+
them as a YAML array in the DHCP subnet spec. A full list of options for the
89+
DHCP spec can be found in [the Fabric API reference](../reference/fabric-api.md#dhcpsubnetspec).
90+
91+
Distributing additional routes via DHCP is independent of the
92+
`disableDefaultRoute` setting. A user can distribute routes via the fabric DHCP
93+
server even if the `disableDefaultRoute` is set to `true`. The additional
94+
routes are advertised via DHCP option 121.
95+
96+
If the `disableDefaultRoute` is set to `true`, and the VPC is `mode: l3vni` the
97+
fabric DHCP server will send routes to the end hosts so that they can reach
98+
other hosts inside of the VPC via the VPC gateway.
7499

75100
### Third-party DHCP server configuration
76101

77-
In case you use a third-party DHCP server, by configuring `spec.subnets.<subnet>.dhcp.relay`, additional information is
102+
To use a third-party DHCP server, configure `spec.subnets.<subnet>.dhcp.relay`. Additional information is
78103
added to the DHCP packet forwarded to the DHCP server to make it possible to identify the VPC and subnet. This
79104
information is added under the RelayAgentInfo (option 82) in the DHCP packet. The relay sets two suboptions in the
80105
packet:

0 commit comments

Comments
 (0)