CN104243208A - Port expansion and message processing method, device and network device - Google Patents

Port expansion and message processing method, device and network device Download PDF

Info

Publication number
CN104243208A
CN104243208A CN201410455232.6A CN201410455232A CN104243208A CN 104243208 A CN104243208 A CN 104243208A CN 201410455232 A CN201410455232 A CN 201410455232A CN 104243208 A CN104243208 A CN 104243208A
Authority
CN
China
Prior art keywords
vlan
message
route mouth
sub
mouth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410455232.6A
Other languages
Chinese (zh)
Inventor
肖宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN201410455232.6A priority Critical patent/CN104243208A/en
Publication of CN104243208A publication Critical patent/CN104243208A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a port expansion and message processing method, device and network device. The port expansion and message processing method, device and network device are used for increasing the number of expanded sub-interfaces and improving message forwarding performance of the sub-interfaces. The port expansion and message processing method includes the steps that the port type of at least one routed port of a switch chip is configured to be a preset port type which supports port expansion; the Port-Based VLAN of the routed port which is configured to be the preset port type is configured to point to an uplink port connected with a routed port of a central processing unit (CPU); different main virtual local area network (VLAN) identifications are distributed to the routed port which is configured to be the preset port type; when the routed port is used for expanding the sub-interfaces, VLAN sub-identifications are distributed to the expanded sub-interfaces.

Description

