It is a kind of realize method that the MAC Address of local terminal MEP and distal end MEP are mutually bound and
System
Technical field
The present invention relates to the OAM of Ethernet (Operation Administration and Maintenance, operation pipes
Reason is safeguarded) MAC of technical field more particularly to LB (LoopBack, loopback) function study distal end MEP by CFM a kind of
The method of location.
Background technology
As important Ethernet link grade OAM, CFM (Connectivity Fault Management, connectivity fault
Management) it is general for realizing the end-to-end OAM monitoring and management function, being widely used in PTN device of operation layer.
Higher and higher with the complexity of network environment, the configuration scene of CFM also becomes complicated therewith.In the configuration of CFM
In the process, it is desirable that the MEP of local terminal completes the binding to the mark and port mac address of distal end MEP.Existing CFM configuration modes
There are two types of:
One, need configuration MEP port between enable CC function after, by interaction of the CCM messages between MEP come
Learn respective MAC Address and be completed in the binding of MEP marks, after being opened due to CC functions, can continue between equipment according to setting
The frequency of (most fast 300 per second) set interacts CCM messages, can sacrifice certain network bandwidth and CPU process resources.
If two, without enabled CC under interface, it is necessary to artificially inquire the port mac of opposite end MEP by way of static
Behind address, realize that binding, not only inconvenient in this way but also underaction are unfavorable for the change and expansion of network by hand.
Invention content
Present invention seek to address that problem as described above.Specifically, the present invention provides a kind of Fast Learning distal end MEP's
The method and its system of MAC Address.
Present invention firstly provides a kind of methods realized the MAC Address of local terminal MEP and distal end MEP and mutually bound, including with
Lower step:
S1:Obtain the mark of distal end MEP;
S2:Local terminal MEP multicasts send first message message, include the local terminal MEP in the first message message
The first MAC Address and the mark;
S3:By first MAC Address, address sends the first response to distal end MEP corresponding with the mark as a purpose
Message includes the second MAC Address of the distal end MEP in first response message;
S4:Second MAC Address is associated with the mark of distal end MEP, complete local terminal MEP and distal end MEP's
The binding of MAC Address.
The method mutually bound according to MAC Address provided by the invention, wherein the step S1 is by executing CFM agreements
In LB orders obtain the mark of distal end MEP.
The method mutually bound according to MAC Address provided by the invention, wherein further include judging institute before the step S2
Distal end MEP is stated whether with the associated step of the second MAC Address, is specifically included:
The study MAC Address and static binding MAC Address of distal end MEP described in identifier lookup based on the distal end MEP, if
Any of the study MAC Address and the static binding MAC Address be it is effective, then the distal end MEP with it is described
Second MAC Address is associated;
If the study MAC Address and the static binding MAC Address are invalid, the distal end MEP and described second
MAC Address is not associated.
The method mutually bound according to MAC Address provided by the invention, wherein as the distal end MEP and the 2nd MAC
When address is not associated, the first message message is multicast message, then the step S3 includes:
S31:The distal end MEP receives the multicast message and is parsed;
S32:Using first MAC Address as the destination address of first response message, and by the 2nd MAC
The encapsulation of first response message is completed as source address in location;
S33:First response message is sent to the local terminal MEP by the distal end MEP.
The method mutually bound according to MAC Address provided by the invention, wherein the step S4 includes:
S41:The local terminal MEP receives first response message and is parsed;
S42:Complete the binding of the MAC Address of the local terminal MEP and distal end MEP.
The present invention also provides a kind of system realized the MAC Address of local terminal MEP and distal end MEP and mutually bound simultaneously, including:
Identifier acquisition module, the mark for obtaining distal end MEP;
Message sending module is connected with the identifier acquisition module, for sending the to the distal end MEP for local terminal MEP
One message packet, wherein the first MAC Address comprising the local terminal MEP and the mark in the first message message;
Message responder module is connected with the message sending module, for supplying distal end MEP corresponding with the mark will
Address sends the first response message to first MAC Address as a purpose, wherein comprising described remote in first response message
Hold the second MAC Address of MEP;
Binding module is connected with the message responder module, for marking second MAC Address and the distal end MEP
The binding of the MAC Address of local terminal MEP and distal end MEP is completed in sensible association.
The system mutually bound according to MAC Address provided by the invention, wherein the identifier acquisition module passes through execution
LB orders in CFM agreements obtain the mark of distal end MEP.
The system mutually bound according to MAC Address provided by the invention, wherein in the identifier acquisition module and the report
Further include between literary sending module:
Be associated with judgment module, for judge the distal end MEP identify whether it is related to second MAC Address
Connection;Its judgment step includes:
The study MAC Address and static binding MAC Address of distal end MEP described in identifier lookup based on the distal end MEP, if
Any of the study MAC Address and the static binding MAC Address be it is effective, then the distal end MEP with it is described
Second MAC Address is associated;
If the study MAC Address and the static binding MAC Address are invalid, the distal end MEP and described second
MAC Address is not associated.
The system mutually bound according to MAC Address provided by the invention, wherein as the distal end MEP and the 2nd MAC
When address is not associated, the first message message is multicast message.
The system mutually bound according to MAC Address provided by the invention, wherein the message responder module sends first and answers
The step of answering message include:
The distal end MEP receives the multicast message and is parsed;
Using first MAC Address as the destination address of first response message, and second MAC Address is made
For source address, the encapsulation of first response message is completed;
First response message is sent to the local terminal MEP by the distal end MEP.
Compared with prior art, the present invention only needs to execute the LB functions of a CFM under local terminal MEP interfaces, you can learns
The MAC Address to distal end MEP is practised, the CC functions in CEM are both needed not rely on, with also not needing the MAC of static binding distal end MEP
Location and mark.Therefore the present invention can greatly reduce the occupancy to bandwidth and cpu resource, and realize the flexible migration of configuration.
Being described below for exemplary embodiment is read with reference to the drawings, other property features of the invention and advantage will
It is apparent from.
Description of the drawings
It is incorporated into specification and the attached drawing of a part for constitution instruction shows the embodiment of the present invention, and with
Principle for explaining the present invention together is described.In the drawings, similar reference numeral is for indicating similar element.Under
Attached drawing in the description of face is some embodiments of the present invention, rather than whole embodiments.Those of ordinary skill in the art are come
It says, without creative efforts, other attached drawings can be obtained according to these attached drawings.
Fig. 1 illustratively depicts the overall flow figure that the present invention carries out MAC Address binding;
Fig. 2 illustratively depicts the local terminal MEP of the present invention to the flow chart of distal end MEP transmission first message messages;
Fig. 3 illustratively depicts the distal end MEP of the present invention to the flow chart of local terminal MEP the first response messages of transmission;
Fig. 4 illustratively depicts the flow that the local terminal MEP of the present invention is mutually bound with the study MAC Address of distal end MEP
Figure;
Fig. 5 illustratively depicts the structural schematic diagram for the system that MAC Address of the invention is mutually bound.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
The all other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.It needs
Illustrate, in the absence of conflict, the features in the embodiments and the embodiments of the present application mutually can be combined arbitrarily.
Well known within the skill of those ordinarily skilled, CFM mainly realizes monitoring and management work(by following 5 messages
Can, respectively:
Continuity check message (CCM, Continuity Check Message):The CFM protocol data lists of one multicast
Member.MEP (safeguard joint endpoint) periodicity sending CCM, it is continuous when confirming MEP that MA (safeguarding joint) possesses by this MA
Property.
Link Trace messages (LTM, Link Trace Message):MEP initiate a CFM PDU be used for track from
MIP (safeguarding domain intermediate point) reaches the path of destination-mac address, until LTM reaches its purpose MEP or cannot be turned again
Hair.Each MP (maintenance point) in path can generate a LTR (Link Trace Reply, link trace response).
Link trace responds (LTR, Link Trace Reply):For MP after MEP receives LTM, transmission traces back to source
The unicast message of MEP.
Loopback message (LBM, Loop Back Message):MEP is sent to the unicast CFM PDU of specified MP, and expects to connect
Receive LBR.
Loopback responds (LBR, Loop Back Reply):After MP receives the LBM sent from MEP, transmission traces back to this
The unicast message of MEP.
The technical solution that MAC Address proposed by the present invention by local terminal MEP and distal end MEP is mutually bound, does not use used
Normal CC functions, but the MAC Address of distal end MEP is bound using LB (loopback) functions in CFM, it is reduced so as to reach
The purpose of resource occupation, flexible configuration.The present invention obtains the mark of distal end MEP by executing LB orders first;Pass through acquisition
Mark judges whether to have been carried out binding;If not yet binding, LBM multicast messages are sent by local terminal MEP and distal end MEP is answered
The mode of LBR unicast messages is answered to learn the MAC Address of distal end MEP and realize binding.
Wherein judge whether that the method for having been carried out binding is by the mark of acquisition:Made with the numerical value of acquired mark
For keyword, the study MAC Address and static binding MAC Address of distal end MEP are searched from mac address table.If the two MAC
Any one address in address is effective, indicate that, the static binding MAC Address of distal end MEP or has been completed MAC
The study of address.Conversely, when two addresses are all invalid, then need to learn MAC Address and realize binding.
The method that the MAC Address of the present invention is mutually bound specifically includes following steps:
S1:Obtain the mark of distal end MEP;
S2:First message message is sent to the distal end MEP, includes the local terminal MEP's in the first message message
First MAC Address;
S3:The distal end MEP by first MAC Address as a purpose address send the first response message, described first
Include the second MAC Address of the distal end MEP in response message;
S4:Second MAC Address is associated with the mark of distal end MEP, complete local terminal MEP and distal end MEP's
The binding of MAC Address.
Wherein, in step S1 of the invention the mark of distal end MEP is obtained by executing the LB orders in CFM agreements.
Preferably, further include before the step S2 judge the distal end MEP whether with the second MAC Address phase
The step of association, specifically includes:
The study MAC Address and static binding MAC Address of distal end MEP described in identifier lookup based on the distal end MEP, if
Any of the study MAC Address and the static binding MAC Address be it is effective, then the distal end MEP with it is described
Second MAC Address is associated;
If the study MAC Address and the static binding MAC Address are invalid, the distal end MEP and described second
MAC Address is not associated.
The method mutually bound according to MAC Address proposed by the present invention, wherein as the distal end MEP and the 2nd MAC
When address is not associated, the first message message is multicast message, then the step S3 includes:
S31:The distal end MEP receives the multicast message and is parsed;
S32:Using first MAC Address as the destination address of first response message, and by the 2nd MAC
The encapsulation of first response message is completed as source address in location;
S33:First response message is sent to the local terminal MEP by the distal end MEP.
The method mutually bound according to MAC Address proposed by the present invention, wherein the step S4 includes:
S41:The local terminal MEP receives first response message and is parsed;
S42:Complete the binding of the MAC Address of the local terminal MEP and distal end MEP.
The specific implementation mode of the present invention introduced below.
Fig. 1 shows that the local terminal MEP in the present invention sends the flow chart of first message message to distal end MEP, covers
State step S1 and S2.Referring to Fig. 1, after the basic configuration for completing CEM, local terminal MEP is by executing LB orders, from LB order lines
Middle parsing obtains the mark of distal end MEP, use the numerical value of the mark go to search as keyword the study MAC Address of distal end MEP with
Static binding MAC Address.If any one address in the two MAC Address is effective, indicate that, static binding is remote
It holds the MAC Address of MEP or has been completed the study of MAC Address.Conversely, when two addresses are all invalid, then need with learning MAC
Simultaneously realize binding in location.Continue to execute following flow.
LBM first message messages are packaged, destination address is multicast mac address.In one embodiment, the group
MAC Address total 48bit, preceding 44bit are broadcast as fixing address " 01 as defined in Y.1731 agreement:80:C2:00:00:3x ", rear 4bit
For the maintenance domain grade (totally 8 grades, numerical value 0 to 7) of local terminal MEP.Source address is the port mac address of local terminal MEP.Group installs
LBM after is forwarded to forwarding chip by issuing channel, and forwarding chip parses message, passes through bilaminar logic, inquiry
MAC table, finds the business outgoing interface of message, and distal end EMP is forwarded to by outgoing interface.
Fig. 2 shows the distal end MEP of the present invention to send the flow chart of first response message to local terminal MEP.The end of distal end MEP
After mouth receives the LBM first message messages of multicast, after the critical field by the access control list matching message of forwarding chip, it will order
In LBM first messages message by above sending channel, give software and handled.Software parses LBM first message messages, will
Purpose MAC of the source MAC field of LBM as the first response messages of LBR, and as source MAC using the port address of this MEP
Location after the encapsulation for completing LBR the first response messages of unicast, then by software through channel is issued, is forwarded to forwarding chip, same logical
Bilaminar logic is crossed, MAC table is inquired, finds the business outgoing interface of message, and source MEP is forwarded to by outgoing interface.
Fig. 3 shows the flow chart that the local terminal MEP of the present invention is mutually bound with the study MAC Address of distal end MEP.Local terminal
It,, will after matching message critical field equally by the access control list of forwarding chip after the ports MEP receive the first response messages of LBR
Message is hit by above sending channel, software is given to and is handled.Software parses source MAC from the first response messages of LBR
The mark with distal end MEP is mapped afterwards, completes binding.Local terminal MEP so just learns to have arrived the MAC Address of distal end MEP.
The present invention additionally provides a kind of system realized the MAC Address of local terminal MEP and distal end MEP and mutually bound, packet simultaneously
It includes:
Identifier acquisition module, the mark for obtaining distal end MEP;
Message sending module is connected with the identifier acquisition module, for sending the to the distal end MEP for local terminal MEP
One message packet, wherein the first MAC Address comprising the local terminal MEP and the mark in the first message message;
Message responder module is connected with the message sending module, for supplying distal end MEP corresponding with the mark will
Address sends the first response message to first MAC Address as a purpose, wherein comprising described remote in first response message
Hold the second MAC Address of MEP;
Binding module is connected with the message responder module, for marking second MAC Address and the distal end MEP
The binding of the MAC Address of local terminal MEP and distal end MEP is completed in sensible association.
Preferably, the identifier acquisition module obtains the mark of distal end MEP by executing the LB orders in CFM agreements.
Preferably, further include between the identifier acquisition module and the message sending module:
Be associated with judgment module, for judge the distal end MEP identify whether it is related to second MAC Address
Connection;Its judgment step includes:
The study MAC Address and static binding MAC Address of distal end MEP described in identifier lookup based on the distal end MEP, if
Any of the study MAC Address and the static binding MAC Address be it is effective, then the distal end MEP with it is described
Second MAC Address is associated;
If the study MAC Address and the static binding MAC Address are invalid, the distal end MEP and described second
MAC Address is not associated.
The system mutually bound according to MAC Address proposed by the present invention, wherein as the distal end MEP and the 2nd MAC
When address is not associated, the first message message is multicast message.
The system mutually bound according to MAC Address proposed by the present invention, wherein the message responder module sends first and answers
The step of answering message include:
The distal end MEP receives the multicast message and is parsed;
Using first MAC Address as the destination address of first response message, and second MAC Address is made
For source address, the encapsulation of first response message is completed;
First response message is sent to the local terminal MEP by the distal end MEP.
Specific embodiment is referring to Fig. 4, be the structural schematic diagram for the system that MAC Address of the invention is mutually bound, this is
System includes identifier acquisition module, association judgment module, message sending module, message responder module and binding module.
Wherein, identifier acquisition module is used to obtain the mark of distal end MEP by the LB orders executed in CFM agreements;Association
Judgment module is connected with identifier acquisition module, for judge distal end MEP identify whether it is associated with the second MAC Address;
Message sending module is connected with judgment module is associated with, for sending first message message to distal end MEP for local terminal MEP, wherein the
Include the first MAC Address of local terminal MEP in one message packet;Message responder module is connected with message sending module, for for remote
Holding MEP, address sends the first response message as a purpose by the first MAC Address, wherein including distal end MEP in the first response message
The second MAC Address;Binding module is connected with message responder module, for marking second MAC Address and the distal end MEP
The binding of the MAC Address of local terminal MEP and distal end MEP is completed in sensible association.
Descriptions above can combine implementation individually or in various ways, and these variants all exist
Within protection scope of the present invention.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations.Although
Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of ordinary skill in the art that:It still may be used
With technical scheme described in the above embodiments is modified or equivalent replacement of some of the technical features;
And these modifications or replacements, various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution spirit and
Range.