Provision additional networking for direct network access to a container or to a virtual
machine.
Procedure
-
Define the network range and the VLAN for which the external network traffic will
traverse.
- Log in to IBM Fusion HCI user
interface.
- Go to Networking page and go to
VLAN tab.
- Click Add VLAN to define a new
VLAN.
- Select the VLAN Type as
Virtualization VLAN.
- Add the newly Defined VLAN to the Uplink ports on the high speed
switches.
In the Edit LINK slide out panel, select value for
VLANs and Save.
- Log in to OpenShift Container Platform web
console.
- Go to .
- Search for
nodenetworkconfigurationpolicies.nmstate.io
and click to
open it.
- In the Instances tab, view the NNCP policy created with the
previously created VLAN ID. For example, if the created VLAN ID is "2222", the NNCP policy name is
"br2222-bond0-policy".
- Copy the bridge name. In this example, it is "br2222".
- Select your project or namespace and go to
.
- In the NetworkAttachmentDefinitions, click
Create Network Attachment Definition to create a new
Network Attachment Definition specific to the desired namespace.
You can reuse the same
network attachment definitions across multiple namespaces.
- Select Linux bridge from the Network Type
drop-down list.
Note: When creating the NAD, include only the bridge details. Do not add VLAN information, as this
disrupts VM communication.
- Add
br2222
in the Bridge name and click
Create.
- Check whether the Bridge Name is same as the one created by the node network policy. In
this example, it is "br2222".
- You can now attach a second network adapter to your virtual machine at the time of
network configuration, and assign it to the defined network attachment definition. It allows access
to the external network.
What to do next
Make sure you delete the secondary VLAN. For steps, see Secondary VLAN detaching.