Configuring Layer 2 External Connectivity
Layer 2 External Connectivity represents the switching network between the ACI leaf switches (aka border leaf) and an External Router. The VLAN representing the external L2 network is mapped to one of the bridge-domains within the fabric, which provides the Layer 2 extension for the bridge-domain and lets the EPGs using the bridge-domain talk to the outside network. The outside network is mapped to an EPG, which helps in realizing contracts between different internal applications and different L2 outside VLANs across nodes.
Caution |
Do not mix the GUI and the CLI, when doing per-interface configuration on APIC. Configurations performed in the GUI, may only partially work in the NX-OS CLI. For example, if you configure a switch port in the GUI at Then you use the show running-config command in the NX-OS style CLI, you receive output such as:
If you use these commands to configure a static port in the NX-OS style CLI, the following error occurs:
This occurs because the CLI has validations that are not performed by the APIC GUI. For the commands from the show running-config command to function in the NX-OS CLI, a vlan-domain must have been previously configured. The order of configuration is not enforced in the GUI. |
The configuration for Layer2 external connectivity is similar to a static application EPG, where you map a VLAN on a node port to an EPG and map the EPG to a bridge-domain to provide/consume contracts.
Procedure
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
Access configuration mode. Example:
|
|||
Step 2 |
Enter tenant configuration mode. Example:
|
|||
Step 3 |
[no] external-l2 epg epg-name Example:
|
Create (or delete ) an external layer 2 EPG. |
||
Step 4 |
Assign a bridge domain to the EPG. Example:
|
|||
Step 5 |
Return to tenant configuration mode. Example:
|
|||
Step 6 |
Return to global configuration mode. Example:
|
|||
Step 7 |
Specify the leaf to be configured. Example:
|
|||
Step 8 |
Specify a port for the external EPG. Example:
|
|||
Step 9 |
By default, a port is in Layer 2 trunk mode. If the port is in Layer 3 mode, convert it to Layer 2 trunk mode using this command. Example:
|
|||
Step 10 |
Associate the interface with a VLAN domain. Example:
|
|||
Step 11 |
Assigns a VLAN on the leaf port and maps the VLAN to a layer 2 external EPG, with the switchport trunk allowed vlan vlan-id tenant tenant-name external-l2 epg epg-name command. Example:
|
|
||
Step 12 |
Assign a VLAN on the leaf port and map the VLAN to an external SVI with the switchport {trunk allowed | trunk native | access} vlan vlan-id tenant tenant-name external-svi command. Example:
|
|
Examples
This example shows how to deploy a layer 2 port for external connectivity.
apic1# configure
apic1(config)# tenant exampleCorp
apic1(config-tenant)# external-l2 epg extendBD1
apic1(config-tenant-extl2epg)# bridge-domain member bd1
apic1(config-tenant-extl2epg)# exit
apic1(config-tenant)# exit
apic1(config)# leaf 101
apic1(config-leaf)# interface eth 1/2
apic1(config-leaf-if)# switchport
apic1(config-leaf-if)# switchport mode trunk
apic1(config-leaf-if)# switchport trunk allowed vlan 10 tenant exampleCorp external-l2 epg extendBD1
This example shows how to deploy a layer 2 port channel or vPC for external connectivity.
...
apic1(config)# leaf 101
apic1(config-leaf)# interface port-channel po1
apic1(config-leaf-if)# switchport trunk allowed vlan 10 tenant exampleCorp external-l2 epg extendBD1
These examples show how to configure SVI on a layer 2 interface for external connectivity.
apic1(config)# leaf 101
pic1(config-leaf)# interface ethernet 1/5
apic1(config-leaf-if)# vlan-domain member dom1
apic1(config-leaf-if)# switchport trunk allowed vlan 10 tenant exampleCorp external-svi
apic1(config-leaf-if)# no switchport trunk allowed vlan 10 tenant exampleCorp external-svi
apic1(config-leaf)# interface ethernet 1/37
apic1(config-leaf-if)# vlan-domain member dom1
apic1(config-leaf-if)# switchport access vlan 11 tenant exampleCorp external-svi
apic1(config-leaf-if)# no switchport access vlan 11 tenant exampleCorp external-svi
apic1(config-leaf)# interface port-channel po34
apic1(config-leaf-if)# vlan-domain member dom1
apic1(config-leaf-if)# switchport trunk native vlan 12 tenant exampleCorp external-svi
apic1(config-leaf-if)# no switchport trunk native vlan 12 tenant exampleCorp external-svi