In the CKA course, under the Networking section, specifically the Network Namespace lesson, it’s mentioned that to establish connectivity between a virtual bridge (v-net-0) and the host interface (eth0), we need to assign an IP address such as 192.168.15.5
to v-net-0
, which belongs to the 192.168.15.0/24
subnet. Once this is done, pinging the network namespace (e.g., at 192.168.15.1
) starts working.
Since v-net-0
is effectively another network interface on the host (i.e., it exists alongside eth0
), wouldn’t we also need to enable IP forwarding on the host to allow communication between the two interfaces? Specifically, by adding the following line to /etc/sysctl.conf
:
net.ipv4.ip_forward = 1