A kind of ports-Extending and message processing method, device and the network equipment
Technical field
The present invention relates to network communication technology field, particularly relate to a kind of ports-Extending and message processing method, device and the network equipment.
Background technology
In VLAN (Virtual Local Area Network, VLAN), a normally corresponding VLAN of physical interface.On the network of multiple VLAN, separate unit router physical interface (Interface) cannot be used to realize inter-vlan communication, router has its physical limitation simultaneously, can not with a large amount of physical interfaces.
In order to break the limitation of physical interface, prior art proposes the concept of sub-interface (Subinterface).Sub-interface is by the virtual multiple logic interfacings out of physical interface by agreement and technology.It allows the single physical interface of a router by dividing the mode of multiple sub-interface, realizes route between multiple VLAN and communicates.Relative sub-interface, the physical interface fictionalizing this sub-interface is called main interface.Each sub-interface from function, effect, with physical interface without any distinguishing.Sub-interface shares the physical layer parameter of main interface, can configure respective link layer and network layer parameter respectively again.User can be forbidden or be activated sub-interface, and can not have an impact to main interface; But the change of main interface state can have an impact to sub-interface, when particularly only having main interface to be in connected state, sub-interface could normal work.
Prior art is generally utilize CPU (Central Processing Unit, CPU) the route mouth virtual sub-interface that carries, then the support of support and the multiple terminals realized many sub-interfaces is connected with exchange chip, but, because it can only support a route mouth, the amount of sub-interface that can fictionalize so at most can not more than 4094, and due to the quantity of same route mouth virtual sub-interface more, each sub-interface performance is poorer, and between each sub-interface, need the bandwidth resources of competing main interface, when if the same time needs to E-Packet, quantity is more, easy formation forwards bottleneck, affect message forwarding performance.
Summary of the invention
The embodiment of the present invention provides a kind of ports-Extending and message forwarding method and device, in order to increase the quantity of the sub-interface expanded and to improve the message forwarding performance of sub-interface.
The embodiment of the present invention provides a kind of ports-Extending method, comprising:
The port type of at least one route mouth of configuration exchange chip is preset port type, and described preset port type supports ports-Extending; And the Port-Based VLAN that configuration is configured to the route mouth of preset port type points to the upper united mouth be connected with the route mouth of central processing unit CPU;
For the route mouth being configured to preset port type distributes different main virtual LAN VLAN marks respectively; And
When utilizing this route mouth to expand sub-interface, the sub-interface for expansion distributes Sub-VLAN mark.
The embodiment of the present invention provides a kind of message processing method, utilize the route mouth of above-mentioned ports-Extending method configuration exchange chip, and set up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Described message processing method, comprising:
The message that the arbitrary route mouth receiving described exchange chip is submitted to by described upper united mouth, carries VLAN mark in described message;
According to the Port Management table of described route mouth correspondence, judge VLAN mark that described message carries no be as primary vlan mark;
If so, E-Packet after deleting the VLAN label TAG in described message;
If not, described message is forwarded.
The embodiment of the present invention provides another message processing method, utilize the route mouth of above-mentioned ports-Extending method configuration exchange chip, and set up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Described message processing method, comprising:
When needing there being message to send, from the queue of route mouth correspondence, obtain the message that will send;
Judge whether carry VLAN TAG in the message obtained;
If so, according to the VLAN mark comprised in described VLAN TAG, from described Port Management table, corresponding route mouth is searched; Described message is sent to the route mouth found;
If not, the route mouth corresponding according to described message place queue, searches primary vlan mark and is added in described message, and send described message to this route mouth from the Port Management table of this route mouth correspondence.
The embodiment of the present invention provides a kind of port expansion device, comprising:
Dispensing unit, for when carrying out ports-Extending, the port type of at least one route mouth of configuration exchange chip is preset port type, and described preset port type supports ports-Extending; And the Port-Based VLAN that configuration is configured to the route mouth of preset port type points to the upper united mouth be connected with the route mouth of central processing unit CPU;
Allocation units, distribute different main virtual LAN VLAN marks respectively for the route mouth for being configured to preset port type; And when utilizing this route mouth to configure sub-interface, the sub-interface for configuration distributes Sub-VLAN mark.
The embodiment of the present invention provides a kind of message process device, comprising:
Dispensing unit, for the route mouth of above-mentioned ports-Extending method configuration exchange chip;
Map unit, for setting up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Receiving element, the message that the arbitrary route mouth for receiving described exchange chip is submitted to by described upper united mouth, carries VLAN mark in described message;
Judging unit, for the Port Management table according to described route mouth correspondence, judge VLAN mark that described message carries no be as primary vlan mark;
Routing unit, for when the judged result of described judging unit is for being, E-Packets after deleting the VLAN label TAG in described message; And when the judged result of described judging unit is no, forward described message.
The embodiment of the present invention provides another message process device, comprising:
Dispensing unit, for the route mouth of above-mentioned ports-Extending method configuration exchange chip;
Map unit, for setting up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Acquiring unit, for when there being message to need to send, obtains the message that will send from the queue of route mouth correspondence;
Judging unit, for judge obtain message in whether carry VLAN TAG;
Message process unit, for when the judged result of described judging unit is for being, according to the VLAN mark comprised in described VLAN TAG, searches corresponding route mouth from described Port Management table; Described message is sent to the route mouth found; And when the judged result of described judging unit is no, the route mouth corresponding according to described message place queue, searches primary vlan mark and is added in described message, and send described message to this route mouth from the Port Management table of this route mouth correspondence.
The embodiment of the present invention provides a kind of network equipment, comprises the first message process device above-mentioned and/or the second message process device.
The ports-Extending method that the embodiment of the present invention provides, by configuring the port type that the port type of at least one route mouth of exchange chip is support ports-Extending, and configure it and point to the upper united mouth that is connected with the route mouth of CPU, the sub-interface distribution VLAN mark being this route mouth simultaneously and utilizing this route mouth to expand, thus achieve the route mouth expansion sub-interface utilizing exchange chip, the route mouth quantity comprised due to exchange chip is more, thus extendible amount of sub-interface is also more.
Simultaneously, the embodiment of the present invention also also each provides for the processing method of the message received and the processing method for message to be sent based on above-mentioned ports-Extending method, sub-interface can be expanded owing to there being multiple route mouth, thus decrease the quantity of the sub-interface that each route mouth expands, reduce the probability that each route mouth produces message repeating bottleneck, improve message forwarding performance.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from specification, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write specification, claims and accompanying drawing and obtain.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a part of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is in the embodiment of the present invention, hardware interface schematic diagram;
Fig. 2 is in the embodiment of the present invention, the implementing procedure schematic diagram of ports-Extending method;
Fig. 3 is in the embodiment of the present invention, the handling process schematic diagram of the message that each route mouth of CPU process receives;
Fig. 4 is in the embodiment of the present invention, the handling process schematic diagram of CPU process message to be sent;
Fig. 5 is in the embodiment of the present invention, the structural representation of port expansion device;
Fig. 6 is in the embodiment of the present invention, the structural representation of the first message process device;
Fig. 7 is in the embodiment of the present invention, the structural representation of the second message process device.
Embodiment
In order to increase the quantity of available sub-interface, avoiding the formation of message repeating bottleneck, improving message forwarding performance, embodiments providing a kind of ports-Extending and message processing method, device and the network equipment.
Below in conjunction with Figure of description, the preferred embodiments of the present invention are described, be to be understood that, preferred embodiment described herein is only for instruction and explanation of the present invention, be not intended to limit the present invention, and when not conflicting, the embodiment in the present invention and the feature in embodiment can combine mutually.
As shown in Figure 1, for the hardware configuration schematic diagram of the embodiment of the present invention, the upper united mouth (port4 namely in Fig. 1) of exchange chip is connected with CPU route mouth, and the route mouth (also referred to as WAN mouth, the port0-port3 namely in Fig. 1) of exchange chip can be used for expanding sub-interface.Based on the hardware structure diagram that Fig. 1 provides, embodiments provide a kind of method utilizing the route mouth of exchange chip to carry out sub-interface expansion, can by being configured realization to the route mouth of exchange chip, concrete, as shown in Figure 2, for the implementing procedure schematic diagram of the ports-Extending method that the embodiment of the present invention provides, can comprise the following steps:
The port type of at least one route mouth of S21, configuration exchange chip is preset port type.
During concrete enforcement, preset port type refers to the port type supporting ports-Extending, and such as Trunk type port or Hybrid type port etc., the embodiment of the present invention does not limit this.For Fig. 1, the route mouth port0-port3 by exchange chip is configured to Trunk type port or Hybrid type port.
The upper united mouth that the route mouth that the Port-Based VLAN that S22, configuration are configured to the route mouth of preset port type points to CPU connects.
During concrete enforcement, owing to the route mouth of exchange chip being set to Trunk port or Hybrid port can introduce another one problem, i.e. two layers of forwarding of message, in order to avoid two layers of forwarding of message, in the embodiment of the present invention, the Port-Based VLAN being configured to the route mouth of Trunk port or Hybrid port is pointed to the upper united mouth be connected with the route mouth of CPU.In Fig. 1, the Port-Based VLAN namely configuring route mouth port0-port3 points to port4.
S23, distribute different primary vlan mark respectively for the route mouth being configured to preset port type, and when utilizing this route mouth to expand sub-interface, be that the sub-interface of expansion distributes Sub-VLAN mark.
During concrete enforcement, message that the route mouth of CPU receives which the route mouth from exchange chip can be identified in order to make CPU software, be required to be exchange chip route mouth during initialization and configure different primary vlan marks, when specifically implementing, can consider to distribute the VLAN be of little use mark.After certain route mouth of the exchanged chip of message receives, according to existing exchange regulation, the message not carrying VLAN mark identifies if the message carrying VLAN mark then retains its VLAN, if then can add the primary vlan mark of this route mouth on message.After the route mouth of CPU receives message, according to receiving the bcm tag of message, CPU software judges that whether message is from exchange chip, if the VLAN mark of then being carried by analytic message from exchange chip is identified specifically from which route mouth of exchange chip.
It should be noted that, primary vlan mark or Sub-VLAN mark be from VLAN mark select, just in order to the VLAN of the VLAN mark and sub-interface of distinguishing main interface identifies in the embodiment of the present invention, the VLAN distributed for main interface mark is called that primary vlan identifies, the VLAN distributed for sub-interface mark is called that Sub-VLAN identifies.
For Fig. 1, can identify as the primary vlan of main interface for route mouth port0 ~ port3 distributes VLAN mark respectively, when utilizing the arbitrary route mouth in port0 ~ port3 to carry out sub-interface expansion, can identify as the Sub-VLAN of sub-interface for the sub-interface of expansion distribute VLAN mark.Such as, for port3 distributes primary vlan mark 2012, the sub-interface expanded for utilizing port3 distributes Sub-VLAN mark 12.
Wherein, Sub-VLAN mark can be configured voluntarily by user, when user configured Sub-VLAN mark identifies identical with the primary vlan distributed, in order to avoid conflict, in during the embodiment of the present invention, dynamic conditioning can be carried out to the VLAN mark of distributing for main interface or sub-interface.Such as, during concrete enforcement, the primary vlan distributed for port0 is designated 4011, and user is configured with the Sub-VLAN mark of sub-interface when being also 4011 on route mouth port0, in this case, again choose a VLAN mark in the VLAN mark that never can be assigned with for main interface as primary vlan mark, the process that dynamic conditioning VLAN identifies is transparent for user, user's not perception.
Preferably, during concrete enforcement, bitmap can be adopted to store each VLAN and to identify its corresponding label information whether be assigned with, during concrete enforcement, whether by the label information that use adopted 1 bit position store, time initial, every corresponding position is set to 0 if 4094 VLAN being identified each VLAN mark, after being assigned with, this VLAN being identified corresponding position and is set to 1.Like this, when needs distribute VLAN mark for primary vlan or Sub-VLAN, be that the VLAN mark of 0, random selecting VLAN mark is distributed from correspondence position.Because each label information only need take a bit, therefore adopt bitmap mode greatly can save memory space.Certainly, also can be that the mode of usage data table stores each VLAN and identifies corresponding relation between the label information corresponding with it, as shown in table 1, show when wherein label information is 1 that this VLAN mark is assigned with, when label information is 0, show that this VLAN mark is not assigned with.Store compared to employing bitmap mode, tables of data mode takies more memory space.
Table 1
VLAN identifies Label information
1 1
2 0
…… ……
4094 0
Pass through said method, route mouth can be expanded to multiple sub-interface, because exchange chip may comprise multiple route mouth, as 4 mouthfuls, 8 mouthfuls even 24 mouthfuls, 48 mouthfuls, each route mouth can expand to 4094 sub-interfaces, the exchange chip of 8 mouthfuls in this way, so can expand 8 route main interfaces, and 8*4094 route sub-interface, on the other hand, may be used for owing to there being multiple route mouth expanding sub-interface, like this, the extendible amount of sub-interface of each route mouth will lack many compared to being carried out expansion by a route mouth, thus, each route needs message amount to be processed greatly to reduce, avoid message repeating bottleneck, improve message forwarding performance.
Based on above-mentioned ports-Extending method, the message received to achieve a butt joint or transmission message process, in the embodiment of the present invention, CPU needs pin to be every Single port of exchange chip, set up a corresponding Port Management table, wherein store each VLAN mark be assigned with and whether it is corresponding relation between primary vlan identifies or Sub-VLAN identifies label information.Such as, for port port0, can according to the form storage port management table shown in table 2:
Table 2
Concrete, often configuration or a deletion sub-interface, CPU revises above-mentioned Port Management table, add or delete corresponding record, as be configured with sub-interface for port0 and for its distribute VLAN be designated 10, then the main interface correspondence position in the Port Management table of port 0 correspondence is set to FALSE, sub-interface correspondence position is set to TRUE.Accordingly, when deleting sub-interface, need to delete corresponding record.
It should be noted that, when adding or delete sub-interface, all needing with the BCM5284 of CPU (register) synchronous, otherwise may occur that CPU cannot receive or send the problem of message.
Based on the Port Management table stored, CPU, when processing the message received, can perform according to the step shown in Fig. 3:
The message that S31, the arbitrary route mouth receiving exchange chip are submitted to by upper united mouth.
During concrete enforcement, the message received due to exchange chip had both been likely the message in local area network (LAN), also be likely the message of wide area network, therefore, the message that the route mouth of exchange chip receives may carry VLAN TAG (VLAN label), i.e. TAG message, TAG message is local area network (LAN) message, also likely do not carry VLAN TAG, i.e. UNTAG message, UNTAG message is wide area network message.In general, TAG message is the message sending to sub-interface, and UNTAG message is the message sending to main interface.
According to exchange regulation, for UNTAG message and wide area network message, exchange chip can add VLAN TAG in the message received, VLAN mark in VLAN TAG is set to the primary vlan mark of the route mouth receiving UNTAG message, the message that arbitrary route mouth of exchange chip receives will submit to CPU process from upper united mouth, the VLAN of upper united mouth is designated default value, is 1.In addition, according to exchange regulation, if if the VLAN mark of the message sent from upper united mouth identifies different from the VLAN of this upper united mouth, then carry VLAN TAG to send, that is, for UNTAG message, the VLAN in the VLAN TAG of the message that CPU receives is designated the primary vlan mark of the route mouth receiving message.
For TAG message and local area network (LAN) message, after arbitrary route mouth of exchange chip receives TAG message, according to exchange regulation, the TAG message that arbitrary route mouth receives can submit to CPU from upper united mouth, and equally, the VLAN of upper united mouth is designated default value, is 1.In addition, if if the VLAN mark of the message sent from upper united mouth identifies different from the VLAN of this upper united mouth, then carry VLAN TAG and send.
Wherein, the VLAN that carries in VLAN TAG mark is as follows: if the message carrying TAG received for sub-interface, then wherein carry Sub-VLAN and identify, if receive for main interface carry TAG message, then wherein carry primary vlan and identify.It should be noted that, if main interface receives the message carrying TAG, the VALN mark being then illustrated as main interface distribution identifies identical causing with the VLAN of the sub-interface utilizing same route mouth to expand, due in the embodiment of the present invention, when carrying out the configuration of route mouth, for VLAN identification collision meeting dynamic conditioning, therefore, the VLAN mark of carrying in the TAG message that the route mouth of exchange chip receives may be only Sub-VLAN mark.
S32, CPU, according to the Port Management table of the route mouth correspondence of submission message, judge whether the VLAN mark of carrying in message is primary vlan mark, if so, performs step S33, if not, performs step S34.
E-Packet after VLAN TAG in S33, deletion message, flow process terminates.
During concrete enforcement, CPU, after receiving message, searches corresponding Port Management table, judge whether the VLAN mark in VLAN TAG is primary vlan mark, if primary vlan mark, CPU forwards this message after deleting VLAN TAG wherein, if be that sub-VLA identifies, CPU directly forwards this message.
S34, to E-Packet.
So far, CPU completes the handling process to the message received.
For CPU, the flow process that the message that port0 submits to processes is described below, supposes that the primary vlan of port0 is designated 9.
If the message that Port0 receives is TAG message, illustrate that it is local area network (LAN) message, namely this message is that the sub-interface utilizing port0 to expand receives.Port0 sends it to port4, this message is through port4, because the VLAN mark in VLAN TAG identifies different from the VLAN of port4, port4 retains former VLAN TAG, namely the Sub-VLAN mark of the sub-interface of TAG message is received, and the message received is submitted to CPU, according to the VLAN mark in VLAN TAG, CPU determines that it is Sub-VLAN mark, then directly forward.
If the message that port0 receives is UATAG, illustrate that it is wide area network message, namely this message is the message that main interface receives, owing to not carrying VLAN TAG in message, the VLAN that the main VALN that then port0 adds self wherein identifies as message identifies, and send it to port4, port4 is after receiving message, because the VLAN mark in VLAN TAG identifies different from the VLAN of port4, port4 retains former VLAN TAG, namely the primary vlan mark of the main interface of UNTAG message is received, and the message received is submitted to CPU, according to the VLAN mark in VLAN TAG, CPU determines that it is primary vlan mark, E-Packet again after deleting VALNTAG.
Below introduce the handling process of CPU process message to be sent, for message to be sent, CPU can process according to the flow process shown in Fig. 4:
S41, when there being message to need to send, from the message queue to be sent of route mouth correspondence, obtain the message that will send.
During concrete enforcement, when needing when there being message to send, CPU will need the message sent to go out team from the message queue to be sent of each route mouth correspondence.
S42, judge obtain message in whether carry VLAN TAG, if so, perform step S43, otherwise, perform step S45.
S43, according to the VLAN mark comprised in VLAN TAG, from Port Management table, search corresponding route mouth.
During concrete enforcement, if the message needing the main interface of exchange chip to send, then do not carry VLAN TAG in message, therefore, according to whether carrying in message VLAN TAG, CPU can judge that this message should send to main interface or sub-interface.
If carry VLAN TAG in message, according to the VLAN mark in VLAN TAG, search from Port Management table its correspondence route mouth, and send this message to the route mouth found.Certainly, CPU also can according to message from queue determine need send to that route mouth.During concrete enforcement, if carry VLAN TAG in message to be sent, then CPU is preferentially identified at according to the VLAN in VLAN TAG the route mouth of searching its correspondence in Port Management table and sends this message to the route mouth found.
S44, send message to the route mouth that finds, flow process terminates.
S45, the route mouth corresponding according to the queue of message place, search primary vlan mark and be added in message from the Port Management table of this route mouth correspondence.
If the message sent to main interface, owing to wherein not carrying VLAN TAG, CPU according to message from queue, determine to need to send this message to that route mouth, and in message, add VLAN TAG, VLAN wherein identifies the primary vlan that can be set in the Port Management table of this route mouth correspondence, and sends this message to the route mouth determined.
S46, to this route mouth send message.
Based on same inventive concept, ports-Extending and message process device and the network equipment is also each provided in the embodiment of the present invention, the principle of dealing with problems due to said apparatus and equipment is similar to ports-Extending and message processing method, therefore the enforcement of said apparatus and equipment see the enforcement of method, can repeat part and repeats no more.
As shown in Figure 5, be the structural representation of the port expansion device that the embodiment of the present invention provides, comprise:
Dispensing unit 51 is preset port type for configuring the port type of at least one route mouth of exchange chip, and described preset port type supports ports-Extending; And the route mouth that configuration is configured to preset port type points to the upper united mouth be connected with the route mouth of central processing unit CPU;
Allocation units 52, distribute different main virtual LAN VLAN marks respectively for the route mouth for being configured to preset port type; And when utilizing this route mouth to expand sub-interface, the sub-interface for expansion distributes Sub-VLAN mark.
Preferably, if allocation units 52 can also be used for Sub-VLAN mark when identify identical with primary vlan, identify as primary vlan for selection VLAN in the VLAN mark that route mouth is never assigned with identifies.
During concrete enforcement, the port expansion device that the embodiment of the present invention provides can also comprise map unit, wherein: map unit, for at allocation units 52 for before the route mouth being configured to preset port type distributes respectively different main virtual LAN VLAN mark, adopt bitmap to store each VLAN and identify its corresponding label information whether be assigned with; Allocation units 52, may be used for when distributing primary vlan mark for route mouth or distributing Sub-VLAN mark for the sub-interface of configuration, select corresponding label information to be that unappropriated VLAN mark is distributed from bitmap.
As shown in Figure 6, be the structural representation of the first message process device that the embodiment of the present invention provides, comprise:
Dispensing unit 61, for the route mouth utilizing above-mentioned port configuration method to configure exchange chip;
Map unit 62, for setting up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its.
Receiving element 63, the message that the arbitrary route mouth for receiving exchange chip is submitted to by described upper united mouth, carries VLAN mark in described message.
Judging unit 64, for the Port Management table according to described route mouth correspondence, judge VLAN mark that described message carries no be as primary vlan mark.
Routing unit 65, for when the judged result of judging unit 64 is for being, E-Packets after deleting the VLAN label TAG in described message; And when the judged result of judging unit 64 is no, forward this message.
As shown in Figure 7, be the structural representation of another message process device that the embodiment of the present invention provides, comprise:
Dispensing unit 71, for the route mouth utilizing above-mentioned port configuration method to configure exchange chip;
Map unit 72, for storing the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Acquiring unit 73, for when there being message to need to send, obtains the message that will send from the queue of route mouth correspondence;
Judging unit 74, for judge obtain message in whether carry VLAN TAG;
Message process unit 75, for when the judged result of described judging unit 74 is for being, according to the VLAN mark comprised in described VLAN TAG, searches corresponding route mouth from described Port Management table; Described message is sent to the route mouth found; And when the judged result of described judging unit 74 is no, the route mouth corresponding according to described message place queue, searches primary vlan mark and is added in described message, and send described message to this route mouth from the Port Management table of this route mouth correspondence.
For convenience of description, above each several part is divided into each module (or unit) according to function and describes respectively.Certainly, the function of each module (or unit) can be realized in same or multiple software or hardware when implementing of the present invention.
During concrete enforcement, the embodiment of the present invention also provides a kind of network equipment, comprises above-mentioned port expansion device or the first message process device or the second message process device.It should be noted that, above-mentioned port expansion device, the first message process device and the second message process device can independently be arranged, and also can merge setting.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (11)

