1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/ipi-install-configuring-networking.adoc
2024-10-03 19:46:28 +00:00

130 lines
4.4 KiB
Plaintext

// This is included in the following assemblies:
//
// ipi-install-installation-workflow.adoc
:_mod-docs-content-type: PROCEDURE
[id="configuring-networking_{context}"]
= Configuring networking
Before installation, you must configure the networking on the provisioner node. Installer-provisioned clusters deploy with a bare-metal bridge and network, and an optional provisioning bridge and network.
image::210_OpenShift_Baremetal_IPI_Deployment_updates_0122_1.png[Configure networking]
[NOTE]
====
You can also configure networking from the web console.
====
.Procedure
. Export the bare-metal network NIC name by running the following command:
+
[source,terminal]
----
$ export PUB_CONN=<baremetal_nic_name>
----
. Configure the bare-metal network:
+
[NOTE]
====
The SSH connection might disconnect after executing these steps.
====
.. For a network using DHCP, run the following command:
+
[source,terminal]
----
$ sudo nohup bash -c "
nmcli con down \"$PUB_CONN\"
nmcli con delete \"$PUB_CONN\"
# RHEL 8.1 appends the word \"System\" in front of the connection, delete in case it exists
nmcli con down \"System $PUB_CONN\"
nmcli con delete \"System $PUB_CONN\"
nmcli connection add ifname baremetal type bridge <con_name> baremetal bridge.stp no <1>
nmcli con add type bridge-slave ifname \"$PUB_CONN\" master baremetal
pkill dhclient;dhclient baremetal
"
----
<1> Replace `<con_name>` with the connection name.
.. For a network using static IP addressing and no DHCP network, run the following command:
+
[source,terminal]
----
$ sudo nohup bash -c "
nmcli con down \"$PUB_CONN\"
nmcli con delete \"$PUB_CONN\"
# RHEL 8.1 appends the word \"System\" in front of the connection, delete in case it exists
nmcli con down \"System $PUB_CONN\"
nmcli con delete \"System $PUB_CONN\"
nmcli connection add ifname baremetal type bridge con-name baremetal bridge.stp no ipv4.method manual ipv4.addr "x.x.x.x/yy" ipv4.gateway "a.a.a.a" ipv4.dns "b.b.b.b" <1>
nmcli con add type bridge-slave ifname \"$PUB_CONN\" master baremetal
nmcli con up baremetal
"
----
<1> Replace `<con_name>` with the connection name. Replace `x.x.x.x/yy` with the IP address and CIDR for the network. Replace `a.a.a.a` with the network gateway. Replace `b.b.b.b` with the IP address of the DNS server.
. Optional: If you are deploying with a provisioning network, export the provisioning network NIC name by running the following command:
+
[source,terminal]
----
$ export PROV_CONN=<prov_nic_name>
----
. Optional: If you are deploying with a provisioning network, configure the provisioning network by running the following command:
+
[source,terminal]
----
$ sudo nohup bash -c "
nmcli con down \"$PROV_CONN\"
nmcli con delete \"$PROV_CONN\"
nmcli connection add ifname provisioning type bridge con-name provisioning
nmcli con add type bridge-slave ifname \"$PROV_CONN\" master provisioning
nmcli connection modify provisioning ipv6.addresses fd00:1101::1/64 ipv6.method manual
nmcli con down provisioning
nmcli con up provisioning
"
----
+
[NOTE]
====
The SSH connection might disconnect after executing these steps.
The IPv6 address can be any address that is not routable through the bare-metal network.
Ensure that UEFI is enabled and UEFI PXE settings are set to the IPv6 protocol when using IPv6 addressing.
====
. Optional: If you are deploying with a provisioning network, configure the IPv4 address on the provisioning network connection by running the following command:
+
[source,terminal]
----
$ nmcli connection modify provisioning ipv4.addresses 172.22.0.254/24 ipv4.method manual
----
. SSH back into the `provisioner` node (if required) by running the following command:
+
[source,terminal]
----
# ssh kni@provisioner.<cluster-name>.<domain>
----
. Verify that the connection bridges have been properly created by running the following command:
+
[source,terminal]
----
$ sudo nmcli con show
----
+
.Example output
[source,terminal]
----
NAME UUID TYPE DEVICE
baremetal 4d5133a5-8351-4bb9-bfd4-3af264801530 bridge baremetal
provisioning 43942805-017f-4d7d-a2c2-7cb3324482ed bridge provisioning
virbr0 d9bca40f-eee1-410b-8879-a2d4bb0465e7 bridge virbr0
bridge-slave-eno1 76a8ed50-c7e5-4999-b4f6-6d9014dd0812 ethernet eno1
bridge-slave-eno2 f31c3353-54b7-48de-893a-02d2b34c4736 ethernet eno2
----