Skip to content

Commit

Permalink
docs: dhcp option-93
Browse files Browse the repository at this point in the history
- Example of multi-arch network boot

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Nov 16, 2021
1 parent bbbe814 commit a0bf382
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
9 changes: 4 additions & 5 deletions website/content/docs/v0.4/Getting Started/prereq-dhcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,18 @@ Since we use a number of Ubiquiti EdgeRouter devices especially in our home test
networks, it is worth mentioning the curious syntax gymnastics we must go
through there.
Essentially, the quotes around the path need to be entered as HTML entities:
`&quote;`.
`&quot;`.

Ubiquiti EdgeRouter configuration statement:

```config
set service dhcp-server shared-network-name sidero \
subnet 172.16.199.1 \
subnet-parameters "include &quote;/config/ipxe-metal.conf&quot;;"
subnet-parameters "include &quot;/etc/dhcp/ipxe-metal.conf&quot;;"
```

Also note the fact that there are two semicolons at the end of the line;
the first is part of the HTML-encoded quote;
the second is the actual terminating semicolon.
Also note the fact that there are two semicolons at the end of the line.
The first is part of the HTML-encoded **"** (`&quot;`) and the second is the actual terminating semicolon.

## Troubleshooting

Expand Down
34 changes: 33 additions & 1 deletion website/content/docs/v0.4/Guides/bootstrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ However, here is an example of the configuration for an Ubiquti EdgeRouter that

This block shows the subnet setup, as well as the extra "subnet-parameters" that tell the DHCP server to include the ipxe-metal.conf file.

> These commands are run under the `configure` option in EdgeRouter
```bash
$ show service dhcp-server shared-network-name MetalDHCP

Expand All @@ -51,7 +53,7 @@ $ show service dhcp-server shared-network-name MetalDHCP
}
```

Here is the ipxe-metal.conf file.
Here is the `ipxe-metal.conf` file.

```bash
$ cat /etc/dhcp/ipxe-metal.conf
Expand All @@ -68,6 +70,36 @@ host talos-mgmt-0 {
}
```

> If you want to boot multiple architectures, you can use the *DHCP Option 93* to specify the architecture.
First we need to define *option 93* in the DHCP server configuration.

```bash
set service dhcp-server global-parameters "option system-arch code 93 = unsigned integer 16;"
```

Now we can specify condition based on *option 93* in `ipxe-metal.conf` file

```bash
$ cat /etc/dhcp/ipxe-metal.conf

allow bootp;
allow booting;

next-server 192.168.1.150;

if option system-arch = 00:0b {
filename "ipxe-arm64.efi";
} else {
filename "ipxe.efi";
}

host talos-mgmt-0 {
fixed-address 192.168.254.2;
hardware ethernet d0:50:99:d3:33:60;
}
```
Notice that it sets a static address for the management node that I'll be booting, in addition to providing the "next server" info.
This "next server" IP address will match references to `PUBLIC_IP` found below in this guide.
Expand Down

0 comments on commit a0bf382

Please sign in to comment.