Configure Layer 3 VLAN on a Cisco switch with the following steps:
- Onboard a switch in the NSO mode. For more information, see Onboard a Cisco switch in Bare Metal Orchestrator.
- Change the directory to ~/samples/switch-profiles.
- Create a switchportconfig YAML file by copying the sample file, mw_cisco_switchportconfig_access_mode.yaml.
cp <mw_cisco_switchportconfig_access_mode>.yaml <new-switchportconfig-id>.yaml
- Edit the <new-switchportconfig-id>.yaml file in Vim or a similar editor.
- Customize the <new-switchportconfig-id>.yaml file:
Update the attributes in the switchportconfig YAML file. For more information, see Switch port configuration field definitions.
This is an example switchportconfig.yaml file for a Cisco switch:
apiVersion: mw.dell.com/v4
kind: SwitchPortConfig
metadata:
name: <REPLACE_THIS>
spec:
l3Vlan:
name: "699"
description: "test1l3vlan"
mtu: 9216
ipaddress: <REPLACE_THIS>
redirects: false - Save the file and quit the editor.
- Create the switchportconfig YAML file with the following command:
bmo create switchportconfig -f switchportconfig.yaml
- Edit the Cisco switch configuration with the following command:
bmo edit switch -f <cisco-switch-id>.yaml
In the switch YAML file, add the switchPortConfig attribute under the IncludeConfig section and assign a value. For example, switch-port-config-1 to apply the Layer 3 VLAN configuration. - Verify the updated details. For more information, see View switches and switch status and View switch inventory.