Skip to content

Commit

Permalink
Merge pull request tinkerbell#559 from jacobweinstock/static-ipam-doc
Browse files Browse the repository at this point in the history
Add doc on ISO static ipam:

## Description

<!--- Please describe what this PR is going to change -->
This describes the spec for passing data.

## Why is this needed

<!--- Link to issue you have raised -->

Fixes: #

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->


## How are existing users impacted? What migration steps/scripts do we need?

<!--- Fixes a bug, unblocks installation, removes a component of the stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
jacobweinstock authored Nov 23, 2024
2 parents 774a9cc + 8304fb3 commit 4748200
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/ISO-Static-IPAM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Static IP Address Management in the OSIE ISO

OSIE stands for operating system installation environment. In Tinkerbell we currently have just one, [HookOS](https://github.com/tinkerbell/hook).
Smee has the capability to Patch the HookOS ISO at runtime to include information about the target machine's network configuration. This is enabled by setting the CLI flag `-iso-static-ipam-enabled=true` along with both `-iso-enabled` and `-iso-url`.
This document defines the specification/data format for passing this info to the HookOS ISO.

## Specification/Data format

This is the spec/ data format for passing the static IP address management information to the HookOS ISO.

```ipam=<mac-address>:<vlan-id>:<ip-address>:<netmask>:<gateway>:<hostname>:<dns>:<search-domains>:<ntp>```

Example:

```ipam=de-ad-be-ef-fe-ed:30:192.168.2.193:255.255.255.0:192.168.2.1:server.example.com:1.1.1.1,8.8.8.8:example.com,team.example.com:132.163.97.1,132.163.96.1```

### Fields

Some fields are required so that basic network communication can function properly.

| Field | Description | Required | Example |
|-------|-------------|----------|---------|
| mac-address | MAC address. Must be in dash notation. | Yes |`00-00-00-00-00-00` |
| vlan-id | VLAN ID. Must be a string integer between 0 and 4096 or an empty string for no VLAN tagging. | No | `30` |
| ip-address | IPv4 address. | Yes | `10.148.56.3` |
| netmask | Netmask. | Yes | `255.255.240.0` |
| gateway | IPv4 Gateway. | No | `10.148.56.1` |
| hostname | Hostname for the system. Can be fully qualified or not. | No | `hookos` or `hookos.example.com` |
| dns | Comma separated list of IPv4 DNS nameservers. Must be IPv4 addresses, not hostnames. | Yes | `1.1.1.1,8.8.8.8` |
| search-domains | Comma separated list of search domains. | No | `example.com,example.org` |
| ntp | Comma separated list of IPv4 NTP servers. Must be IPv4 addresses, not hostnames. | No | `132.163.97.1,132.163.96.1` |

## Implementation details

Smee will set the kernel commandline parameter `ipam=` with the above format. In HookOS, there is a service that reads this cmdline parameter and writes the file(s) and runs the command(s) necessary to configure HookOS the use of all the values. See HookOS for more details on the service and how it works.

0 comments on commit 4748200

Please sign in to comment.