1. a ports-Extending method, is characterized in that, comprising:
The port type of at least one route mouth of configuration exchange chip is preset port type, and described preset port type supports ports-Extending; And the Port-Based VLAN that configuration is configured to the route mouth of preset port type points to the upper united mouth be connected with the route mouth of central processing unit CPU;
For the route mouth being configured to preset port type distributes different main virtual LAN VLAN marks respectively; And
When utilizing this route mouth to expand sub-interface, the sub-interface for expansion distributes Sub-VLAN mark.
2. the method for claim 1, is characterized in that, if when described Sub-VLAN mark identifies identical with described primary vlan, then described method also comprises:
Identify as primary vlan for selecting a VLAN mark in the VLAN mark that described route mouth is never assigned with.
3. the method for claim 1, is characterized in that, before the route mouth for being configured to preset port type distributes different main virtual LAN VLAN marks respectively, also comprises:
Adopt bitmap to store each VLAN and identify its corresponding label information whether be assigned with; And
When distributing primary vlan mark for described route mouth or distributing Sub-VLAN mark for the sub-interface of configuration, from described bitmap, corresponding label information is selected to be that unappropriated VLAN mark is distributed.
4. a message processing method, it is characterized in that, utilize the route mouth of the method configuration exchange chip described in claim 1,2 or 3, and set up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Described message processing method, comprising:
The message that the arbitrary route mouth receiving described exchange chip is submitted to by described upper united mouth, carries VLAN mark in described message;
According to the Port Management table of described route mouth correspondence, judge VLAN mark that described message carries no be as primary vlan mark;
If so, E-Packet after deleting the VLAN label TAG in described message;
If not, described message is forwarded.
5. a message processing method, it is characterized in that, utilize the route mouth of the method configuration exchange chip described in claim 1,2 or 3, and set up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Described message processing method, comprising:
When needing there being message to send, from the queue of route mouth correspondence, obtain the message that will send;
Judge whether carry VLAN TAG in the message obtained;
If so, according to the VLAN mark comprised in described VLAN TAG, from described Port Management table, corresponding route mouth is searched; Described message is sent to the route mouth found;
If not, the route mouth corresponding according to described message place queue, searches primary vlan mark and is added in described message, and send described message to this route mouth from the Port Management table of this route mouth correspondence.
6. a port expansion device, is characterized in that, comprising:
Dispensing unit is preset port type for configuring the port type of at least one route mouth of exchange chip, and described preset port type supports ports-Extending; And the Port-Based VLAN that configuration is configured to the route mouth of preset port type points to the upper united mouth be connected with the route mouth of central processing unit CPU;
Allocation units, distribute different main virtual LAN VLAN marks respectively for the route mouth for being configured to preset port type; And when utilizing this route mouth to expand sub-interface, the sub-interface for expansion distributes Sub-VLAN mark.
7. device as claimed in claim 6, is characterized in that,
Described allocation units, if when also identifying identical for described Sub-VLAN mark with described primary vlan, identify as primary vlan for selecting a VLAN mark in the VLAN mark that described route mouth is never assigned with.
8. device as claimed in claim 6, is characterized in that, also comprise map unit, wherein:
Map unit, for being, before the route mouth being configured to preset port type distributes different main virtual LAN VLAN marks respectively, adopt bitmap to store each VLAN and identify its corresponding label information whether be assigned with at described allocation units;
Described allocation units, specifically for when distributing primary vlan mark for described route mouth or distributing Sub-VLAN mark for the sub-interface of configuration, select corresponding label information to be that unappropriated VLAN mark is distributed from described bitmap.
9. a message process device, is characterized in that, comprising:
Dispensing unit, for utilizing the route mouth of the method configuration exchange chip described in claim 1,2 or 3;
Map unit, for setting up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Receiving element, the message that the arbitrary route mouth for receiving described exchange chip is submitted to by described upper united mouth, carries VLAN mark in described message;
Judging unit, for the Port Management table according to described route mouth correspondence, judge VLAN mark that described message carries no be as primary vlan mark;
Routing unit, for when the judged result of described judging unit is for being, E-Packets after deleting the VLAN label TAG in described message; And when the judged result of described judging unit is no, forward described message.
10. a message process device, is characterized in that, comprising:
Dispensing unit, for utilizing the route mouth of the method configuration exchange chip described in claim 1,2 or 3;
Map unit, for setting up the Port Management table of each route mouth correspondence, whether described Port Management table is the corresponding relation between the label information that primary vlan identifies or Sub-VLAN identifies for the VLAN mark that stores each and be assigned with and its;
Acquiring unit, for when there being message to need to send, obtains the message that will send from the queue of route mouth correspondence;
Judging unit, for judge obtain message in whether carry VLAN TAG;
Message process unit, for when the judged result of described judging unit is for being, according to the VLAN mark comprised in described VLAN TAG, searches corresponding route mouth from described Port Management table; Described message is sent to the route mouth found; And when the judged result of described judging unit is no, the route mouth corresponding according to described message place queue, searches primary vlan mark and is added in described message, and send described message to this route mouth from the Port Management table of this route mouth correspondence.
11. 1 kinds of network equipments, is characterized in that, comprise the device described in the arbitrary claim of claim 6 ~ 10.
CN201410455232.6A 2014-09-09 2014-09-09 Port expansion and message processing method, device and network device Pending CN104243208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410455232.6A CN104243208A (en) 2014-09-09 2014-09-09 Port expansion and message processing method, device and network device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410455232.6A CN104243208A (en) 2014-09-09 2014-09-09 Port expansion and message processing method, device and network device

