Skip to content

Feature Request: Private VLAN (PVLAN) support in the data model #167

Description

@Bribruh123

Feature Request: Private VLAN (PVLAN) support in the data model

Summary

Add native data model support for Private VLANs (PVLANs) on Cisco NX-OS, covering
the VLAN-level private-vlan configuration, vlan configuration mode, and the full
set of interface/port-channel private-vlan modes, mappings, and associations.

Current Behavior

No data model coverage exists for:

  • VLAN private-vlan type (primary / isolated / community)
  • VLAN private-vlan association (primary <-> secondaries)
  • vlan configuration <id> stanzas
  • Interface/port-channel private-vlan promiscuous mode and mapping
  • Interface/port-channel private-vlan trunk promiscuous mode
  • Interface/port-channel private-vlan trunk secondary mode and trunk association
  • Interface/port-channel private-vlan host mode and host-association
  • Interface/port-channel private-vlan trunk mapping (on promiscuous-trunk AND plain trunk ports)
  • Interface/port-channel private-vlan trunk allowed vlan (PVLAN trunk form)
  • Host-association combined with an access VLAN on the same port

Expected Behavior

The data model should allow declaring PVLAN VLAN types/associations, vlan configuration stanzas, and the corresponding interface modes/mappings, so that
applying the model produces the equivalent NX-OS configuration below. Secondary
VLANs should be expressible as a single VLAN, a comma list, or a range.

Example NX-OS Configuration to Support

VLAN-level:

vlan 100
  private-vlan primary
  private-vlan association 101-102
vlan 101
  private-vlan isolated
vlan 102
  private-vlan community

vlan configuration 101

Promiscuous trunk port / port-channel:

interface Ethernet1/1
  switchport mode private-vlan trunk promiscuous
  switchport private-vlan mapping 100 101
  switchport private-vlan trunk allowed vlan 1-4094
  switchport private-vlan mapping trunk 100 101

Promiscuous mapping-trunk on a standard trunk port (secondary as a range):

interface Ethernet1/2
  switchport mode trunk
  switchport private-vlan mapping trunk 100 101-102
  switchport trunk allowed vlan 100

Trunk secondary port:

interface Ethernet1/3
  switchport mode private-vlan trunk secondary
  switchport private-vlan association trunk 100 101

Host port (with and without an access VLAN):

interface Ethernet1/4
  switchport mode private-vlan host
  switchport private-vlan host-association 100 101

interface Ethernet1/5
  switchport private-vlan host-association 100 101
  switchport access vlan 100

Promiscuous (non-trunk) mapping with a secondary list:

interface port-channel1
  switchport mode private-vlan promiscuous
  switchport private-vlan mapping 100 101,102

Proposed Data Model (illustrative)

nxos:
  devices:
    - name: SWITCH-01
      configuration:
        vlan:
          vlans:
            - id: 100
              private_vlan:
                type: primary
                association: [101, 102]
            - id: 101
              name: Private
              private_vlan:
                type: isolated
            - id: 102
              name: Private-community
              private_vlan:
                type: community
        interfaces:
          ethernets:
            - id: 1/1
              switchport:
                mode: trunk-promiscuous
                private_vlan:
                  mapping: { primary: 100, secondary: 101 }
                  trunk_mapping: { primary: 100, secondary: 101 }
                  trunk_allowed_vlans: 1-4094
            - id: 1/3
              switchport:
                mode: trunk-secondary
                private_vlan:
                  trunk_association: { primary: 100, secondary: 101 }
            - id: 1/4
              switchport:
                mode: host
                private_vlan:
                  host_association: { primary: 100, secondary: 101 }

Additional Context

  • Feature prerequisite on device: feature private-vlan
  • Applies to physical interfaces and port-channels

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions