Movatterモバイル変換


[0]ホーム

URL:


CN114745250A - Port management method and device - Google Patents

Port management method and device
Download PDF

Info

Publication number
CN114745250A
CN114745250ACN202210290903.2ACN202210290903ACN114745250ACN 114745250 ACN114745250 ACN 114745250ACN 202210290903 ACN202210290903 ACN 202210290903ACN 114745250 ACN114745250 ACN 114745250A
Authority
CN
China
Prior art keywords
port
multicast
layer multicast
layer
state
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.)
Granted
Application number
CN202210290903.2A
Other languages
Chinese (zh)
Other versions
CN114745250B (en
Inventor
徐娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co LtdfiledCriticalNew H3C Technologies Co Ltd
Priority to CN202210290903.2ApriorityCriticalpatent/CN114745250B/en
Publication of CN114745250ApublicationCriticalpatent/CN114745250A/en
Application grantedgrantedCritical
Publication of CN114745250BpublicationCriticalpatent/CN114745250B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The application provides a port management method and device. The method is applied to the two-layer multicast equipment in the VRRP networking, and the port roles (which can be member ports, router ports or set ports) of the ports of the two-layer multicast equipment and the states of related two-layer multicast forwarding table items comprising the ports are managed, so that when the two-layer multicast equipment receives related multicast data messages through the port roles as the router ports or the set ports, the two-layer multicast equipment can only forward the multicast data messages through the member ports connected with multicast receivers of a specified multicast group on the two-layer multicast equipment, and cannot forward the multicast data messages for the set ports through the port roles, thereby saving bandwidth resources to a certain extent.

Description

Port management method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for port management.
Background
In an existing Virtual Routing Redundancy Protocol (VRRP) networking (as shown in fig. 1), a two-layer multicast device 1 enables Internet Group Management Protocol Snooping (IGMP Snooping), and when an Internet Group Management Protocol (Internet Group Management Protocol) Report (Membership) message sent by a multicast receiver (i.e., a host 1) of a specified multicast Group is received through a Port (Port)3 (i.e., a multicast Group Member Port, referred to as a Member Port for short), a two-layer multicast forwarding table is generated for managing and controlling forwarding of multicast data messages.
The two-layer multicast device 1 is respectively connected with the three-layer multicast device 1 and the three-layer multicast device 2, the three-layer multicast device 1 and the three-layer multicast device 2 are respectively connected with the three-layer multicast device 3 connected with a multicast source corresponding to a specified multicast group, and the three-layer multicast device 1 and the three-layer multicast device 2 are not connected with a multicast receiver of the specified multicast group. The two-layer multicast device 1, the three-layer multicast device 1, and the three-layer multicast device 2 belong to the same Spanning Tree Protocol (STP) ring network, and the blocking port is located on the three-layer multicast device 1.
The three-layer Multicast device 1 and the three-layer Multicast device 2 form a VRRP backup group, and both enable a Protocol Independent Multicast-Sparse Mode (PIM-SM) and an IGMP. The three-layer Multicast device 1 and the three-layer Multicast device 2 may establish a Protocol Independent Multicast (PIM) neighbor by interacting PIM Hello messages with each other, and establish a PIM neighbor by interacting PIM Hello messages with a three-layer Multicast device 3 that enables PIM-SM and serves as a Rendezvous Point (RP) node; in addition, the two nodes may also select a Designated Router (DR) node, for example, select triple-layer multicast device 2 as a DR node, where triple-layer multicast device 2 is responsible for sending a PIM join packet to triple-layer multicast device 3, and create a routing table entry with an interface being Port1 on triple-layer multicast device 2 by triple-layer multicast device 3; both will also establish multicast groups via IGMP and maintain multicast group membership.
Under the above networking, the third layer multicast device 1 and the third layer multicast device 2 may periodically send PIM Hello packets to each other through the second layer multicast device 1, and the second layer multicast device 1 may set ports (i.e., ports 1 and Port2 on the second layer multicast device 1) that receive the PIM Hello packets as Router ports (Router ports). Thus, when receiving the multicast data packet of the designated multicast group, the triple-layer multicast device 3 sends the multicast data packet to the triple-layer multicast device 2 based on the relevant routing table entry, and the triple-layer multicast device 2 sends the multicast data packet to the double-layer multicast device 1, and after receiving the multicast data packet through the Port2 on the subsequent double-layer multicast device, the subsequent double-layer multicast device forwards the multicast data packet to the host 1 through the Port3 based on the relevant double-layer multicast forwarding table entry, and also forwards the multicast data packet to the triple-layer multicast device 1 through another routing Port (i.e., Port1) on the subsequent double-layer multicast device.
However, the three-layer multicast device 1 will discard the multicast data packet because there is no corresponding egress interface. The reason why the three-layer multicast device 1 side does not have a corresponding output interface is mainly because the three-layer multicast device 1 side does not have a multicast receiver of the multicast group, in this case, the multicast data message sent by the two-layer multicast device 1 through the Port1 is actually redundant, which results in a waste of more bandwidth resources.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a port management method and device.
According to a first aspect of the embodiments of the present application, there is provided a port management method, which is applied to a two-layer multicast device in a VRRP networking network, where the two-layer multicast device enables IGMP snooping, the VRRP networking network further includes a multicast receiver of a designated multicast group connected to the two-layer multicast device, a first three-layer multicast device and a second three-layer multicast device, and a third three-layer multicast device connected to the first three-layer multicast device and the second three-layer multicast device and connected to a multicast source corresponding to the designated multicast group, the first three-layer multicast device and the second three-layer multicast device form a VRRP backup group, and both the first three-layer multicast device and the second three-layer multicast device are not connected to the multicast receiver of the designated multicast group and both enable PIM-SM and IGMP, and the two-layer multicast device, the first three-layer multicast device and the second three-layer multicast device belong to a same STP, the method comprises the following steps:
when a first IGMP membership report message sent by a multicast receiver of the designated multicast group connected with the first IGMP membership report message is received for the first time, setting the port role of a first port receiving the first IGMP membership report message as a member port, and setting the state of a first two-layer multicast forwarding table item including the first port, the address of the designated multicast group and a Virtual Local Area Network (VLAN) to which the multicast receiver of the designated multicast group belongs in a two-layer multicast forwarding table created by the first IGMP membership report message and the second IGMP membership report message as an effective state, wherein the two-layer multicast forwarding table item in the effective state in the two-layer multicast forwarding table created by the second layer multicast device is used for guiding the second layer multicast device to receive the multicast data message of the designated multicast group through a port connected with a three-layer multicast device serving as a designated router DR node in the first three-layer multicast device and the second three-layer multicast device, forwarding the multicast data message through an output interface in a two-layer multicast table item in an effective state matched with the multicast data message;
when an IGMP query message or a first PIM Hello message sent by a three-layer multicast device serving as an IGMP querier in the first three-layer multicast device and the second three-layer multicast device is received for the first time, setting a port role of a second port receiving the IGMP query message or the first PIM Hello message as a router port, setting a state of a second two-layer multicast forwarding table item including the second port, an address of the designated multicast group and a VLAN to which a multicast receiver of the designated multicast group belongs in a two-layer multicast forwarding table created by the router device as an effective state, and after setting the port role of the second port as the router port, if only the IGMP query message and the first PIM Hello message are received through the second port within a first set duration, switching the port role of the second port from the router port to a set port, changing the state of the second layer two multicast forwarding table entry from an effective state to an invalid state; and
when a second PIM Hello packet sent by a third-layer multicast device serving as a DR node in the first and second third-layer multicast devices is received for the first time, setting a port role of a third port that receives the second PIM Hello packet as a router port, setting a state of a third second-layer multicast forwarding table item including the third port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs in a second-layer multicast forwarding table created by the router device as an effective state, and after setting the port role of the third port as the router port, if only the second PIM Hello packet is received through the third port within a second set time period, switching the port role of the third port from the router port to a set port, and changing the state of the third second-layer multicast forwarding table item from the effective state to the invalid state, the three-layer multicast device as the IGMP querier is different from the three-layer multicast device as the DR node.
According to a second aspect of the embodiments of the present application, there is provided a port management apparatus, which is applied to an IGMP snooping enabled two-layer multicast device in a VRRP networking network, the VRRP networking network further includes a multicast receiver of a designated multicast group connected to the two-layer multicast device, a first three-layer multicast device and a second three-layer multicast device, and a third three-layer multicast device connected to the first three-layer multicast device and the second three-layer multicast device and connected to a multicast source corresponding to the designated multicast group, the first three-layer multicast device and the second three-layer multicast device form a VRRP backup group, to which no multicast receiver of the designated multicast group is connected and PIM-SM and IGMP are enabled, the two-layer multicast device, the first three-layer multicast device and the second three-layer multicast device belong to a same STP, the device comprises:
a first management module, configured to, when receiving a first IGMP membership report packet sent by a multicast receiver of the designated multicast group connected to the first management module for the first time, set a port role of a first port that receives the first IGMP membership report packet as a member port, and set a state of a first two-layer multicast forwarding entry, which includes the first port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs, in a two-layer multicast forwarding table created by the first management module as an active state, where the two-layer multicast forwarding entry in the active state in the two-layer multicast forwarding table created by the two-layer multicast device is used to instruct the two-layer multicast device to receive a multicast data packet of the designated multicast group through a port connected to a three-layer multicast device serving as a designated router DR node in the first three-layer multicast device and the second three-layer multicast device, forwarding the multicast data message through an output interface in a two-layer multicast table item in an effective state matched with the multicast data message;
a second management module, configured to, when receiving an IGMP query packet or a first PIM Hello packet sent by a third-layer multicast device serving as an IGMP query device in the first third-layer multicast device and the second third-layer multicast device for the first time, set a port role of a second port that receives the IGMP query packet or the first PIM Hello packet as a router port, set a state of a second layer multicast forwarding table item, which includes the second port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs, in a self-created second layer multicast forwarding table as an active state, and after setting a port role of the second port as the router port, switch the port role of the second port from the router port to a set port if only the IGMP query packet and the first PIM Hello packet are received through the second port within a first set duration, changing the state of the second layer two multicast forwarding table entry from an effective state to an invalid state; and
a third management module, configured to, when a second PIM Hello packet sent by a triple-layer multicast device serving as a DR node in the first triple-layer multicast device and the second triple-layer multicast device is received for the first time, set a port role of a third port that receives the second PIM Hello packet as a router port, set a state of a third double-layer multicast forwarding table entry of a VLAN to which a multicast receiver of the designated multicast group belongs, in a double-layer multicast forwarding table created by the third management module, to an active state, and after setting the port role of the third port as the router port, if only the second PIM Hello packet is received through the third port within a second set duration, switch the port role of the third port from the router port to a set port, and change the state of the third double-layer multicast forwarding table entry from the active state to an inactive state, the three-layer multicast device as the IGMP querier is different from the three-layer multicast device as the DR node.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in this embodiment of the present application, for a two-layer multicast device in a VRRP networking, which enables IGMP snooping, a new port role (i.e. a set port) is added for a port on the device, and by managing the port role of the device (which may be a member port, a router port, or a set port) and the states of related two-layer multicast forwarding entries including the ports, when the two-layer multicast device receives a related multicast data packet through the port role as the router port or the set port, the two-layer multicast device only forwards the multicast data packet through a member port connected to a multicast receiver of a designated multicast group on the device itself, and does not forward the multicast data packet through the port role as the set port, thereby saving bandwidth resources to a certain extent.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is one of schematic structural diagrams of a VRRP networking provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a port management method according to an embodiment of the present application;
fig. 3 is a second schematic diagram of an architecture of a VRRP networking according to an embodiment of the present application;
fig. 4 is a third schematic diagram of a VRRP networking architecture according to an embodiment of the present invention;
fig. 5 is a fourth schematic diagram of a VRRP networking architecture according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a port management device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The words "if" or "if" as used herein may be interpreted as "at … …" or "at … …" depending on the context.
Next, examples of the present application will be described in detail.
The embodiment of the application provides a port management method, which is applied to a two-layer multicast device which enables IGMP snooping in a VRRP networking, wherein the VRRP networking further comprises a multicast receiver of a designated multicast group connected with the two-layer multicast device, a first three-layer multicast device, a second three-layer multicast device, and a third three-layer multicast device connected with a multicast source and connected with the first three-layer multicast device and the second three-layer multicast device, the first three-layer multicast device and the second three-layer multicast device form a VRRP backup group, the first three-layer multicast device and the second three-layer multicast device are not connected with the multicast receiver of the designated multicast group, and the second three-layer multicast device all enable PIM-SM and IGMP, and the two-layer multicast device, the first three-layer multicast device and the second three-layer multicast device belong to the same STP, as shown in fig. 1, the method can comprise the following steps:
s21, when receiving a first IGMP membership report packet sent by a multicast receiver of an assigned multicast group connected to the first IGMP membership report packet, setting a port role of a first port that receives the first IGMP membership report packet as a member port, and setting a state of a first two-layer multicast forwarding table item, which includes the first port, an address of the assigned multicast group, and a VLAN to which the multicast receiver of the assigned multicast group belongs, in a two-layer multicast forwarding table created by the first IGMP membership report packet as an effective state.
The second-layer multicast forwarding table item in the effective state in the second-layer multicast forwarding table created by the second-layer multicast device is used for guiding the second-layer multicast device to forward the multicast data message of the specified multicast group received through the port connected with the third-layer multicast device serving as the DR node in the first-layer multicast device and the second-layer multicast device through the output interface in the second-layer multicast table item in the effective state matched with the multicast data message.
S22, when receiving the IGMP query message or the first PIM Hello message sent by the triple-layer multicast device serving as an IGMP querier in the first triple-layer multicast device and the second triple-layer multicast device for the first time, setting the port role of the second port receiving the IGMP query message or the first PIM Hello message as a router port, setting the state of a second layer multicast forwarding table item which comprises the second port, the address of the appointed multicast group and the VLAN which the multicast receiver of the appointed multicast group belongs to in a self-created second layer multicast forwarding table as an effective state, after the port role of the second port is set as the router port, if only the IGMP query message and the first PIM Hello message are received through the second port within the first set time length, the port role of the second port is switched to a set port from the router port, and the state of the second layer two multicast forwarding table entry is changed from the valid state to the invalid state.
In this step, a specific election process of electing a three-layer multicast device as an IGMP querier between a first three-layer multicast device and a second three-layer multicast device is the prior art, and is not described in detail herein.
In addition, in this step, the first set duration may be a duration of a sending period of a first set number of IGMP query messages or a first PIM Hello message.
Here, the first set number may be set according to actual network requirements of the VRRP networking. For example, in an example, it is assumed that the duration of the sending period of the IGMP query packet is 105s, and it is assumed that the value of the first set number is 3, then the first set duration is 315 s.
S23, when a second PIM Hello packet sent by a triple-layer multicast device serving as a DR node in a first triple-layer multicast device and a second triple-layer multicast device is received for the first time, setting a port role of a third port that receives the second PIM Hello packet as a router port, setting a state of a third double-layer multicast forwarding entry including the third port, an address of a designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs in a double-layer multicast forwarding table created by the router port as an active state, and after setting the port role of the third port as the router port, if only the second PIM Hello packet is received through the third port within a second set duration, switching the port role of the third port from the router port to a set port, and changing the state of the third double-layer multicast forwarding entry from the active state to the inactive state.
In this step, the three-layer multicast device of the IGMP querier is different from the three-layer multicast device as the DR node.
In addition, in this step, the second set duration may be a duration of a second set number of sending periods of the second PIM Hello packets.
It should be noted that the steps S22 and S23 are not sequentially divided.
In addition, in this embodiment, for the two-layer multicast device, when receiving the multicast data packet of the specified multicast group sent by the three-layer multicast device serving as the DR node through a port (the port role of the port may be a router port or may be a set port) connected to the three-layer multicast device serving as the DR node in the first three-layer multicast device and the second three-layer multicast device, only the two-layer multicast entry matching the multicast data packet is searched from the two-layer multicast entry in the valid state in the local two-layer multicast forwarding table, and then the multicast data packet is forwarded through the found outgoing interface in the two-layer multicast entry. In this way, once the port role of the port on the two-layer multicast device connected to the three-layer multicast device as the non-DR node is the set port, the two-layer multicast device does not forward the related multicast data packet through the port, thereby saving the bandwidth resource to a certain extent.
Here, a specific election process of electing a triple-layer multicast device as a DR node between a first triple-layer multicast device and a second triple-layer multicast device is a prior art, and will not be described in detail herein.
Further, in this embodiment of the present application, the layer two multicast device may further perform the following operation flow:
the first operation flow is as follows: after the port role of the second port is switched to a set port from a router port, if a second IGMP membership report message broadcasted by a three-layer multicast device serving as a non-DR node in a first three-layer multicast device and a second three-layer multicast device is received for the first time through the second port, switching the port role of the second port from the set port to a member port and a set port, and changing the state of a second two-layer multicast forwarding table from an invalid state to an effective state, wherein the second IGMP membership report message is broadcasted by the three-layer multicast device serving as the non-DR node when a new multicast receiver of a specified multicast group is connected and a second IGMP membership report message sent by the new multicast receiver is received;
when the second IGMP membership report message is not received through the second port within the third set duration, switching the port role of the second port from the member port to the set port to the router port, and maintaining the state of the second layer multicast forwarding table item unchanged;
after switching the port role of the second port to the router port, starting to execute the step of switching the port role of the second port from the router port to the set port if only the IGMP query message and the first PIM Hello message are received through the port within the first set duration. That is, after switching the port role of the port to the router port, the two-layer multicast device re-executes the step of switching the port role of the port from the router port to the set port if only the IGMP query packet and/or the PIM Hello packet are received through the port within the first set duration, and the step of changing the state of the two-layer multicast forwarding table, which includes the port, the address of the designated multicast group, and the VLAN to which the multicast receiver of the designated multicast group belongs, in the two-layer multicast forwarding table created by the two-layer multicast device from the valid state to the invalid state.
The second operation flow is as follows: after the port role of the second port is switched to the set port, if a PIM adding message sent by the first layer multicast equipment or the second layer multicast equipment is received for the first time through the second port, the port role of the second port is switched to the router port, and the state of the second layer multicast forwarding table entry is changed from an invalid state to an effective state; the PIM adding message is sent when the first-layer multicast equipment or the second-layer multicast equipment receives a third IGMP membership report message sent by a new multicast receiver connected with the PIM adding message, and determines that the PIM adding message is switched from a non-DR node to a DR node and a link between the PIM adding message and the third-layer multicast equipment fails;
after the port role of the second port is switched to the router port, if only the first PIM Hello packet is received through the second port within the fourth set duration, the port role of the second port is switched from the router port to the set port, and the state of the second layer multicast forwarding table entry is changed from the valid state to the invalid state. Here, the fourth set time period may be set in the same manner as the second set time period described above.
It should be noted that the first operation flow is applicable to a scenario in which, after the two-layer multicast device switches the port role of the second port from the router port to the set port, a new multicast receiver of the specified multicast group is deployed on the side of the three-layer multicast device serving as the non-DR node in the first three-layer multicast device and the second three-layer multicast device. The second-layer multicast device can ensure that a new multicast receiver connected with the third-layer multicast device as the non-DR node can receive related multicast data messages in time by executing the first operation flow, and can avoid wasting bandwidth resources for a long time after the new multicast receiver goes offline.
Here, the VLAN to which the new multicast receiver of the designated multicast group, which is deployed on the three-layer multicast apparatus side as the non-DR node, belongs, may be the same as or different from the VLAN to which the multicast receiver of the designated multicast group on the two-layer multicast apparatus side belongs.
Specifically, in the first operation flow, the third set time duration may be a time duration of a sending period of a third set number of second IGMP membership report packets. Here, the third set number may also be set according to the actual network requirements of the VRRP networking.
The second operation flow is applicable to a scenario where, after the two-layer multicast device switches the port role of the port from the router port to the set port, the DR nodes in the first three-layer multicast device and the second three-layer multicast device change, a new multicast receiver of the designated multicast group is deployed on the side of the three-layer multicast device serving as the new DR node, and a link between the three-layer multicast device serving as the new DR node and the third three-layer multicast device fails. The second layer multicast device can ensure that a new multicast receiver connected with the third layer multicast device as a new DR node receives the related multicast data message in time by executing the second operation flow, and can avoid wasting bandwidth resources for a long time after the new multicast receiver goes offline.
The port management method is described in detail below with reference to specific embodiments.
Still taking the VRRP networking architecture shown in fig. 1 as an example, assume that the three-layer multicast device serving as a DR node is a three-layer multicast device 2, and the three-layer multicast device serving as an IGMP query is a three-layer multicast device 1; it is assumed that the sending periods of the PIM Hello packets sent by the three-layer multicast device 1 and the three-layer multicast device 2 are both 105s, and the sending period of the IGMP query packet sent by the three-layer multicast device 1 is also 105 s.
For the layer two multicast device 1, when receiving the IGMP membership report message 1 sent by the host 1 for the first time, the Port role of the Port (i.e., Port3) receiving the IGMP membership report message 1 is set as a member Port, and a state of a layer two multicast forwarding table (denoted as layer two multicast forwarding table 1) including the Port3, an address of a specified multicast group, and a VLAN (e.g., VLAN100) to which the host 1 belongs in the layer two multicast forwarding table created by itself is set as an active state.
When receiving an IGMP query packet or a PIM Hello packet 1 sent by the three-layer multicast device 1 for the first time, setting the Port role of the Port (i.e., Port1) receiving the IGMP query packet or the PIM Hello packet 1 as a router Port, and setting the state of a two-layer multicast forwarding table (marked as a two-layer multicast forwarding table 2) including the Port1, the address of the specified multicast group, and the VLAN (i.e., VLAN100) to which the host 1 belongs in the two-layer multicast forwarding table created by itself as an effective state.
After setting the Port role of the Port1 as the router Port, once only the IGMP query packet and the PIM Hello packet 1 are received through the Port1 within 3 consecutive 105s (i.e., within the first set duration), the Port role of the Port1 is switched from the router Port to the set Port, and the state of the two-layer multicast forwarding table entry 2 is changed from the active state to the inactive state.
When receiving the PIM Hello packet 2 sent by the three-layer multicast device 2 for the first time, setting the Port role of the Port (i.e., Port2) receiving the PIM Hello packet 2 as a router Port, and setting the state of the two-layer multicast forwarding table item (marked as the two-layer multicast forwarding table item 3) including the Port2, the address of the specified multicast group, and the VLAN (i.e., VLAN100) to which the host 1 belongs in the two-layer multicast forwarding table created by itself as an effective state.
After setting the Port role of the Port2 as the router Port, once only the PIM Hello packet 2 is received through the Port2 within 3 consecutive 105s (i.e., within the second set duration), the Port role of the Port2 is switched from the router Port to the set Port, and the state of the two-layer multicast forwarding table entry 3 is changed from the active state to the inactive state.
It should be noted that, for the two-layer multicast device 1, when receiving a multicast data packet of a specified multicast group sent by the three-layer multicast device 2 through a Port2 (a corresponding Port role may be a router Port, or may be a set Port) (this multicast data packet is sent to the three-layer multicast device 2 when the three-layer multicast device 3 receives a multicast data packet from a multicast source corresponding to the specified multicast group), only a two-layer multicast entry matching this multicast data packet is searched from a two-layer multicast entry in an effective state in a local two-layer multicast forwarding table, and then the multicast data packet is forwarded through an outgoing interface in the searched two-layer multicast entry. Thus, when the Port1 of the layer two multicast device 1 has the Port role of set Port, the layer two multicast device 1 will not forward the multicast data packet through the Port1 (as shown in fig. 3), thereby saving bandwidth resources to some extent.
In addition, after the layer two multicast device 1 switches the Port role of the Port1 on itself from the router Port to the set Port, if a new multicast receiver of the designated multicast group, for example, the host 2 shown in fig. 4, is deployed on the layer three multicast device 1, and the VLAN to which the multicast group belongs is, for example, VLAN100, in this case, the layer three multicast device 1 receives the IGMP membership report message sent by the host 2 through the Port3 on itself, and then the layer three multicast device 1 broadcasts the IGMP membership report message in the VLAN to which the host 1 belongs.
Subsequently, for the two-layer multicast device 1, when the Port1 receives the IGMP membership report packet 2 broadcasted by the three-layer multicast device 1 for the first time, the Port1 switches the Port role from the set Port to the member Port and the set Port, and changes the state of the two-layer multicast forwarding table entry 2 from the invalid state to the valid state, so as to ensure that the host 2 can receive the related multicast data packet in time.
Next, if the IGMP membership report packet 2 is not received through the Port1 within a third set duration (e.g., 260s), that is, the host 2 goes down, at this time, the Port1 switches the router Port from the member Port and the set Port, and maintains the state of the layer two multicast forwarding table entry 2.
Then, after the Port1 is switched to the router Port, once only the IGMP query packet and the PIM Hello packet 1 are received through the Port1 within 3 consecutive 105s (i.e., within the first set duration), the Port1 is switched from the router Port to the set Port, and the state of the two-layer multicast forwarding table entry 2 is changed from the active state to the inactive state, so as to avoid the bandwidth waste.
In addition, after the two-layer multicast device 1 switches the Port role of the Port1 on itself from the router Port to the set Port, if a new multicast receiver of the designated multicast group, for example, the host 3 shown in fig. 5, is deployed on the three-layer multicast device 1, and the VLAN to which the three-layer multicast device belongs is, for example, VLAN200, in fig. 4, it is assumed that a link between the three-layer multicast device 1 and the three-layer multicast device 3 has failed, and the three-layer multicast device 1 is also changed to be a DR node, in this case, the three-layer multicast device 1 receives an IGMP membership report message sent by the host 2 through the Port3 on itself, and then the three-layer multicast device 1 sends a PIM join message to the two-layer multicast device 1.
Subsequently, for the two-layer multicast device 1, when the PIM join packet sent by the three-layer multicast device 1 is received for the first time through the Port1, the Port role of the Port1 is switched to the router Port, and the state of the two-layer multicast forwarding entry 2 is changed from the invalid state to the valid state, so as to ensure that the host 2 can receive the related multicast data packet in time.
Then, after the Port1 is switched to the router Port, once only the PIM Hello packet 1 is received through the Port1 within 3 consecutive 105s (i.e., within the fourth set duration), the Port1 is switched from the router Port to the set Port, and the state of the two-layer multicast forwarding table entry 2 is changed from the active state to the inactive state, so as to avoid bandwidth waste.
It can be seen from the above technical solutions that, in the embodiment of the present application, for a two-layer multicast device in a VRRP networking, which enables IGMP snooping, a new port role (i.e. a set port) is added for a port on the device, and by managing the port role (which may be a member port, a router port, or a set port) of the port and the states of related two-layer multicast forwarding entries including the ports, when the two-layer multicast device receives a related multicast data packet through the port role as the router port or the set port, the two-layer multicast device only forwards the multicast data packet through a member port connected to a multicast receiver of a designated multicast group on the device itself, and does not forward the multicast data packet through the port role as the set port, thereby saving bandwidth resources to a certain extent.
Based on the same inventive concept, the present application further provides a port management apparatus, which is applied to a two-layer multicast device in a VRRP networking network, wherein the two-layer multicast device enables IGMP snooping, the VRRP networking network further comprises a multicast receiver of a designated multicast group connected to the two-layer multicast device, a first three-layer multicast device and a second three-layer multicast device, and a third three-layer multicast device connected to the first three-layer multicast device and the second three-layer multicast device and connected to a multicast source corresponding to the designated multicast group, the first three-layer multicast device and the second three-layer multicast device form a VRRP backup group, and both are not connected to the multicast receiver of the designated multicast group, and both enable PIM-SM and IGMP, the two-layer multicast device, the first three-layer multicast device and the second three-layer multicast device belong to a same STP ring network, the schematic structural diagram is shown in fig. 6, and specifically includes:
afirst management module 61, configured to, when receiving a first IGMP membership report packet sent by a multicast receiver of the designated multicast group connected to the first management module for the first time, set a port role of a first port that receives the first IGMP membership report packet as a member port, and set a state of a first two-layer multicast forwarding entry in a two-layer multicast forwarding table created by the first management module, the first port, an address of the designated multicast group, and a VLAN to which the multicast receiver of the designated multicast group belongs, as an active state, where the two-layer multicast forwarding entry in the two-layer multicast forwarding table created by the two-layer multicast device in the active state is used to instruct the two-layer multicast device to receive a multicast data packet of the designated multicast group through a port connected to a three-layer multicast device serving as a designated router DR node in the first three-layer multicast device and the second three-layer multicast device, forwarding the multicast data message through an output interface in a two-layer multicast table item in an effective state matched with the multicast data message;
asecond management module 62, configured to, when receiving an IGMP query packet or a first protocol independent multicast PIM Hello packet sent by a third-layer multicast device serving as an IGMP query device in the first third-layer multicast device and the second third-layer multicast device for the first time, set a port role of a second port that receives the IGMP query packet or the first PIM Hello packet as a router port, set a state of a second layer multicast forwarding table entry, which is created by the second management module and includes the second port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs, in a self-created second layer multicast forwarding table as an active state, and after setting the port role of the second port as the router port, if only the IGMP query packet and the first PIM Hello packet are received through the second port within a first set duration, switching the port role of the second port from a router port to a set port, and changing the state of the second layer two multicast forwarding table entry from an effective state to an invalid state; and
athird management module 63, configured to, when a second PIM Hello packet sent by a third-layer multicast device serving as a DR node in the first and second third-layer multicast devices is received for the first time, set a port role of a third port that receives the second PIM Hello packet as a router port, set a state of a third second-layer multicast forwarding table entry of a VLAN to which a multicast receiver of the designated multicast group belongs, in a second-layer multicast forwarding table created by the third management module, as an active state, and after setting the port role of the third port as a router port, if only the second PIM Hello packet is received through the third port within a second set duration, switch the port role of the third port from the router port to a set port, and change the state of the third second-layer multicast forwarding table entry from the active state to an inactive state, the three-layer multicast device as the IGMP querier is different from the three-layer multicast device as the DR node.
Preferably, thesecond management module 62 is further configured to:
after the port role of the second port is switched to a set port from a router port, if a second IGMP membership report message broadcasted by a three-layer multicast device serving as a non-DR node in the first three-layer multicast device and the second three-layer multicast device is received for the first time through the second port, switching the port role of the second port from the set port to a member port and a set port, and changing the state of the second two-layer multicast forwarding table from an invalid state to an valid state, wherein the second IGMP membership report message is broadcasted by the three-layer multicast device serving as the non-DR node when a new multicast receiver of the specified multicast group is connected to the three-layer multicast device and the second IGMP membership report message sent by the new multicast receiver is received;
when the second IGMP membership report packet is not received through the second port within a third set duration, switching the port role of the second port from a member port to a set port through a router port, and maintaining the state of the second layer multicast forwarding table entry unchanged;
after switching the port role of the second port to a router port, starting to execute a step of switching the port role of the second port from the router port to a set port if only the IGMP query packet and the first PIM Hello packet are received through the port within the first set duration.
Preferably, thesecond management module 62 is further configured to:
after the port role of the second port is switched to a set port, if a PIM (personal information management) join message sent by the first layer multicast equipment or the second layer multicast equipment is received for the first time through the second port, switching the port role of the second port to a router port, and changing the state of the second layer multicast forwarding table from an invalid state to an effective state;
after switching the port role of the second port to a router port, if only the first PIM Hello packet is received through the second port within a fourth set duration, switching the port role of the second port from the router port to a set port, and changing the state of the second layer two-layer multicast forwarding table entry from an active state to an inactive state;
the PIM join message is sent when the first-layer multicast device or the second-layer multicast device receives a third IGMP membership report message sent by a new multicast receiver connected to the first-layer multicast device or the second-layer multicast device, and determines that the first-layer multicast device or the second-layer multicast device is switched from a non-DR node to a DR node and a link between the first-layer multicast device or the second-layer multicast device and the third-layer multicast device fails.
Preferably, the first set duration is a duration of a first set number of sending cycles of the IGMP query packet or the first PIM Hello packet; the second set duration is a duration of a second set number of sending periods of the second PIM Hello packets.
Preferably, the third set duration is a duration of a third set number of sending cycles of the second IGMP membership report packet.
Preferably, the fourth set duration is a duration of a fourth set number of sending cycles of the first PIM Hello packets.
It can be seen from the above technical solutions that, in the embodiment of the present application, for a two-layer multicast device in a VRRP networking, which enables IGMP snooping, a new port role (i.e. a set port) is added for a port on the device, and by managing the port role (which may be a member port, a router port, or a set port) of the port and the states of related two-layer multicast forwarding entries including the ports, when the two-layer multicast device receives a related multicast data packet through the port role as the router port or the set port, the two-layer multicast device only forwards the multicast data packet through a member port connected to a multicast receiver of a designated multicast group on the device itself, and does not forward the multicast data packet through the port role as the set port, thereby saving bandwidth resources to a certain extent.
An electronic device is further provided in an embodiment of the present application, as shown in fig. 7, including aprocessor 71 and a machine-readable storage medium 72, where the machine-readable storage medium 72 stores machine-executable instructions that can be executed by theprocessor 71, and theprocessor 71 is caused by the machine-executable instructions to: and implementing the steps of the port management method.
The machine-readable storage medium may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program realizes the steps of the above-mentioned port management method when being executed by a processor.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A port management method is applied to a two-layer multicast device which enables an Internet group management protocol snooping (IGMP) snooping in a Virtual Router Redundancy Protocol (VRRP) networking, the VRRP networking also comprises a multicast receiver of a specified multicast group connected with the two-layer multicast device, a first three-layer multicast device, a second three-layer multicast device and a third three-layer multicast device which is connected with the first three-layer multicast device and the second three-layer multicast device and is connected with a multicast source corresponding to the specified multicast group, the first three-layer multicast device and the second three-layer multicast device form a VRRP backup group, the multicast receiver of the specified multicast group is not connected with the first three-layer multicast device, the PIM-SM of a protocol independent multicast-sparse mode and the Internet group management protocol are enabled, and the IGMP is enabled, and the two-layer multicast device, The first layer multicast equipment and the second layer multicast equipment belong to the same Spanning Tree Protocol (STP) ring network, and the method comprises the following steps:
when a first IGMP membership report message sent by a multicast receiver of the designated multicast group connected with the second layer multicast forwarding table is received for the first time, setting the port role of a first port receiving the first IGMP membership report message as a member port, and setting the state of a first layer multicast forwarding table item in a second layer multicast forwarding table created by the second layer multicast forwarding table, which comprises the first port, the address of the designated multicast group and a first layer multicast forwarding table item of a virtual local area network VLAN to which the multicast receiver of the designated multicast group belongs, as an effective state, wherein the second layer multicast forwarding table item in the effective state in the second layer multicast forwarding table created by the second layer multicast forwarding table is used for guiding the second layer multicast device to receive the multicast data message of the designated multicast group through a port connected with a third layer multicast device serving as a designated router DR node in the first layer multicast device and the second layer multicast device, forwarding the multicast data message through an output interface in a two-layer multicast table item in an effective state matched with the multicast data message;
when an IGMP query message or a first protocol independent multicast PIM Hello message sent by a three-layer multicast device serving as an IGMP query in the first three-layer multicast device and the second three-layer multicast device is received for the first time, setting a port role of a second port that receives the IGMP query message or the first PIM Hello message as a router port, setting a state of a second two-layer multicast forwarding table entry including the second port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs in a two-layer multicast forwarding table created by itself as an active state, and after setting the port role of the second port as the router port, switching the port role of the second port from the router port to a set port if only the IGMP query message and the first PIM Hello message are received through the second port within a first set duration, changing the state of the second layer two multicast forwarding table entry from an effective state to an invalid state; and
when a second PIM Hello packet sent by a third-layer multicast device serving as a DR node in the first and second third-layer multicast devices is received for the first time, setting a port role of a third port that receives the second PIM Hello packet as a router port, setting a state of a third second-layer multicast forwarding table item including the third port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs in a second-layer multicast forwarding table created by the router device as an effective state, and after setting the port role of the third port as the router port, if only the second PIM Hello packet is received through the third port within a second set time period, switching the port role of the third port from the router port to a set port, and changing the state of the third second-layer multicast forwarding table item from the effective state to the invalid state, the three-layer multicast device as the IGMP querier is different from the three-layer multicast device as the DR node.
after the port role of the second port is switched to a set port from a router port, if a second IGMP membership report message broadcasted by a three-layer multicast device serving as a non-DR node in the first three-layer multicast device and the second three-layer multicast device is received for the first time through the second port, switching the port role of the second port from the set port to a member port and a set port, and changing the state of the second two-layer multicast forwarding table from an invalid state to an valid state, wherein the second IGMP membership report message is broadcasted by the three-layer multicast device serving as the non-DR node when a new multicast receiver of the specified multicast group is connected to the three-layer multicast device and the second IGMP membership report message sent by the new multicast receiver is received;
6. A port management device is applied to a two-layer multicast device which enables an Internet group management protocol snooping (IGMP) snooping in a Virtual Router Redundancy Protocol (VRRP) networking, the VRRP networking also comprises a multicast receiver of a specified multicast group connected with the two-layer multicast device, a first three-layer multicast device, a second three-layer multicast device and a third three-layer multicast device which is connected with the first three-layer multicast device and the second three-layer multicast device and is connected with a multicast source corresponding to the specified multicast group, the first three-layer multicast device and the second three-layer multicast device form a VRRP backup group, the multicast receiver of the specified multicast group is not connected with the first three-layer multicast device, the PIM-SM of a protocol independent multicast-sparse mode and the Internet group management protocol are enabled, and the IGMP is enabled, and the two-layer multicast device, The first layer multicast equipment and the second layer multicast equipment belong to the same spanning tree protocol STP ring network, and the device comprises:
a first management module, configured to, when receiving a first IGMP membership report packet sent by a multicast receiver of the designated multicast group connected to the first management module for the first time, set a port role of a first port that receives the first IGMP membership report packet as a member port, and set a state of a first two-layer multicast forwarding entry, which includes the first port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs, in a two-layer multicast forwarding table created by the first management module as an active state, where the two-layer multicast forwarding entry in the active state in the two-layer multicast forwarding table created by the two-layer multicast device is used to instruct the two-layer multicast device to receive a multicast data packet of the designated multicast group through a port connected to a three-layer multicast device serving as a DR node in the first three-layer multicast device and the second three-layer multicast device, forwarding the multicast data message through an output interface in a two-layer multicast table item in an effective state matched with the multicast data message;
a second management module, configured to, when receiving an IGMP query packet or a first protocol independent multicast PIM Hello packet sent by a third-layer multicast device serving as an IGMP query from among the first and second third-layer multicast devices for the first time, set a port role of a second port that receives the IGMP query packet or the first PIM Hello packet as a router port, set a state of a second layer multicast forwarding table entry including the second port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs in a self-created second layer multicast forwarding table as an active state, and after setting the port role of the second port as the router port, switch the port role of the second port from the router port to a set port if only the IGMP query packet and the first PIM Hello packet are received through the second port within a first set duration, changing the state of the second layer two multicast forwarding table entry from an effective state to an invalid state; and
a third management module, configured to, when a second PIM Hello packet sent by a third-layer multicast device serving as a DR node in the first and second third-layer multicast devices is received for the first time, set a port role of a third port that receives the second PIM Hello packet as a router port, set a state of a third second-layer multicast forwarding entry including the third port, an address of the designated multicast group, and a VLAN to which a multicast receiver of the designated multicast group belongs in a second-layer multicast forwarding table created by the third management module as an active state, and after the port role of the third port is set as the router port, switch the port role of the third port from the router port to a set port if only the second PIM Hello packet is received through the third port within a second set duration, and change the state of the third second-layer multicast forwarding entry from the active state to an inactive state, the three-layer multicast device as the IGMP querier is different from the three-layer multicast device as the DR node.
after the port role of the second port is switched to a set port from a router port, if a second IGMP membership report message broadcasted by a three-layer multicast device serving as a non-DR node in the first three-layer multicast device and the second three-layer multicast device is received for the first time through the second port, switching the port role of the second port from the set port to a member port and a set port, and changing the state of the second two-layer multicast forwarding table from an invalid state to an valid state, wherein the second IGMP membership report message is broadcasted by the three-layer multicast device serving as the non-DR node when a new multicast receiver of the specified multicast group is connected to the third layer multicast device and the second IGMP membership report message sent by the new multicast receiver is received;
CN202210290903.2A2022-03-232022-03-23Port management method and deviceActiveCN114745250B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210290903.2ACN114745250B (en)2022-03-232022-03-23Port management method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210290903.2ACN114745250B (en)2022-03-232022-03-23Port management method and device

Publications (2)

Publication NumberPublication Date
CN114745250Atrue CN114745250A (en)2022-07-12
CN114745250B CN114745250B (en)2023-12-12

Family

ID=82277429

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210290903.2AActiveCN114745250B (en)2022-03-232022-03-23Port management method and device

Country Status (1)

CountryLink
CN (1)CN114745250B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090268607A1 (en)*2007-03-312009-10-29Liyang WangMethod and device for multicast traffic redundancy protection
CN102082720A (en)*2009-12-012011-06-01杭州华三通信技术有限公司Method and device for forwarding multicast flow
CN103441940A (en)*2013-08-292013-12-11华为技术有限公司Method and device for switching network device from stand-by state to main state and network device
CN113472656A (en)*2021-06-292021-10-01新华三信息安全技术有限公司Two-layer switching equipment and method for forwarding multicast data message

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090268607A1 (en)*2007-03-312009-10-29Liyang WangMethod and device for multicast traffic redundancy protection
CN102082720A (en)*2009-12-012011-06-01杭州华三通信技术有限公司Method and device for forwarding multicast flow
CN103441940A (en)*2013-08-292013-12-11华为技术有限公司Method and device for switching network device from stand-by state to main state and network device
CN113472656A (en)*2021-06-292021-10-01新华三信息安全技术有限公司Two-layer switching equipment and method for forwarding multicast data message

Also Published As

Publication numberPublication date
CN114745250B (en)2023-12-12

Similar Documents

PublicationPublication DateTitle
US9077551B2 (en)Selection of multicast router interfaces in an L2 switch connecting end hosts and routers, which is running IGMP and PIM snooping
US8102848B1 (en)Multicast high availability enhancements for faster convergence
JP5619290B2 (en) Multicast branch, protocol independent multicast router, and pruning method for layer 2 switch
US8619605B2 (en)Method and apparatus for maintaining port state tables in a forwarding plane of a network element
US8345536B1 (en)Multicast high availability enhancements for non-stop forwarding
US8385335B2 (en)Method and apparatus for providing fast reroute of a unicast packet within a network element to an available port associated with a multi-link trunk
US7778266B2 (en)Switch and network fault recovery method
US7719959B2 (en)Achieving super-fast convergence of downstream multicast traffic when forwarding connectivity changes between access and distribution switches
US8477791B2 (en)Method and apparatus for locally implementing port selection via synchronized port state databases maintained by the forwarding plane of a network element
CN101035009A (en)Multicast traffic redundancy protection method and device
JP2012501583A (en) Improved convergence of multicast traffic
EP4057578B1 (en)Internet group management protocol host mobility in ethernet virtual private network multicast networks
CN111901133B (en)Multicast switching method, device, network equipment and storage medium
US8514696B2 (en)Multicast tree state replication
CN101610200B (en)Switching method and device of multicast routing
EP3883182B1 (en)Evpn multicast ingress forwarder election using source-active route
CN102185776A (en)Method for rapid convergence of layer 2 multicast of Ethernet and Ethernet system
EP3429139B1 (en)Ingress gateway selection for a shortest path bridging network to support inter domain multicast routing
CN114465942A (en) A forwarding method and system for simultaneously supporting Layer 2 and Layer 3 multicast traffic
CN114745250A (en)Port management method and device
CN108011828B (en)Multicast switching method, device, core layer switch and storage medium
CiscoConfiguring IP Multicast Layer 3 Switching
CiscoConfiguring IP Multicast Layer 3 Switching
US11088945B1 (en)Dynamic source-driven path setup across a switch fabric
CN115037670A (en)Network convergence method and device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp