A Commands

allocate interface ethernet

To allocate Ethernet interfaces to a virtual device context (VDC), use the allocate interface ethernet command. To revert to the default settings, use the no form of this command.

allocate interface ethernet slot/port

allocate interface ethernet slot/port

allocate interface ethernet slot/port [-port]

allocate interface ethernet slot/port , ethernet slot1/port ... [ , ethernet slot/port ]

no allocate interface ethernet slot/port

no allocate interface ethernet slot/port [-port]

no allocate interface ethernet slot/port , ethernet slot1/port ... [ , ethernet slot/port ]

Syntax Description

slot/port

Slot number and port number for the Ethernet interface.

Command Default

None

Command Modes


VDC configuration

Command History

Release

Modification

6.1(1)

Added the no option.

4.0(1)

This command was introduced.

Usage Guidelines

You can use this command only in the default VDC (VDC 1).

Initially, all interfaces belong to the default VDC. You can allocate individual interfaces, ranges of interface, or lists of interfaces.

Use the show vdc membership command to display the current allocation of interfaces among the VDCs on the physical device.


Note


All configuration for the interface is lost when you allocate them to another VDC.

To remove the interface from the VDC and return them to the default VDC, you must enter VDC configuration mode for the default VDC and allocate the interface to the default VDC.

This command requires the Advanced Services license.

Examples

This example shows how to allocate one Ethernet interface to a VDC:

switch# configure terminal
switch(config)# vdc MyDevice
switch(config-vdc)# allocate interface ethernet 2/1
Moving ports will cause all config associated to them in source vdc to be removed. Are you sure you want to move the ports? [yes] yes

This example shows how to allocate a range of Ethernet interfaces on the same module to a VDC:

switch# configure terminal
switch(config)# vdc MyDevice
switch(config-vdc)# allocate interface ethernet 2/1 - 4
Moving ports will cause all config associated to them in source vdc to be removed. Are you sure you want to move the ports? [yes] yes

This example shows how to allocate a list of Ethernet interfaces on the same module to a VDC:

switch# configure terminal
switch(config)# vdc MyDevice
switch(config-vdc)# allocate interface ethernet 2/1, ethernet 2/3, ethernet 2/5
Moving ports will cause all config associated to them in source vdc to be removed. Are you sure you want to move the ports? [yes] yes

This example shows how to move an Ethernet interface back to the default VDC:

switch# configure terminal
switch(config)# vdc switch
switch(config-vdc)# allocate interface ethernet 2/1
Moving ports will cause all config associated to them in source vdc to be removed. Are you sure you want to move the ports? [yes] yes

Related Commands

Command

Description

show vdc membership

Displays VDC interface membership information.

vdc

Creates or specifies a VDC and enters VDC configuration mode.