Assigning an IP Address to a Virtual Ethernet Interface

Virtual Ethernet (VE) interfaces can be assigned an IPv4 address.

A VE interface is a logical port associated with a Layer 3 Virtual LAN (VLAN) configured on a Layer 3 switch. You can configure routing parameters on the VE interface to enable the Layer 3 switch to route protocol traffic between Layer 3 VLANs without using an external router. Additionally, you can configure IP routing interface parameters on the VE interface.

Note: A Layer 3 switch uses the lowest MAC address on the device (the MAC address of port 1 or 1/1/1) as the MAC address for all ports within all VE interfaces you configure on the device.
  1. Enter global configuration mode.
    device# configure terminal
  2. Create a VLAN.
    device(config)# vlan 2 name Marketing
    VLAN 2 is named for the Marketing department.
  3. Add a range of untagged Ethernet ports to the VLAN.
    device(config-vlan-2)# untag ethernet 1/1/1 to 1/1/4
  4. Create a virtual routing interface for the VLAN.
    device(config-vlan-2)# interface ve 2
  5. Assign an IP address to the virtual interface.
    device(config-vif-2)# ip address 10.1.2.1/24

The following example adds a virtual interface to a VLAN and configures an IP address for a VE interface.

device# configure terminal
device(config)# vlan 2 name Marketing
device(config-vlan-2)# untag ethernet 1/1/1 to 1/1/4
device(config-vlan-2)# interface ve 2
device(config-vif-2)# ip address 10.1.2.1/24