Publications (1)

Publication Number Publication Date
CN104243208A true CN104243208A (en) 2014-12-24

Family

ID=52230608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410455232.6A Pending CN104243208A (en) 2014-09-09 2014-09-09 Port expansion and message processing method, device and network device

Country Status (1)

Country Link
CN (1) CN104243208A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017000714A1 (en) * 2015-07-02 2017-01-05 深圳市中兴微电子技术有限公司 Port extension method and device, and storage medium
CN106797344A (en) * 2015-06-30 2017-05-31 华为技术有限公司 By the method and apparatus of remote network element port communication
CN108011802A (en) * 2017-12-14 2018-05-08 锐捷网络股份有限公司 A kind of file transmitting method and two three-layer network appliances
CN109728992A (en) * 2018-11-27 2019-05-07 盛科网络(苏州)有限公司 Method, apparatus, storage medium and the electronic device in distribution forwarding domain
WO2021042845A1 (en) * 2019-09-06 2021-03-11 南京中兴软件有限责任公司 Virtual local area network service management method, and virtual local area network global management device
CN112532540A (en) * 2019-09-17 2021-03-19 华为技术有限公司 Interface management method, device and system
WO2021121003A1 (en) * 2019-12-17 2021-06-24 中兴通讯股份有限公司 Message processing method, module, detection method, switching device and storage medium
CN113965456A (en) * 2021-08-30 2022-01-21 广州文远知行科技有限公司 Host interface expanding method, device, equipment and storage medium
CN114430392A (en) * 2022-01-26 2022-05-03 福州创实讯联信息技术有限公司 Method and terminal for connecting Intel network card with Switch to expand internet access
CN115015666A (en) * 2022-06-20 2022-09-06 国网山东省电力公司莱西市供电公司 Intelligent substation relay protection test expander and protection debugging method
CN115883383A (en) * 2022-12-09 2023-03-31 山东有人物联网股份有限公司 Network expansion communication method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960262A (en) * 2005-11-02 2007-05-09 盛科网络有限公司 Switchboard system having port extending ability and method of realizing extending of port
CN101043352A (en) * 2006-03-22 2007-09-26 华为技术有限公司 Method for configuring Native VLAN for GPON system and processing Ethernet packets
EP2362608A1 (en) * 2010-02-26 2011-08-31 Connection Technology Systems Inc. Data packet forwarding method and network device using such method in network address translation mode
CN103634213A (en) * 2013-11-04 2014-03-12 天津汉柏信息技术有限公司 Message forwarding method
CN103746943A (en) * 2013-12-23 2014-04-23 汉柏科技有限公司 Method for establishing VLAN subinterface and exchange chip using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960262A (en) * 2005-11-02 2007-05-09 盛科网络有限公司 Switchboard system having port extending ability and method of realizing extending of port
CN101043352A (en) * 2006-03-22 2007-09-26 华为技术有限公司 Method for configuring Native VLAN for GPON system and processing Ethernet packets
EP2362608A1 (en) * 2010-02-26 2011-08-31 Connection Technology Systems Inc. Data packet forwarding method and network device using such method in network address translation mode
CN103634213A (en) * 2013-11-04 2014-03-12 天津汉柏信息技术有限公司 Message forwarding method
CN103746943A (en) * 2013-12-23 2014-04-23 汉柏科技有限公司 Method for establishing VLAN subinterface and exchange chip using the same

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106797344A (en) * 2015-06-30 2017-05-31 华为技术有限公司 By the method and apparatus of remote network element port communication
WO2017000714A1 (en) * 2015-07-02 2017-01-05 深圳市中兴微电子技术有限公司 Port extension method and device, and storage medium
CN106330784A (en) * 2015-07-02 2017-01-11 深圳市中兴微电子技术有限公司 Port extension method and device
CN108011802A (en) * 2017-12-14 2018-05-08 锐捷网络股份有限公司 A kind of file transmitting method and two three-layer network appliances
CN109728992A (en) * 2018-11-27 2019-05-07 盛科网络(苏州)有限公司 Method, apparatus, storage medium and the electronic device in distribution forwarding domain
WO2021042845A1 (en) * 2019-09-06 2021-03-11 南京中兴软件有限责任公司 Virtual local area network service management method, and virtual local area network global management device
CN112532540A (en) * 2019-09-17 2021-03-19 华为技术有限公司 Interface management method, device and system
WO2021121003A1 (en) * 2019-12-17 2021-06-24 中兴通讯股份有限公司 Message processing method, module, detection method, switching device and storage medium
CN113965456A (en) * 2021-08-30 2022-01-21 广州文远知行科技有限公司 Host interface expanding method, device, equipment and storage medium
CN114430392A (en) * 2022-01-26 2022-05-03 福州创实讯联信息技术有限公司 Method and terminal for connecting Intel network card with Switch to expand internet access
CN115015666A (en) * 2022-06-20 2022-09-06 国网山东省电力公司莱西市供电公司 Intelligent substation relay protection test expander and protection debugging method
CN115015666B (en) * 2022-06-20 2023-02-03 国网山东省电力公司莱西市供电公司 Intelligent substation relay protection test expander and protection debugging method
CN115883383A (en) * 2022-12-09 2023-03-31 山东有人物联网股份有限公司 Network expansion communication method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104243208A (en) Port expansion and message processing method, device and network device
US10581700B2 (en) Service flow processing method, apparatus, and device
CN102857414A (en) Forwarding table writing method and device and message forwarding method and device
CN107547391B (en) Message transmission method and device
CN106470158B (en) Message forwarding method and device
CN107547242B (en) The acquisition methods and device of VM configuration information
CN108123901B (en) Message transmission method and device
CN103023773B (en) Method, device and system for forwarding message in multi-topology network
JP6618610B2 (en) Routing management
CN103067295A (en) Method and device and system for service transmission
WO2016175768A1 (en) Map tables for hardware tables
CN105827529A (en) Path establishing method and controller
CN105282003A (en) Tunnel establishing method and system, tunnel controller and virtual switch
CN104468368A (en) Method and device for allocating BGP neighbors
CN103354520A (en) Label processing method and device employing the same
CN104301229A (en) Data packet forwarding method and device and routing table generating method and device.
CN106302861A (en) A kind of address distribution method and device
CN114285787A (en) Cross-user-plane forwarding method, system and computer-readable storage medium
CN108259205B (en) Route publishing method and network equipment
CN112187635B (en) Message forwarding method and device
CN106254282B (en) The implementation method and device of link aggregation
CN105681186B (en) A kind of protection switching method and protection switching device
KR101952187B1 (en) Method and apparatus for processing service node ability, service classifier and service controller
CN106209634B (en) Learning method and device of address mapping relation
CN109768909A (en) Message forwarding method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141224

RJ01 Rejection of invention patent application after publication