The invention discloses a method and a unit for creating a layer three interface. The method comprises the following steps of: creating a shared default virtual
local area network (VLAN) virtual interface for all layer three
Ethernet interfaces on equipment, allocating interface
media access control (MAC) addresses to each layer three
Ethernet interface, and creating layer three interface table entries of each layer three
Ethernet interface, wherein the layer three interface table entries comprise the interface
MAC address and a VLAN identifier (ID); for each layer three Ethernet sub-interface on the equipment, creating a corresponding VLAN virtual interface according to a VLAN bound with the layer three Ethernet sub-interface, allocating the interface MAC addresses to each layer three Ethernet sub-interface, and creating the layer three interface table entries of each layer three Ethernet sub-interface, wherein the layer three interface table entries comprise the interface
MAC address and the VLAN ID; and when the equipment receives a message from an interface, searching for the three
layer interface table entries matched with a destination
MAC address and a VLAN
label of the message, and if the matched layer three interface table entries are found, performing layer three forwarding
processing on the message. By the method and unit, the creation of the layer three interface can be realized without preserving the VLAN, and the VLAN configuration and use of a user may not be limited.