Embodiment
The embodiment of the present invention can be applicable to RoutingQinQ networking, for Dynamic Discovery and the renewal of the inner VLAN Tag of RoutingQinQ.The reciprocal process of the embodiment of the present invention by introducing between access switch and core switch for inquiring about and report private network vlan information, make core switch can detect the private network VLAN of subscriber equipment, and Dynamic Maintenance private network vlan table item, thus simplify the configuration operation of core switch being specified private network VLAN, even if change occurs the VLAN of ports having on subscriber equipment or VLAN deletes, can both automatically upgrade private network vlan table item dynamically on core switch.
On the other hand, send to subscriber equipment when there being external flow, but its object IP address does not have a corresponding ARP on core switch, core switch is according to the private network vlan table item safeguarded by the way, send the ARP request that inner VLAN Tag is these private networks VLAN, thus respective user equipment is inquired about within the scope of these private networks VLAN, specify private network VLAN with configuring according to manual mode, within the scope of all private network VLAN, search respective user equipment compare, decrease the quantity of ARP request message, accelerate ARP pace of learning.
The embodiment of the present invention can realize based on user terminal/server framework, namely, access switch is as client, core switch is as server end, client notices private network vlan information, server end safeguards private network vlan table item, and regularly sends inquiry request, with requesting query private network vlan information.Certainly, also can realize based on other framework form, its realize principle with based on user terminal/server framework to realize principle similar.
In order to realize mutual private network vlan information between access switch and core switch, in order to safeguard private network vlan table item, the embodiment of the present invention defines two kinds of messages: private network VLAN query message and private network VLAN report message, and defines rules of interaction and the handling process of two kinds of messages.For convenience of description, the rules of interaction of these two kinds of messages and handling process are defined as MSVRP(MultipleSub-VLANRegistrationProtocol by the embodiment of the present invention, many private networks VLAN log-in protocol, or claim many inner VLAN log-in protocol), namely, the message inquired about for private network vlan information and report mutual between access switch and core switch, and relevant handling process, all follow the regulation of this agreement.Accordingly, in the embodiment of the present invention, private network VLAN query message is called MSVRP asks (MSVRPrequest) message, sub-VLAN(and private network VLAN is sent for core switch) inquiry, private network VLAN report message is called MSVRP reports (MSVRPreport) message, sends sub-VLAN(and private network VLAN for access switch) information.
First the form of the MSVRP protocol massages in the embodiment of the present invention is introduced below.The form of MSVRP protocol massages described below is only citing, does not form limitation of the scope of the invention.
(1) MSVRPreport message
The target MAC (Media Access Control) address of MSVRPreport message uses specific multicast mac address, as 01-80-C2-00-00-100.A Message(information is comprised in message) unit, AttributeType(attribute type) value is 0x03, private network vlan information is encapsulated in AttributeList(attribute list) in field.
As shown in Figure 2, in AttributeList, comprise VectorAttribute(vector attribute) and EndMark(end mark), wherein VectorAttribute can have 1 or multiple, for carrying vlan information; EndMark is 0x0000.VectorAttribute field comprises the VectorHeader(vector head of 2 bytes), the initial VLAN of FirstVLAN(of 2 bytes), and the Vector of 171 bytes.VectorHeader field wherein comprise 3bit LeaveAllEvent(use 000 represent), and the quantity of the NumberOfValues(value of 13bit), for illustration of VectorAttribute with VLAN number.The attribute status of VLAN and computational methods in Vector field, use property value and the computational methods of existing MVRP agreement, that is, indicate from which VLAN by FirstVLAN, each byte of Vector field represents the attribute status of 3 VLAN.Such as, the attribute status indicating VLAN2 is needed to be New, then: the value of FirstVLAN field is 2, represent from VLAN2, Vector field is 1 byte length, and 3 property values are wherein followed successively by New, MT, MT, represents that the attribute of VLAN2 is New, VLAN3 and VLAN4 without proper notice.
In MSVRPreport message, VLAN attribute status 4 kinds, this 4 attribute value is respectively:
0: i.e. New, represent that corresponding VLAN is the VLAN of new statement.This attribute for configuring MSVRP client functionality, or port carry out VLAN switch time, in the MSVRPreport message of initiatively initiating.
1: i.e. JoinIn, represent that corresponding VLAN was stated.For responding in the MSVRPreport message of MSVRPrequest message.
4: i.e. MT, represent that corresponding VLAN does not exist, without proper notice.Be applied in MSVRPreport message when initiatively initiating or respond MSVRPrequest.
5: i.e. LV, represent and nullify corresponding VLAN.For deleting MSVRP client functionality, or when port carries out VLAN switching, initiatively initiate the notice of vlan information.
(2) MSVRPrequest message
The form of MSVRPrequest message as shown in Figure 3.The object MAC of MSVRPrequest message uses specific multicast mac address, and as 01-80-C2-00-00-100, to comprise Message, an AttributeType value in message be 0x02, AttributeList value is full 0.
Optionally, MSVRPrequest message also can be unicast message, that is, the target MAC (Media Access Control) address of MSVRPrequest message, and unicast mac address can be used to send.
Below to adopt client/server approach, the embodiment of the present invention is described in detail.
First be illustrated as below and realize the embodiment of the present invention, need the configuration operation carried out on access switch and core switch, and the relevant regulations of MSVRP agreement.
(1) configuration operation on access switch, and the regulation of MSVRP client behavior
On access switch access user equipment port on configure MSVRP client functionality.There are two kinds of configuration modes:
Configuration mode one: configure MSVRP client functionality on the port that access switch is connected with subscriber equipment.Preferably, can give tacit consent on all of the port be connected with subscriber equipment at access switch and configure this function.When cancelling MSVRP client functionality, as long as cancel MSVRP client functionality on corresponding port.
Configuration mode two: configure MSVRP client functionality on private network VLAN, like this, the port (i.e. subscriber equipment access port) access switch belonging to this VLAN is also just configured with MSVRP client functionality.Preferably, can give tacit consent to configure this function on all private network VLAN.When cancelling its MSVRP client functionality for the VLAN being configured with MSVRP client functionality, port access switch belonging to this VLAN also just eliminates MSVRP client functionality.
MSVRP client functionality is mainly used in realizing sending MSVRPreport message and receiving MSVRPrequest message.
As previously mentioned, the VLAN attribute carried in the MSVRPreport message that MSVRP client sends has 4 kinds: New(to show, and corresponding VLAN is the VLAN of new statement, this property value is 0), JoinIn(shows that corresponding VLAN is declared VLAN, this property value is 1), MT(shows that corresponding VLAN does not exist, without proper notice, this property value is 4), LV(shows that corresponding VLAN nullifies, this property value is 5).
Access switch sends the VLAN attribute carried in MSVRPreport message and message, can have several situation of following A, B, C, D:
A: after configure MSVRP client functionality on port, this port initiatively sends MSVRPreport message, in order to notice private network vlan information to core switch, in this message, for the added VLAN of this port, its property value is New, to state the existence of corresponding VLAN.Such as, after the above-mentioned configuration mode one of employing configures MSVRP client functionality on port, if this port is current add VLAN2, in the MSVRPreport message that then this port sends, the value of the FirstVLAN field in VectorAttribute field is 2, Vector field is 1 byte length, and 3 property values are wherein followed successively by New, MT, MT, represents that the attribute of VLAN2 is New, VLAN3 and VLAN4 without proper notice.Certainly, if adopt above-mentioned configuration mode one to be configured with MSVRP client functionality on certain port, but this port does not also add any VLAN at present, then this port also can not send MSVRPreport message.In like manner, after adopting above-mentioned configuration mode two to configure MSVRP client functionality on port, also send MSVRPreport message in the manner described above.
B: when carrying out VLAN at the port configuring MSVRP client functionality and switching, this port initiatively sends MSVRPreport message, in order to notice private network vlan information to core switch, in this message, for the VLAN after switching belonging to this port, its property value is New, in order to state the existence of this VLAN, for the VLAN switched belonging to this port front, its property value is LV, in order to nullify this VLAN.Such as, certain port arrangement MSVRP client functionality, this port is current belongs to VLAN2, after this port is switched to VLAN3 from VLAN2, this port sends MSVRPreport message, and the value of the FirstVLAN field in this message in VectorAttribute field is 2, Vector field is 1 byte length, 3 property values are wherein followed successively by LV, New, MT, represent that the attribute of VLAN2 be the attribute of LV, VLAN3 is New, VLAN4 without proper notice.
C: when cancelling this function on the port configuring MSVRP client functionality, this port initiatively sends MSVRPreport message, in order to notice private network vlan information to core switch, in this message, for the added VLAN of this port, its property value is LV, to state cancellation corresponding VLAN.Such as, after the above-mentioned configuration mode one of employing configures MSVRP client functionality on port, if cancel the MSVRP function on this port, because this port adds VLAN2, then this port sends in MSVRPreport message, and the value of the FirstVLAN field in VectorAttribute field is 2, Vector field is 1 byte length, 3 property values are wherein followed successively by LV, MT, MT, represent that the attribute of VLAN2 is LV, VLAN3 and VLAN4 without proper notice.Certainly, when cancelling the MSVRP client functionality that certain port configures, if this port does not also add any VLAN at present, then this port also can not send MSVRPreport message.In like manner, after adopting above-mentioned configuration mode two to cancel MSVRP client functionality on port, also send MSVRPreport message in the manner described above.
After D, access switch receive the MSVRPrequest message of core switch transmission, propagated in the private network VLAN of this message institute requesting query by this message, wherein, the private network VLAN of institute's requesting query determines according to the VLANTag carried in this message.After port access switch having configured MSVRP client functionality receives the MSVRPrequest message that core switch sends, return MSVRPreport message, in order to notice private network vlan information to core switch, in this message, for the added VLAN of this port, its property value is JoinIn.Such as, configure MSVRP client functionality and after the port belonging to VLAN2 receives MSVRPrequest message, return MSVRPreport message, the value of the FirstVLAN field in this message in VectorAttribute field is 2, Vector field is 1 byte length, 3 property values are wherein followed successively by JoinIn, MT, MT, represent that the attribute of VLAN2 is JoinIn, VLAN3 and VLAN4 without proper notice.
In addition, after the above-mentioned configuration mode one of employing configures MSVRP client functionality on certain port, if this port not yet adds any VLAN at present, when then this port being added VLAN, this port initiatively sends MSVRPreport message, in this message, for the VLAN that this port adds, its property value is New.After this, if this port is left this VLAN, then this port initiatively sends MSVRPreport message, and in this message, for the VLAN that this port leaves, its property value is LV.
In order to improve the transmission of reliability and minimizing message, after port initiatively sends MSVRPreport message, start the timer that this port is corresponding, the duration of this timer is be not less than the Cycle Length that core switch sends MSVRPrequest message, preferably, the Cycle Length times over sending MSVRPrequest message can be set to.For convenience of description, in the present embodiment by this timer called after listentimer.After access switch receives the MSVRPrequest message of core switch transmission, reply MSVRPreport message according to this MSVRPrequest message, and reset listentimer timer corresponding to this port.If listentimer timer expiry, then illustrate in listentimer timer timing time, this port does not receive the MSVRPrequest message of the corresponding private network VLAN of requesting query, then MSVRP client thinks that core switch does not receive the corresponding MSVRPreport message of this client active transmission, this MSVRP client sends MSVRPreport message again, and deletes this listentimer timer.In the MSVRPreport message again sent, for the VLAN belonging to this port, its property value is New.
Optionally, the function of vlan traffic monitoring and respective handling can also be realized on access switch.
Do not have the PC of carry PC or carry not power under some private network VLAN, in order to reduce message interaction for these private networks VLAN and process, economizing on resources, vlan traffic monitoring function can be increased on access switch.In a period of time length, when certain private network VLAN does not have flow (namely this private network VLAN is in non operating state), access switch does not report the information of this private network VLAN to core switch, to reach the object of saving resource.
Concrete, when the port of access switch needs (such as to need initiatively to send MSVRPreport message by during MSVRPreport message report private network vlan information, or when needing to return MSVRPreport message according to the MSVRPrequest message received), before carrying out the report of private network vlan information, judge that whether the VLAN that will report is in running order, if in running order, then noticed the information of this VLAN by MSVRPreport message, otherwise, do not notice the information of this VLAN.Concrete, if this port includes multiple VLAN, the VLAN wherein had is in running order, and some VLAN are in non operating state, then, in the MSVRPreport message that this port sends, for the VLAN being in non operating state, then do not carry its vlan information; If this port only comprises a VLAN and this VLAN is in non operating state, or be configured with multiple VLAN but be all in non operating state, then not sending MSVRPreport message, to reduce the mutual of MSVRP message, saving resource.
Vlan traffic monitor mode (namely judging the mode whether VLAN is in running order) has two kinds:
Monitor mode one: by checking the mac address table on access switch, for the VLAN enabled on the port of MSVRP client functionality, check the MAC Address list item whether having this VLAN in mac address table, if do not have, then think that this VLAN is in non operating state, otherwise think that this VLAN is in running order;
Monitor mode two: each port open timer enabling MSVRP client functionality, if this port does not have flow in timer timing time, then think that the VLAN on this port is in non operating state, otherwise think that the VLAN on this port is in running order.Concrete, the port of each MSVRP of enabling client functionality can add up the flow of each VLAN on this port the cycle, and the flow recorded in each cycle, when needs judge that whether VLAN is in running order, can judge according to the statistical value of a current nearest vlan traffic measurement period.
Consider and access switch may have multiple port to be all configured with identical VLAN, and the MSVRP client functionality all enabled.If in these ports, a port is had to have sent a MSVRPreport message, because MSVRPreport message is multicast message, therefore other port being configured with identical VLAN also can receive this MSVRPreport message, therefore, MSVRP agreement specifies: the port being configured with MSVRP client functionality, does not process, can directly abandon for the MSVRPreport message received.
(2) configuration operation on core switch, and the regulation of MSVRP server end behavior
The VLAN virtual interface that core switch enables RoutingQinQ function configures MSVRP server capability, be mainly used in regularly sending MSVRPrequest message, for the private network vlan information of inquiring client terminal, and safeguard private network vlan table item (hereinafter referred to as sub-VLAN list item).Primaryly in sub-VLAN list item comprise following content: the ID of private network VLAN, the ID of corresponding public network VLAN, can further include the mac address information of access switch.
The port of configuration MSVRP server capability can receive MSVRPreport message, the private network vlan information in analytic message, and safeguards sub-VLAN list item; MSVRPrequest message can be regularly sent according to the sub-VLAN list item safeguarded.Each private network vlan table item that Sub-VLAN list item is safeguarded all starts corresponding timer, the timing duration of this timer is the transmission cycle duration being not less than MSVRPrequest message, preferably, many times of the Cycle Length sending MSVRPrequest message can be set to.For convenience of describing, by this timer called after holdtimer in the present embodiment.It is after the private network vlan information of New or JoinIn that core switch receives attribute at every turn, matches corresponding private network vlan table item and resets corresponding holdtimer timer.If holdtimer timer expiry, then the MSVRPreport message not receiving corresponding private network VLAN in the timing time of this timer is described, then core switch deletes the record that in sub-VLAN table, this private network VLAN is corresponding.
Preferably, the port of configuration MSVRP server capability also can start timer, the timing length of this timer is less than the transmission Cycle Length of MSVRPrequest message, preferably, can be set to 1/1 to five/10th of the transmission Cycle Length of MSVRPrequest message.For convenience of describing, this timer called after looktimer.When the main purpose starting looktimer timer is to prevent the MSVRPreport message receiving a large amount of identical VLAN, MSVRP server is caused ceaselessly to revise sub-VLAN list item.If the port of configuration MSVRP server capability receives the MSVRPreport message of identical vlan information in looktimer timer timing time, then do not refresh the holdtimer timer of corresponding list item in sub-VLAN table.
Concrete, a kind of preferably implementation is: the port of configuration MSVRP server capability is each private network VLAN configuration looktimer timer in sub-vlan; After the port of configuration MSVRP server capability receives MSVRPreport message, parse noticed private network vlan information, corresponding looktimer timer is checked according to this vlan information, if this looktimer timer is (namely not overtime) in timing course, then abandon this MSVRPreport message received, if this looktimer timer is overtime, reset this looktimer timer, and safeguard corresponding sub-vlan list item according to the MSVRPreport message received, comprise the holdtimer timer resetting corresponding sub-vlan list item.
After the port of configuration MSVRP server capability receives MSVRPreport message, according to the difference of the VLAN attribute wherein carried, process operation is also distinguished to some extent, specifically can comprise following situation:
A: if the VLAN attribute parsed in MSVRPreport message is New or JoinIn, then inquire about in sub-VLAN table and whether there is the list item of this attribute corresponding to the VLAN of New or JoinIn, if exist, then reset the holdtimer timer of this list item; If do not exist, then in sub-VLAN table, add list item corresponding to this VLAN, corresponding holdtimer timer is set.
B: if the VLAN attribute parsed in MSVRPreport message is LV, it is then the sub-VLAN list item of the VLAN inquiry correspondence of LV according to this attribute, reset the holdtimer timer of this list item, and send MSVRPrequest message, for inquiring about the vlan information that this attribute is LV.After this described in process ditto, comprising: if having received the MSVRPreport message for noticing this vlan information in this holdtimer timer timing time, then reset the holdtimer timer that this VLAN is corresponding; If this holdtimer timer expiry, then delete the record that in sub-VLAN, this private network VLAN is corresponding.
C: if the VLAN attribute parsed in MSVRPreport message is MT, then core switch does not process this VLAN.
When core switch sends MSVRP message, according to sub-VLAN list item, encapsulate two-layer VLANTag, outside VLAN is enable the VLAN virtual interface VLAN of MSVRP server capability, and inner VLAN is the corresponding private network VLAN recorded in sub-VLAN.The MSVRPreport message carrying two-layer VLANTag is sent to convergence switch through the port of configuration MSVRP server capability.
Consider when on access switch, a port belongs to multiple VLAN, in sub-VLAN table, the MACID of this access switch to there being many list items, can send corresponding MSVRPrequest message for each list item when core switch sends MSVRPrequest message.In order to reduce the transmission of message, when in sub-VLAN table, when having the MAC Address of multiple list item identical in the list item that identical public network VLAN is corresponding, only send a MSVRPrequest message for these list items, this MSVRPrequest message inner VLAN Tag is a certain private network VLAN in these list items.
Such as, in sub-VLAN table, the corresponding private network VLAN2 and private network VLAN3 of public network VLAN100, the MAC Address of the access switch that private network VLAN2 is corresponding with private network VLAN3 is identical, then identical for MAC Address and belong to the list item of same public network VLAN, only need the outer VLAN tag sent to be VLAN100, inner VLAN tag is the MSVRPrequest message of VLAN2.
(3) configuration operation on convergence-level switch, and the behavior regulation of convergence-level switch
Configuration operation on convergence-level switch is same as the prior art.
After convergence switch receives MSVRPrequest message, in outer VLANTag place VLAN, carry out transparent transmission.Because the interface enabling QinQ function that RoutingQinQ networking requirement convergence-level switch is connected with access switch, and enable the PVID(PortVLANID of the port of QinQ function, port vlan ID, i.e. port default VLAN) value is identical with the VLAN value of VLAN virtual interface core switch being enabled RoutingQinQ, therefore MSVRPrequest message is by after the port of convergence switch being enabled QinQ, divests outside VLAN Tag.It is that the message of private network VLAN is sent to access switch that MSVRPrequest message only carries one deck VLAN.
Because it is according to the private network vlan information packaging V LANTag's recorded in sub-VLAN list item that core switch sends MSVRPrequest message, therefore, MSVRPrequest message can be dealt into all VLAN in sub-VLAN list item, therefore, when access switch receives MSVRPrequest message, also just can think that core switch have received its MSVRPreport message.
After core switch receives the message sent from Internet network, the ARP corresponding according to the object IP address lookup of this message; If do not match corresponding ARP, then inquire about the sub-VLAN list item of this plant maintenance, according to all private network VLAN inquired, encapsulation ARP request message is also sent to corresponding VLAN.The corresponding ARP request message of each private network VLAN, each ARP request message comprises twice VLAN encapsulation, and outside VLAN is the public network VLAN recorded in corresponding list item, and inner VLAN is corresponding private network VLAN.After core switching device receives arp reply message, according to response message study ARP, and according to study to ARP the message sent from Internet network encapsulated and is sent to target UE.
In order to the clearer explanation embodiment of the present invention, below for the networking shown in Fig. 4, describe the specific implementation process of the embodiment of the present invention in detail.
As shown in Figure 4, equipment 1 and equipment 2 are access switch, are mainly used in being connected with subscriber equipment.Equipment 3 is convergence switch, itself sw3_p1 and sw3_p2 interface enabling QinQ function, and the message for equipment 1 and equipment 2 being sent stamps the Tag of outside VLAN tag(and VLAN100 or VLAN200), then message is sent to core switch.Equipment 4 is core switch, its sw4_p1 port is Trunk mouth, the VLAN virtual interface of corresponding VLAN100 and VLAN200 in the diagram, enable RoutingQinQ function, VLAN100 and VLAN200 virtual interface configures second-dot1qVLANid, be mainly used in divesting two-layer VLANTag to user's message, then carry out three layers of forwarding; For the message that external network is sent, when entering sw4_p1 port, corresponding two-layer VLANTag being stamped to message, being sent to corresponding subscriber equipment.The VLAN virtual interface enabling RoutingQinQ function on the device 4 configures MSVRP server capability.
After enable MSVRP client functionality on the sw1_p1 port of equipment 1, sw1_p1 port sends MSVRPreport message, and (this message is multicast message, target MAC (Media Access Control) address is specific multicast MAC Address), the value of the FirstVLAN field in this message in VectorAttribute field is 2, Vector field is 1 byte length, and 3 property values are wherein followed successively by New, MT, MT.After sw1_p1 port being enabled MSVRP client functionality, this port also starts corresponding listentimer timer, and the duration of this timer is 5s.
After this MSVRPreport message arrives the sw3_p1 port of equipment 3, due to this port be QinQ port, pvid is VLAN100, therefore the MSVRPreport message entered is stamped to the outside VLAN Tag of VLAN100, and is forwarded to equipment 4.
After equipment 4 receives this MSVRPreport message, the property value parsing the VLAN2 carried in this MSVRPreport message is New, is indicated as the VLAN of new statement; Equipment 4 sub-VLAN that it is safeguarded according to the information inquiry of the VLAN2 parsed shows, and does not inquire corresponding list item, in sub-VLAN table, therefore creates the list item of this VLAN, and arrange the holdtimer timer of this list item.
In like manner, when other port (sw1_p2, sw1_p3, sw1_p4) at equipment 1, and after sw2_p1, sw2_p2, sw2_p3, sw2_p4 interface enabling MSVRP client functionality of equipment 2, MSVRPreport message can be triggered equally send, safeguard corresponding sub-VLAN list item to make equipment 4 according to the MSVRPreport message received.
By above handling process, the Sub-VLAN list item (table 1.2 shows the MAC Address of the access switch that each MACID is corresponding in table 1.1) as Suo Shi table 1.1 that equipment 4 is safeguarded, the duration of Holdtimer is wherein 2min(and 120000ms).
Table 1.1
Table 1.2
MAC ID |
MAC Address |
Public network VLAN ID |
1 |
00-00-00-00-00-01 |
100 |
2 |
00-00-00-00-00-02 |
100 |
3 |
00-00-00-00-00-03 |
100 |
4 |
00-00-00-00-00-04 |
100 |
5 |
00-00-00-00-00-05 |
200 |
6 |
00-00-00-00-00-06 |
200 |
7 |
00-00-00-00-00-07 |
200 |
8 |
00-00-00-00-00-08 |
200 |
Transmission Cycle Length every 1000ms(and MSVRPrequest message), equipment 4 is for each list item in its Sub-VLAN table safeguarded, MSVRPrequest message is sent by sw4_p1 port, this MSVRPrequest message encapsulates two-layer VLANTag, skin is the VLAN of VLAN virtual interface, and internal layer is the private network VLAN recorded in sub-VLAN.Such as, equipment 4 is for (private network VLAN2 in table 1, public network VLAN100) corresponding to list item, the MSVRPrequest message of generation outside VLAN Tag to be VLAN100, inner VLAN Tag be VLAN2, and send this MSVRPrequest message from the VLAN virtual interface of VLAN100.This MSVRPrequest message is multicast message, and target MAC (Media Access Control) address is specific multicast mac address.
After the MSVRPrequest message that equipment 4 sends arrives equipment 3, equipment 3 sends to access switch after divesting outside VLAN Tag.Such as, it be VLAN100, inner VLAN Tag is after the MSVRPrequest message of VLAN2 that equipment 4 receives outside VLAN Tag, and the pvid due to sw3_p1 port is VLAN100, and therefore this port divests the outer VLAN tag of VLAN100, is sent to equipment 1.
After equipment 1 receives MSVRPrequest message, this message is propagated in VLAN2.When the sw1_p1 port accepts of equipment 1 is after this MSVRPrequest message, because the VLAN carried in VLAN that this port configures and this MSVRPrequest message matches, therefore reply the MSVRPreport message carrying the information of VLAN belonging to the port.During owing to enabling MSVRP client functionality on sw1_p1 port, this port had sent MSVRPreport message, and in the MSVRPreport message therefore now sent, the property value of VLAN2 is JoinIn, represented that this VLAN stated.Sw1_p1 port, after receiving this MSVRPrequest message, also resets corresponding listentimer timer.
After this, this MSVRPreport message is transparent to equipment 4 by equipment 3.After equipment 4 receives this MSVRPreport message, the property value parsing the private network VLAN2 carried in this MSVRPreport message is JoinIn; Equipment 4 inquires about its sub-VLAN table safeguarded according to the vlan information parsed, and inquires corresponding list item, therefore resets the holdtimer timer of this list item.
In like manner, when other port (sw1_p2, sw1_p3, sw1_p4) of equipment 1, and after sw2_p1, sw2_p2, sw2_p3, sw2_p4 port accepts of equipment 2 to MSVRPrequest message, MSVRPreport message can be returned, safeguard corresponding sub-VLAN list item to make equipment 4 according to the MSVRPreport message received.
After the VLAN4 belonging to the sw1_P3 port of equipment 1 is switched to VLAN6, sw1_P3 port sends MSVRPreport message, resets corresponding listentimer timer.The value of the FirstVLAN field in the VectorAttribute field in this message is 4, Vector field is 1 byte length, 3 property values are wherein followed successively by LV, MT, New, represent the attribute of VLAN4 to be the attribute of LV, VLAN5 be that the attribute of MT, VLAN6 is New.After equipment 4 receives this MSVRPreport message, the attribute parsing VLAN6 is New, therefore (public network VLAN100 is inserted, private network VLAN6) corresponding list item, and starting corresponding Holdtimer timer, the attribute parsing VLAN4 is LV, therefore resets (public network VLAN100, private network VLAN4) the Holdtimer timer of corresponding list item, and send the MSVRPrequest message for inquiring about VLAN4.After this, due to the Holdtimer timer expiry of the list item of (public network VLAN100, private network VLAN4) correspondence, therefore delete list item corresponding to (public network VLAN100, private network VLAN4).After above-mentioned process, sub-VLAN list item (explanations are omitted heres the list item for MAC Address corresponding to MACID each in record sheet 2.1) as Suo Shi table 2.1:
Table 2.1
When cancelling the MSVRP client functionality of sw1_p2 port on equipment 1, sw1_p2 port sends MSVRPreport message, the value of the FirstVLAN field in the VectorAttribute field in this message is 3, Vector field is 1 byte length, 3 property values are wherein followed successively by LV, MT, MT, represent that the attribute of VLAN3 be the attribute of LV, VLAN4 and VLAN5 is MT.After equipment 4 receives this MSVRPreport message, reset the Holdtimer timer of list item corresponding to (public network VLAN100, private network VLAN3), and send the MSVRPrequest message for inquiring about VLAN3.After this, due to the Holdtimer timer expiry of the list item of (public network VLAN100, private network VLAN3) correspondence, therefore delete list item corresponding to (public network VLAN100, private network VLAN3).After above-mentioned process, sub-VLAN list item (explanations are omitted heres the list item for MAC Address corresponding to MACID each in record sheet 3.1) as Suo Shi table 3.1:
Table 3.1
After this, because the virtual interface of 100 does not receive the MSVRPreport message carrying private network VLAN5 information to public network VLANID on equipment 4 for a long time, the holdtime timer time of corresponding list item is reduced to 0, if now also do not receive the MSVRPreport message carrying private network VLAN5 information, be then that the list item of 0 is deleted from sub-VLAN table by this holdtime timer value.After above-mentioned process, sub-VLAN list item (explanations are omitted heres the list item for MAC Address corresponding to MACID each in record sheet 4.1) as Suo Shi table 4.1:
Table 4.1
The sw1_P3 port of equipment 1 is after switching VLAN, the MSVRPrequest message (now sw1_P3 port belongs to VLAN6) of the information carrying VLAN6 is not received in 5s, corresponding listentimer timer expiry, sw1_p3 port sends MSVRPreport message, and resets corresponding listentimer timer.The value of the FirstVLAN field in the VectorAttribute field in this message is 6, Vector field is 1 byte length, and 3 property values are wherein followed successively by New, MT, MT.After this, the handling process of this message ditto described in, be not described in detail in this.
After equipment 4 receives the message coming from Internet, the ARP corresponding according to the object IP address lookup of this message, does not inquire corresponding list item, therefore sends ARP request message according to its Sub-VLAN list item safeguarded.The Sub-VLAN list item safeguarded for equipment 4 is as table 4.1, and equipment 4 sends 6 ARP request messages, and its skin and internal memory VLANTag encapsulation are respectively:
ARP request message 1: outside VLAN Tag is 100, inner VLAN Tag is 2;
ARP request message 2: outside VLAN Tag is 100, inner VLAN Tag is 6;
ARP request message 3: outside VLAN Tag is 200, inner VLAN Tag is 5;
ARP request message 4: outside VLAN Tag is 200, inner VLAN Tag is 6;
ARP request message 5: outside VLAN Tag is 200, inner VLAN Tag is 7;
ARP request message 6: outside VLAN Tag is 200, inner VLAN Tag is 8.
After equipment 4 receives arp response message, carry out ARP study, and obtain MAC Address corresponding to object IP address according to the ARP learning to arrive, encapsulate this message and forward.
Based on the networking shown in Fig. 4, Fig. 5 shows the flow process that the private network vlan information under concrete scene administers and maintains.As shown in Figure 5, this flow process can comprise:
Step 1: after the sw1_p1 interface enabling MSVRP client functionality of equipment 1, send a MSVRPreport message, the VLANTag of this message is VLAN2, and the attribute of the VLAN2 carried in this message is New.
Step 2: the sw3_p1 port accepts of equipment 3, after this MSVRPreport message, for this message stamps the outside VLAN Tag of VLAN100, and is sent to equipment 4.
Step 3: the sw4_p1 port accepts of equipment 4 is after the MSVRPreport message of the two-layer VLANTag of band, resolving the private network vlan information carried in MSVRPreport message is VLAN2, VLAN2 is recorded in sub-VLAN table as private network VLAN, and starts Holdtimer timer.
Step 4: the length sending the cycle through 1000ms(and MSVRPrequest message) after, equipment 4 encapsulates MSVRPrequest message according to sub-VLAN list item and sends, and this message encapsulates two-layer VLANTag, and outer VLAN tag is VLAN100, and inner VLAN tag is VLAN2.
Step 5: after equipment 3 receives this message, peels off the outer VLAN tag of VLAN100, retains the Tag of VLAN2, and this message is sent to equipment 1 by sw3_p1 port.
Step 6: it is after the MSVRPrequest message of VLAN2 that equipment 1 receives this VLANTag, propagates in VLAN2.After Sw1_p1 port accepts to this MSVRPrequest message, because this port belongs to VLAN2, therefore send a MSVRPreport message, the VLANTag that goes out of message is VLAN2, and the attribute of the VLAN2 carried in this message is JoinIn.
Step 7 ~ 8: this MSVRPreport message is transparent to after equipment 4 through equipment 3, equipment 4 safeguards corresponding Sub-VLAN list item according to this message.
By describing above and can finding out, the embodiment of the present invention safeguards private network vlan table item by the mode that protocol massages is mutual, reduces the VLAN configuration of RoutingQinQ.In addition, by carrying out message interaction between access switch and core switch, make core switch private network VLAN can be detected, like this, when external flow is sent to subscriber equipment by core switch, the VLAN scope that core switch sends ARP request message can be reduced, reduce ARP and flood, accelerate ARP pace of learning.
The above embodiment of the present invention mainly by carrying vlan information to realize in MSVRP message, and the MSVRP message being used for carrying vlan information uses specific multicast address to send.During specific implementation; also vlan information can be carried by the message of other agreement or similar MSVRP agreement; or use other multicast address to realize the embodiment of the present invention, if thought and the above embodiment of the present invention is similar all should within protection scope of the present invention.
Based on identical technical conceive, the invention process additionally provides a kind of network equipment.
The structural representation of Access Layer switching equipment in the QinQ networking that Fig. 6 provides for the embodiment of the present invention.As shown in the figure, this switching equipment can comprise: inquiry response module 61, report initiation module 62, wherein:
Inquiry response module 61, for receive at this equipment core switching device send private network VLAN query message after, private network VLAN report message is sent to core switching device according to described private network VLAN query message, carrying private network vlan information in described private network VLAN report message, safeguarding corresponding private network vlan table item for triggering described core switching device;
Report initiation module 62, after private network VLAN configuration variation after carry out many private networks VLAN log-in protocol functional configuration at the port of this equipment or on the port of described access switching equipment, private network VLAN report message is sent to core switching device, carrying private network vlan information in described private network VLAN report message, safeguarding corresponding private network vlan table item for triggering described core switching device.
Wherein, the destination address of described private network VLAN query message and described private network VLAN report message is multicast mac address.
Concrete, inquiry response module 61 specifically for: the private network VLAN query message received is propagated in the private network VLAN of institute's requesting query; The port accepts that this equipment configures the private network VLAN of requesting query to some extent sends private network VLAN report message after described private network VLAN query message, and the attribute wherein indicating the private network VLAN of institute's requesting query is JoinIn.
Concrete, report initiation module 62 specifically for: after the port at this equipment connection subscriber equipment configuring many private networks VLAN log-in protocol function, private network VLAN report message is sent by this port, the information of the private network VLAN belonging to this port is carried in described private network VLAN report message, wherein, the attribute of the private network VLAN belonging to this port is New; Or, after the port at this equipment connection subscriber equipment being cancelled many private networks VLAN log-in protocol function, private network VLAN report message is sent by this port, the information of the private network VLAN belonging to this port is carried in described private network VLAN report message, wherein, the attribute of the private network VLAN belonging to this port is LV.
Concrete, report initiation module 62 specifically for: if the private network VLAN of the port of this equipment switches, then send private network VLAN report message to core switching device, wherein carry the private network vlan information before switching and after switching, wherein, the attribute of the VLAN before switching is LV, and the attribute of the VLAN after switching is New.
Further, after report initiation module 62 sends private network VLAN report message, start the timer corresponding with transmit port, the duration of described timer is not less than the Cycle Length that core switching device sends private network VLAN query message; And when the timer times out, reset this timer, and send private network VLAN report message from the port of correspondence, wherein carry the vlan information belonging to this port, wherein, the attribute of the VLAN belonging to this port is New.Accordingly, inquiry response module 61 also for, when this equipment receives private network VLAN query message, and after sending private network VLAN report message, and reset timer corresponding to receiving port.
Concrete, inquiry response module 61, before sending private network VLAN report message to core switching device, judges whether have flow in the private network VLAN that will report; There is flow in the private network VLAN reported if judge, then send private network VLAN report message to core switching device, otherwise abandon sending private network VLAN report message to core switching device.Or/and report initiation module 62, before sending private network VLAN report message to core switching device, judges whether have flow in the private network VLAN that will report; There is flow in the private network VLAN reported if judge, then send private network VLAN report message to core switching device, otherwise abandon sending private network VLAN report message to core switching device.
The structural representation of core layer switching equipment in the QinQ networking that Fig. 7 provides for the embodiment of the present invention.As shown in the figure, this switching equipment can comprise: private network VLAN enquiry module 71, private network vlan table item maintenance module 72, further, also can comprise ARP processing module 73, wherein:
Private network VLAN enquiry module 71, for the private network vlan table item according to this plant maintenance, sends private network VLAN query message according to setting cycle to access switching equipment, carries the private network vlan information of institute's requesting query in described private network VLAN query message; Wherein, private network vlan table item comprises the mark of private network VLAN, the mark of public network VLAN;
Private network vlan table item maintenance module 72, for receive at this equipment access switching equipment send private network VLAN report message after, according to the private network vlan information carried in the private network VLAN report message received, safeguard corresponding private network vlan table item.
Wherein, the destination address of described private network VLAN query message and described private network VLAN report message is multicast mac address.
Further, private network vlan table item maintenance module 72 also for, for each private network VLAN in private network vlan table arranges corresponding timer.Private network vlan table item maintenance module 72 is after this equipment receives private network VLAN report message, according to the private network vlan information carried in described private network VLAN report message, the timer that inquiry is corresponding, if the timer of correspondence is not overtime, then abandon the private network VLAN report message received, if the timer expiry of correspondence, then reset the timer of described correspondence, and according to the private network vlan information carried in described private network VLAN report message, safeguard corresponding private network vlan table item.
Concrete, private network VLAN enquiry module 71 specifically for: when the cycle sending private network VLAN query message arrives, inquiry private network vlan table item, if inquire corresponding to the access switching equipment MAC address in multiple private network vlan table items of same public network VLAN identical, then send a private network VLAN query message for described multiple private network vlan table item, the outside VLAN of described private network VLAN query message is the public network VLAN that described multiple private network VLAN is corresponding, inner VLAN is the private network VLAN that in described multiple private network vlan table item, any one list item is corresponding.
Concrete, private network vlan table item maintenance module 72 specifically for: resolve the private network VLAN report message that this equipment receives, and the private network vlan table item that coupling is corresponding; If the attribute parsing private network VLAN is New or JoinIn, and match corresponding private network vlan table item, then reset the timer of the private network vlan table item correspondence matched; If the attribute parsing private network VLAN is New or JoinIn but do not match corresponding private network vlan table item, then adds corresponding private network vlan table item, and the timer of this private network vlan table item correspondence is set; If the attribute parsing private network VLAN is LV, and match corresponding private network vlan table item, then reset the timer of the private network vlan table item correspondence matched, and send private network VLAN query message, described private network VLAN query message is the private network VLAN of LV for the attribute that query parse goes out; If the timer expiry of private network vlan table item correspondence, then delete the private network vlan table item that this timer is corresponding.
Concrete, ARP processing module 73 for receive at this equipment external network send message after, the ARP list item corresponding according to the object IP matching addresses of described message, if do not match, then inquire about all private network vlan table items of this plant maintenance, and send ARP request message to the private network VLAN of each private network vlan table item correspondence.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a station terminal equipment (can be mobile phone, personal computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should look protection scope of the present invention.