CN106411741B - Medium access control MAC address learning method, controller and switching equipment - Google Patents
Medium access control MAC address learning method, controller and switching equipment Download PDFInfo
- Publication number
- CN106411741B CN106411741B CN201610812399.2A CN201610812399A CN106411741B CN 106411741 B CN106411741 B CN 106411741B CN 201610812399 A CN201610812399 A CN 201610812399A CN 106411741 B CN106411741 B CN 106411741B
- Authority
- CN
- China
- Prior art keywords
- mac address
- message
- list item
- switching equipment
- address list
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the present invention provides a kind of medium access control MAC address learning method, controller and switching equipment, this method comprises: controller receives the ingress port information of the first message that open flows OF switching equipment is sent and the first message;The first MAC Address list item is generated according to the ingress port information of the first message and the first message;The exit port of first MAC Address list item is the inbound port of the first message;First MAC Address list item is saved in the mac address table of OF switching equipment;Judge in the mac address table of OF switching equipment with the presence or absence of the second MAC Address list item;If there is the second MAC Address list item, controller sends the first MAC Address list item and the second MAC Address list item to OF switching equipment;The present invention passes through the case where issuing MAC Address list item in pairs, avoiding controller that from cannot learning all MAC Address list items into whole network.
Description
Technical field
The present invention relates to the communication technology more particularly to a kind of medium access control MAC address learning methods, controller and friendship
Exchange device.
Background technique
With the continuous mature and development of network technology, open flows (Openflow, abbreviation OF) network be we provide
A kind of new network model based on stream, the network mainly include two class equipment: controller and OF switching equipment.Wherein, it controls
Device is used to carry out network centralized control, and issues flow table to OF switching equipment, and OF switching equipment is used to be docked according to the flow table
The message received is matched and is forwarded;Wherein, controller is opened to user;Source medium access control is recorded in flow table
The address (Media Access Control, abbreviation MAC), target MAC (Media Access Control) address and output port mark.
In the prior art, when OF switching equipment receives customer edge (Communication Edge, abbreviation CE)
It when the message of transmission, is matched according to the target MAC (Media Access Control) address of message with existing flow table in the OF switching equipment, if matching
It arrives, is then forwarded from corresponding output port;If being not matched to flow table, by the message up sending controller, by controller
Instruction OF switching equipment is broadcasted, and controller to the source MAC, target MAC (Media Access Control) address and source port of the message into
Row study, i.e. update mac address table, and OF switching equipment is issued in the form of flow table.
Inventor has found during realizing the embodiment of the present invention, will lead to some address list item controls using the prior art
Device study processed is less than so that controller cannot control effectively to the data flow in network.
Summary of the invention
The embodiment of the present invention provides a kind of medium access control MAC address learning method, controller and switching equipment, is used for
Solve the problems, such as that controller cannot learn into OF network all MAC Address list items.
First aspect of the embodiment of the present invention provides a kind of medium access control MAC address learning method, comprising:
Controller receives the ingress port information of the first message that open flows OF switching equipment is sent and first message,
In the first message source address be the first customer edge CE MAC Address, the destination address of the first message is the 2nd CE's
MAC Address;The inbound port of first message is the port that the OF switching equipment receives first message;
Controller generates the first MAC Address list item according to the ingress port information of first message and first message,
Wherein, the source address of the first MAC Address list item is the MAC Address of the 2nd CE, the destination of the first MAC Address list item
Location is the MAC Address of the first CE;The exit port of the first MAC Address list item is the inbound port of first message;
The first MAC Address list item is saved in the mac address table of the OF switching equipment by controller;
Controller judges in the mac address table of the OF switching equipment with the presence or absence of the second MAC Address list item, wherein institute
The source address for stating the second MAC Address list item is the MAC Address of the first CE, and the destination address of the second MAC Address list item is the
The MAC Address of two CE;
If there is the second MAC Address list item, controller sends first MAC Address to the OF switching equipment
List item and the second MAC Address list item.
With reference to first aspect, in the first possible embodiment of first aspect, the method also includes:
If there is no the second MAC Address list item, controller receives the second message that the OF switching equipment is sent
With the ingress port information of second message, wherein the source address of the second message be the 2nd CE MAC Address, the mesh of the second message
Address be the first CE MAC Address;The inbound port of second message is the end that the OF switching equipment receives second message
Mouthful;
Controller generates second mac address table according to the ingress port information of second message and second message
, wherein the exit port of the second MAC Address list item is the inbound port of second message;
The second MAC Address list item is saved in the mac address table of the OF switching equipment by controller;
Controller sends the first MAC Address list item and the second MAC Address list item to the OF switching equipment.
Second aspect of the embodiment of the present invention provides a kind of medium access control MAC address learning method, comprising:
Open flows OF switching equipment receives the message that customer edge CE is sent, wherein the message source address is the
The MAC Address of one customer edge CE, the destination address of the message are the MAC Address of the 2nd CE;The message enters end
Mouth is the port that the OF switching equipment receives the message;
If the MAC that it is the 2nd CE comprising MAC Address, destination address that source address is the first CE that the message, which is not matched to,
The MAC Address list item of location, then the ingress port information of the message and the message is sent to controller by OF switching equipment, so that
Controller generates MAC Address list item, wherein the source address of the MAC Address list item is the MAC Address of the 2nd CE, the MAC
The destination address of location list item is the MAC Address of the first CE;The exit port of the MAC Address list item is the inbound port of the message.
It is described by the message and described in the first possible embodiment of second aspect in conjunction with second aspect
The ingress port information of message is sent to after controller, further includes:
Receive the MAC Address list item that controller is sent.
The third aspect of the embodiment of the present invention provides a kind of controller, comprising:
Receiving module, for receiving the first message of open flows OF switching equipment transmission and the inbound port of first message
Information, wherein the source address of the first message is the MAC Address of the first customer edge CE, the destination address of the first message is the
The MAC Address of two CE;The inbound port of first message is the port that the OF switching equipment receives first message;
Generation module, for according to the first MAC of the ingress port information of first message and first message generation
Location list item, wherein the source address of the first MAC Address list item is the MAC Address of the 2nd CE, the first MAC Address list item
Destination address be the first CE MAC Address;The exit port of the first MAC Address list item enters end for first message
Mouthful;
Preserving module, for the first MAC Address list item to be saved in the mac address table of the OF switching equipment;
Judgment module whether there is the second MAC Address list item in the mac address table for judging the OF switching equipment,
Wherein, the source address of the second MAC Address list item is the MAC Address of the first CE, the destination of the second MAC Address list item
Location is the MAC Address of the 2nd CE;
Sending module, for if there is the second MAC Address list item, controller to send institute to the OF switching equipment
State the first MAC Address list item and the second MAC Address list item.
In conjunction with the third aspect, in the first possible embodiment of the third aspect, the receiving module, be also used to as
The second MAC Address list item is not present in fruit, and controller receives the second message and described second that the OF switching equipment is sent
The ingress port information of message, wherein the source address of the second message is the MAC Address of the 2nd CE, the destination address of the second message is the
The MAC Address of one CE;The inbound port of second message is the port that the OF switching equipment receives second message;
The generation module is also used to according to the generation of the ingress port information of second message and second message
Second MAC Address list item, wherein the exit port of the second MAC Address list item is the inbound port of second message;
The preserving module is also used to for the second MAC Address list item being saved in the MAC Address of the OF switching equipment
Table;
The sending module is also used to send the first MAC Address list item and described second to the OF switching equipment
MAC Address list item.
Fourth aspect of the embodiment of the present invention provides a kind of switching equipment, comprising:
Receiving module, for receiving the message of customer edge CE transmission, wherein the message source address is the first use
The MAC Address of family edge device CE, the destination address of the message are the MAC Address of the 2nd CE;The inbound port of the message is
The OF switching equipment receives the port of the message;
Sending module is comprising MAC Address, destination address that source address is the first CE if not being matched to for the message
The MAC Address list item of the MAC Address of 2nd CE, then OF switching equipment sends the ingress port information of the message and the message
To controller, so that controller generates MAC Address list item, wherein the source address of the MAC Address list item is the MAC of the 2nd CE
Address, the destination address of the MAC Address list item are the MAC Address of the first CE;The exit port of the MAC Address list item is described
The inbound port of message.
In conjunction with fourth aspect, in the first possible embodiment of fourth aspect, the receiving module is also used to connect
The MAC Address list item that admission controller is sent.
The 5th aspect of the embodiment of the present invention provides a kind of controller, comprising:
Receiver, for receiving the first message of open flows OF switching equipment transmission and the inbound port letter of first message
Breath, wherein the source address of the first message is the MAC Address of the first customer edge CE, the destination address of the first message is second
The MAC Address of CE;The inbound port of first message is the port that the OF switching equipment receives first message;
Processor, for generating the first MAC Address according to the ingress port information of first message and first message
List item, wherein the source address of the first MAC Address list item is the MAC Address of the 2nd CE, the first MAC Address list item
Destination address is the MAC Address of the first CE;The exit port of the first MAC Address list item is the inbound port of first message;
Memory, for the first MAC Address list item to be saved in the mac address table of the OF switching equipment;
The processor is also used to judge in the mac address table of the OF switching equipment with the presence or absence of the second mac address table
, wherein the source address of the second MAC Address list item is the MAC Address of the first CE, the mesh of the second MAC Address list item
Address be the 2nd CE MAC Address;
Transmitter, for if there is the second MAC Address list item, controller to be to described in OF switching equipment transmission
First MAC Address list item and the second MAC Address list item.
In conjunction with the 5th aspect, in the first possible embodiment of the 5th aspect, the receiver, if be also used to
There is no the second MAC Address list item, controller receives the second message that the OF switching equipment is sent and second report
The ingress port information of text, wherein the source address of the second message is the MAC Address of the 2nd CE, the destination address of the second message is first
The MAC Address of CE;The inbound port of second message is the port that the OF switching equipment receives second message;
The processor is also used to generate described the according to the ingress port information of second message and second message
Two MAC Address list items, wherein the exit port of the second MAC Address list item is the inbound port of second message;
The memory, for the second MAC Address list item to be saved in the mac address table of the OF switching equipment;
The transmitter is used for the OF switching equipment with sending the first MAC Address list item and the 2nd MAC
Location list item.
The 6th aspect of the embodiment of the present invention provides a kind of switching equipment, comprising:
Receiver, for receiving the message of customer edge CE transmission, wherein the message source address is the first user
The MAC Address of edge device CE, the destination address of the message are the MAC Address of the 2nd CE;The inbound port of the message is institute
State the port that OF switching equipment receives the message;
Transmitter, if not being matched to for the message comprising MAC Address that source address is the first CE, destination address
The MAC Address list item of the MAC Address of two CE, then the ingress port information of the message and the message is sent to by OF switching equipment
Controller, so that controller generates MAC Address list item, wherein the source address of the MAC Address list item is the MAC of the 2nd CE
Location, the destination address of the MAC Address list item are the MAC Address of the first CE;The exit port of the MAC Address list item is the report
The inbound port of text.
In conjunction with the 6th aspect, in the first possible embodiment of the 6th aspect, the receiver is also used to receive
The MAC Address list item that controller is sent.
In the embodiment of the present invention, after the controller in OF network generates the first MAC Address list item, OF switching equipment is judged
Mac address table in whether there is corresponding second MAC Address list item, if there is the second MAC Address list item, then by this
MAC Address list item is issued, controller can be made all to learn to arrive by round-trip MAC Address list item in this way, avoid controller
May study less than Section MAC address list item in whole network the case where, allow controller to the number in whole network
It is controlled well according to stream.
The 7th aspect of the embodiment of the present invention provides a kind of medium access control MAC address learning method, comprising:
Open flows OF switching equipment receives the message that customer edge CE is sent;
The OF switching equipment generates MAC Address list item according to the message, wherein the destination of the mac address table item
Location is the source address of the message;The exit port of the MAC Address list item is the end that the OF switching equipment receives the message
Mouthful;
The OF switching equipment saves the MAC Address list item;
The OF switching equipment sends the MAC Address list item to controller.
In conjunction with the 7th aspect, in the first possible embodiment of the 7th aspect, the OF switching equipment is to control
Device sends the MAC Address list item and specifically includes:
The OF switching equipment sends the MAC Address list item to controller by OF message.
Eighth aspect of the embodiment of the present invention provides a kind of medium access control MAC address learning method, comprising:
Controller receives the MAC Address list item that OF switching equipment is sent;
The MAC Address list item is saved in the corresponding mac address table of the OF switching equipment by controller.
Ninth aspect present invention provides a kind of switching equipment, comprising:
Receiving module, for receiving the message of customer edge CE transmission;
Generation module, for generating MAC Address list item according to the message, wherein the destination of the mac address table item
Location is the source address of the message;The exit port of the MAC Address list item is the end that the OF switching equipment receives the message
Mouthful;
Preserving module, for saving the MAC Address list item;
Sending module, for sending the MAC Address list item to controller.
In conjunction with the 9th aspect, in a first possible embodiment of the ninth aspect, the sending module is specifically used for
The MAC Address list item is sent to controller by OF message.
The tenth aspect of the embodiment of the present invention provides a kind of controller, comprising:
Receiving module, for receiving the MAC Address list item of OF switching equipment transmission;
Preserving module, for the MAC Address list item to be saved in the corresponding mac address table of the OF switching equipment.
The tenth one side of the embodiment of the present invention provides a kind of switching equipment, comprising:
Receiver, for receiving the message of customer edge CE transmission;
Processor, for generating MAC Address list item according to the message, wherein the destination address of the mac address table item
For the source address of the message;The exit port of the MAC Address list item is the port that the OF switching equipment receives the message;
Memory, for saving the MAC Address list item;
Transmitter, for sending the MAC Address list item to controller.
On the one hand in conjunction with the tenth, in a first possible embodiment of the eleventh aspect, the transmitter, it is specific to use
The MAC Address list item is sent to controller in passing through OF message.
The 12nd aspect of the embodiment of the present invention provides a kind of controller, comprising:
Receiver, for receiving the MAC Address list item of OF switching equipment transmission;
Memory, for the MAC Address list item to be saved in the corresponding mac address table of the OF switching equipment.
In the embodiment of the present invention, OF switching equipment generates MAC Address list item according to the message received and is saved, this
Sample may learn all address list items in its communication process, and the MAC Address list item that study generates is passed through and is sent in OF message
To controller, controller safeguards the MAC Address list item sent on each OF switching equipment, the MAC of available whole network
Address is controlled with the data flow to whole network.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to do one simply to introduce, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram of MAC address learning embodiment of the method one provided by the invention;
Fig. 2 is the schematic diagram of application structure of MAC address learning embodiment of the method two provided by the invention;
Fig. 3 is the flow diagram of MAC address learning embodiment of the method three provided by the invention;
Fig. 4 is the structural schematic diagram of controller embodiment one provided by the invention;
Fig. 5 is the structural schematic diagram of switching equipment embodiment one provided by the invention;
Fig. 6 is the structural schematic diagram of controller embodiment two provided by the invention;
Fig. 7 is the structural schematic diagram of switching equipment embodiment two provided by the invention;
Fig. 8 is the flow diagram of MAC address learning embodiment of the method four provided by the invention;
Fig. 9 is the flow diagram of MAC address learning embodiment of the method five provided by the invention;
Figure 10 is the structural schematic diagram of switching equipment embodiment three provided by the invention;
Figure 11 is the structural schematic diagram of controller embodiment three provided by the invention;
Figure 12 is the structural schematic diagram of switching equipment example IV provided by the invention;
Figure 13 is the structural schematic diagram of controller example IV provided by the invention.
Specific embodiment
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
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the flow diagram of MAC address learning embodiment of the method one provided by the invention, as shown in Figure 1, this method
Include:
S101, controller receive the ingress port information of the first message and first message that OF switching equipment is sent, wherein
The source address of first message is the MAC Address of the first CE, and the destination address of the first message is the MAC Address of the 2nd CE;First report
The inbound port of text is the port that the OF switching equipment receives first message.Specifically, the ingress port information of the first message
It can be encapsulated by OF switching equipment in the first message on together and give controller, can also individually be sent to controller.
S102, controller generate the first MAC Address according to the ingress port information of above-mentioned first message and first message
List item, wherein the source address of the first MAC Address list item is the MAC Address of the 2nd CE, the purpose of the first MAC Address list item
Address is the MAC Address of the first CE;The exit port of the first MAC Address list item is the inbound port of above-mentioned first message.
Above-mentioned first MAC Address list item is saved in the mac address table of above-mentioned OF switching equipment by S103, controller.
In OF network, controller can parse in the message sent on receiving OF switching equipment and get the message
Source MAC, target MAC (Media Access Control) address and the OF switching equipment receive the inbound port number of the message, and learnt, i.e., it is raw
At MAC Address list item, by above-mentioned source MAC, MAC Address is recorded as a purpose in the MAC Address list item, by above-mentioned purpose
MAC Address is recorded above-mentioned inbound port as exit port (outport), is issued when by MAC Address list item as source MAC
After above-mentioned OF switching equipment, which can know when receiving the message sent with a upper message along reverse path
Road sends this message from which port.
S104, controller judge in the mac address table of above-mentioned OF switching equipment with the presence or absence of the second MAC Address list item,
In the second MAC Address list item source address be the first CE MAC Address, the destination address of the second MAC Address list item is the
The MAC Address of two CE.
S105, if there is above-mentioned second MAC Address list item, controller sends above-mentioned first to above-mentioned OF switching equipment
MAC Address list item and above-mentioned second MAC Address list item.
In the prior art, it will be handed down to OF switching equipment after the every study to a MAC Address list item of controller, for example,
It is handed down to OF controller after controller study to above-mentioned first MAC Address list item, then when the 2nd CE is sent to above-mentioned first CE
When the second message, in such a way that the prior art matches purpose MAC, so that it may be matched in above-mentioned first MAC Address list item
The MAC Address of first CE, and then corresponding exit port (outport) number is found in the first MAC Address list item, thus by
Two messages are sent from the corresponding port of the go out port numbers, reach the first CE, without reporting controller, such controller is just
It cannot learn to above-mentioned second MAC Address list item.
In the present embodiment, after the controller in OF network generates the first MAC Address list item, OF switching equipment is judged
It whether there is corresponding second MAC Address list item in mac address table, it is a pair of if there is the second MAC Address list item, then by this
MAC Address list item issues, and controller can be made all to learn to arrive by round-trip MAC Address list item in this way, avoiding controller can
Can study less than Section MAC address list item in whole network the case where, allow controller to the data in whole network
Stream is controlled well.
Fig. 2 is the schematic diagram of application structure of MAC address learning embodiment of the method two provided by the invention, this method embodiment
Applied in OF network, for including three OF switching equipment in controller control range, these OF switching equipment can be
OF interchanger.Specifically, as shown in Fig. 2, including: controller 201, the first OF switching equipment 202, the 2nd OF in the application scenarios
Switching equipment 203, the 3rd OF switching equipment 204 and the first CE205, the 2nd CE206, the 3rd CE207.
Further, after above-mentioned S104, if there is no above-mentioned second MAC Address list item, controller receives above-mentioned OF
The ingress port information of the second message and above-mentioned second message that switching equipment is sent, wherein the source address of the second message is the 2nd CE
MAC Address, the destination address of the second message is the MAC Address of the first CE;The inbound port of second message is that above-mentioned OF exchange is set
The standby port for receiving second message.
Identical as the mode for handling above-mentioned first message, controller is believed according to the inbound port of second message of the second message
Breath generates above-mentioned second MAC Address list item, wherein the exit port of above-mentioned second MAC Address list item is entering for above-mentioned second message
Port;In turn, above-mentioned second MAC Address list item is saved in the mac address table of above-mentioned OF switching equipment by controller;Finally, control
Device processed sends the first MAC Address list item and the second MAC Address list item to above-mentioned OF switching equipment.
Further, learn to generate in controller and obtain above-mentioned first MAC corresponding with above-mentioned first OF switching equipment
After address list item, which is sent to above-mentioned first OF switching equipment for above-mentioned first message, and indicates that the first OF is handed over
First message broadcasting is given other OF switching equipment of the first OF switching equipment communication by exchange device, so that above-mentioned other OF
First message is sent to above-mentioned 2nd CE with the above-mentioned 2nd CE OF switching equipment communicated by second in switching equipment;The control
Device processed receives the first message that above-mentioned other OF switching equipment are sent, the MAC Address comprising the first CE and the in first message
The MAC Address of two CE, first message are that other OF switching equipment be not matched to the MAC for being the first CE comprising above-mentioned source address
Address, the MAC Address that destination address is the 2nd CE MAC Address list item when the MAC Address of the first CE that sends and the 2nd CE
MAC Address when send;Controller study, which generates, obtains above-mentioned first MAC Address list item, and by above-mentioned first mac address table
Item is added in mac address table corresponding with OF switching equipment each in above-mentioned other OF switching equipment;It is i.e. identical as aforementioned process, on
It states and is not matched to equally after the first message broadcasting to other OF switching equipment comprising MAC Address that source address is the first CE, purpose
Address is the MAC Address of MAC Address list item above-mentioned first CE of the MAC Address of the 2nd CE and the MAC Address of the 2nd CE, then
Also controller will be sent in the ingress port information of first message and first message, so that controller carries out mac learning, then controlled
Study is obtained the first MAC Address list item generated and is added separately in address table corresponding with each OF switching equipment by device processed.It needs
It is noted that above-mentioned first MAC Address list item can refer to during sending above-mentioned first message, controller study is arrived
MAC Address list item;Similarly, hereinafter, the second MAC Address list item can refer to during sending the second message, control
The address list item that device learns;Third MAC Address list item can refer to during sending third message, and controller study is arrived
MAC Address list item;4th MAC Address list item can refer to during sending four messages, the MAC that controller learns
Address list item;It can be different in addition, corresponding to different OF switching equipment.
Referring to Fig. 2, it is assumed that before without any message interaction, all address tables are all empty, it should be noted that control
Device processed can safeguard a mac address table for all OF switching equipment in range of management;First CE205 is sent to the 2nd CE206
During first message, when by the first OF switching equipment 202, the port a of the first OF switching equipment 202 receives first report
Text, wherein the MAC Address of the first CE205 of note is mac1, and the MAC Address of the 2nd CE206 of note is mac2, and first message is the
It is not matched in one OF switching equipment 202 comprising the MAC Address list item that source MAC is mac1, target MAC (Media Access Control) address is mac2,
Then by the ingress port information of first message and first message (controller is sent on a) of port, controller carries out mac learning,
The source MAC that first message is got from first message is mac1, on target MAC (Media Access Control) address mac2, and acquisition
Port a is stated, and is charged in first mac address table corresponding with the first OF switching equipment 202, at this point, first mac address table is such as
Shown in table 1.1,
Table 1.1
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | a |
In this way after subsequent first MAC Address list item is handed down to the first OF switching equipment, then there is the 2nd CE to be sent to first
The message of CE, the first OF switching equipment, which is known that, sends out message from port a.
In the present embodiment, due to only having the first MAC Address list item to control at this time so wouldn't send in address above mentioned table
First message can be returned to above-mentioned first OF switching equipment 202 by device, and indicate the first OF switching equipment 202 by this first
Message broadcasting is gone out, and makes the OF switching equipment being connected with the first OF switching equipment that can receive first message, above-mentioned
Instruction can be controller and send an instruction message while returning to the first message to realize;By taking Fig. 2 as an example, the 2nd OF is handed over
Exchange device 203 can receive first message from port c, and the 3rd OF switching equipment 204 can receive first report from port e
Text, then, it as the processing mode of above-mentioned first OF switching equipment 202, is first matched, includes source when being not matched to
When the MAC Address list item that MAC Address is mac1, target MAC (Media Access Control) address is mac2, by first message up sending to controller 201, with
Make controller 201 carry out mac learning, and the first MAC Address list item that will acquire charge to respectively with the 2nd OF switching equipment 203 and
In the corresponding mac address table of 3rd OF switching equipment 204, wherein second mac address table corresponding with the 2nd OF switching equipment 203
As shown in table 2.1,
Table 2.1
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | c |
Third mac address table corresponding with the 3rd OF switching equipment 204 as shown in table 3.1,
Table 3.1
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | e |
It at this time all only include one in mac address table corresponding with the 2nd OF switching equipment 203 and the 3rd OF switching equipment 204
A MAC Address entry, therefore without issuing, all only safeguarded in controller;After this, controller can indicate each OF
First message is broadcasted by switching equipment from each port, so that first message can reach the 2nd CE206.
In above-mentioned S102, for controller when above-mentioned 2nd CE sends the second message to above-mentioned first CE, study obtains and life
At the second address list item, specifically, above controller receive second message that above-mentioned 2nd OF switching equipment is sent and this
The ingress port information of two messages, MAC Address, the source MAC that the target MAC (Media Access Control) address for including in second message is the first CE are
With the MAC Address of the 2nd CE, it not being matched to comprising source address is the 2nd CE which, which is above-mentioned 2nd OF switching equipment,
MAC Address, the MAC Address that destination address is the first CE MAC Address list item when send, at this point, the MAC Address of the 2nd CE
For source MAC, the MAC Address of the first CE is purpose MAC Address;Then, controller study obtains above-mentioned second MAC Address
List item, and the second MAC Address list item is added in the second address table corresponding with above-mentioned 2nd OF switching equipment, this second
Address table includes above-mentioned first MAC Address list item and the second MAC Address list item.
Referring to Fig. 2, during the 2nd CE206 sends the second message to the first CE205, by the 2nd OF switching equipment
When 203, the port d of the 2nd OF switching equipment 203 receives second message, and second message is in the 2nd OF switching equipment 203
It is not matched to comprising the address list item that source MAC is mac2, target MAC (Media Access Control) address is mac1, then by second message and this
The ingress port information of second message (send controller 201, controller 201 carries out mac learning, from second message on the d) of port
The source MAC for getting second message is mac2, target MAC (Media Access Control) address mac1, and obtains the ingress port information, that is, is held
Mouth d, and charge in second mac address table corresponding with the 2nd OF switching equipment 203, at this point, the second mac address table such as table
Shown in 2.2,
Table 2.2
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | c |
mac1 | mac2 | d |
At this point, a pair of of MAC Address list item is contained in the second mac address table, then by this pair of of mac address table Xiang Yiliu
The form of table is handed down to above-mentioned 2nd OF switching equipment;During specific implementation, controller is issued to the 2nd OF switching equipment
After the first MAC Address list item and the second MAC Address list item, above-mentioned second report that above-mentioned first OF switching equipment is sent is received
Text, the MAC Address of MAC Address and the 2nd CE in above-mentioned second message comprising the first CE, above-mentioned second message are above-mentioned first
OF switching equipment be not matched to the MAC Address for being the first CE comprising MAC Address, destination address that source address is the 2nd CE
It is sent when MAC Address list item;Then, controller study obtains above-mentioned second MAC Address list item, and by above-mentioned 2nd MAC
Address list item is added in the first address table corresponding with above-mentioned first OF switching equipment, and above-mentioned first address table includes above-mentioned
One MAC Address list item and the second MAC Address list item;Further, above controller issues above-mentioned first MAC Address list item and
Two MAC Address list items, specially above controller issue above-mentioned first MAC Address list item and to above-mentioned first OF switching equipment
Two MAC Address list items, so that above-mentioned first OF switching equipment sends above-mentioned second message according to above-mentioned first MAC Address list item
To above-mentioned first CE.
Specifically, when the 2nd OF switching equipment receive above-mentioned first MAC Address list item and the second MAC Address list item it
Afterwards, the second message in the 2nd OF switching equipment can be matched to the first MAC Address list item therein, thus will from port c
Second message issues, and second message is sent to the first OF switching equipment by the port b of the first OF switching equipment, and first
OF switching equipment is not matched to the MAC Address list item that source MAC is mac2, target MAC (Media Access Control) address is mac1, then by this second
Message up sending controller, controller carry out mac learning, and the source MAC that second message is got from second message is
Mac2, target MAC (Media Access Control) address mac1, and inbound port b when second message is sent to the first OF switching equipment is obtained, and
It charges in the first mac address table corresponding with the first OF switching equipment, at this point, first mac address table is as shown in table 1.2,
Table 1.2
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | a |
mac1 | mac2 | b |
At this point, contain a pair of of address list item in the first mac address table, then by this to address list item with the shape of flow table
Formula is handed down to above-mentioned first OF switching equipment, and the second message that then controller returns to the first OF switching equipment can match
To the first address list item therein, to be sent to the first CE from port a by second message.
Then, during the first CE205 sends third message to the 3rd CE207, by the first OF switching equipment 202
When, it is inputted from the port a of the first OF switching equipment 202, wherein the MAC Address of the first CE205 of note is mac1, remembers the 3rd CE207
MAC Address be mac3, the third message be not matched in the first OF switching equipment 202 comprising source MAC be mac1, mesh
MAC Address be mac3 MAC Address list item, then by the third message up sending controller, controller carries out mac learning, from
The source MAC that the third message is got in the third message is mac1, target MAC (Media Access Control) address mac3, and obtain this
Three messages are sent to inbound port a when the first OF switching equipment 202, and charge to and the first OF as third MAC Address list item
In corresponding first mac address table of switching equipment 202, at this point, the mac address table is as shown in table 1.3,
Table 1.3
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | a |
mac1 | mac2 | b |
mac3 | mac1 | a |
But there is not yet opposite mac1 for this MAC Address list item of mac3 to mac1 in address table at this time and arrive
The MAC Address list item of mac3, therefore do not issue temporarily, only safeguarded in controller.
The third message can be returned to above-mentioned first OF switching equipment 202 by controller, and indicate that the first OF exchange is set
Standby 202 go out the third message broadcasting, make the OF switching equipment communicated with the first OF switching equipment that can receive this
Third message, above-mentioned instruction can be controller and send an instruction message while returning to third message to realize;With Fig. 2
For, the second switching equipment 203 and third switching equipment 204 can all receive the third message, then, it is exchanged with above-mentioned first
The processing mode of equipment 202 is the same, is first matched, and is mac1, target MAC (Media Access Control) address when being not matched to comprising source MAC
For mac3 MAC Address list item when, by the third message up sending to controller 201 so that controller 201 carries out mac learning, and
With charging to MAC corresponding with the 2nd OF switching equipment 203 and the 3rd OF switching equipment 204 respectively as third MAC Address list item
In the table of location, wherein second mac address table corresponding with the 2nd OF switching equipment 203 is as shown in table 2.3,
Table 2.3
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | c |
mac1 | mac2 | d |
mac3 | mac1 | c |
Third mac address table corresponding with the 3rd OF switching equipment 204 as shown in table 3.2,
Table 3.2
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | e |
mac3 | mac1 | e |
In the second address table and third address table for this MAC Address list item of mac3 to mac1, there is not yet
The MAC Address list item of opposite mac1 to mac3, therefore do not issue temporarily, only safeguarded in controller.In turn, controller meeting
Indicate that the third message is broadcasted by each OF switching equipment from each port, so that the third message can reach the 3rd CE207.
Next, during the 3rd CE207 sends the 4th message to the first CE205, by the 3rd OF switching equipment
It when 204, is inputted from the port f of the 3rd OF switching equipment 204, the 4th message is not matched in the 3rd OF switching equipment 204
Comprising the MAC Address list item that source MAC is mac3, target MAC (Media Access Control) address is mac1, then by the 4th message up sending controller
201, controller 201 carries out mac learning, and the source MAC that the 4th message is got from the 4th message is mac3, purpose
MAC Address is mac1, and obtains inbound port f when the 4th message is sent to the 3rd OF switching equipment 204, and as
Four MAC Address list items are charged in third mac address table corresponding with the 3rd OF switching equipment 204, at this point, the third MAC Address
Table as shown in table 3.3,
Table 3.3
At this point, containing " mac1 to mac3 " and " mac3 to mac1 " this pair of of mac address table in third mac address table
, then by this pair of of mac address table item, i.e. third MAC Address list item and the 4th MAC Address list item is issued in the form of flow table
To above-mentioned 2nd OF switching equipment.
After the 3rd OF switching equipment receives above-mentioned third MAC Address list item and the 4th MAC Address list item, controller
The 4th message for returning to the 3rd OF switching equipment can be matched to third MAC Address list item therein, thus will from port e
4th message issues, and the 4th message is sent to the first OF switching equipment by the port g of the first OF switching equipment, and first
OF switching equipment is not matched to the MAC Address list item that source MAC is mac3, target MAC (Media Access Control) address is mac1, then by the 4th
Message up sending controller, controller carry out mac learning, and the source MAC that the 4th message is got from the 4th message is
Mac3, target MAC (Media Access Control) address mac1, and inbound port g when the 4th message is sent to the first OF switching equipment is obtained, and
It is charged in the first mac address table corresponding with the first OF switching equipment as the 4th MAC Address list item, at this point, the first MAC
Location table as shown in table 1.4,
Table 1.4
Source MAC | Purpose MAC | Go out port numbers |
mac2 | mac1 | a |
mac1 | mac2 | b |
mac3 | mac1 | a |
mac1 | mac3 | g |
At this point, containing " mac1 to mac3 " and " mac3 to mac1 " this pair of of mac address table in the first mac address table
, then by this pair of of mac address table item, i.e. third MAC Address list item and the 4th MAC Address list item is issued in the form of flow table
To above-mentioned first OF switching equipment.If, when OF switching equipment receives message, only carrying out purpose MAC using the prior art
The matching of address, then can have in the first OF switching equipment when the 4th message passes through above-mentioned first OF switching equipment
Above-mentioned first MAC Address list item in be matched to target MAC (Media Access Control) address mac1, then will by the 4th message by port a it is straight
The first CE is given in sending and receiving, and without above giving controller, such words controller would not learn to the 4th in above-mentioned table 1.4
MAC Address list item, and the embodiment of the present invention is used, need to be matched to purpose MAC and source MAC simultaneously, then the first OF exchange is set
It is standby just must be the 4th message up sending to controller.
Then the 4th message that controller returns to the first OF switching equipment can be matched to third MAC Address therein
List item, to be sent to the first CE from port a by the 4th message.
In the present embodiment, after the controller in OF network generates the first MAC Address list item, OF switching equipment is judged
It whether there is corresponding second MAC Address list item in mac address table, it is a pair of if there is the second MAC Address list item, then by this
MAC Address list item issues, if it does not, study is waited to generate the second MAC Address list item and then by this under address list item
Hair, can make controller all learn to arrive by round-trip MAC Address list item in this way;Further, in the present embodiment, exchange OF
Equipment is when receiving message while matching target MAC (Media Access Control) address and source MAC, to guarantee that controller may learn purpose
MAC Address is identical but all MAC Address list items that source MAC is different, preferably avoid controller may learn less than
The case where Section MAC address in whole network, controller is controlled well to the data flow in whole network
System.In addition, if controller does not learn to above-mentioned second MAC Address list item using the prior art, then next time the first CE to
2nd CE may still be matched less than purpose MAC when sending message, and then give controller message up sending again, and use the present invention
After embodiment, controller ibid can not be sent when the first CE gives the 2nd CE to send message again, thus control can also be alleviated
The burden of device.
Fig. 3 is the flow diagram of MAC address learning embodiment of the method three provided by the invention, the executing subject of this method
It can be above-mentioned first OF switching equipment or the 2nd OF switching equipment, as shown in figure 3, the party corresponding with aforementioned controllers side
Method includes:
S301, OF switching equipment receive the message that CE is sent, wherein the message source address is the MAC Address of the first CE, should
The destination address of message is the MAC Address of the 2nd CE;The inbound port of the message is that the OF switching equipment receives described first
The port of message.
If it is the 2nd CE that S302, the message, which are not matched to comprising MAC Address, destination address that source address is the first CE,
The MAC Address list item of MAC Address, then the ingress port information of the message He the message is sent to controller by OF switching equipment, with
Controller is set to generate MAC Address list item, wherein the source address of the MAC Address list item is the MAC Address of the 2nd CE, the MAC Address
The destination address of list item is the MAC Address of the first CE;The exit port of the MAC Address list item is the inbound port of the message.Control
The specific implementation process of device side can refer to preceding method embodiment, and details are not described herein.
Further, after S302, which can receive the MAC Address list item of controller transmission,
Pair address list item.
In the present embodiment, after OF switching equipment receives the message of CE transmission, while the target MAC (Media Access Control) address of the message is matched
And source MAC makes to control if not being matched to simultaneously just will give controller in the ingress port information of the message and the message
Device carries out mac learning, obtains corresponding address list item, and it is pairs of issue, can learn to avoid controller less than in OF network
Some address list items, thus enable the controller to preferably control whole network data flow.
Fig. 4 is the structural schematic diagram of controller embodiment one provided by the invention, as shown in figure 4, the controller includes: to connect
Receive module 401, generation module 402, preserving module 403, judgment module 404 and sending module 405, wherein
Receiving module 401, for receiving the first message of open flows OF switching equipment transmission and entering for first message
Port information, wherein the source address of the first message is the MAC Address of the first customer edge CE, the destination address of the first message
For the MAC Address of the 2nd CE;The inbound port of first message is the port that the OF switching equipment receives first message;
Generation module 402, for generating the first MAC according to the ingress port information of first message and first message
Address list item, wherein the source address of the first MAC Address list item is the MAC Address of the 2nd CE, first mac address table
The destination address of item is the MAC Address of the first CE;The exit port of the first MAC Address list item enters end for first message
Mouthful;
Preserving module 403, the mac address table for the first MAC Address list item to be saved in the OF switching equipment;
Judgment module 404 whether there is the second mac address table in the mac address table for judging the OF switching equipment
, wherein the source address of the second MAC Address list item is the MAC Address of the first CE, the mesh of the second MAC Address list item
Address be the 2nd CE MAC Address;
Sending module 405 is used for if there is the second MAC Address list item, and controller is sent out to the OF switching equipment
Send the first MAC Address list item and the second MAC Address list item.
Above-mentioned each module is for executing preceding method embodiment, and specific implementation is similar, and details are not described herein.
In the present embodiment, after the controller in OF network generates the first MAC Address list item, OF switching equipment is judged
It whether there is corresponding second MAC Address list item in mac address table, it is a pair of if there is the second MAC Address list item, then by this
MAC Address list item issues, and controller can be made all to learn to arrive by round-trip MAC Address list item in this way, avoiding controller can
Can study less than Section MAC address list item in whole network the case where, allow controller to the data in whole network
Stream is controlled well.
Further, according to the judgement of above-mentioned judgment module as a result, above-mentioned receiving module 401, be also used to if there is no
The second MAC Address list item, controller receive the second message of the OF switching equipment transmission and entering for second message
Port information, wherein the source address of the second message is the MAC Address of the 2nd CE, the destination address of the second message is the first CE's
MAC Address;The inbound port of second message is the port that the OF switching equipment receives second message;
Generation module 402 is also used to according to the generation of the ingress port information of second message and second message
Second MAC Address list item, wherein the exit port of the second MAC Address list item is the inbound port of second message;
Preserving module 403 is also used to for the second MAC Address list item being saved in the MAC Address of the OF switching equipment
Table;
Sending module 404 is also used to send the first MAC Address list item and described second to the OF switching equipment
MAC Address list item.
Fig. 5 is the structural schematic diagram of switching equipment embodiment one provided by the invention, as shown in figure 5, the switching equipment packet
It includes: receiving module 501 and sending module 502, in which:
Receiving module 501, for receiving the message of customer edge CE transmission, wherein the message source address is the
The MAC Address of one customer edge CE, the destination address of the message are the MAC Address of the 2nd CE;The message enters end
Mouth is the port that the OF switching equipment receives the message;
Sending module 502, if not being matched to for the message comprising source address is the MAC Address of the first CE, destination
Location is the MAC Address list item of the MAC Address of the 2nd CE, then OF switching equipment is by the ingress port information of the message and the message
It is sent to controller, so that controller generates MAC Address list item, wherein the source address of the MAC Address list item is the 2nd CE's
MAC Address, the destination address of the MAC Address list item are the MAC Address of the first CE;The exit port of the MAC Address list item is
The inbound port of the message.
Further, receiving module 501 are also used to receive the MAC Address list item of controller transmission.
In the present embodiment, after OF switching equipment receives the message of CE transmission, while the target MAC (Media Access Control) address of the message is matched
And source MAC makes to control if not being matched to simultaneously just will give controller in the ingress port information of the message and the message
Device carries out mac learning, obtains corresponding address list item, and it is pairs of issue, can learn to avoid controller less than in OF network
Some address list items, thus enable the controller to preferably control whole network data flow.
Fig. 6 is the structural schematic diagram of controller embodiment two provided by the invention, as shown in fig. 6, the controller includes: to connect
Receive device 601, processor 602, memory 603 and transmitter 604, in which:
Receiver 601, for receive open flows OF switching equipment transmission the first message and first message enter end
Message breath, wherein the source address of the first message is the MAC Address of the first customer edge CE, the destination address of the first message is
The MAC Address of 2nd CE;The inbound port of first message is the port that the OF switching equipment receives first message;
Processor 602, for according to the first MAC of the ingress port information of first message and first message generation
Location list item, wherein the source address of the first MAC Address list item is the MAC Address of the 2nd CE, the first MAC Address list item
Destination address be the first CE MAC Address;The exit port of the first MAC Address list item enters end for first message
Mouthful;
Memory 603, for the first MAC Address list item to be saved in the mac address table of the OF switching equipment;
Processor 602 is also used to judge in the mac address table of the OF switching equipment with the presence or absence of the second mac address table
, wherein the source address of the second MAC Address list item is the MAC Address of the first CE, the mesh of the second MAC Address list item
Address be the 2nd CE MAC Address;Transmitter 604, for if there is the second MAC Address list item, controller is to institute
It states OF switching equipment and sends the first MAC Address list item and the second MAC Address list item.
In the present embodiment, after the controller in OF network generates the first MAC Address list item, OF switching equipment is judged
It whether there is corresponding second MAC Address list item in mac address table, it is a pair of if there is the second MAC Address list item, then by this
MAC Address list item issues, and controller can be made all to learn to arrive by round-trip MAC Address list item in this way, avoiding controller can
Can study less than Section MAC address list item in whole network the case where, allow controller to the data in whole network
Stream is controlled well.
Further, receiver 601 are also used to if there is no the second MAC Address list item, described in controller receives
The ingress port information of the second message and second message that OF switching equipment is sent, wherein the source address of the second message is second
The MAC Address of CE, the destination address of the second message are the MAC Address of the first CE;The inbound port of second message is OF exchange
Equipment receives the port of second message;
In this case, processor 602 are also used to the ingress port information according to second message and second message
Generate the second MAC Address list item, wherein the exit port of the second MAC Address list item enters end for second message
Mouthful;
The second MAC Address list item is saved in the mac address table of the OF switching equipment by memory 603;Transmitter
604, for sending the first MAC Address list item and the second MAC Address list item to the OF switching equipment.
The controller is for executing preceding method embodiment, and realization principle is similar, and details are not described herein.
Fig. 7 is the structural schematic diagram of switching equipment embodiment two provided by the invention, as shown in fig. 7, the switching equipment packet
It includes: receiver 701, transmitter 702, in which:
Receiver 701, for receiving the message of CE transmission, wherein the message source address is the first customer edge
The MAC Address of CE, the destination address of the message are the MAC Address of the 2nd CE;The inbound port of the message is OF exchange
Equipment receives the port of the message;
Transmitter 702, if not being matched to the MAC Address, the destination address that are the first CE comprising source address for the message
For the MAC Address list item of the MAC Address of the 2nd CE, then OF switching equipment sends out the ingress port information of the message and the message
Controller is given, so that controller generates MAC Address list item, wherein the source address of the MAC Address list item is the 2nd CE's
MAC Address, the destination address of the MAC Address list item are the MAC Address of the first CE;The exit port of the MAC Address list item is
The inbound port of the message.
Further, above-mentioned receiver 701 is also used to receive the MAC Address list item of controller transmission.
The switching equipment is for executing preceding method embodiment, and realization principle is similar, and details are not described herein.
Fig. 8 is the flow diagram of MAC address learning embodiment of the method four provided by the invention, as shown in figure 8, this method
Include:
S801, OF switching equipment receive the message that CE is sent.
S802, OF switching equipment generate MAC Address list item according to above-mentioned message, wherein the purpose of above-mentioned MAC Address list item
Address is the source address of the message;The exit port of above-mentioned MAC Address list item is the port that the OF switching equipment receives the message.
In the present embodiment, after OF switching equipment receives message, equally by the message in this OF switching equipment into
Row matching, can be matching target MAC (Media Access Control) address, if the message is not matched to, not need the message up sending to controller,
But OF switching equipment oneself carries out mac learning, obtains MAC Address list item, such OF switching equipment can learn to get it
All MAC Address list items in communication process, as long as because by it message it can be carried out learning.
S803, OF switching equipment save the MAC Address list item.
S804, OF switching equipment send above-mentioned MAC Address list item to controller.
After OF switching equipment generates mac learning to address list item, controller is above given, specifically can be every study one
MAC Address list item just on send controller, be also possible to will need by the OF switching equipment forward mac address information all learn
To controller is sent on later again, make controller that the corresponding MAC Address of OF switching equipment is added in the MAC Address list item received
Table safeguarded, and controller is allow to grasp the data flow of whole network, carry out very to whole network data flow
Good control.
In the present embodiment, OF switching equipment generates MAC Address list item according to the message received and is saved, and in this way may be used
To learn all address list items into its communication process, controller, controller will be given on the MAC Address list item of study generation
The MAC Address list item sent on each OF switching equipment is safeguarded, the MAC Address of available whole network, to entire net
The data flow of network is controlled.
Further, can be in above-mentioned S804 above-mentioned OF switching equipment by OF message to controller with sending the MAC
Location list item.
Specifically, above-mentioned OF message can be named as OFP_MAC_MOD, and the format of above-mentioned OF message can be with are as follows:
struct ofp_mac_mod{ (1)
struct ofp_header header;(2)
uint64_t datapathid;The datapathid* of/* switching equipment/(3)
uint8_t table_id;Table id*/(4) where/* MAC Address list item
uint8_t command;/*One of OFPFC_*.*/ (5)
uint16_tidle_timeout;The expired time * of/* MAC Address list item/(6)
uint16_t priority;(7)
struct ofpmatch match;The mac* of/* mesh/(8)
struct ofp_instruction instructions[0];/ * Instruction:action:output is arrived
outport*/ (9)
};
Make an explanation to the main contents of above-mentioned code as follows: (1) row is for defining above-mentioned OF message name;(3) row
The OF switching equipment of the OF message is given on carrying;The mark that (4) go for carrying the MAC Address list item;(6) row is used
The digestion period for carrying address above mentioned list item;(8) row wants matched content for carrying above-mentioned MAC Address list item, at this
Purpose MAC is matched in embodiment;(9) row is matched to the purpose MAC movement to be carried out later for carrying, in the present embodiment
Instruction sends message from which port.
In the present embodiment, OF switching equipment generates MAC Address list item according to the message received and is saved, and in this way may be used
To learn all address list items into its communication process, the MAC Address list item that study generates is passed through and gives control in OF message
Device processed, controller safeguard the MAC Address list item sent on each OF switching equipment, the MAC Address of available whole network,
It is controlled with the data flow to whole network.
Fig. 9 is the flow diagram of MAC address learning embodiment of the method five provided by the invention, as shown in figure 9, this method
Include:
S901, controller receive the MAC Address list item that OF switching equipment is sent.
Above-mentioned MAC Address list item is saved in the mac address table of above-mentioned OF switching equipment by S902, controller.
Corresponding with embodiment illustrated in fig. 8, which receives the MAC Address list item that OF switching equipment is sent, and saves
It to corresponding mac address table, and is safeguarded, the MAC Address of its available whole network, with the data flow to whole network
It is controlled.
Figure 10 is the structural schematic diagram of switching equipment embodiment three provided by the invention, which can be OF network
In any OF switching equipment, the switching equipment include: receiving module 110, generation module 120, preserving module 130 and send mould
Block 140
Receiving module 110, for receiving the message of CE transmission;
Generation module 120, for generating MAC Address list item according to the message, wherein the purpose of the mac address table item
Address is the source address of the message;The exit port of the MAC Address list item is that the OF switching equipment receives the message
Port;
Preserving module 130, for saving the MAC Address list item;
Sending module 140 sends the MAC Address list item for sending to controller to controller.
Further, sending module 140 are specifically used for sending the MAC Address list item to controller by OF message.
The switching equipment is for executing embodiment of the method shown in Fig. 8, and realization principle is similar, and details are not described herein.
In the present embodiment, OF switching equipment generates MAC Address list item according to the message received and is saved, and in this way may be used
To learn all address list items into its communication process, the MAC Address list item that study generates is passed through and gives control in OF message
Device processed, controller safeguard the MAC Address list item sent on each OF switching equipment, the MAC Address of available whole network,
It is controlled with the data flow to whole network.
Figure 11 is the structural schematic diagram of controller embodiment three provided by the invention, and as shown in figure 11, which includes:
Receiving module 111 and preserving module 112, in which:
Receiving module 111, for receiving the MAC Address list item of OF switching equipment transmission;Preserving module 112 is used for institute
It states MAC Address list item and is saved in the corresponding mac address table of the OF switching equipment.
The controller is for executing embodiment of the method shown in Fig. 9, and realization principle is similar, and details are not described herein.
Figure 12 is the structural schematic diagram of switching equipment example IV provided by the invention, as shown in figure 12, the switching equipment
It can be any OF switching equipment in OF network, which includes: receiver 121, processor 122,123 and of memory
Transmitter 124, in which:
Receiver 121, for receiving the message of CE transmission;Processor 122 generates MAC Address list item according to the message,
Wherein the destination address of the mac address table item is the source address of the message;The exit port of the MAC Address list item is described
OF switching equipment receives the port of the message;Memory 123, for saving the MAC Address list item;Transmitter 124, is used for
The MAC Address list item is sent to controller.
The switching equipment is for executing embodiment of the method shown in Fig. 8, and realization principle is similar, and details are not described herein.
Figure 13 is the structural schematic diagram of controller example IV provided by the invention, and as shown in figure 13, which includes:
Receiver 131 and memory 132, in which:
Receiver 131, for receiving the MAC Address list item of OF switching equipment transmission;Memory 132 is used for the MAC
Address list item is saved in the corresponding mac address table of the OF switching equipment.
The controller is for executing embodiment of the method shown in Fig. 9, and realization principle is similar, and details are not described herein.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
The various media that can store program code such as disk.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (9)
1. a kind of medium access control MAC address learning method characterized by comprising
Open flows OF switching equipment receives the message that customer edge CE is sent;
The OF switching equipment generates MAC Address list item according to the message, wherein the destination address of the mac address table item is
The source address of the message;The exit port of the MAC Address list item is the port that the OF switching equipment receives the message;
The OF switching equipment saves the MAC Address list item;
The OF switching equipment sends the MAC Address list item to controller.
2. the method according to claim 1, wherein the OF switching equipment is to the controller transmission MAC
Location list item specifically includes:
The OF switching equipment sends the MAC Address list item to controller by OF message.
3. a kind of medium access control MAC address learning method characterized by comprising
Controller receives the MAC Address list item that open flows OF switching equipment is sent;The MAC Address list item is that the OF exchange is set
What the standby message sent according to customer edge CE generated, wherein the destination address of the mac address table item is the message
Source address;The exit port of the MAC Address list item is the port that the OF switching equipment receives the message;
The MAC Address list item is saved in the corresponding mac address table of the OF switching equipment by controller.
4. a kind of switching equipment characterized by comprising
Receiving module, for receiving the message of customer edge CE transmission;
Generation module, for generating MAC Address list item according to the message, wherein the destination address of the mac address table item is
The source address of the message;The exit port of the MAC Address list item is the port that OF switching equipment receives the message;
Preserving module, for saving the MAC Address list item;
Sending module, for sending the MAC Address list item to controller.
5. switching equipment according to claim 4, which is characterized in that the sending module is specifically used for passing through OF message
The MAC Address list item is sent to controller.
6. a kind of controller characterized by comprising
Receiving module, for receiving the MAC Address list item of open flows OF switching equipment transmission;The MAC Address list item is described
OF switching equipment is generated according to the message that customer edge CE is sent, wherein the destination address of the mac address table item is
The source address of the message;The exit port of the MAC Address list item is the port that the OF switching equipment receives the message;
Preserving module, for the MAC Address list item to be saved in the corresponding mac address table of the OF switching equipment.
7. a kind of switching equipment characterized by comprising
Receiver, for receiving the message of customer edge CE transmission;
Processor, for generating MAC Address list item according to the message, wherein the destination address of the mac address table item is institute
State the source address of message;The exit port of the MAC Address list item is the port that OF switching equipment receives the message;
Memory, for saving the MAC Address list item;
Transmitter, for sending the MAC Address list item to controller.
8. switching equipment according to claim 7, which is characterized in that the transmitter, be specifically used for by OF message to
Controller sends the MAC Address list item.
9. a kind of controller characterized by comprising
Receiver, for receiving the MAC Address list item of open flows OF switching equipment transmission;The MAC Address list item is the OF
Switching equipment is generated according to the message that customer edge CE is sent, wherein the destination address of the mac address table item is institute
State the source address of message;The exit port of the MAC Address list item is the port that the OF switching equipment receives the message;
Memory, for the MAC Address list item to be saved in the corresponding mac address table of the OF switching equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610812399.2A CN106411741B (en) | 2013-02-27 | 2013-02-27 | Medium access control MAC address learning method, controller and switching equipment |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201380000093.1A CN103430497B (en) | 2013-02-27 | 2013-02-27 | Media access contro (MAC) address learning method, controller, and exchange equipment |
CN201610812399.2A CN106411741B (en) | 2013-02-27 | 2013-02-27 | Medium access control MAC address learning method, controller and switching equipment |
CN2013071945 | 2013-02-27 |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201380000093.1A Division CN103430497B (en) | 2013-02-27 | 2013-02-27 | Media access contro (MAC) address learning method, controller, and exchange equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106411741A CN106411741A (en) | 2017-02-15 |
CN106411741B true CN106411741B (en) | 2019-11-26 |
Family
ID=49653000
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610812399.2A Active CN106411741B (en) | 2013-02-27 | 2013-02-27 | Medium access control MAC address learning method, controller and switching equipment |
CN201380000093.1A Active CN103430497B (en) | 2013-02-27 | 2013-02-27 | Media access contro (MAC) address learning method, controller, and exchange equipment |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201380000093.1A Active CN103430497B (en) | 2013-02-27 | 2013-02-27 | Media access contro (MAC) address learning method, controller, and exchange equipment |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN106411741B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105519052B (en) * | 2013-05-09 | 2019-06-11 | 华为技术有限公司 | Message forwarding method, equipment and system |
CN104125150A (en) * | 2014-07-22 | 2014-10-29 | 福建星网锐捷网络有限公司 | Protocol message processing method, device and system |
CN104320340A (en) * | 2014-10-21 | 2015-01-28 | 杭州华三通信技术有限公司 | Method and device for defining study source MAC address in network by software |
CN105847148B (en) * | 2016-03-18 | 2019-07-16 | 上海斐讯数据通信技术有限公司 | A kind of data frame transmission control method and system |
CN115297069B (en) * | 2022-07-29 | 2024-06-07 | 中国电信股份有限公司 | EVPN network equipment, MAC address learning method and communication system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101645904A (en) * | 2009-09-09 | 2010-02-10 | 中兴通讯股份有限公司 | Method and device for reducing utilization rate of central processing unit of switch |
CN101820435A (en) * | 2009-02-27 | 2010-09-01 | 华为技术有限公司 | Synchronization method and device for MAC (Media Access Control) address table information of distributed network processing system |
CN101834788A (en) * | 2010-04-16 | 2010-09-15 | 福建星网锐捷网络有限公司 | Storage operation method, device and equipment of media access control address table items |
CN102045200A (en) * | 2010-12-24 | 2011-05-04 | 武汉烽火网络有限责任公司 | Conditional synchronization method for MAC address table entry of distributed switch |
WO2012023604A1 (en) * | 2010-08-20 | 2012-02-23 | 日本電気株式会社 | Communication system, control apparatus, communication method and program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
IL144100A (en) * | 2000-07-06 | 2006-08-01 | Samsung Electronics Co Ltd | Mac address-based communication restricting method |
CN101094187B (en) * | 2007-07-30 | 2010-06-09 | 杭州华三通信技术有限公司 | Method, device, and operation board capable of learning address of medium access control |
CN101958938B (en) * | 2010-06-01 | 2013-07-24 | 福建星网锐捷网络有限公司 | Learning method and device of MAC address table based on network processor |
-
2013
- 2013-02-27 CN CN201610812399.2A patent/CN106411741B/en active Active
- 2013-02-27 CN CN201380000093.1A patent/CN103430497B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101820435A (en) * | 2009-02-27 | 2010-09-01 | 华为技术有限公司 | Synchronization method and device for MAC (Media Access Control) address table information of distributed network processing system |
CN101645904A (en) * | 2009-09-09 | 2010-02-10 | 中兴通讯股份有限公司 | Method and device for reducing utilization rate of central processing unit of switch |
CN101834788A (en) * | 2010-04-16 | 2010-09-15 | 福建星网锐捷网络有限公司 | Storage operation method, device and equipment of media access control address table items |
WO2012023604A1 (en) * | 2010-08-20 | 2012-02-23 | 日本電気株式会社 | Communication system, control apparatus, communication method and program |
CN102045200A (en) * | 2010-12-24 | 2011-05-04 | 武汉烽火网络有限责任公司 | Conditional synchronization method for MAC address table entry of distributed switch |
Also Published As
Publication number | Publication date |
---|---|
CN106411741A (en) | 2017-02-15 |
CN103430497A (en) | 2013-12-04 |
CN103430497B (en) | 2017-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106411741B (en) | Medium access control MAC address learning method, controller and switching equipment | |
CN104079492B (en) | The methods, devices and systems that flow table is configured in a kind of OpenFlow networks | |
CN105306354B (en) | Network data communication method and system without explicit addressing | |
CN101651578B (en) | Bidirectional forwarding detection method by cross-domain forwarding and PE devices | |
CN109922150A (en) | Virtual device information processing method, device, gateway of internet of things and Internet of Things communication system | |
Hassan et al. | A general framework of genetic multi-agent routing protocol for improving the performance of MANET environment | |
CN103838659B (en) | The control method and device of a kind of system journal | |
WO2013143285A1 (en) | Flow control method and device as well as clustering system | |
CN102158983A (en) | Method for constructing 6LoWPAN wireless sensor network | |
CN104243536B (en) | A kind of bullet train controls network semi-matter simulating system | |
CN103929377B (en) | Wired network and wireless network combined dispatching method and system and related devices | |
CN104378229A (en) | Link prediction method for opportunity network | |
CN107637053A (en) | Expansible network address translation in network environment | |
CN106034071B (en) | Data message transmission method and edge route-bridge equipment | |
CN103368838B (en) | A kind of Delay Tolerant Network retransmission method based on weighting socialgram | |
Ahmed et al. | Green industrial networking: recent advances, taxonomy, and open research challenges | |
CN105357071A (en) | Identification method and identification system for network complex traffic | |
CN102710510B (en) | Information processing method, apparatus and system | |
CN106105129B (en) | Topology learning method and apparatus of the Openflow network across traditional IP | |
CN104838624B (en) | The method, apparatus and system that a kind of control business data forward in virtual network | |
Adam et al. | An adaptive wake-up-interval to enhance receiver-based ps-mac protocol for wireless sensor networks | |
CN106484510A (en) | A kind of time management method based on linux kernel timer | |
Kuaban et al. | Performance analysis of packet aggregation mechanisms and their applications in access (eg, IoT, 4G/5G), core, and data centre networks | |
CN105681215B (en) | A kind of generation method and controller of forwarding-table item | |
CN108462650A (en) | A kind of output unit based on TTE interchangers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |