Summary of the invention
The objective of the invention is by breaking through the restriction of the local area network building that IEEE802.1Q defined VLAN ID (VLAN ID) shortage problem brought, under the existing related protocol of local area network (LAN) (need not use new communication protocol), the low-cost end-to-end interconnection (transparent transmission) that realizes extensive VLAN, both can support centralized broadband LAN to insert, can support to provide simultaneously LAN VPN (local network virtual private network) and PPPOE access service again, and the network operator need not to increase the data forwarding method that the realization local area network (LAN) Virtual Channel of more new technology learning cost transmits, and it may further comprise the steps:
1), whether the interface of judgment device have packet to arrive, if not then wait for, if there is packet to arrive, then
2), check the frame check sign indicating number of packet, if the incorrect data bag then abandons this packet, otherwise
3), judge whether type of data packet and the input interface type enter mate, if do not match then abandon this packet, otherwise
4), check " label forwarding information data table " whether with good grounds input interface or the output interface that clearly indicates this packet of input packet or VLAN ID of dateout bag, if " label forwarding information data table " be clearly indication not, then abandon this packet, otherwise
5), equipment is according to the indication of " label forwarding information data table ", exchanges its VLAN ID VLANID according to specifying during packet exchange between any two interfaces of the equipment of finishing.
The operation of exchanging VLAN ID VLAN ID according to the appointment of label information tables of data when wherein, finishing packet exchange between any two interfaces of equipment in the above-mentioned steps 5 may further comprise the steps:
51), the LAN data bag that enters is added the VLAN ID of " label forwarding information data table " indication, recomputate the frame check sign indicating number, from the interface output of " label forwarding information data table " indication;
52), the LAN data bag that enters is exported from the interface of " label forwarding information data table " indication;
53), the original VLAN ID of virtual LAN data bag that enters is replaced to the new VLAN ID of " label forwarding information data table " indication, recomputate the frame check sign indicating number, from the interface dateout bag of " label forwarding information data table " indication;
54), with the original VLAN ID of the virtual LAN data bag that enters according to " label forwarding information data table " indication deletion, recomputate the frame check sign indicating number, from the interface dateout bag of " label forwarding information data table " indication.
When using the present invention to set up the LAN Virtual Channel, need not to set up a brand-new MPLS network, need not increases additional tags on LAN or vlan data newspaper, so can realize the linear speed exchange and the higher data transmitting efficient of data.
Under the existing related protocol of local area network (LAN) (need not use new communication protocol); the low-cost end-to-end interconnection (transparent transmission) that realizes extensive VLAN; promptly can support centralized broadband LAN to insert; can support to provide simultaneously LAN VPN (local area network interconnection's private network) and PPPOE access service again; and the network operator need not to increase more new technology learning cost, the existing investment of the network of protection maximum.
Describe realization of the present invention and the course of work and principle in detail below in conjunction with accompanying drawing:
Embodiment
As shown in Figure 1, Virtual Channel switching equipment of the present invention (LAN virtual connectiondevice, hereinafter to be referred as LVCD) system and device roughly the same with existing LAN switch (LAN SWITCH), its system logic structure comprises four major parts: A, switching bus; B, function element; C, memory device; D, input/output interface.Their functional structure is described respectively below.
A, switching bus
Switching bus provides public data transmission channel for collaborative work between each parts of switch.
B, function element
Function element comprises network layer routing function device, controlled function device and three parts of forwarding capability device.
Wherein network layer routing function device is used for setting up and safeguarding vlan id routing table;
The controlled function device is handled various control informations, and the each several part of switch is controlled;
The forwarding capability device is responsible for the reception and the forwarding of packet.
C, memory device
Memory device comprises the Cache of Flash RAM, NV RAM, RAM, ROM and every interface.
Flash RAM is used to deposit the operating system of switch;
NV RAM deposits configuration file;
ROM deposits basic boot;
RAM deposits Mac (medium access control) address table, PVID (Port VLAN ID, interface VLAN ID) table, TFIB (Tag Forwarding Information Base, label forwarding information data) table and some other information;
The Cache of every interface is used for the packet that receives is cushioned, and also has the priority query of dateout bag to deposit etc.
D, input/output port
The interface of LVCD can supporting rate 10/100/1000Mbps, medium is that cable/optical fiber, agreement are the various interface of LAN/IEEE802.1Q or other type.Comprise user port and control port two classes.
As shown in Figure 2, the data transfer device of Virtual Channel switching equipment of the present invention may further comprise the steps:
1), whether the interface of judgment device have packet to arrive, if not then wait for, if there is packet to arrive, then
2), check the frame check sign indicating number of packet, if the incorrect data bag then abandons this packet, otherwise
3), judge whether the type of data packet and the input interface type that enter mate.Wherein the packet that receives of input interface can be divided into local area network (LAN) (as Ethernet) frame, VLAN (IEEE802.1Q) frame two classes.The interface that transmits the IEEE802.1Q frame is called labelization (Taged) interface, and the interface that transmits local area network (LAN) (as Ethernet) frame is labelization (Untaged) interface not.Whether type of data packet that judgement enters in this step and input interface type mate may further comprise the steps:
31), judge the type of data packet enter, if the LAN data bag then forwards step 33 to, if the virtual LAN data bag, then
32), judge and the type of input interface, then to abandon this packet if input interface is the not label interface that transmits the LAN data bag; If input interface is the interface of label that transmits the virtual LAN data bag, then forward step 4 to;
33), judge and the type of input interface, then to abandon this packet if input interface is the interface of label that transmits the virtual LAN data bag, if input interface is the not label interface that transmits the LAN data bag, then forward above-mentioned steps 4 to, then abandon this packet, otherwise
4), check " label forwarding information data table " whether the VLAN ID VLAN ID of with good grounds input interface or input packet clearly indicate the output interface of this packet or the VLAN ID of dateout bag, if " label forwarding information data table " be clearly indication not, then abandon this packet, otherwise
5), equipment is according to the indication of " label forwarding information data table ", exchanges its VLAN ID VLAN ID according to specifying during packet exchange between any two interfaces of the equipment of finishing, it mainly may further comprise the steps:
51), the LAN data bag that enters is added the VLAN ID of " label forwarding information data table " indication, recomputate the frame check sign indicating number, from the interface output of " label forwarding information data table " indication;
52), the LAN data bag that enters is exported from the interface of " label forwarding information data table " indication;
53), the original VLAN ID VLAN of the virtual LAN data bag ID that enters is replaced to the new VLAN ID of " label forwarding information data table " indication, recomputate the frame check sign indicating number, from the interface dateout bag of " label forwarding information data table " indication;
54), with the original VLAN ID of the virtual LAN data bag that enters according to " label forwarding information data table " indication deletion, recomputate the frame check sign indicating number, from the interface dateout bag of " label forwarding information data table " indication.
As shown in Figure 3, it is as follows to the basic procedure of the application implementation of the Virtual Channel realization data forwarding of interface b to set up interface a among the present invention: a certain interface a such as this equipment is interface 1, vlan id 1=3 (decimal system), another interface b is interface 2, vlan id 2=5 (decimal system), and it is achieved as follows:
Packet from a or b interface receive can be divided into local area network (LAN) (as Ethernet) frame, IEEE802.1Q frame two classes.The interface that transmits the IEEE802.1Q frame is called labelization (Taged) interface, and the interface that transmits local area network (LAN) (as Ethernet) frame is labelization (Untaged) interface not.
At first, by configuration (by configured port or the Long-distance Control of LVCD), set a, the b interface is Taged interface (this information is recorded into the PVID tables of data of a, b interface), the vlan id that sets a interface vlan id simultaneously and be 3 VLAN and b interface is 5 VLAN interconnection (this information is recorded into the TFIB table).
Finish after the setting, LVCD waits for a, the input of b interface data.If detect a interface packet is arranged, at first judge whether it is qualified a certain class packet (PVID according to this port is set to IEEE802.1Q),, will be dropped (drop) if not the IEEE802.1Q frame.Otherwise,, judge whether to be the correct data bag, if not then abandoning by checking the FCS (Frame CheckSequence) of IEEE802.1Q frame.Next step LVCD reads TFIB (Tag Forwarding Information Base), find that this interface vlan id is that 3 packets need is forwarded to the b interface, by controlled function device and internal bus, this vlan id is changed into 5, regenerates FCS, output to interface b then.If detect the b interface packet is arranged, at first judge whether it is qualified a certain class packet (PVID according to this port is set to IEEE802.1Q),, will be dropped (drop) if not the IEEE802.1Q frame.Otherwise,, judge whether to be the correct data bag, if not then abandoning by checking the FCS (Frame CheckSequence) of IEEE802.1Q frame.Next step LVCD reads TFIB (Tag Forwarding Information Base), find that this interface Vlan id is that 5 packets need is forwarded to a interface, by controlled function device and internal bus, this vlan id is changed into 3, regenerates FCS, output to interface a then.
When like this, this LVCD sends to interface b with regard to having finished packet with vlan1 among the interface a id of vlan1 is converted to the id of vlan2; And, when the packet of vlan2 among the interface b is sent to interface a the id of vlan2 is converted to the id of vlan1, realized that vlan2 with the vlan1 of interface a and interface b couples together the formation Virtual Channel.