-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for static IP address on FCOS #30
Changes from 1 commit
f4412f4
9c0b283
969c806
8f03ebd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
:experimental: | ||
= Configuring FCOS to Use a Static IP Address | ||
By default, an FCOS instance will attempt to grab a DHCP address from the local network. However, if you need FCOS to use a static IP address, you can do so by specifying the NetworkManager configuration in the Ignition configuration file. | ||
|
||
As with any custom configuration on FCOS, you can write specific files in the xref:ign-storage.adoc[`storage` node] of the Ignition file. | ||
|
||
The following snippet shows how to assign the following to eth0: | ||
|
||
* static IP range: `192.0.2.1/24` | ||
* gateway: `192.0.2.255` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addresses that end in |
||
* DNS: `192.0.2.53` | ||
|
||
.Example assignment of static IP address | ||
[source, yaml] | ||
---- | ||
variant: fcos | ||
version: 1.0.0 | ||
storage: | ||
files: | ||
- path: /etc/NetworkManager/system-connections/eth0.nmconnection | ||
mode: 0600 | ||
overwrite: true | ||
contents: inline | ||
[connection] | ||
id=Uplink | ||
type=802-3-ethernet | ||
autoconnect=true | ||
interface-name=eth0 | ||
match-device=interface-name:eth0 | ||
uuid=<insert UUID> | ||
[ethernet] | ||
mac-address=<insert MAC address> | ||
[ipv4] | ||
method=manual | ||
addresses=192.0.2.1/24 | ||
gateway=192.0.2.255 | ||
dns=192.0.2.53 | ||
dns-search=example.com | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be tweaked slightly so that
|
||
---- | ||
NOTE: During the initramfs portion of the boot process, dracut will attempt to grab a DHCP address. When it times out, Ignition will take over and write the above configuration into the filesystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's only a single IP being assigned here; just drop
range