Assigning an IP Address to a Virtual Ethernet Interface
Virtual interfaces can be assigned an IPv4 address using this task.
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 a virtual 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.
- Enter global configuration mode.
- Create a VLAN.
VLAN 2 is named for the Marketing department.
- Add a range of untagged Ethernet ports to the VLAN.
- Create virtual interface 1 as the routing interface for the VLAN.
- Enter interface configuration mode for the virtual interface.
- Assign an IP address to the virtual interface.
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)# router-interface ve 1 device(config-vlan-2)# interface ve 1 device(config-vif-1)# ip address 10.1.2.1/24