Skip to content

OSDOCS-14170: Created doc for enabled port isolation Linux bridge CNI… #92544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dfitzmau
Copy link
Contributor

@dfitzmau dfitzmau commented Apr 23, 2025

Version(s):
4.19+

Issue:
OSDOCS-14170

Link to docs preview:
Enabling port isolation for a Linux bridge NAD

  • SME has approved this change.
  • QE has approved this change.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 23, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 23, 2025

@dfitzmau: This pull request references OSDOCS-14170 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

… CNV

Version(s):

Issue:

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 23, 2025

@dfitzmau: This pull request references OSDOCS-14170 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Version(s):
4.19+

Issue:
OSDOCS-14170

Link to docs preview:

  • SME has approved this change.
  • QE has approved this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 23, 2025
@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 23, 2025
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Apr 23, 2025

@dfitzmau dfitzmau force-pushed the OSDOCS-14170 branch 7 times, most recently from 1176d93 to 17fc9f6 Compare April 24, 2025 09:42
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 24, 2025

@dfitzmau: This pull request references OSDOCS-14170 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Version(s):
4.19+

Issue:
OSDOCS-14170

Link to docs preview:
Enabling port isolation for a Linux bridge NAD

  • SME has approved this change.
  • QE has approved this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

@ormergi ormergi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review

[id="virt-linux-bridge-nad-port-isolation.adoc_{context}"]
= Enabling port isolation for a Linux bridge NAD

You can enable port isolation for a Linux bridge network attachment definition (NAD) so that virtual machines (VMs) that run on the same virtual LAN (VLAN) can operate in isolation from one another. When you assign an IP address to the virtual bridge, the virtual bridge can act as a gateway. The Linux bridge NAD creates a virtual bridge, or _virtual switch_, between network interfaces and the physical network. The Linux bridge NAD configures port numbers on the virtual bridge so that only specific traffic can reach each port.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence can be omitted it doesnt seem related to this feature, do I miss something?
"When you assign an IP address to the virtual bridge, the virtual bridge can act as a gateway"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Removed!

"name": "bridge-network", <1>
"type": "bridge", <2>
"bridge": "br1", <3>
"hairpinMode": "true", <4>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually enable hairpin mode, this line should be omitted because default is false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. I add something related in the prerequisites.

<2> The actual name of the Container Network Interface (CNI) plugin that provides the network for this network attachment definition. Do not change this field unless you want to use a different CNI.
<3> The name of the Linux bridge that is configured on the node. The name should match the interface bridge name defined in the NodeNetworkConfigurationPolicy manifest.
<4> Defaults to `false`. When set to `true`, network interfaces that interact with the virtual bridges
<5> Enables or disables port isolation on the virtual bridge. Default value is `false`. When set to `true`, each targeted VM is assigned to a specific port number. The virtual bridge prevents traffic from one isolated port from reaching another isolated port.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note this is true for pods as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

. Edit the Linux bridge NAD by setting `portIsolation` to `true`:
+
[source,yaml]
----
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this example should include additional configuration that are commonly used for VMs, such as vlan, disableContainerInterface, preserveDefaultVlan

      "cniVersion":"0.3.1",
      "name": "bridge-network",
      "type": "bridge",
      "bridge": "br1",
      "preserveDefaultVlan": false,
      "vlan": 100,
      "disableContainerInterface": "true", 
      "portIsolation": "true"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added and a description for disableContainerInterface as no description exists in the pre-existing "Creating a Linux bridge NAD by using the command line" section.

@dfitzmau dfitzmau force-pushed the OSDOCS-14170 branch 3 times, most recently from 453bbc4 to 6f3d1b4 Compare April 24, 2025 11:52
Copy link

openshift-ci bot commented Apr 24, 2025

@dfitzmau: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-4.19 jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants