Create a VLAN
Create a VLAN by port, protocol, or an SPBM B-VLAN. Optionally, you can choose to assign the VLAN a name and color.
Assign an IP address to the VLAN. You can also assign a MAC-offset value that allows you to manually change the default MAC address.
About this task
If you configure the SLA Mon agent address under an IP interface or VLAN, you must remove the SLA Mon address before you can remove the IP address or VLAN.
Procedure
Example
Switch:1>enable Switch:1#configure terminal Switch:1(config)#vlan create 2 type port-mstprstp 0 color 4 Switch:1(config)#vlan i-sid 2 100 Switch:1(config)#interface vlan 2 Switch:1(config-if)#ip address 192.0.2.0/24 dvr-one-ip
Variable Definitions
The following table defines parameters for the vlan create command.
Variable |
Value |
---|---|
<2-4059> |
Specifies the VLAN ID in the range of 2 to 4059. VLAN ID 1 is the default VLAN and you cannot create or delete VLAN ID 1. By default, the system reserves VLAN IDs 4060 to 4094 for internal use. On switches that support the vrf-scaling and spbm-config-mode boot configuration flags, if you enable these flags, the system also reserves VLAN IDs 3500 to 3998. |
name WORD<0-64> |
Specifies the VLAN name. The name attribute is optional. |
type port-mstprstp <0-63> [color <0-32>] |
Creates a VLAN by port:
Note:
MSTI instance 62 is reserved for SPBM if SPBM is enabled on the switch. |
type pvlan-mstprstp <0-63> [color <0-32>] |
Creates a private VLAN by port:
|
type protocol-mstprstp <0–63> ipv6 |
Creates a VLAN by protocol:
|
type spbm-bvlan |
Creates a SPBM B-VLAN. |
The following table defines parameters for the ip address command.
Variable |
Value |
---|---|
<A.B.C.D/X>|<A.B.C.D> <A.B.C.D> |
Specifies the IP address and subnet mask in the format A.B.C.D/X or A.B.C.D A.B.C.D. |
dvr-one-ip |
Specifies that the IP address will be used as the DvR gateway IP address and will be used by all other DvR Controllers for the DvR VLAN subnet. |
<MAC-offset> |
Specifies a number by which to offset the MAC address from the chassis MAC address. This ensures that each IP address has a different MAC address. If you omit this variable, a unique MAC offset is automatically generated. Different hardware platforms support different ranges. To see which range is available on the switch, use the CLI command completion Help. Note:
You cannot specify the mac-offset for a given secondary IP. |
secondary |
Identifies the IP address as a Secondary IP Interface. |
state-disabled |
Creates the IP interface in an administratively disabled state. This parameter is useful if you want to preconfigure an IP interface, including the routing protocol configuration for that interface, and enable it later during a maintenance window. This parameter applies only to the primary IP address. By default, the switch enables an IP interface after you configure the primary IP address. |
The following table defines parameters for the vlan i-sid command.
Variable |
Value |
---|---|
<1-4059> |
Specifies the VLAN ID. Specifies the VLAN ID in the range of 1 to 4059. By default, VLAN IDs 1 to 4059 are configurable and the system reserves VLAN IDs 4060 to 4094 for internal use. On switches that support the vrf-scaling and spbm-config-mode boot configuration flags, if you enable these flags, the system also reserves VLAN IDs 3500 to 3998. VLAN ID 1 is the default VLAN and you cannot create or delete VLAN ID 1. |
<0-16777215> |
Specifies the service instance identifier (I-SID). You cannot use I-SID 0x00ffffff. The system reserves this I-SID to advertise the virtual BMAC in an SMLT dual-homing environment. This value is the same for the primary and secondary VLANs. |
force |
Specifies the software must replace the existing VLAN-to-I-SID mapping, if one exists. |