CN102025796B - MAC (media access control) address updating method and device - Google Patents
MAC (media access control) address updating method and device Download PDFInfo
- Publication number
- CN102025796B CN102025796B CN201010557252.6A CN201010557252A CN102025796B CN 102025796 B CN102025796 B CN 102025796B CN 201010557252 A CN201010557252 A CN 201010557252A CN 102025796 B CN102025796 B CN 102025796B
- Authority
- CN
- China
- Prior art keywords
- list item
- address
- multicast
- message
- port numbers
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5069—Address allocation for group communication, multicast communication or broadcast communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Abstract
The invention discloses an MAC (media access control) address updating method which is used for realizing unified update and maintenance of an MAC address. The method comprises the following steps: getting an IP (Internet protocol) address of a multicast group of the Internet protocol version 4 (IPv4) or an IP address of a multicast group of the Internet protocol version 6 (IPv6) according to a received message; mapping the got IP address of the multicast group of the IPv4 as the multicast MAC address when getting the IP address of the multicast group of the IPv4; mapping the got IP address of the multicast group of the IPv6 as the multicast MAC address when getting the IP address of the multicast group of the IPv6; and updating a public MAC address table according to the got multicast MAC address. The invention further discloses a device for implementing the method.
Description
Technical field
The present invention relates to the communications field, particularly a kind of MAC Address update method and device.
Background technology
Due to current IPv4(Internet Protocol version4, Internet Protocol Version 4) there is the problem of this address space deficiency in network, so with IPv6(Internet Protocol version6, IPv6) be that the Next Generation Internet agreement of core moves towards practical from conceptual phase.Compared with the 32 bit address length of IPv4, the 128 bit address length of IPv6 not only can meet the demand of global user to IP address, can also provide better support in each side such as fail safe, mobility, service quality, therefore IPv6 replaces IPv4 has become the inexorable trend of network Development.But because current the Internet also belongs to the initial stage that IPv6 develops; existing IPv4 network possesses suitable scale; in order to protect existing equipment and investment, network can not disposable replacement arrive IPv6, but by the process that faces long-term IPv4, an IPv6 and deposit.Only carry out at present the fusion of IPV4 and IPV6 network, just can realize a smooth transition.
The general principle of multicasting technology is to utilize IGMP(Internet Group Management Protocol, Internet group management protocol of the multicast group) or MLD(Multicast Listener Discovery, multicast listener discovery) safeguard multicast group relation.IGMP(IPv4) or in MLD(IPv6) run on three-layer equipment, add or leave multicast group and carry out dynamic management for multicast receivers, and setting up three layers of multicast forwarding list item.Simultaneously, on two-layer equipment, move IGMP Snooping(Internet Group Management Protocol Snooping, Internet group management protocol of the multicast group is spied upon) or MLD Snooping(Multicast Listener Discovery Snooping, multicast listener discovery is spied upon), configure respectively IGMP message or MLD message between three-layer equipment and the multicast receivers of IGMP agreement or MLD agreement, on two-layer equipment, set up and safeguarded MAC multicast address according to message.The multicast data message that two-layer equipment is received later just forwards according to this MAC multicast address, realizes the Layer 2 Multicast of multicast data message.
In prior art, support at the same time on the dual stack two-layer equipment of IPv4 and IPv6, IPV4 protocol stack and IPv6 protocol stack may be distinguished independent maintenance MAC multicast address separately, so not only can cause the waste of hardware resource, software also can increase complexity on realizing, and is not easy to MAC Address to carry out safety management.
Summary of the invention
The embodiment of the present invention provides a kind of MAC Address update method, and for realizing, the unified of MAC Address upgraded and safeguarded, and a kind of method of multicasting, for realizing according to unified MAC Address, data are carried out to multicast.
A kind of MAC Address update method, comprises the following steps:
Obtain the multicast group IP address of Internet Protocol Version 4 IPv4 version or the multicast group IP address of IPv6 IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
In the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
Upgrade public mac address table according to the multicast mac address obtaining.
A kind of method of multicasting, comprises the following steps:
Obtain the multicast group IP address of IPv4 version or the multicast group IP address of IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
In the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
In public mac address table, inquire about the port numbers corresponding with described multicast mac address according to described multicast mac address, carry out data retransmission according to described port numbers.
A kind of MAC Address updating device, comprising:
Processing module, for obtaining the multicast group IP address of IPv4 version or the multicast group IP address of IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
Modular converter, in the time obtaining the multicast group IP address of IPv4 version, is mapped as multicast media access control MAC address by the multicast group IP address of the IPv4 version of acquisition; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
Executive Module, for upgrading public mac address table according to the multicast mac address obtaining.
A kind of multicast apparatus, comprising:
Processing module, for obtaining the multicast group IP address of IPv4 version or the multicast group IP address of IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
Modular converter, in the time obtaining the multicast group IP address of IPv4 version, is mapped as multicast media access control MAC address by the multicast group IP address of the IPv4 version of acquisition; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
Executive Module, for inquiring about the port numbers corresponding with described multicast mac address according to described multicast mac address at public mac address table, carries out data retransmission according to described port numbers.
The embodiment of the present invention obtains the multicast group IP address of Internet Protocol Version 4 IPv4 version or the multicast group IP address of IPv6 IPv6 version according to the message of receiving; In the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address; Upgrade public mac address table according to the multicast mac address obtaining.IPv4 and IPv6 use same public mac address table, realized the unified of MAC Address upgraded and safeguarded, have saved memory source.
Brief description of the drawings
Fig. 1 is the primary structure figure of MAC Address updating device in the embodiment of the present invention;
Fig. 2 is the detailed structure view of MAC Address updating device in the embodiment of the present invention;
Fig. 3 A is the detailed structure view of processing module in MAC Address updating device in the embodiment of the present invention;
Fig. 3 B is the detailed structure view of Executive Module in MAC Address updating device in the embodiment of the present invention;
Fig. 4 is the main flow chart of MAC Address update method in the embodiment of the present invention;
In Fig. 5 embodiment of the present invention, receive join message as IPv4 version time, obtain the detail flowchart of IGMP Snooping list item;
Fig. 6 is joining message as IPv6 version of receiving in the embodiment of the present invention, obtains the detail flowchart of MAC Address;
Fig. 7 is the leave message received in the embodiment of the present invention while being IPv4 version, the detail flowchart of the processing to IGMP Snooping list item;
Fig. 8 be in the embodiment of the present invention in the time that the leave message of receiving is IPv6 version, the detail flowchart of the processing to MLDSnooping list item.
Embodiment
The embodiment of the present invention obtains the multicast group IP address of Internet Protocol Version 4 IPv4 version or the multicast group IP address of IPv6 IPv6 version according to the message of receiving; In the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address; Upgrade public mac address table according to the multicast mac address obtaining.IPv4 and IPv6 use same public mac address table, realized the unified of MAC Address upgraded and safeguarded, have saved memory source.
Referring to Fig. 1, in the embodiment of the present invention, MAC Address updating device comprises processing module 101, Executive Module 102 and modular converter 103.
(0100.5e01.0101, port one)
Wherein, 0100.5e01.0101 is the MAC Address obtaining after multicast group IP address 224.1.1.1 mapping.For example, another MAC forwarding entry is:
(3333.0000.0001, port 2)
Wherein, 3333.0000.0001 is the multicast mac address obtaining after multicast group IP address ff4e::1 mapping.Because be all to start with 01005e after the mapping of the corresponding IP of IPv4 address, after the mapping of the corresponding IP of IPv6 address, be all with 3333 beginnings, therefore the MAC Address obtaining after IPv4 corresponding IP address and the mapping of the corresponding IP of IPv6 address can be not identical, when the two stores in address table unit 1022, can not clash.
Referring to Fig. 2, described device also comprises transceiver module 104, and described device can also comprise memory module 105.
Referring to Fig. 3 A, described processing module 101 specifically comprises the first resolution unit 1011, the second resolution unit 1012, the first query unit 1013, the second query unit 1014, the first creating unit 1015 and the second creating unit 1016.Wherein, the first resolution unit 1011, the first query unit 1013 and the first creating unit 1015 are the equipment corresponding to IPv4, and the second resolution unit 1012, the second query unit 1014 and the second creating unit 1016 are the equipment corresponding to IPv6.In embodiments of the present invention, what in processing module 101, IPv4 is joined message all sends and adds the message of multicast group 224.1.1.1 as example taking IPv4 multicast recipient for example, and what IPv6 was joined message all sends and add the message of multicast group ff4e::1 as example taking IPv4 multicast recipient for example.
The first resolution unit 1011 is resolved for the message that IPv4 multicast recipient is sent.Transceiver module 104 receiving after message, and the protocol type that judges this message is IPv4 version or IPv6 version, in the time determining that the protocol type of this message is IPv4 version, notifies the first resolution unit 1011 to resolve.The first resolution unit 1011, receiving after the message that IPv4 multicast recipient sends, judges that this message joins message or leave message, and parses the parameter information comprising in this message.Wherein, this parameter information at least comprises multicast group IP address and VLAN ID, can obtain the port numbers of the port that receives this message in the time receiving described message.Multicast group IP address can corresponding multiple port numbers, and a VLAN ID can corresponding multiple port numbers.For example, the first resolution unit 1011 is received after message, determines that the port numbers of the port that receives this message is port one, and the message parameter information parsing is:
IPv4 multicast group IP address: 224.1.1.1, VLAN ID:100
The second resolution unit 1012 is resolved for the message that IPv6 multicast recipient is sent.Transceiver module 104 receiving after message, and the protocol type that judges this message is IPv4 version or IPv6 version, in the time determining that the protocol type of this message is IPv6 version, notifies the second resolution unit 1012 to resolve.The second resolution unit 1012, receiving after the message that IPv6 multicast recipient sends, judges that this message joins message or leave message parses the parameter information comprising in this message.Wherein, this parameter information at least comprises that multicast group IP address and VLAN ID receive the port numbers of the port of this message.Multicast group IP address can corresponding multiple port numbers, and a VLAN ID can corresponding multiple port numbers.For example, the message parameter information that resolution unit 1022 parses is:
IPv6 multicast group IP address: ff4e::1, VLAN ID:100, port: port 2.
The multicast group IP address lookup IGMP Snooping list item that the first query unit 1013 parses for basis.Query unit 1013 is safeguarded all IGMP Snooping list items, all IGMP Snooping list items can be stored for inquiry and call.When the first resolution unit 1011 parses after the parameter information comprising in message, notify the first query unit 1013 to inquire about.If join message, the multicast group IP address lookup comprising in the message information that the first query unit 1013 parses according to the first resolution unit 1011 and judge storage IGMP Snooping list item in whether have the IGMP Snooping list item set that has comprised this multicast group IP address, if judged result is no, the port numbers of the port of notifying the first creating unit 1015 according to this multicast group IP address and join message described in receiving creates an IGMP Snooping list item, this IGMP Snooping list item forms the IGMP Snooping list item set corresponding to this multicast group IP address, if judged result is yes, judge that the port numbers whether having in this IGMP Snooping list item set in IGMP Snooping list item is the port numbers of the port that joins message described in receiving, if there is the port numbers in IGMP Snooping list item identical with the port numbers of the port joining message described in reception in this IGMP Snooping list item set, directly this IGMP Snooping list item is sent to Executive Module 102, if do not have the port numbers in IGMP Snooping list item identical with the port numbers of the port joining message described in reception in this IGMP Snooping list item set, the port numbers of the port of notifying the first creating unit 101 according to this multicast group IP address and join message described in receiving creates an IGMP Snooping list item in this IGMP Snooping list item set, if leave message, the multicast group IP address lookup comprising in the message information that the first query unit 1013 parses according to the first resolution unit 1011 and judge storage IGMP Snooping list item in whether have the IGMP Snooping list item set that has comprised this multicast group IP address, if judged result is no, do not carry out any operation, if judged result is yes, whether judge in this IGMP Snooping list item set has the port numbers in IGMP Snooping list item identical with the port numbers of the port of the described leave message of reception, if do not have the port numbers in IGMP Snooping list item identical with the port numbers of the port of the described leave message of reception in this IGMP Snooping list item set, do not carry out any operation, if there is the port numbers in IGMP Snooping list item to add the port numbers of the port leaving identical with described in reception in this IGMP Snooping list item set, delete this port numbers, and delete this IGMP Snooping list item.If this IGMP Snooping list item set, for empty, is deleted this IGMP Snooping list item set after deleting this IGMP Snooping list item.
The multicast group IP address lookup MLD Snooping list item that the second query unit 1014 parses for basis.The second query unit 1014 is safeguarded all MLD Snooping list items, all MLD Snooping list items can be stored for inquiry and call.When the second resolution unit 1012 parses after the parameter information comprising in message, notify the second query unit 1014 to inquire about.If join message, the multicast group IP address lookup comprising in the message information that the second query unit 1014 parses according to the second resolution unit 1012 and judge storage MLD Snooping list item in whether have the MLD Snooping list item set that has comprised this multicast group IP address, if judged result is no, the port numbers of the port of notifying the second creating unit 1016 according to this multicast group IP address and join message described in receiving creates a MLD Snooping list item, this MLD Snooping list item forms the MLD Snooping list item set corresponding to this multicast group IP address, if judged result is yes, judge that the port numbers that whether has MLD Snooping list item to comprise in this MLD Snooping list item set is identical with the port numbers of the port joining message described in reception, if the port numbers that has MLD Snooping list item to comprise in this MLD Snooping list item set is identical with the port numbers of the port joining message described in reception, directly this MLD Snooping list item is sent to Executive Module 102, if the port numbers that does not have MLD Snooping list item to comprise in this MLD Snooping list item set is identical with the port numbers of the port joining message described in reception, the port numbers of the port of notifying the second creating unit 1016 according to this multicast group IP address and join message described in receiving creates a MLD Snooping list item in this MLD Snooping list item set, if leave message, the multicast group IP address lookup comprising in the message information that the second query unit 1014 parses according to the second resolution unit 1012 and judge storage MLD Snooping list item in whether have the MLD Snooping list item set that has comprised this multicast group IP address, if judged result is no, do not carry out any operation, if judged result is yes, judge that the port numbers that whether has MLD Snooping list item to comprise in this MLD Snooping list item set is identical with the port numbers of the port of the described leave message of reception, if the port numbers that does not have MLD Snooping list item to comprise in this MLD Snooping list item set is identical with the port numbers of the port of the described leave message of reception, do not carry out any operation, if the port numbers that has MLD Snooping list item to comprise in this MLD Snooping list item set is identical with the port numbers of the port of the described leave message of reception, delete this port numbers, and delete this MLD Snooping list item.If deleted after this MLD Snooping list item, this MLD Snooping list item set is empty, deletes this MLD Snooping list item set.
The first creating unit 1015 is for creating IGMP Snooping list item.If the first query unit 1013 is judged the IGMP Snooping list item set that does not comprise the multicast group IP address comprising in the message parsing in the IGMP Snooping list item of storage, or in the IGMP Snooping list item set corresponding to the multicast group IP address comprising in the message parsing, do not comprise the IGMP Snooping list item of the port numbers of the port that receives described message, the first creating unit 1015 creates an IGMP Snooping list item according to the port numbers of the multicast group IP address comprising in this message parsing and the port that receives described message, this IGMP Snooping list item comprises the multicast group IP address comprising in the message parsing, VLAN ID and receive the port numbers port numbers of the port of described message, again this IGMP Snooping list item is sent to Executive Module 102.For example, the IGMP Snooping list item of this establishment can be as follows:
IGMP Snooping list item: (224.1.1.1,100,1)
Wherein, 224.1.1.1 is multicast group IP address, and 100 is VLAN ID, the port numbers port numbers of 1 port for the described message of reception.Multicast group IP address can corresponding multiple VLAN ID, also can corresponding multiple port numbers, but in an IGMP Snooping list item, only comprise a multicast group IP address, a VLAN ID and a port numbers.
The second creating unit 1016 is for creating MLD Snooping list item.If the second query unit 1014 is judged the MLD Snooping list item set that does not comprise the multicast group IP address comprising in the message parsing in the MLD Snooping list item of storage, or in the MLD Snooping list item set corresponding to the multicast group IP address comprising in the message parsing, do not comprise the MLD Snooping list item of the port numbers of the port that receives described message, the second creating unit 1016 creates a MLD Snooping list item according to the port numbers of the multicast group IP address comprising in this message parsing and the port that receives described message, this MLD Snooping list item comprises the multicast group IP address comprising in the message parsing, VLANID and port numbers, again this MLD Snooping list item is sent to Executive Module 102.For example, the MLD Snooping list item of this establishment can be as follows:
MLD Snooping list item: (ff4e::1,100,2)
Wherein, ff4e::1 is multicast group IP address, and 100 is VLAN ID, the port numbers port numbers of 2 ports for the described message of reception.Multicast group IP address can corresponding multiple VLAN ID, also can corresponding multiple port numbers, but in a MLD Snooping list item, only comprise a multicast group IP address, a VLANID and a port numbers.
Referring to Fig. 3 B, in described Executive Module 102, specifically comprise operating unit 1021 and address table unit 1022.Wherein, Executive Module 102 can be realized by function.
Introduce method of multicasting below by flow process.
Referring to Fig. 4, the main method flow process that MAC Address is upgraded is as follows:
Step 401: obtain the multicast group IP address of IPv4 version or the multicast group IP address of IPv6 version according to the message of receiving.
Step 402: in the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address.
Step 403: upgrade public mac address table according to the multicast mac address obtaining.
Referring to Fig. 5, the embodiment of the present invention joins message as example to receive.While joining message as IPv4 version, the method detailed flow process that obtains IGMP Snooping list item is as follows:
Step 501: receive and join message, obtain the port numbers of the port joining message described in receiving.Wherein, this to join message be that IPv4 multicast recipient sends.
Step 502: resolve this and join message, obtain multicast group IP address, VLAN ID.Judge the protocol type that this joins message, determine it is IPv4 or IPv6.
Step 503: according to this multicast group IP address, judge whether to exist corresponding IGMP Snooping list item set.When judged result is when being, execution step 504, otherwise execution step 505.If joining message of receiving in step 501 is that IPv6 multicast recipient sends, this step is to judge whether to exist corresponding MLD Snooping list item.
Step 504: judge that the port numbers that whether has IGMP Snooping list item to comprise in this IGMP Snooping list item set is identical with the port numbers of the port joining message described in reception.When judged result is while being no, continue step 505, otherwise continue step 506.
Step 505: create IGMP Snooping list item according to this multicast group IP address, VLAN ID and port numbers.For example, an IGMP Snooping list item can be: (224.1.1.1,100,1).Execution step 507.If joining message of receiving in step 501 is that IPv6 multicast recipient sends, this step is to create MLD Snooping list item according to this multicast group IP address, VLAN ID and port numbers.
Step 506: this IGMP Snooping list item is sent to Executive Module 102.It in the time of specific implementation, can be the interface function that calls Executive Module 102.If joining message of receiving in step 501 is that IPv6 multicast recipient sends, this step is for to send to Executive Module 102 by this MLD Snooping list item.
Referring to Fig. 6, the embodiment of the present invention joins message as example to receive, when joining message as IPv6 version of receiving, the method detailed flow process that obtains MAC Address is as follows:
Step 601: receive MLD Snooping list item.If that receives joins message as IPv4 version, what in this step, receive is IGMP Snooping list item.
Step 602: the IP address version of determining this MLD Snooping list item is IPv6.If what receive in step 601 is IGMP Snooping list item, this step is to determine that the IP address version of this IGMP Snooping list item is IPv4.
Step 603: the multicast group IP address mapping that MLD Snooping list item is comprised obtains multicast mac address.Wherein, the multicast group IP address of IPv6 version is 128, and the MAC Address that mapping obtains is 48.For example, be 3333.0000.0001 by the multicast mac address obtaining after the multicast group IP address mapping of ff4e::1.If determine in step 602 that the IP address version of IGMP Snooping list item is IPv4, this step is that the multicast group IP address mapping that IGMP Snooping list item is comprised obtains multicast mac address.
Step 604: judge and whether have in already present MAC forwarding entry and the set of the corresponding multicast MAC of this multicast mac address forwarding entry.Wherein, corresponding referring in existing MAC forwarding entry, has in the set of multicast MAC forwarding entry corresponding multicast mac address identical with this multicast mac address.When judged result is when being, execution step 605, otherwise execution step 606.
Step 605: judge that the port numbers that whether has MAC forwarding entry to comprise in the set of this multicast MAC forwarding entry is identical with the port numbers of carrying in the second list item.When judged result is while being no, continue step 606, otherwise continue step 607.If what receive in step 601 is IGMP Snooping list item, this step is identical with the port numbers of carrying in the first list item for judging the port numbers that in this MAC forwarding entry set, whether multicast has MAC forwarding entry to comprise.。
Step 606: add a MAC forwarding entry according to the port numbers of carrying in this multicast mac address and described the second list item.
Step 607: this MLD Snooping list item is sent to Executive Module 102.
Referring to Fig. 7, in the embodiment of the present invention, to receive that leave message is as example, in the time that leave message is IPv4 version, the method detailed flow process of the processing to IGMP Snooping list item is as follows:
Step 701: receive leave message, obtain the port numbers of the port that receives described leave message.Wherein, this leave message is that IPv4 multicast recipient sends.
Step 702: determine that this leave message is IPv4 version.Or this leave message can be also IPv6 version.
Step 703: resolve this leave message, obtain multicast group IP address and VLAN ID.
Step 704: according to this multicast group IP address, judge whether to exist corresponding IGMP Snooping list item set.When judged result is when being, execution step 704, otherwise process ends.If determine in step 702 that this leave message is IPv6 version, this step is according to this multicast group IP address, judges whether to exist corresponding MLD Snooping list item.
Step 705: judge that the port numbers that whether has IGMP Snooping list item to comprise in this IGMP Snooping list item set is identical with the port numbers of the port of the described leave message of reception.When judged result is when being, execution step 706, otherwise process ends.
Step 706: delete this port numbers in this IGMP Snooping list item, and delete this IGMP Snooping list item.
Step 707: judge whether this IGMP Snooping list item set is empty.When judged result is when being, continue step 708, otherwise process ends.
Step 708: delete this IGMP Snooping list item set.
Referring to Fig. 8, in the embodiment of the present invention, to receive that leave message is as example, in the time that leave message is IPv6 version, the method detailed flow process of the processing to MLD Snooping list item is as follows:
Step 801: obtain the multicast group IP address in MLD Snooping list item.If leave message is IPv4 version, this step is the multicast group IP address obtaining in IGMP Snooping list item.
Step 802: the IP address version of determining this MLD Snooping list item is IPv6.If step 801 is for obtaining the multicast group IP address in IGMP Snooping list item, this step is to determine that the IP address version of this IGMPSnooping list item is IPv4.
Step 803: the multicast group IP address mapping that MLD Snooping list item is comprised obtains multicast mac address.Wherein, the multicast group IP address of IPv6 version is 128, and the multicast mac address that mapping obtains is 48.For example, be 3333.0000.0001 by the multicast mac address obtaining after the multicast group IP address mapping of ff4e::1.If determine in step 602 that the IP address version of IGMP Snooping list item is IPv4, this step is that the multicast group IP address mapping that IGMP Snooping list item is comprised obtains multicast mac address.
Step 804: judge and whether have in already present MAC forwarding entry and the corresponding multicast MAC forwarding entry set of this multicast group IP address.Wherein, corresponding referring in existing MAC forwarding entry, the MAC Address that has MAC forwarding entry to comprise is identical with this multicast mac address.When judged result is when being, execution step 805, otherwise process ends.
Step 805: judge that the port numbers that whether has multicast MAC forwarding entry to comprise in this MAC forwarding entry set is identical with the port numbers of carrying in the second list item.When judged result is when being, execution step 806, otherwise process ends.
Step 806: delete this port numbers in this multicast MAC forwarding entry, and delete this MAC forwarding entry.
Step 807: judge whether the set of this multicast MAC forwarding entry is empty.When judged result is when being, execution step 808, otherwise process ends.
Step 808: delete this MAC forwarding entry set of multicast.
The embodiment of the present invention obtains the multicast group IP address of Internet Protocol Version 4 IPv4 version or the multicast group IP address of IPv6 IPv6 version according to the message of receiving; In the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address; Upgrade public mac address table according to the multicast mac address obtaining.The MAC Address of IPv4 and IPv6 is unified to storage, and IPv4 and IPv6 protocol stack no longer need to safeguard respectively public mac address table separately, have saved memory source.And IPv4 and IPv6 dual stack manage with same Executive Module 102, reduce the complexity that software is realized, and, in the time implementing safety management for multicast mac address, can avoid and concrete protocol version coupling, strengthen MAC transplantability, also realized the unified storage to MAC Address and safeguarded, in the time processing leave message, if delete after corresponding IGMP Snooping list item or MLD Snooping list item IGMP Snooping list item set or the set of MLD Snooping list item for empty, delete this IGMP Snooping list item set or the set of MLD Snooping list item, if the set of multicast MAC forwarding entry is for empty after deleting corresponding MAC forwarding entry, delete this MAC forwarding entry set, thereby effectively save memory headroom, make in public mac address table canned data more reasonable, be convenient to utilize.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the present invention can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) that wherein include computer usable program code.
The present invention is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present invention, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computer or other programmable data processing device produces the device for realizing the function of specifying at flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame on computer or other programmable devices.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if these amendments of the present invention and within modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.
Claims (16)
1. a MAC Address update method, is characterized in that, comprises the following steps:
Obtain the multicast group IP address of Internet Protocol Version 4 IPv4 version or the multicast group IP address of IPv6 IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
In the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
Upgrade public mac address table according to the multicast mac address obtaining.
2. the method for claim 1, is characterized in that, described in the message received for joining message, in the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address and also comprises step before:
When obtain the multicast group IP address of IPv4 version according to the message of receiving, judge Internet group management protocol of the multicast group spies upon in IGMP Snooping, whether there is the first list item set corresponding to the multicast group IP address of described IPv4 version, when judged result is while being no, the first list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of IPv4 version;
When obtain the multicast group IP address of IPv6 version according to the message of receiving, judge multicast listener discovery spies upon in MLD Snooping, whether there is the second list item set corresponding to the multicast group IP address of described IPv6 version, when judged result is while being no, the second list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of IPv6 version.
3. method as claimed in claim 2, is characterized in that,
In the time that judgement defines the first list item set corresponding to the multicast group IP address of described IPv4 version, the port numbers that judges the port joining message described in whether having port numbers that the first list item comprises in described the first list item set and receiving is identical, when the port numbers that does not have the first list item to comprise in described the first list item set with receive described in the port numbers of the port that joins message when identical, the first list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of described IPv4 version; Or
In the time that judgement defines the second list item set corresponding to the multicast group IP address of described IPv6 version, the port numbers that judges the port joining message described in whether having port numbers that the second list item comprises in described the second list item set and receiving is identical, when the port numbers that does not have the first list item to comprise in described the second list item set with receive described in the port numbers of the port that joins message when identical, the second list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of described IPv6 version.
4. method as claimed in claim 2 or claim 3, it is characterized in that, the described message of receiving is for joining message, the step of upgrading public mac address table according to the multicast mac address obtaining comprises: judge in public mac address table, whether there is the multicast MAC forwarding entry set corresponding to the multicast mac address of described acquisition, when judged result is while being no, create according to the multicast mac address obtaining the MAC forwarding entry that comprises the port numbers of carrying in described the first list item or the second list item, when judged result is when being, judge that the port numbers that whether has MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry is identical with the port numbers of carrying in described the first list item or the second list item, in the time that the port numbers that does not have MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry is identical with the port numbers of carrying in described the first list item or the second list item, in the set of described multicast MAC forwarding entry, add the MAC forwarding entry of the port numbers of carrying in comprising described the first list item or the second list item according to described multicast mac address.
5. the method for claim 1, is characterized in that, described in the message received be leave message, in the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address and also comprises step before:
Judge and in IGMP Snooping, whether have the first list item set corresponding to the multicast group IP address of described IPv4 version, when judged result is when being, judge that in described the first list item set, whether to have port numbers that the first list item comprises identical with the port numbers of port of receiving described leave message, in the time that the port numbers that has the first list item to comprise in described the first list item set is identical with the port numbers of port of receiving described leave message, in described the first list item, delete this port numbers, and delete described the first list item; Or
Judge and in MLD Snooping, whether have the second list item set corresponding to the multicast group IP address of described IPv6 version, when judged result is when being, judge that in described the second list item set, whether to have port numbers that the second list item comprises identical with the port numbers of port of receiving described leave message, in the time that the port numbers that has the second list item to comprise in described the second list item set is identical with the port numbers of port of receiving described leave message, in this port numbers of middle deletion of described the second list item, and delete described the second list item.
6. method as claimed in claim 5, is characterized in that, also comprises step:
Judge that whether described the first list item set is empty, when judged result is when being, delete described the first list item set; Or
Judge that whether described the second list item set is empty, when judged result is when being, delete described the second list item set.
7. the method as described in claim 5 or 6, it is characterized in that, the described message of receiving is leave message, the step of upgrading public mac address table according to the multicast mac address obtaining comprises: judge whether the multicast MAC forwarding entry set corresponding to the multicast mac address of described acquisition, when judged result is when being, judge that the port numbers that whether has MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry is identical with the port numbers of carrying in described the first list item or the second list item, in the time that the port numbers that has MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry is identical with the port numbers of carrying in described the first list item or the second list item, in described MAC forwarding entry, delete this port numbers, and delete described MAC forwarding entry, continue to judge whether the set of described multicast MAC forwarding entry is empty, in the time that the set of described multicast MAC forwarding entry is sky, deletes the set of described multicast MAC forwarding entry.
8. a method of multicasting, is characterized in that, comprises the following steps:
Obtain the multicast group IP address of IPv4 version or the multicast group IP address of IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
In the time obtaining the multicast group IP address of IPv4 version, the multicast group IP address of the IPv4 version of acquisition is mapped as to multicast media access control MAC address; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
In public mac address table, inquire about the port numbers corresponding with described multicast mac address according to described multicast mac address, carry out data retransmission according to described port numbers.
9. a MAC Address updating device, is characterized in that, comprising:
Processing module, for obtaining the multicast group IP address of IPv4 version or the multicast group IP address of IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
Modular converter, in the time obtaining the multicast group IP address of IPv4 version, is mapped as multicast media access control MAC address by the multicast group IP address of the IPv4 version of acquisition; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
Executive Module, for upgrading public mac address table according to the multicast mac address obtaining.
10. device as claimed in claim 9, it is characterized in that, the described message of receiving is for joining message, described processing module also obtains the multicast group IP address of IPv4 version for the message of receiving when basis, judge Internet group management protocol of the multicast group spies upon in IGMP Snooping, whether there is the first list item set corresponding to the multicast group IP address of described IPv4 version, when judged result is while being no, the first list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of IPv4 version; When obtain the multicast group IP address of IPv6 version according to the message of receiving, judge multicast listener discovery spies upon in MLD Snooping, whether there is the second list item set corresponding to the multicast group IP address of described IPv6 version, when judged result is while being no, the second list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of IPv6 version.
11. devices as claimed in claim 10, it is characterized in that, described processing module is also when defining the first list item set corresponding to the multicast group IP address of described IPv4 version when judgement, the port numbers that judges the port joining message described in whether having port numbers that the first list item comprises in described the first list item set and receiving is identical, when the port numbers that does not have the first list item to comprise in described the first list item set with receive described in the port numbers of the port that joins message when identical, the first list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of described IPv4 version, or in the time that judgement defines the second list item set corresponding to the multicast group IP address of described IPv6 version, the port numbers that judges the port joining message described in whether having port numbers that the second list item comprises in described the second list item set and receiving is identical, when the port numbers that does not have the first list item to comprise in described the second list item set with receive described in the port numbers of the port that joins message when identical, the second list item of the port numbers that comprises the port joining message described in receiving according to the multicast group IP address creation of described IPv6 version.
12. devices as described in claim 10 or 11, it is characterized in that, the described message of receiving is for joining message, described Executive Module is for judging whether public mac address table has the multicast MAC forwarding entry set corresponding to the multicast mac address of described acquisition, when judged result is while being no, create according to the multicast mac address obtaining the MAC forwarding entry that comprises the port numbers of carrying in described the first list item or the second list item, when judged result is when being, judge that the port numbers that whether has MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry is identical with the port numbers of carrying in described the first list item or the second list item, in the time that the port numbers that does not have MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry is identical with the port numbers of carrying in described the first list item or the second list item, in the set of described multicast MAC forwarding entry, add the MAC forwarding entry of the port numbers of carrying in comprising described the first list item or the second list item according to described multicast mac address.
13. devices as claimed in claim 9, it is characterized in that, the described message of receiving is leave message, described processing module is also for judging whether IGMP Snooping has the first list item set corresponding to the multicast group IP address of described IPv4 version, when judged result is when being, judge that in described the first list item set, whether to have port numbers that the first list item comprises identical with the port numbers of port of receiving described leave message, in the time that the port numbers that has the first list item to comprise in described the first list item set is identical with the port numbers of port of receiving described leave message, in described the first list item, delete this port numbers, and delete described the first list item, or judge and in MLD Snooping, whether have the second list item set corresponding to the multicast group IP address of described IPv6 version, when judged result is when being, judge that in described the second list item set, whether to have port numbers that the second list item comprises identical with the port numbers of port of receiving described leave message, in the time that the port numbers that has the second list item to comprise in described the second list item set is identical with the port numbers of port of receiving described leave message, in described the second list item, delete this port numbers, and delete described the second list item.
14. devices as claimed in claim 13, is characterized in that, described processing module is also for judging that whether described the first list item set is empty, when judged result is when being, delete described the first list item set; Or judge that whether described the second list item set is empty, when judged result is when being, delete described the second list item set.
15. devices as described in claim 13 or 14, it is characterized in that, the described message of receiving is leave message, described Executive Module is for judging whether the multicast MAC forwarding entry set corresponding to the multicast mac address of described acquisition, when judged result is when being, judge that the port numbers that whether has MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry is identical with the port numbers of carrying in described the first list item or the second list item, when the port numbers that has MAC forwarding entry to comprise in the set of described multicast MAC forwarding entry identical with the port numbers of carrying in described the first list item or the second list item, in described multicast MAC forwarding entry, delete this port numbers, and delete described MAC forwarding entry, continue to judge whether the set of described multicast MAC forwarding entry is empty, in the time that the set of described multicast MAC forwarding entry is sky, deletes the set of described multicast MAC forwarding entry.
16. 1 kinds of multicast apparatus, is characterized in that, comprising:
Processing module, for obtaining the multicast group IP address of IPv4 version or the multicast group IP address of IPv6 version according to the message of receiving; Wherein, described message is to join message or leave message, and described message is to be sent by IPv4 multicast recipient or IPv6 multicast recipient;
Modular converter, in the time obtaining the multicast group IP address of IPv4 version, is mapped as multicast media access control MAC address by the multicast group IP address of the IPv4 version of acquisition; In the time obtaining the multicast group IP address of IPv6 version, the multicast group IP address of the IPv6 version of acquisition is mapped as to multicast mac address;
Executive Module, for inquiring about the port numbers corresponding with described multicast mac address according to described multicast mac address at public mac address table, carries out data retransmission according to described port numbers.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010557252.6A CN102025796B (en) | 2010-11-23 | 2010-11-23 | MAC (media access control) address updating method and device |
PCT/CN2011/075002 WO2012068854A1 (en) | 2010-11-23 | 2011-05-31 | Method and apparatus for updating media access control (mac) address |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010557252.6A CN102025796B (en) | 2010-11-23 | 2010-11-23 | MAC (media access control) address updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102025796A CN102025796A (en) | 2011-04-20 |
CN102025796B true CN102025796B (en) | 2014-06-11 |
Family
ID=43866638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010557252.6A Active CN102025796B (en) | 2010-11-23 | 2010-11-23 | MAC (media access control) address updating method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102025796B (en) |
WO (1) | WO2012068854A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102025796B (en) * | 2010-11-23 | 2014-06-11 | 中兴通讯股份有限公司 | MAC (media access control) address updating method and device |
CN103227843B (en) | 2012-08-31 | 2016-05-04 | 杭州华三通信技术有限公司 | A kind of physical link address management method and device |
WO2014089746A1 (en) * | 2012-12-10 | 2014-06-19 | 华为技术有限公司 | Message forwarding method and device |
CN107888713B (en) * | 2016-09-30 | 2021-10-01 | 中兴通讯股份有限公司 | Method and device for dynamically allocating MAC address and access equipment |
CN110830378B (en) * | 2018-08-07 | 2022-05-17 | 迈普通信技术股份有限公司 | Address table item updating method and switching equipment |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101191721B1 (en) * | 2005-11-03 | 2012-10-16 | 삼성전자주식회사 | METHOD FOR GENERATING AND MANAGING CONNECTION IDENTIFIERS FOR SUPPORTING GROUP MULTICASTING IN IPv6-BASED WIRELESS NETWORK AND NETWORK INTERFACE OF ENABLING THE METHOD |
CN1968273B (en) * | 2006-10-26 | 2010-08-18 | 杭州华三通信技术有限公司 | IPv6 service supporting method and its switching device |
CN1980246B (en) * | 2006-12-07 | 2011-04-13 | 杭州华三通信技术有限公司 | Two-layer multi-casting flow retransmission method |
CN101291240B (en) * | 2008-06-19 | 2010-08-25 | 杭州华三通信技术有限公司 | Multicast flow transmission method and system |
CN102025796B (en) * | 2010-11-23 | 2014-06-11 | 中兴通讯股份有限公司 | MAC (media access control) address updating method and device |
-
2010
- 2010-11-23 CN CN201010557252.6A patent/CN102025796B/en active Active
-
2011
- 2011-05-31 WO PCT/CN2011/075002 patent/WO2012068854A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
CN102025796A (en) | 2011-04-20 |
WO2012068854A1 (en) | 2012-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103152264B (en) | Openflow network and IP network connection communication method and Openflow subnet edge switch | |
CN101052022B (en) | System and method for virtual special net user to access public net | |
CN102025796B (en) | MAC (media access control) address updating method and device | |
CN102457386B (en) | Multicast message transmission method in bidirectional PIM (Personal Information Management) of communication equipment and communication equipment | |
CN105264493A (en) | Dynamic virtual machines migration over information centric networks | |
CN101594358A (en) | Three layer switching methods, device, system and host | |
CN102571587B (en) | Method and equipment for forwarding messages | |
CN107547399B (en) | Multicast forwarding table item processing method and PE equipment | |
JP5884899B2 (en) | Control device, physical node, terminal device, communication system, port state display method and program | |
CN104980355A (en) | Source controllable multicast data transmission method and system thereof under SDN Environment | |
CN104301238A (en) | Message processing method, device and system | |
CN112134776B (en) | Method for generating multicast forwarding table item and access gateway | |
CN104852840A (en) | Method and device for controlling mutual access between virtual machines | |
CN103441932A (en) | Host routing table entry generating method and device | |
CN103634214A (en) | Route information generating method and device | |
CN104753789A (en) | Message forwarding method and system | |
CN103166846A (en) | Message forwarding method and device | |
CN109936490A (en) | Virtual home network share method and system based on VXLAN and OpenFlow | |
CN106921551A (en) | Virtual communication method, system and equipment | |
CN105264841A (en) | Packet forwarding system, device and method | |
WO2009146615A1 (en) | A processing method, a system and a processor for network address translation service | |
CN105657078A (en) | Data transmission method, data transmission device and multi-layer network manager | |
CN105634899A (en) | Method and system for providing virtual network service | |
CN105376706A (en) | Method and apparatus for subscribing equipment position information | |
CN105264839A (en) | Software defined network based networking method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |