Summary of the invention
The invention provides a kind of port configuration method and switching equipment, be used for dynamic-configuration and the router port of safeguarding on the switch.
For achieving the above object, the invention provides a kind of port configuration method, be applied to enable Internet Group Management Protocol and intercepted on the switching equipment of IGMP Snooping, comprising:
Receive the Link Layer Discovery Protocol LLDP neighbor information that neighbor device sends by port;
According to the LLDP neighbor information that described port receives, judge whether described neighbor device has enabled IGMP Snooping;
When described neighbor device has enabled IGMP Snooping, described port is carried out the dynamic router configuring ports.
Wherein, after the described Link Layer Discovery Protocol LLDP neighbor information, also comprise by the transmission of port reception neighbor device:
Write down the information of the neighbor device that comprises in the described LLDP neighbor information and the IGMP Snooping ability of described neighbor device, when the IGMP Snooping ability of described neighbor device changes, upgrade the IGMP Snooping ability of described neighbor device; Described IGMP Snooping ability comprises: enabled IGMP Snooping or do not enabled IGMP Snooping.
Wherein, the described LLDP neighbor information that receives according to described port, judge whether described neighbor device has enabled IGMP Snooping and comprised:
Resolve the expansion TLV in the LLDP neighbor information of described record;
According to the field of carrying among the described expansion TLV, judge whether neighbor device has enabled IGMPSnooping.
Wherein, when described neighbor device has enabled IGMP Snooping, described port is carried out the dynamic router configuring ports comprises:
Obtain the affiliated vlan list of described port;
Obtain the VLAN that has enabled IGMP Snooping in the described vlan list;
Based on the described VLAN that enables IGMP Snooping, described port is carried out the dynamic router configuring ports.
Wherein, also comprise:
Described neighbor device generates the LLDP neighbor information of carrying IGMP Snooping ability;
Described neighbor device regularly sends described LLDP neighbor information of carrying IGMP Snooping ability by each port; And/or after finding that arbitrary port becomes Up from Down, send described LLDP neighbor information of carrying IGMP Snooping ability from described port; Described IGMP Snooping ability comprises: enabled IGMP Snooping or do not enabled IGMP Snooping.
Wherein, described neighbor device generates the LLDP neighbor information of carrying IGMP Snooping ability and comprises:
Described neighbor device adds expansion TLV in the LLDP neighbor information, carry IGMP Snooping ability by the field among the described expansion TLV; Described IGMP Snooping ability comprises: enabled IGMPSnooping or do not enabled IGMP Snooping.
The present invention also provides a kind of switching equipment, has enabled Internet Group Management Protocol and has intercepted IGMPSnooping, comprising:
The neighbor information receiving element is used for receiving the Link Layer Discovery Protocol LLDP neighbor information that neighbor device sends by port;
Judging unit is used for the LLDP neighbor information that receives according to described neighbor information receiving element, judges whether described neighbor device has enabled IGMP Snooping;
The port arrangement unit is used for when described neighbor device has enabled IGMP Snooping described port being carried out the dynamic router configuring ports.
Wherein, also comprise:
The neighbor information record cell is used to write down the information of described neighbor device and the IGMP Snooping ability of described neighbor device, when the IGMP Snooping ability of described neighbor device changes, upgrades the IGMP Snooping ability of described neighbor device; Described IGMP Snooping ability comprises: enabled IGMP Snooping or do not enabled IGMP Snooping.
Wherein, described judging unit comprises:
Resolve subelement, be used for resolving the expansion TLV of described LLDP neighbor information;
Judgment sub-unit is used for the field of carrying according to described expansion TLV, judges whether neighbor device has enabled IGMP Snooping.
Wherein, described port arrangement unit comprises:
First obtains subelement, is used to obtain the affiliated vlan list of described port;
Second obtains subelement, is used for obtaining the VLAN that described vlan list has enabled IGMP Snooping;
The port arrangement subelement is used for the VLAN that enables IGMP Snooping based on described, and described port is carried out the dynamic router configuring ports.
The present invention also provides a kind of switching equipment, comprising:
The neighbor information generation unit is used to generate the LLDP neighbor information of carrying IGMP Snooping ability; Described IGMP Snooping ability comprises: enabled IGMP Snooping or do not enabled IGMPSnooping;
The neighbor information transmitting element is used for timing sends the described IGMP of carrying Snooping ability by each port LLDP neighbor information; And/or after finding that arbitrary port becomes Up from Down, send described LLDP neighbor information of carrying IGMP Snooping ability from described port.
Wherein, described neighbor information generation unit specifically is used for: add expansion TLV in the LLDP neighbor information, carry IGMP Snooping ability by the field among the described expansion TLV; Described IGMPSnooping ability comprises: enabled IGMP Snooping or do not enabled IGMP Snooping.
Compared with prior art, the present invention has the following advantages:
Among the present invention, the LLDP message IGMP Snooping information of carrying equipment by expansion, make that switching equipment can be according to the LLDP message dynamic-configuration router port of expansion, flux of multicast can be restrained fast when making network topology change, and the manual configuration of having avoided the user under the situation of a plurality of VLAN is arranged in port arrangement, be convenient to safeguard.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
The invention provides a kind of port configuration method, its core concept is: because LLDP (Link LayerDiscovery Protocol, Link Layer Discovery Protocol) message is not subjected to the influence of port blockeds such as MSTP/RRPP, can be between equipment advertised information, therefore can make switch can dynamically increase and safeguard router port according to the LLDP message of expansion by the LLDP message announcement IGMPSnooping state of expansion.Concrete, the invention provides a kind of port configuration method, be applied to enable Internet Group Management Protocol and intercepted on the switching equipment of IGMP Snooping, as shown in Figure 2, comprising:
Step s201, receive the Link Layer Discovery Protocol LLDP neighbor information that neighbor device sends by port.
Step s202, according to the LLDP neighbor information that this port receives, judge whether this neighbor device has enabled IGMP Snooping.
Step s203, when this neighbor device has enabled IGMP Snooping, this port is carried out the dynamic router configuring ports.
The LLDP that relates among the present invention is a link layer protocol.Concrete, local device is made into TLV (Type/Length/Value with the information sets of this equipment, type) is encapsulated in and sends to direct-connected neighbor device in the LLDP neighbor information, also the LLDP neighbor information that receives from neighbor device is preserved with the form of standard mib (Management Information Base, management information bank) simultaneously.By the LLDP agreement, the information of own and directly-connected neighbor equipment can be preserved and manage to equipment, for the communication conditions of network management system inquiry and judgement link.The fundamental type TLV that can encapsulate in neighbor information that stipulates in the existing LLDP agreement is as shown in table 1 below:
Table 1 fundamental type TLV explanation
The TLV type |
The TLV title |
Whether must issue |
0 |
End of LLDPDU |
Sign LLDPDU finishes |
1 |
Chassis ID TLV |
The bridge MAC Address of transmitting apparatus |
2 |
Port ID TLV |
Be used for identifying the port of LLDPDU transmitting terminal.When equipment did not send MED TLV, content was the port title, and when equipment sent MED TLV, content was the MAC Address of port, used bridge MAC when not having port mac |
3 |
Time To Live TLV |
The time-to-live of this facility information on neighbor device |
4 |
Port Description TLV |
The description character string of ethernet port |
5 |
System Name TLV |
The title of equipment |
6 |
System Description TLV |
System description |
7 |
System Capabilities TLV |
The major function of system and have which major function to be enabled |
8 |
Management Address TLV |
Management address, and corresponding interface number and OID (Object Identifier, object identity).The management address content is the IP address of user's appointment, if not configuration of user, management address be interface allow by and the primary ip address of the minimum VLAN of VLAN ID value, as if |
|
|
The minimum VLAN of VLAN ID value does not dispose primary ip address, and the management address value is 127.0.0.1 |
9~126 |
Reserved |
Reserved field |
127 |
Organizationally?Specific TLVs |
Expanded definition |
Among above-mentioned each fundamental type TLV, TYPE 127 is used for expanded definition, can define Sub TLV, and for example the Sub TLV of IEEE 802.3 tissue definition comprises:
Subtype=1:MAC/PHY Configuration/Status TLV: be used to carry port speed and duplex state, whether support port speed to consult, whether enable auto-negotiation functionality and current speed and duplex state automatically.
Subtype=2:Power Via MDI TLV: the power supply capacity that is used to carry port.
Subtype=3:Link Aggregation TLV: be used to carry port and whether support link aggregation and whether enable link polymerization.
Subtype=4:Maximum Frame Size TLV: be used to carry the maximum frame size of support, get the MTU (Max Transmission Unit, MTU) of port arrangement
Among the present invention, newly-increased Sub TLV shown in the tabulation 2 down in the LLDP neighbor information:
Table 2 increases Sub TLV explanation newly
TLV type=27 |
TLV?information string?length=9 |
OUI 00-0F-E2 |
subtype 01 |
IGSP Status |
Reserved |
The each several part implication is as follows among the newly-increased Sub TLV shown in the table 2:
TLV type is 127, the TLV of expression expanded definition;
The length of TLV character string is 9 bits;
OUI (Organizationally Unique Identifier organizes unique identification), the tissue under the newly-increased SubTLV of expression.
Subtype is 1, and length is 8 bits.
IGSP (IGMP Snooping Protocol) Status represents the IGSP state, and length is 8 bits.The explanation of IGSP Status sees the following form 3.
The explanation of table 3 IGSP Status
Bit |
The Function function |
Value/Meaning value and implication |
0 |
IGSP Capability IGSP ability |
0 does not support IGSP function 1 to support the IGSP function |
1 |
IGSP Status IGSP state |
0 has enabled IGSP 1 does not enable IGSP |
2-7 |
Reserved keeps |
-- |
Among the IGSP Status, when the value of IGSP Capability was 0, the value of IGSP Status can only be 0, and devices illustrated is not supported IGMP Snooping function.When the value of IGSP Capability was 1, devices illustrated was supported IGMP Snooping function, but the value of IGSP Status can be 0 or 1, and IGSPStatus illustrated that this equipment supported IGMP Snooping and enabled IGMP Snooping at 1 o'clock; Though IGSPStatus is 0 o'clock devices illustrated support IGMP Snooping but does not enable IGMP Snooping.
Below be example with network scenarios shown in Figure 3, the embodiment of middle port collocation method of the present invention is described.As shown in Figure 3, the configuration of routers in upstream 3 layers of multicast and related protocol, the downstream is 2 layers of looped network that 4 switches are formed, and prevents loop by MSTP or RRPP, its middle port P3 is labeled as black, sign is in blocked state.The corresponding VLAN of 4 the switch upper port in downstream has disposed IGMP Snooping.
Below be that example describes with switch S4.
(1) method of switch S4 transmission LLDP neighbor information is as follows:
After the switch S4 overall situation has enabled IGMP Snooping, with IGSP Capability field and the set of IGSP Status field of expansion TLV in the LLDP neighbor information (is IGSP Capability=1, IGSP Status=1), show that this equipment can support and enable IGMP Snooping.Periodically send the LLDP neighbor information to direct-connected neighbor device afterwards by all of the port.If a certain moment afterwards, the switch S4 overall situation removes to have enabled IGMP Snooping, then the IGSP Status field of expansion TLV in the LLDP neighbor information is put 0, shows that this equipment does not enable IGMP Snooping.Periodically send the LLDP neighbor information to direct-connected neighbor device afterwards by all of the port.Same, switch S1, S2 in the network and S3 also carry out similar processing.
Except above-mentioned periodicity sends the mode of LLDP neighbor information,, can send the LLDP neighbor information by this port to neighbor device at once if after certain port on the switch becomes the UP state from the Down state.And the LLDP neighbor information of after postponing special time (as 1.5 seconds), inquiring about this port record at once.
For the LLDP neighbor information sending method in other switches in the network, similar to the LLDP neighbor information sending method of above-mentioned switch S4, be not repeated in this description at this.
(2) processing method of switch S4 when receiving the LLDP neighbor information of neighbor device transmission is as follows:
Switch S4 can receive the LLDP neighbor information as the switch S3 transmission of neighbor device by port P3.According to standard LLDP agreement, the facility information of switch S4 record switch S3, by the expansion TLV in the LLDP neighbor information, obtain and write down the IGMPSnooping ability information (comprising the value of IGSP Capability and the value of IGSP Status) of switch S3 simultaneously; Comprise that switch S3 has enabled IGMP Snooping or do not enabled IGMP Snooping.When the LLDP neighbor information of switch S3 transmission changes, upgrade facility information and the IGMP Snooping ability information of the switch S3 of storage before according to the LLDP neighbor information after changing.
After switch S4 has enabled IGMP Snooping, regularly the LLDP neighbor information of local record is checked (being a proof cycle with 60s for example).When the IGSP Status when finding any LLDP neighbor information that receives from certain port is set (being IGSP Status=1), this port is carried out the dynamic router configuring ports.Need to prove,, when the IGSP Status in any one or a plurality of LLDP neighbor information is set, then judges this port is carried out the dynamic router configuring ports if certain port receives a plurality of LLDP neighbor informations.For example for port P3, when the IGSP Status in finding the LLDP neighbor information that switch S3 sends was set, then switch S4 judged and need carry out the dynamic router configuring ports to port P3.
When switch S4 carries out the dynamic router configuring ports to port P3, at first check the vlan list that this port P3 is affiliated, obtain the VLAN that has enabled IGMP Snooping in this vlan list then, based on the VLAN that has enabled IGMP Snooping, port P3 is carried out the dynamic router configuring ports, and start age timer (if be router port for certain VLAN, then refresh its corresponding age timer), do not process for the VLAN that does not enable IGMP Snooping.
Processing method when receiving the LLDP neighbor information in other switches in the network, the processing method when receiving the LLDP neighbor information to above-mentioned switch S4 is similar, is not repeated in this description at this.
By above-mentioned steps, realized the dynamic router port arrangement of switch S4 to port P3.As seen because LLDP agreement itself can not be subjected to the influence of loop agreement port blocked, therefore comprise that port blocked also can the Dynamic Maintenance router port.The port that is labeled as white among Fig. 3 is the dynamic router port, and promptly by method provided by the invention, 4 equipment all are configured to the dynamic router port with all interconnect ports automatically.
In addition, said method provided by the invention and is compared by the mode of igmp querying message and PIM hello packet configuration dynamic router port in the prior art, realizes the dynamic router configuring ports based on different Rule of judgment, therefore there is not conflict, can coexists.For the equipment of not supporting above-mentioned expansion TLV, can ignore this expansion TLV according to the LLDP protocol definition, can other LLDP information in the LLDP neighbor information not impacted.
In the said method provided by the invention, the LLDP message IGMPSnooping information of carrying equipment by expansion, make that switching equipment can be according to the LLDP message dynamic-configuration router port of expansion, flux of multicast can be restrained fast when making network topology change, and the manual configuration of having avoided the user under the situation of a plurality of VLAN is arranged in port arrangement, be convenient to safeguard.
The present invention also provides a kind of switching equipment, and it has enabled Internet Group Management Protocol and has intercepted IGMPSnooping, as shown in Figure 4, comprising:
Neighbor information receiving element 10 is used for receiving the Link Layer Discovery Protocol LLDP neighbor information that neighbor device sends by port;
Judging unit 20 is used for the LLDP neighbor information that receives according to described neighbor information receiving element, judges whether described neighbor device has enabled IGMP Snooping;
Port arrangement unit 30 is used for when described neighbor device has enabled IGMP Snooping described port being carried out the dynamic router configuring ports.
In the switching equipment provided by the present invention, as shown in Figure 5, also comprise:
Neighbor information record cell 40 is used to write down the information of neighbor device and the IGMPSnooping ability of neighbor device, when the IGMP of neighbor device Snooping ability changes, upgrades the IGMP Snooping ability of this neighbor device; IGMP Snooping ability comprises: enabled IGMPSnooping or do not enabled IGMP Snooping.
Above-mentioned judging unit 20 can comprise:
Resolve subelement 21, be used for resolving the expansion TLV of the LLDP neighbor information of described record;
Judgment sub-unit 22 is used for the field of carrying according to described expansion TLV, judges whether neighbor device has enabled IGMP Snooping.
Above-mentioned port arrangement unit 30 can comprise:
First obtains subelement 31, is used to obtain the affiliated vlan list of described port;
Second obtains subelement 32, is used for obtaining the VLAN that described vlan list has enabled IGMP Snooping;
Port arrangement subelement 33 is used for the VLAN that enables IGMP Snooping based on described, and described port is carried out the dynamic router configuring ports.
The present invention also provides a kind of switching equipment, as shown in Figure 6, comprising:
Neighbor information generation unit 50 is used to generate the LLDP neighbor information of carrying IGMP Snooping ability; Concrete, can in the LLDP neighbor information, add expansion TLV, carry IGMP Snooping ability by the field among the expansion TLV; This IGMP Snooping ability comprises: enabled IGMPSnooping or do not enabled IGMP Snooping.
Neighbor information transmitting element 60 is used for regularly sending the LLDP neighbor information of carrying the IGMPSnooping ability to its neighbor device by each port; And/or after finding that arbitrary port becomes Up from Down, send the LLDP neighbor information of carrying IGMP Snooping ability to its neighbor device from this port.
In the above-mentioned switching equipment provided by the invention, the LLDP message IGMPSnooping information of carrying equipment by expansion, make that switching equipment can be according to the LLDP message dynamic-configuration router port of expansion, flux of multicast can be restrained fast when making network topology change, and the manual configuration of having avoided the user under the situation of a plurality of VLAN is arranged in port arrangement, be convenient to safeguard.
Above-mentioned module can be distributed in a device, also can be distributed in multiple arrangement.Above-mentioned module can be merged into a module, also can further split into a plurality of submodules.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number is not represented the quality of embodiment just to description.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.