You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<1> Node role where you want to enable IP forwarding, for example, `worker`
76
+
<2> Populate with the generated base64 string
53
77
54
78
.. Apply the configuration by running the following command:
55
79
+
@@ -58,8 +82,50 @@ spec:
58
82
$ oc apply -f enable-ip-forward.yaml
59
83
----
60
84
61
-
. Alternatively, you can enable IP forwarding globally by running the following command:
85
+
.Verification
86
+
87
+
. After you apply the machine config, verify the changes by following this procedure:
88
+
89
+
.. Enter into a debug session on the target node by running the following command:
62
90
+
91
+
[source,terminal]
92
+
----
93
+
$ oc debug node/<node-name>
94
+
----
95
+
This step instantiates a debug pod called `<node-name>-debug`.
96
+
97
+
.. Set `/host` as the root directory within the debug shell by running the following command:
98
+
+
99
+
[source,terminal]
100
+
----
101
+
$ chroot /host
102
+
----
103
+
The debug pod mounts the host’s root file system in `/host` within the pod. By changing the root directory to `/host`, you can run binaries contained in the host’s executable paths.
104
+
105
+
.. Verify that IP forwarding is enabled by running the following command:
106
+
+
107
+
[source,terminal]
108
+
----
109
+
$ cat /etc/sysctl.d/enable-global-forwarding.conf
110
+
----
111
+
+
112
+
.Expected output
113
+
114
+
[source,terminal]
115
+
----
116
+
net.ipv4.conf.bridge-net.forwarding = 1
117
+
net.ipv6.conf.bridge-net.forwarding = 1
118
+
net.ipv4.conf.bridge-net.rp_filter = 0
119
+
net.ipv6.conf.bridge-net.rp_filter = 0
120
+
----
121
+
+
122
+
The output indicates that IPv4 and IPv6 packet forwarding is enabled on the `bridge-net` interface.
0 commit comments