-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for static IP address on FCOS (#30)
* Add documentation for static IP address on FCOS * Make changes based on input from @miabbott * Fix copy/paste error
- Loading branch information
1 parent
58a9ab9
commit 2f62807
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
: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: `192.0.2.10/24` | ||
* gateway: `192.0.2.1` | ||
* DNS: `192.168.124.1;1.1.1.1;8.8.8.8` | ||
* DNS search domain: `redhat.com` | ||
.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] | ||
type=ethernet | ||
interface-name=eth0 | ||
[ethernet] | ||
mac-address=<insert MAC address> | ||
[ipv4] | ||
method=manual | ||
addresses=192.0.2.10/24 | ||
gateway=192.0.2.1 | ||
dns=192.168.124.1;1.1.1.1;8.8.8.8 | ||
dns-search=redhat.com | ||
---- | ||
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. | ||
|
||
If the interface does not come up correctly on first boot, issue the following commands to force the static IP to take effect: | ||
|
||
`nmcli connection down eth0` | ||
|
||
`nmcli connection up eth0` |