CN101505282B - Method and equipment for deleting VLAN information - Google Patents

Method and equipment for deleting VLAN information Download PDF

Info

Publication number
CN101505282B
CN101505282B CN2009101314804A CN200910131480A CN101505282B CN 101505282 B CN101505282 B CN 101505282B CN 2009101314804 A CN2009101314804 A CN 2009101314804A CN 200910131480 A CN200910131480 A CN 200910131480A CN 101505282 B CN101505282 B CN 101505282B
Authority
CN
China
Prior art keywords
vlan
mac address
deleted
corresponding relation
switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009101314804A
Other languages
Chinese (zh)
Other versions
CN101505282A (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
Hangzhou 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2009101314804A priority Critical patent/CN101505282B/en
Publication of CN101505282A publication Critical patent/CN101505282A/en
Application granted granted Critical
Publication of CN101505282B publication Critical patent/CN101505282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method and a device for deleting virtual local area network (VLAN) information. The method comprises the following steps: determining VLAN to be deleted in a switch; according to the VLAN to be deleted, determining an MAC address corresponding relation corresponding to the VLAN to be deleted; and deleting the MAC address corresponding relation. In the method and the device, by reducing the frequency of deleting MAC address list items of the VLAN to be deleted in the switch, the execution efficiency is improved, and the execution time is shortened.

Description

A kind of method and apparatus of deleting VLAN information
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method and apparatus of deleting VLAN information.
Background technology
VLAN (Virtual Local Area Network, VLAN) refers on the basis of switched LAN, the crossed over different segment that the Adoption Network management software consists of, the end to end logical network of heterogeneous networks.VLAN can be divided into VLAN based on port by type, based on the VLAN of MAC (Media AccessControl, FDDI sublayer protocol) address, based on the VLAN of agreement, based on the VLAN of subnet and based on the VLAN of comprehensive strategic.Wherein, the advantage that VLAN has comprises: the restriction broadcast domain, broadcast domain is limited in the VLAN, and to save bandwidth, improve network throughput; Strengthen security of local area networks, the two layer message between VLAN is isolated mutually, the user in VLAN can not with other VLAN in user's direct communication; Make up flexibly virtual workgroup, divide different users to different working groups with VLAN.When switch reconfigures or create VLAN, the vlan information of all of the port in the switch and the vlan information of switch need to be removed.
In the prior art, the vlan information of the vlan information of all of the port in the switch and switch is removed the method for (deleting in batches VLAN) as shown in Figure 1, the method may further comprise the steps:
Step S101 obtains each VLAN to be deleted successively.
Step S102 obtains each port (port) among the VLAN successively.
Wherein, this port is the port with above-mentioned vlan information to be deleted that gets access to.
Step S103, mode flush (removing) FDB (ForwardingDatabase according to port and VLAN, forwarding database, be the MAC Address list item that hardware is preserved) the MAC record of middle port, be about to mate simultaneously in the FDB table dynamic MAC address list item deletion of this port and VLAN to be deleted.
Wherein, the MAC Address list item of this hardware preservation is the dynamic MAC address list item in the switch.
Step S104 removes the MAC record of shadow (software preserve MAC Address list item) middle port according to the mode of port and VLAN, is about to mate simultaneously in the shadow table static mac address table entry deletion of this port and VLAN to be deleted.
Wherein, the MAC Address list item of this software preservation is the static mac address list item in the switch.
Step S105 deletes port from VLAN, be about to delete from this port all about the information of VLAN to be deleted in the port.
Step S106, judge among this VLAN all of the port whether all traversal finish, if traversal is finished, all of the port information deletion of this VLAN is finished, and forwards step S107 to, otherwise forwards step S102 to.
Wherein, each VLAN can corresponding a plurality of ports, VLAN (VLAN to be deleted) information of each port all need to be disposed.
Step S107 removes the MAC record of VLAN among the FDB according to the VLAN mode, is about to the dynamic MAC address list item deletion of this VLAN of coupling in the FDB table.
Step S108 removes the MAC record of VLAN among the shadow according to the mode of VLAN, is about to the static mac address table entry deletion of this VLAN of coupling in the shadow table.
Step S109 carries out deletion VLAN, soon deletes from switch all about the information of this VLAN.
Step S110, judge all VLAN to be deleted whether all traversal finish, if traversal is finished, the vlan information of all of the port and the vlan information of switch are all disposed, and finish this flow process, otherwise forward step S101 to, continue to obtain VLAN to be deleted.
Concrete, in a main task, remove the handling process of vlan information, in carrying out deletion FDB table, before the dynamic MAC address list item, need specific semaphore of first to file, when this semaphore is arrived in application, could delete dynamic MAC address list item in the FDB table.Wherein, this specific semaphore is so that current main task of carrying out only has one, the conflict that has caused when having avoided a plurality of tasks to carry out simultaneously.After a main task is finished, must discharge this semaphore, wherein, the process that discharges this semaphore is finished in interrupting Processing tasks.
Carry out to remove in the FDB table after the dynamic MAC address list item in main task, continue the main task handling process, in again carrying out deletion FDB table during the dynamic MAC address list item, also need to apply for specific semaphore, at this moment, when above-mentioned semaphore is interrupted Processing tasks release, can applies for specific semaphore, thereby again delete dynamic MAC address list item in the FDB table; When above-mentioned semaphore also is not interrupted Processing tasks release, main task will be forced to switch away, can't again delete dynamic MAC address list item in the FDB table, be dispatched to the interruption Processing tasks of release semaphore when task dispatch, and when above-mentioned semaphore is discharged, dispatch back the main task application to this specific semaphore, and again delete dynamic MAC address list item in the FDB table.Wherein, each port all needs to carry out the process of dynamic MAC address list item in the above-mentioned deletion FDB table among the VLAN to be deleted, and VLAN to be deleted also needs to carry out the process of dynamic MAC address list item in the above-mentioned deletion FDB table.
Based on top analysis, when the batch deleting VLAN information, there is at present following shortcoming:
When a large amount of vlan information of deletion, repeatedly remove dynamic MAC address list item and the process of removing static mac address list item in the shadow table in the FDB table with carrying out, expended the plenty of time, for example, comprise 52 ports for removing among 4093 VLAN, each VLAN, will carry out dynamic MAC address list item and the process of removing static mac address list item in the shadow table in the inferior removing FDB table of 216929 (52*4093+1*4093), significantly reduce efficient.And, switch owing to carry out continually task between the interruption Processing tasks of main task and release semaphore, have a strong impact on execution efficient, expend the plenty of time.
Summary of the invention
The invention provides a kind of method and apparatus of deleting VLAN information, with when deleting VLAN in batches, reduce the used time of deletion.
In order to achieve the above object, the present invention proposes a kind of method of deleting virtual LAN VLAN information, it is characterized in that, stored the dynamic MAC address information of VLAN in the first corresponding relation of switch, stored the static mac address information of VLAN in the second corresponding relation; The method may further comprise the steps:
Determine VLAN to be deleted in the switch;
Determine the MAC Address corresponding relation corresponding with described VLAN to be deleted according to described VLAN to be deleted;
Delete described MAC Address corresponding relation.
Preferably, described method further comprises:
Delete the port corresponding with described VLAN to be deleted, and delete described VLAN to be deleted; The port that described deleting MAC address corresponding relation, deletion are corresponding with described VLAN to be deleted and delete between the described VLAN to be deleted not successively ordinal relation.
Preferably, describedly determine that according to VLAN to be deleted the MAC Address corresponding relation corresponding with described VLAN to be deleted comprises:
Judge whether the MAC Address of described VLAN to be deleted corresponding relation is arranged in the described switch, if so, determine that described MAC Address corresponding relation is the MAC Address corresponding relation corresponding with described VLAN to be deleted.
Preferably, describedly judge whether have the MAC Address of described VLAN to be deleted corresponding relation to comprise in the switch:
Judge in the first corresponding relation of described switch and whether store the dynamic MAC address corresponding relation with described VLAN to be deleted.
Preferably, whether store after the dynamic MAC address corresponding relation with described VLAN to be deleted in described the first corresponding relation of judging switch, also comprise:
The dynamic MAC address corresponding relation that will have described VLAN to be deleted is deleted from described the first corresponding relation.
Preferably, describedly judge whether have the MAC Address of described VLAN to be deleted corresponding relation to comprise in the switch:
Judge in the second corresponding relation of described switch and whether store the static mac address corresponding relation with described VLAN to be deleted.
Preferably, describedly judge judged result that whether MAC Address of described VLAN to be deleted corresponding relation is arranged in the switch when being, described method further comprises:
In described switch, record port-mark or the VLAN sign of all dynamic MAC address corresponding relations corresponding with described VLAN to be deleted in the first corresponding relation; And/or
In described switch, record port-mark or the VLAN sign of all static mac address corresponding relations corresponding with described VLAN to be deleted in the second corresponding relation.
Preferably, described deleting MAC address corresponding relation comprises:
According to the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in described port-mark or described switch the first corresponding relation of VLAN sign deletion;
According to the static mac address corresponding relation corresponding with described VLAN to be deleted in described port-mark or described switch the second corresponding relation of VLAN sign deletion.
Preferably, described according to before the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in port-mark or described switch the first corresponding relation of VLAN sign deletion, also comprise:
In a task from semaphore of described switch application;
Described according to after the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in port-mark or described switch the first corresponding relation of VLAN sign deletion, also comprise:
In described task, discharge described semaphore.
Preferably, when VLAN to be deleted comprises in the described switch all VLAN in described definite switch,
Describedly determine that according to VLAN to be deleted the MAC Address corresponding relation corresponding with described VLAN to be deleted comprises:
Determine that all MAC Address corresponding relations are the MAC Address corresponding relation corresponding with described VLAN to be deleted in the switch.
Preferably, described deleting MAC address corresponding relation comprises:
Delete in described switch the first corresponding relation all static mac address corresponding relations in all dynamic MAC address corresponding relations and described switch the second corresponding relation of deletion.
The present invention proposes a kind of equipment of deleting VLAN information, it is characterized in that, stored the dynamic MAC address information of VLAN in the first corresponding relation of switch, stored the static mac address information of VLAN in the second corresponding relation; This equipment comprises:
The first determination module is used for determining switch VLAN to be deleted;
The second determination module is electrically connected with described the first determination module, and the VLAN to be deleted that is used for determining according to described the first determination module determines the MAC Address corresponding relation corresponding with described VLAN to be deleted;
The first removing module is electrically connected with described the second determination module, is used for deleting the MAC Address corresponding relation that described the second determination module is determined.
Preferably, described the second determination module comprises:
Judge submodule, be used for judging whether described switch has the MAC Address corresponding relation of VLAN to be deleted;
First determines submodule, is electrically connected with described judgement submodule, be used for when the judged result of described judgement submodule when being, determine that described MAC Address corresponding relation is the MAC Address corresponding relation corresponding with described VLAN to be deleted.
Preferably, described judgement submodule specifically is used for:
Judge in the first corresponding relation of described switch whether store the dynamic MAC address corresponding relation with described VLAN to be deleted, and judge in the second corresponding relation of described switch whether store the static mac address corresponding relation with described VLAN to be deleted.
Preferably, described the first removing module specifically is used for: when described judgement submodule judged that the first corresponding relation of described switch has been stored the dynamic MAC address corresponding relation with described VLAN to be deleted, the dynamic MAC address corresponding relation that will have described VLAN to be deleted was deleted from described the first corresponding relation; Or described the second determination module also comprises:
Record sub module, the port-mark or the VLAN that are used for all dynamic MAC address corresponding relations corresponding with described VLAN to be deleted in described switch record the first corresponding relation identify; And/or
In described switch, record port-mark or the VLAN sign of all static mac address corresponding relations corresponding with described VLAN to be deleted in the second corresponding relation.
Preferably, described the first removing module specifically is used for:
Port-mark or VLAN sign according to described record sub module record are deleted the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in described switch the first corresponding relation;
Port-mark or VLAN sign according to described record sub module record are deleted the static mac address corresponding relation corresponding with described VLAN to be deleted in described switch the second corresponding relation.
Preferably, described equipment also comprises:
The application module, be used for before described the first removing module dynamic MAC address corresponding relation corresponding with described VLAN to be deleted according to port-mark or described switch the first corresponding relation of VLAN sign deletion, in a task from semaphore of described switch application;
Release module, be electrically connected with described application module, be used for after described the first removing module dynamic MAC address corresponding relation corresponding with described VLAN to be deleted according to port-mark or described switch the first corresponding relation of VLAN sign operation deletion, in described task, discharging the semaphore of described application module application.
Preferably, when described the first determination module determines in the switch that VLAN to be deleted comprises in the described switch all VLAN,
Described the second determination module comprises that second determines submodule,
Described second determines that submodule is used for determining that all MAC Address corresponding relations of switch are the MAC Address corresponding relation corresponding with described VLAN to be deleted;
Described the first removing module also is used for:
When described second determines that submodule is determined all MAC Address corresponding relations in the switch for the MAC Address corresponding relation corresponding with described VLAN to be deleted, delete in described switch the first corresponding relation all static mac address corresponding relations in all dynamic MAC address corresponding relations and described switch the second corresponding relation of deletion.
Compared with prior art, the present invention has the following advantages: by reducing the number of times of the MAC Address list item that needs to delete VLAN in the deletion switch, improved execution efficient, shortened the time of implementation.And by in main task, carrying out the process of release semaphore, avoid applying for the semaphore failure and the task of causing is switched that reduce the time that the wait task dispatching office expends, when FDB was removed in the execution of a large amount of number of times, the time of implementation shortened greatly next time.
Description of drawings
In order to be illustrated more clearly in the present invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in the present invention or the description of the Prior Art, apparently, accompanying drawing in the following describes only is accompanying drawings more of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of removing VLAN in the prior art;
Fig. 2 is the method flow diagram of a kind of deleting VLAN information of proposing of the present invention;
Fig. 3 is the method flow diagram of a kind of deleting VLAN information of first embodiment of the invention proposition;
Fig. 4 is the method flow diagram of a kind of deleting VLAN information of second embodiment of the invention proposition;
Fig. 5 is the method flow diagram of a kind of deleting VLAN information of third embodiment of the invention proposition;
Fig. 6 is the equipment structure chart of a kind of deleting VLAN information of proposing of the present invention.
Embodiment
Below in conjunction with the accompanying drawing among the present invention, the technical scheme among the present invention is clearly and completely described, obviously, described only is the present invention's part, rather than whole.Based on the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other invention that obtains under the creative work prerequisite.
Core concept of the present invention is in the deletion switch in the dynamic MAC address list item in the FDB table and the shadow table before the static mac address list item, increase the process of judging, FDB table there is the information recording/of static mac address list item in the information of dynamic MAC address list item and the shadow table in switch, delete the MAC Address list item of all VLAN to be deleted by carrying out deletion action, significantly shortened and deleted the spent time.Among the present invention, the vlan information of the vlan information of deletion port and deletion switch does not have ordinal relation successively in FDB table and shadow table.And, among the present invention, when in the needs deletions switch during all VLAN, can remove in the switch FDB table all dynamic MAC address list items and remove all static mac address list items in the switch shadow table.
The method of a kind of deleting VLAN information that the present invention proposes as shown in Figure 2, may further comprise the steps:
Step S201 determines VLAN to be deleted in the switch.
Step S202 determines the MAC Address corresponding relation corresponding with described VLAN to be deleted according to described VLAN to be deleted.
Wherein, describedly determine that according to VLAN to be deleted the MAC Address corresponding relation corresponding with described VLAN to be deleted comprises:
Judge whether the MAC Address of described VLAN to be deleted corresponding relation is arranged in the described switch, if so, determine that described MAC Address corresponding relation is the MAC Address corresponding relation corresponding with described VLAN to be deleted.
Wherein, describedly judge whether have the MAC Address of described VLAN to be deleted corresponding relation specifically to comprise in the switch:
Judge in the first corresponding relation of described switch whether store the dynamic MAC address corresponding relation with described VLAN to be deleted, stored the dynamic MAC address information of VLAN in described the first corresponding relation; With
Judge in the second corresponding relation of described switch whether store the static mac address corresponding relation with described VLAN to be deleted, stored the static mac address information of VLAN in described the second corresponding relation.
Concrete, whether store the dynamic MAC address corresponding relation with described VLAN to be deleted in above-mentioned the first corresponding relation of judging described switch and judge whether store the static mac address corresponding relation ordinal relation of priority not with described VLAN to be deleted in the second corresponding relation of described switch; The first corresponding relation of switch includes but not limited to that the dynamic MAC address list item of storage in the switch FDB table, the second corresponding relation of switch include but not limited to the static mac address list item of storage in the switch shadow table.
Wherein, whether store after the dynamic MAC address corresponding relation with described VLAN to be deleted in described the first corresponding relation of judging switch, also comprise:
The dynamic MAC address corresponding relation that will have described VLAN to be deleted is deleted from described the first corresponding relation.
In this step, the dynamic MAC address corresponding relation with VLAN to be deleted is specially: the corresponding dynamic MAC address list item of port of storage in the FDB table, or the corresponding dynamic MAC address list item of VLAN to be deleted of storage in the FDB table; Static mac address corresponding relation with VLAN to be deleted is specially: the corresponding static mac address list item of port of storage in the shadow table, or the corresponding static mac address list item of VLAN to be deleted of storage in the shadow table.
Wherein, describedly judge judged result that whether MAC Address of described VLAN to be deleted corresponding relation is arranged in the switch when being, described method further comprises:
In described switch, record port-mark or the VLAN sign of all dynamic MAC address corresponding relations corresponding with described VLAN to be deleted in the first corresponding relation; And/or
In described switch, record port-mark or the VLAN sign of all static mac address corresponding relations corresponding with described VLAN to be deleted in the second corresponding relation.
Concrete, when the dynamic MAC address corresponding relation with VLAN to be deleted is the corresponding dynamic MAC address list item of port of storage in the FDB table, the port-mark of record dynamic MAC address corresponding relation in switch; When the dynamic MAC address corresponding relation with VLAN to be deleted is the corresponding dynamic MAC address list item of VLAN to be deleted of storage in the FDB table, the VLAN sign of record dynamic MAC address corresponding relation in switch; When the static mac address corresponding relation with VLAN to be deleted is the corresponding static mac address list item of port of storage in the shadow table, the port-mark of record static mac address corresponding relation in switch; When the static mac address corresponding relation with VLAN to be deleted is the corresponding static mac address list item of VLAN to be deleted of storage in the shadow table, the VLAN sign of record static mac address corresponding relation in switch.
Wherein, described deleting MAC address corresponding relation comprises:
According to the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in described port-mark or described switch the first corresponding relation of VLAN sign deletion;
According to the static mac address corresponding relation corresponding with described VLAN to be deleted in described port-mark or described switch the second corresponding relation of VLAN sign deletion.
Concrete, when in described switch, recording the port-mark of dynamic MAC address corresponding relation, according to all mate the dynamic MAC address list item of port and VLAN to be deleted simultaneously in the disposable removing switch of this port-mark FDB table;
All mate the static mac address list item of port and VLAN to be deleted simultaneously in the disposable removing switch shadow table; Or mate simultaneously successively the static mac address list item of port and VLAN to be deleted in (one by one) the removing switch shadow table.
When the VLAN of record dynamic MAC address corresponding relation in described switch identifies, identify the dynamic MAC address list item of all VLAN to be deleted in the disposable removing switch FDB table according to this VLAN;
The static mac address list item of all VLAN to be deleted in the disposable removing switch shadow table; Or remove successively the static mac address list item of VLAN to be deleted in the switch shadow table.
When in described switch, recording the port-mark of static mac address corresponding relation, according to all mate the static mac address list item of port and VLAN to be deleted simultaneously in the disposable removing switch of this port-mark shadow table;
All mate the dynamic MAC address list item of port and VLAN to be deleted simultaneously in the disposable removing switch FDB table; Or remove successively the dynamic MAC address list item that mates simultaneously port and VLAN to be deleted in the switch FDB table.
When the VLAN of record static mac address corresponding relation in described switch identifies, identify the static mac address list item of all VLAN to be deleted in the disposable removing switch shadow table according to this VLAN;
The dynamic MAC address list item of all VLAN to be deleted in the disposable removing switch FDB table; Or remove successively the dynamic MAC address list item of VLAN to be deleted in the switch FDB table.
Wherein, described according to before the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in port-mark or described switch the first corresponding relation of VLAN sign deletion, also comprise:
In a task, from described switch, apply for a semaphore;
Concrete, above-mentioned remove successively in the FDB table in the dynamic MAC address list item of coupling port and VLAN to be deleted, or remove successively before the dynamic MAC address list item of the VLAN to be deleted in the FDB table, also need in above-mentioned task, from described switch, apply for above-mentioned semaphore.This task is for carrying out the main task of above-mentioned all processes, and this semaphore is specific semaphore, is used for making a switch executive director to be engaged in.
Described according to after the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in port-mark or described switch the first corresponding relation of VLAN sign deletion, also comprise:
In described task, discharge described semaphore.
Wherein, when VLAN to be deleted comprises in the described switch all VLAN in described definite switch,
Describedly determine that according to VLAN to be deleted the MAC Address corresponding relation corresponding with described VLAN to be deleted comprises:
Determine that all MAC Address corresponding relations are the MAC Address corresponding relation corresponding with described VLAN to be deleted in the switch.
Wherein, described deleting MAC address corresponding relation comprises:
Delete in described switch the first corresponding relation all static mac address corresponding relations in all dynamic MAC address corresponding relations and described switch the second corresponding relation of deletion.
Step S203 deletes described MAC Address corresponding relation.
Among the present invention, when this deletes described MAC Address corresponding relation, be not limited to and once delete all MAC Address corresponding relations, for the present invention, can carry out secondary, three times or the MAC Address corresponding relation of all VLAN to be deleted in the deletion action deletion switch repeatedly, compare with the MAC Address corresponding relation of only removing of prior art at every turn, only need among the present invention to get final product if it were not for only remove a MAC Address corresponding relation at every turn.
Step S204 deletes the port corresponding with described VLAN to be deleted;
Step S205 deletes described VLAN to be deleted.
Wherein, among the above-mentioned step S203-step S205, the port that deleting MAC address corresponding relation, deletion are corresponding with described VLAN to be deleted and delete between the described VLAN to be deleted not successively ordinal relation can carry out deletion action according to actual needs.
Among the present invention, after getting access to VLAN to be deleted, need the information of this VLAN of deletion, the information of this VLAN comprises: corresponding to the port information of this VLAN, corresponding to the MAC information of this VLAN and corresponding to the identification information of this VLAN, the identification information of this VLAN i.e. this VLAN.
The method of a kind of deleting VLAN information that first embodiment of the invention proposes, the applicable scope of the method includes but not limited to delete the vlan information in the switch, for example, can delete in batches the vlan information that uses in the Ma Weier chip switch by use the method.As shown in Figure 3, the method for this deleting VLAN information may further comprise the steps:
Step S301 obtains each VLAN to be deleted in the switch successively.
In network when using VLAN to carry out data communication, the network equipment utilizes the VLAN under the VLAN ID identification message, wherein, VLAN numbered under VLAN ID represented message, length is 12bit, span is 0~4095,0 and 4095 is the value that keeps in the agreement, and the span of VLAN ID is 1~4094, namely in switch, dispose at most 4094 VLAN, when deletion VLAN, first VLAN (VLAN 1) can not delete, and other VLAN (VLAN 2~VLAN 4093) all can delete, in the present invention, all VLAN in take the VLAN to be deleted that gets access to as switch outside the VLAN 1 describe as example.Wherein, after getting access to a VLAN to be deleted, with the information deletion of this VLAN in the port, and the information of deleting this VLAN, obtain VLAN next to be deleted, carry out the operation of deleting VLAN information and port vlan information.
Step S302 obtains each port with vlan information to be deleted successively.
For example, getting access to a VLAN to be deleted is VLAN 5, when all comprising the information of this VLAN 5 in a plurality of ports, need to in a plurality of ports about the information deletion of VLAN5, namely obtain successively each port in a plurality of ports, after getting access to a port, delete VLAN 5 relevant informations in this port, and obtain the next port in a plurality of ports.Wherein, in switch, VLAN can corresponding a plurality of ports, and a port also can belong to a plurality of VLAN, namely in a port a plurality of vlan informations is arranged.
Step S303 judges in the switch FDB table whether the dynamic MAC address list item that mates simultaneously port and VLAN to be deleted is arranged, and when having mated the dynamic MAC address list item of port and VLAN to be deleted simultaneously, forwards step S304 to, otherwise, forward step S305 to.
Wherein, preserved the dynamic MAC address list item of switch middle port and the dynamic MAC address list item of VLAN in this FDB table, VLAN appropriate ports above-mentioned and to be deleted are the port with vlan information to be deleted that gets access among the step S302.
Step S304 removes the dynamic MAC address list item that mates simultaneously this port and vlan information to be deleted in the FDB table according to the mode of port and VLAN.
Step S305 judges in the switch shadow table whether the static mac address list item that mates simultaneously port and VLAN to be deleted is arranged, and when having mated the static mac address list item of port and VLAN to be deleted simultaneously, forwards step S306 to, otherwise, forward step S307 to.Wherein, the static mac address list item of switch middle port and the static mac address list item of VLAN have been preserved in this shadow table.
Among the present invention, judge the static mac address list item that whether mates simultaneously port and VLAN to be deleted in the switch and judge that the dynamic MAC address list item that whether mates simultaneously port and VLAN to be deleted in the switch does not have ordinal relation successively, namely can carry out the deterministic process among the step S305 before step S303.
Concrete, in switch, all preserved the FDB table, comprise the MAC Address list item in this FDB table, the record of the corresponding MAC Address list item of each bar FDB list item (each in the FDB table), this MAC Address list item comprises: dynamic MAC address list item and static mac address list item.
Wherein, the MAC Address list item in the FDB table generates by following approach or changes.(1) switch self study, switch is according to the source MAC, port, the VLAN ID that receive packet, automatically upgrade the MAC Address list item in the FDB table, be that switch is according to the mac address information that receives from all of the port, generate or safeguard the MAC Address list item, when switch receives frame data, determine it is that this Frame is filtered or transmits according to the MAC Address list item; (2) manual increasing increases the MAC Address list item in the FDB table by hand by command line interface.
Wherein, the number of MAC Address list item can be determined by product in the FDB table, each MAC Address list item in the FDB table is by MAC Address and VLAN ID unique identification, and the content in the FDB table includes but not limited to: MAC Address, the port numbers related with MAC Address, show with title, the FDB of the related VLAN of MAC Address in each sign (Flags); The implication of each sign is specially in this FDB table: Permanent (static address list item), Dynamic (dynamic address list item).
Wherein, the most at first, all MAC Address list items in the switch FDB table all are dynamic, if (ageing time) afterwards through after a while, the corresponding network equipment of this MAC Address list item does not have transfer of data, and this MAC Address list item will be deleted, thereby prevents that the MAC Address list item is too huge, namely when be sure of that certain network equipment is removed from network after, with MAC Address list item deletion from the FDB table of this network equipment.If ageing time is set as 0, this MAC Address list item will be stored in the FDB table and can dynamically do not deleted, and when the switch shutdown or when restarting, all dynamic MAC address list items are all with deleted.
Wherein, the static mac address list item must be configured by program (for example h.link) by the manual setting of system manager or server, a static mac address list item must be a unicast address, and can not have the MAC Address of two static address list items identical.When the MAC Address list item in the FDB table is the static mac address list item, do not allow switch random, change static mac address list item in the FDB table automatically, thereby realized the fixing corresponding of port and MAC Address, the network equipment in this corresponding scope can't not receive from the next packet of switch, and the static mac address list item in namely showing by use FDB has been realized the binding between MAC and the port.
Certainly, dynamic MAC address list item in the switch and static mac address list item only need during the preserving existence intersection property changes planes, might not be kept in the FDB table, for example, by using the hardware in the switch to preserve the dynamic MAC address list item, preserve the static mac address list item by using the software in the switch.Among the present invention, the dynamic MAC address list item is kept in the FDB table, the static mac address list item is kept in the shadow table describes for example.
Step S306, with the information recording/of this port in switch.
Among the present invention, can in the form of switch, record the information of port, for example, by newly-built form StaticMacPortList (static MAC port tabulation), be used for storing the port information with static mac address information of above-mentioned VLAN to be deleted, the information that has VLAN 5 to be deleted in the port 3, and shadow table has been when having mated simultaneously the MAC Address list item (all being static MAC Address list items in the shadow table) of port 3 and VLAN 5, and the information (for example sign) of this port is recorded in the StaticMacPortList table of switch.
Step S307 deletes the information all about VLAN to be deleted in the port from this port.
For example, when containing the information of VLAN 5 to be deleted in the port 3, the information all about VLAN 5 in the port 3 is deleted from port 3.
Step S308, judge have this vlan information all of the port whether all traversal finish, if traversal is finished, all of the port information deletion of this VLAN is finished, and forwards step S309 to, otherwise forwards step S302 to.
Wherein, port with vlan information to be deleted may have a lot of (for example 52), at this moment, need to be with the information deletion of the VLAN to be deleted in each port, when traversal is not finished, need to rotate back into step S302, re-start step S302 to the flow process of step S307, finish until will have the port traversal of vlan information to be deleted.
Step S309 removes the static mac address list item that mates simultaneously this port and VLAN to be deleted in the shadow table according to the port information that records in the switch.
Wherein, the port information that will have the static mac address list item among the step S306 all has been stored in the StaticMacPortList table of switch, in this step, by from the StaticMacPortList table, obtaining the corresponding port of port information of record, remove the static mac address list item that mates simultaneously this port and VLAN to be deleted in the shadow table according to the mode of port and VLAN.
Step S310 judges whether remain the dynamic MAC address list item of deleting VLAN information in the switch FDB table, if so, forwards step S311 to, otherwise, forward step S312 to.Wherein, preserved the dynamic MAC address list item that has vlan information in the switch in this FDB table.
Step S311 removes the dynamic MAC address list item that has vlan information to be deleted in the FDB table according to the mode of VLAN.
Among the present invention, in step S304, removed the dynamic MAC address list item that mates simultaneously port and vlan information to be deleted in the FDB table according to the mode of port and VLAN, and in subsequent step, traveled through all of the port with vlan information to be deleted, judge among the step S310 when whether remaining the dynamic MAC address list item of deleting VLAN information in the FDB table, no longer included the MAC Address of vlan information to be deleted in this switch, just do not needed to carry out this step S311 yet, be step S310 the determination result is NO, directly forward step S312 to.In particular cases, remove when mating simultaneously the dynamic MAC address list item of port and vlan information to be deleted in the FDB table according to the mode of port and VLAN among the step S304, when the MAC Address list item in the deletion FDB table (hardware table item) is more, the deletion of software program and hardware table item can not be finished synchronously, at this moment, judge among the step S310 when whether remaining the dynamic MAC address list item of deleting VLAN information in the FDB table, software program is thought the MAC Address that is still waiting deleting VLAN information in this switch, namely need to carry out this step, remove the dynamic MAC address list item that has vlan information to be deleted in the FDB table according to the mode of VLAN.
Step S312 judges whether remain the static mac address list item of deleting VLAN information in the switch shadow table, if so, forwards step S313 to, otherwise, forward step S314 to.Wherein, preserved the static mac address list item that has vlan information in the switch in this shadow table.
Among the present invention, judge that whether whether remain the static mac address list item and judging of deleting VLAN information in the switch has the not ordinal relation of priority of the dynamic MAC address of VLAN to be deleted list item in the switch, namely can carry out the deterministic process among the step S312 before step S310.
Among the present invention, judge whether remain in the switch FDB table deleting VLAN information the dynamic MAC address list item and judge whether switch shadow remains the implementation of static mac address list item of deleting VLAN information in showing, can also whether the dynamic MAC address list item that mate simultaneously port and VLAN to be deleted be arranged in judging switch FDB table and judge switch shadow operates before whether the static mac address list item that mates simultaneously port and VLAN to be deleted being arranged in showing, when remaining the dynamic MAC address list item of deleting VLAN information in the FDB table, can in switch, record the identification information of VLAN, vlan information according to all VLAN to be deleted in the disposable deletion switch of the identification information FDB table of record VLAN, and/or when remaining the static mac address list item of deleting VLAN information in the shadow table, can in switch, record the identification information of VLAN, according to the vlan information of all VLAN to be deleted in the disposable deletion switch of the identification information shadow table of record VLAN.Namely in remove FDB table according to the mode of port and VLAN, mate simultaneously the dynamic MAC address list item of port and vlan information to be deleted and remove according to the mode of port and VLAN mate simultaneously the static mac address list item of port and vlan information to be deleted in the shadow table before, remove the dynamic MAC address list item of vlan information to be deleted in the FDB table and remove the static mac address list item of vlan information to be deleted in the shadow table according to the mode of VLAN according to the mode of VLAN.
Step S313 removes the static mac address list item that has vlan information to be deleted in the shadow table according to the mode of VLAN.
Among the present invention, removed the static mac address list item that mates simultaneously this port and VLAN to be deleted in the shadow table according to the mode of port and VLAN among the step S309, and during deletion static mac address (software preserve MAC Address), do not relate to the synchronous problem of software and hardware, in step S312, judge when whether remaining the static mac address list item of deleting VLAN information in the switch shadow table, do not had the static mac address list item of vlan information to be deleted in this shadow table, namely do not need to carry out and remove the process that has the static mac address list item of vlan information to be deleted in the shadow table in this step, directly forward step S314 to.
Step S314 deletes the relevant information of all VLAN to be deleted from switch.
Step S315, judge all VLAN to be deleted whether all traversal finish, if traversal is finished, the vlan information of all of the port and the vlan information of switch are all disposed, and finish this flow process, otherwise forward step S301 to, continue to obtain VLAN to be deleted.
Among the present invention, to delete VLAN 2~VLAN 4093 as the example explanation, namely need to obtain successively each VLAN among VLAN 2~VLAN 4093, repeatedly the flow process among execution in step S301~step S314.
Among the present invention, in a main task, remove the handling process of vlan information, in carrying out deletion FDB table before the dynamic MAC address list item, only have when applying for to a specific semaphore, could delete dynamic MAC address list item in the FDB table, in executing deletion FDB table, after the dynamic MAC address list item, in this main task, carry out the process that discharges this semaphore, thereby the task of having avoided applying for the semaphore failure next time and having caused is switched, and main task can not switched away.Namely be put in the main task by the process with release semaphore and carry out, reduce the time that the wait task dispatching office expends, when FDB was removed in the execution of a large amount of number of times, the time of implementation shortened successful.
As seen, among the present invention, when the vlan information of port is removed, by before removing the MAC address list item, carrying out the step of judging, greatly reduced and carried out the number of times of removing the MAC Address list item, by the static mac address list item among the disposable deletion shadow after the searching loop port finishes, only once traveled through and search the shadow table, improve execution efficient, shortened the time of implementation.For example, when the port with vlan information to be deleted is 52, in the prior art, need to carry out and remove the dynamic MAC address list item for 52 times and remove the static mac address list item 52 times, and adopt batch of the present invention to delete the method for VLAN, only need to determine to carry out the number of times of removing FDB according to the dynamic MAC situation on reality VLAN to be deleted and the port (when not mating the dynamic MAC address list item of port and vlan information to be deleted in the FDB table, not needing to carry out reset procedure), and the static mac address list item of removing among the shadow only need be carried out once, so that number of purge greatly reduces, greatly shortened the time of implementation.
When vlan information is removed, removing the step of also judging before the MAC Address list item, no longer need to carry out the process of removing static mac address among the shadow, and greatly reduced the process (even not needing to carry out the process of removing dynamic MAC address in the FDB table) of removing dynamic MAC address in the FDB table of carrying out, significantly reduce the number of times of removing, greatly shortened the time of implementation.
To sum up, the method for the batch deletion VLAN that the application of the invention provides shortens the time of implementation greatly.For example, when switch need to be deleted 4093 VLAN in batches, each VLAN comprises 52 ports, and when not having dynamic MAC address list item and static mac address list item in the switch, carry out the order of 4093 VLAN of deletion according to prior art, need more than 1 hour, and adopt the present invention to carry out the order of 4093 VLAN of deletion, only need about 4 minutes and 30 seconds.
Among the present invention, the main body of carrying out the aforesaid operations process includes but not limited to switch, can control the equipment of this switch, can carry out the aforesaid operations flow process program, can send this software to switch.
Wherein, the inventive method can be adjusted each step order according to actual needs.
The method of a kind of deleting VLAN information that second embodiment of the invention proposes as shown in Figure 4, may further comprise the steps:
Step S401 obtains each VLAN to be deleted in the switch successively.
Step S402 obtains each port with vlan information to be deleted successively.
Step S403 judges in the switch FDB table whether the dynamic MAC address list item that mates simultaneously port and VLAN to be deleted is arranged, and when having mated the dynamic MAC address list item of port and VLAN to be deleted simultaneously, forwards step S404 to, otherwise, forward step S405 to.
Wherein, above-mentioned step S401-step S403 is identical with the process of step S301-step S303, does not repeat them here.
Step S404, with the information recording/of this port in switch.
Among the present invention, can in the form of switch, record the information of port, for example, in switch, pass through newly-built form DynamicMacPortList (dynamic MAC port list), store the port information with dynamic MAC address information of above-mentioned VLAN to be deleted, the information that has VLAN 5 to be deleted in the port 4, and when having mated simultaneously the MAC Address list item (all being dynamic MAC Address list items in the FDB table) of port 4 and VLAN 5 in the FDB table, the information (for example identification information) of this port is recorded in the DynamicMacPortList table of switch.
Step S405 judges in the switch shadow table whether the static mac address list item that mates simultaneously port and VLAN to be deleted is arranged, and when having mated the static mac address list item of port and VLAN to be deleted simultaneously, forwards step S406 to, otherwise, forward step S407 to.
Among the present invention, judge the static mac address list item that whether mates simultaneously port and VLAN to be deleted in the switch and judge that the dynamic MAC address list item that whether mates simultaneously port and VLAN to be deleted in the switch does not have ordinal relation successively, namely can carry out the deterministic process among the step S405 before step S403.
Wherein, above-mentioned step S405 is identical with step S305, does not repeat them here.
Step S406, with the information recording/of this port in switch.
Among the present invention, can in the form of switch, record the information of port, for example, by newly-built form StaticMacPortList (static MAC port tabulation), store the port information with static mac address information of above-mentioned VLAN to be deleted.Wherein, this storage have static mac address information port form can to have a form of dynamic MAC address information port information identical with storage among the step S404, both also can be different.
Among the present invention, when in judging switch shadow table, the static mac address list item that mates simultaneously port and VLAN to be deleted being arranged, can also remove the static mac address list item that mates simultaneously this port and VLAN to be deleted in the shadow table according to the mode of port and VLAN, do not carry out the operation of this step, namely not with the information recording/of this port in switch, but directly remove the static mac address list item that mates simultaneously this port and VLAN to be deleted in the shadow table.
Step S407 deletes the information all about VLAN to be deleted in the port from this port.
Step S408, judge have this vlan information all of the port whether all traversal finish, if traversal is finished, all of the port information deletion of this VLAN is finished, and forwards step S409 to, otherwise forwards step S402 to.
Wherein, above-mentioned step S407, step S408 are identical with step S307, step S308, do not repeat them here.
Step S409, remove the dynamic MAC address list item that mates simultaneously port and VLAN to be deleted in the FDB table according to the port information that records in the switch, and remove the static mac address list item that mates simultaneously port and VLAN to be deleted in the shadow table according to the port information that records in the switch.
Wherein, the port information that will have the dynamic MAC address list item among the step S404 all has been stored in the DynamicMacPortList table of switch, in this step, by from the DynamicMacPortList table, obtaining the corresponding port of port information of record, remove the dynamic MAC address list item that mates simultaneously this port and VLAN to be deleted in the FDB table according to the mode of port and VLAN.
Wherein, the port information that will have the static mac address list item among the step S406 all has been stored in the StaticMacPortList table of switch, in this step, by from the StaticMacPortList table, obtaining the corresponding port of port information of record, remove the static mac address list item that mates simultaneously this port and VLAN to be deleted in the shadow table according to the mode of port and VLAN.
Wherein, remove dynamic MAC address list item in the FDB table and remove not successively ordinal relation of static mac address list item in the shadow table according to the mode of port and VLAN according to the mode of port and VLAN, the sequencing that can remove according to the policy selection of switch self or select to remove simultaneously.
Step S410 judges whether remain the dynamic MAC address list item of deleting VLAN information in the switch FDB table, if so, forwards step S411 to, otherwise, forward step S412 to.
Step S411 removes the dynamic MAC address list item that has vlan information to be deleted in the FDB table according to the mode of VLAN.
Step S412 judges whether remain the static mac address list item of deleting VLAN information in the switch shadow table, if so, forwards step S413 to, otherwise, forward step S414 to.
Step S413 removes the static mac address list item that has vlan information to be deleted in the shadow table according to the mode of VLAN.
Step S414 deletes the relevant information of all VLAN to be deleted from switch.
Step S415, judge all VLAN to be deleted whether all traversal finish, if traversal is finished, the vlan information of all of the port and the vlan information of switch are all disposed, and finish this flow process, otherwise forward step S401 to, continue to obtain VLAN to be deleted.
Wherein, the operating process of above-mentioned step S410-step S415 is identical with the operating process among the step S310-step S315, does not repeat them here.
Wherein, the inventive method can be adjusted each step order according to actual needs.
As seen, among the present invention, when the vlan information of port is removed, by before removing the MAC Address list item, carrying out the step of judging, greatly reduced and carried out the number of times of removing the MAC Address list item, by the dynamic MAC address list item in the disposable deletion FDB table after the searching loop port finishes and the static mac address list item among the shadow, only once traveled through and search FDB table and shadow table, improve execution efficient, shortened the time of implementation.
The method of a kind of deleting VLAN information that third embodiment of the invention proposes, the applicable scope of the method includes but not limited to delete the whole deletable VLAN on the switch, and as shown in Figure 5, the method for this deletion VLAN may further comprise the steps:
Step S501 removes all dynamic MAC address list items in the switch FDB table.
Among the present invention, need to be with all the vlan information deletions on the switch, namely delete the information (VLAN 1 unsuppressible-suppression) of VLAN 2~VLAN 4093 at switch, dynamic MAC address list item in the FDB table is the corresponding list item of port, VLAN and dynamic MAC address, when needs are deleted all VLAN, need to be with dynamic MAC address list item deletions all in the FDB table.
Step S502 removes all static mac address list items in the switch shadow table.
Wherein, the static mac address list item of shadow table is the corresponding list item of port, VLAN and static MAC address, when needs are deleted all VLAN (VLAN 2~VLAN 4093, VLAN 1 unsuppressible-suppression), shadow need to be shown all static mac address table entry deletions.
Wherein, step S501 and step S502 be the ordinal relation of priority not, and all static mac address list items also can operate before step S501 in the removing switch shadow table.
Step S503 obtains each VLAN in the switch successively, namely obtains successively each VLAN among the VLAN 2-VLAN 4093.
Wherein, when the VLAN number inadequate 4094 on the switch or VLAN number greater than 4094 the time, obtain successively all deleted VLAN according to VLAN number actual on this switch, for example, when only having VLAN 1-VLAN 1000 on the switch, obtain successively each VLAN among the VLAN 2-VLAN 1000.
Step S504 deletes the information all about this VLAN that gets access in the port from this port.For example, when the VLAN that obtains successively is VLAN 5, will have VLAN 5 information deletions in all of the port of VLAN 5 information.
Step S505 deletes the relevant information of all VLAN from switch.For example, when the VLAN that obtains successively is VLAN 5, all information of VLAN 5 are deleted from switch.
Step S506, judge all VLAN whether all traversal finish, if traversal is finished, the vlan information of all of the port and the vlan information of switch are all disposed, and finish this flow process, otherwise forward step S503 to, continue to obtain VLAN.
Wherein, the inventive method can be adjusted each step order according to actual needs.
As seen, among the present invention, all static mac address list items among all dynamic MAC address list item and the shadow have shortened the time of implementation greatly in the disposable deletion FDB table.
The invention allows for a kind of equipment of deleting VLAN information, this equipment includes but not limited to switch, can control the equipment of this switch.As shown in Figure 6, the equipment of this deleting VLAN information comprises:
The first determination module 61 is used for determining switch VLAN to be deleted.
The second determination module 62 is electrically connected with this first determination module 61, is used for determining the MAC Address corresponding relation corresponding with this VLAN to be deleted according to the VLAN to be deleted that this first determination module 61 is determined.
Concrete, the second determination module 62 comprises:
Judge submodule 621, be used for judging whether switch has the MAC Address corresponding relation of VLAN to be deleted.
Wherein, this judgement submodule 621 specifically is used for:
Judge in the first corresponding relation of switch and whether store the dynamic MAC address corresponding relation with VLAN to be deleted, and judge in the second corresponding relation of switch whether store the static mac address corresponding relation with VLAN to be deleted, store the dynamic MAC address information of VLAN in the first corresponding relation, stored the static mac address information of VLAN in the second corresponding relation.
First determines submodule 622, is electrically connected with judging submodule 621, be used for when the judged result of judgement submodule 621 when being, determine that the MAC Address corresponding relation is the MAC Address corresponding relation corresponding with VLAN to be deleted.
Record sub module 623, be electrically connected with judging submodule 621, be used for when the judged result of judging submodule 621 when being, the port-mark or the VLAN that record all dynamic MAC address corresponding relations corresponding with described VLAN to be deleted in the first corresponding relation in described switch identify; And/or
In described switch, record port-mark or the VLAN sign of all static mac address corresponding relations corresponding with described VLAN to be deleted in the second corresponding relation.
When the first determination module 61 determines in the switches that VLAN to be deleted comprises in the switch all VLAN,
The second above-mentioned determination module 62 comprises that second determines submodule 624,
Second determines that submodule 624 is used for determining that all MAC Address corresponding relations of switch are the MAC Address corresponding relation corresponding with VLAN to be deleted.
The first removing module 63 is electrically connected with the second determination module 62, is used for the MAC Address corresponding relation that this second determination module 62 of deletion is determined.
Described the first removing module specifically is used for: when described judgement submodule 621 judged that the first corresponding relation of described switch has been stored the dynamic MAC address corresponding relation with described VLAN to be deleted, the dynamic MAC address corresponding relation that will have described VLAN to be deleted was deleted from described the first corresponding relation; Or this first removing module 63 also is used for:
Port-mark or VLAN sign according to record sub module 622 records are deleted the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in switch the first corresponding relation;
Port-mark or VLAN sign according to record sub module 622 records are deleted the static mac address corresponding relation corresponding with described VLAN to be deleted in switch the second corresponding relation.
Wherein, the first removing module 63 also is used for:
When second determines that submodule 624 determines that all MAC Address corresponding relations in the switches be the MAC Address corresponding relation corresponding with VLAN to be deleted, all dynamic MAC address corresponding relations and delete all static mac address corresponding relations in switch the second corresponding relation in deletion switch the first corresponding relation.
The second removing module 64 is electrically connected with the first determination module 61, is used for deleting port corresponding to VLAN to be deleted of determining with the first determination module 61.
The 3rd removing module 65 is electrically connected with the first determination module 61, is used for the VLAN to be deleted that deletion the first determination module 61 is determined.
Application module 66, be electrically connected with this first removing module 63, be used for before this first removing module 63 dynamic MAC address corresponding relation corresponding with described VLAN to be deleted according to port-mark or VLAN sign deletion switch the first corresponding relation, in a task from switch semaphore of application.
Release module 67, be electrically connected with application module 66, be used for after the first removing module 63 dynamic MAC address corresponding relation corresponding with described VLAN to be deleted according to port-mark or VLAN sign deletion switch the first corresponding relation, in above-mentioned task, discharging the above-mentioned semaphore of this application module 66 applications.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can separate deployment.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 that some instructions are with so that a computer equipment (can be personal computer, server, perhaps network equipment etc.) is carried out method of the present invention.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.
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 above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number does not represent 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, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.

Claims (20)

1. a method of deleting virtual LAN VLAN information is characterized in that, has stored the dynamic MAC address information of VLAN in the first corresponding relation of switch, has stored the static mac address information of VLAN in the second corresponding relation; The method may further comprise the steps:
Determine VLAN to be deleted in the switch;
Determine the MAC Address corresponding relation corresponding with described VLAN to be deleted according to described VLAN to be deleted;
Delete described MAC Address corresponding relation.
2. the method for claim 1 is characterized in that, described method further comprises:
Delete the port corresponding with described VLAN to be deleted, and delete described VLAN to be deleted; The port that described deleting MAC address corresponding relation, deletion are corresponding with described VLAN to be deleted and delete between the described VLAN to be deleted not successively ordinal relation.
3. the method for claim 1 is characterized in that, describedly determines that according to VLAN to be deleted the MAC Address corresponding relation corresponding with described VLAN to be deleted comprises:
Judge whether the MAC Address of described VLAN to be deleted corresponding relation is arranged in the described switch, if so, determine that described MAC Address corresponding relation is the MAC Address corresponding relation corresponding with described VLAN to be deleted.
4. method as claimed in claim 3 is characterized in that, describedly judges whether have the MAC Address of described VLAN to be deleted corresponding relation to comprise in the switch:
Judge in the first corresponding relation of described switch and whether store the dynamic MAC address corresponding relation with described VLAN to be deleted.
5. whether method as claimed in claim 4 is characterized in that, store after the dynamic MAC address corresponding relation with described VLAN to be deleted in described the first corresponding relation of judging switch, also comprises:
The dynamic MAC address corresponding relation that will have described VLAN to be deleted is deleted from described the first corresponding relation.
6. method as claimed in claim 4 is characterized in that, describedly judges judged result that whether MAC Address of described VLAN to be deleted corresponding relation is arranged in the switch when being, described method further comprises:
In described switch, record port-mark or the VLAN sign of all dynamic MAC address corresponding relations corresponding with described VLAN to be deleted in the first corresponding relation.
7. method as claimed in claim 6 is characterized in that, described deleting MAC address corresponding relation comprises:
According to the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in described port-mark or described switch the first corresponding relation of VLAN sign deletion.
8. method as claimed in claim 3 is characterized in that, describedly judges whether have the MAC Address of described VLAN to be deleted corresponding relation to comprise in the switch:
Judge in the second corresponding relation of described switch and whether store the static mac address corresponding relation with described VLAN to be deleted.
9. method as claimed in claim 8, it is characterized in that, describedly judge judged result that whether MAC Address of described VLAN to be deleted corresponding relation is arranged in the switch when being, described method further comprises: the port-mark of all static mac address corresponding relations corresponding with described VLAN to be deleted or VLAN identify in record the second corresponding relation in described switch.
10. method as claimed in claim 9 is characterized in that, described deleting MAC address corresponding relation comprises:
According to the static mac address corresponding relation corresponding with described VLAN to be deleted in described port-mark or described switch the second corresponding relation of VLAN sign deletion.
11. method as claimed in claim 7 is characterized in that, and is described according to before the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in port-mark or described switch the first corresponding relation of VLAN sign deletion, also comprises:
In a task from semaphore of described switch application;
Described according to after the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in port-mark or described switch the first corresponding relation of VLAN sign deletion, also comprise:
In described task, discharge described semaphore.
12. the method for claim 1 is characterized in that, when VLAN to be deleted comprises in the described switch all VLAN in described definite switch,
Describedly determine that according to VLAN to be deleted the MAC Address corresponding relation corresponding with described VLAN to be deleted comprises:
Determine that all MAC Address corresponding relations are the MAC Address corresponding relation corresponding with described VLAN to be deleted in the switch.
13. method as claimed in claim 12 is characterized in that, described deleting MAC address corresponding relation comprises:
Delete in described switch the first corresponding relation all static mac address corresponding relations in all dynamic MAC address corresponding relations and described switch the second corresponding relation of deletion.
14. the equipment of a deleting VLAN information is characterized in that, has stored the dynamic MAC address information of VLAN in the first corresponding relation of switch, has stored the static mac address information of VLAN in the second corresponding relation; This equipment comprises:
The first determination module is used for determining switch VLAN to be deleted;
The second determination module is electrically connected with described the first determination module, and the VLAN to be deleted that is used for determining according to described the first determination module determines the MAC Address corresponding relation corresponding with described VLAN to be deleted;
The first removing module is electrically connected with described the second determination module, is used for deleting the MAC Address corresponding relation that described the second determination module is determined.
15. equipment as claimed in claim 14 is characterized in that, described the second determination module comprises:
Judge submodule, be used for judging whether described switch has the MAC Address corresponding relation of VLAN to be deleted;
First determines submodule, is electrically connected with described judgement submodule, be used for when the judged result of described judgement submodule when being, determine that described MAC Address corresponding relation is the MAC Address corresponding relation corresponding with described VLAN to be deleted.
16. equipment as claimed in claim 15 is characterized in that, described judgement submodule specifically is used for:
Judge in the first corresponding relation of described switch whether store the dynamic MAC address corresponding relation with described VLAN to be deleted, and judge in the second corresponding relation of described switch whether store the static mac address corresponding relation with described VLAN to be deleted.
17. equipment as claimed in claim 16, it is characterized in that, described the first removing module specifically is used for: when described judgement submodule judged that the first corresponding relation of described switch has been stored the dynamic MAC address corresponding relation with described VLAN to be deleted, the dynamic MAC address corresponding relation that will have described VLAN to be deleted was deleted from described the first corresponding relation; Or described the second determination module also comprises:
Record sub module, the port-mark or the VLAN that are used for all dynamic MAC address corresponding relations corresponding with described VLAN to be deleted in described switch record the first corresponding relation identify; And/or
In described switch, record port-mark or the VLAN sign of all static mac address corresponding relations corresponding with described VLAN to be deleted in the second corresponding relation.
18. equipment as claimed in claim 17 is characterized in that, described the first removing module specifically is used for:
Port-mark or VLAN sign according to described record sub module record are deleted the dynamic MAC address corresponding relation corresponding with described VLAN to be deleted in described switch the first corresponding relation;
Port-mark or VLAN sign according to described record sub module record are deleted the static mac address corresponding relation corresponding with described VLAN to be deleted in described switch the second corresponding relation.
19. equipment as claimed in claim 18 is characterized in that, also comprises:
The application module, be used for before described the first removing module dynamic MAC address corresponding relation corresponding with described VLAN to be deleted according to port-mark or described switch the first corresponding relation of VLAN sign deletion, in a task from semaphore of described switch application;
Release module, be electrically connected with described application module, be used for after described the first removing module dynamic MAC address corresponding relation corresponding with described VLAN to be deleted according to port-mark or described switch the first corresponding relation of VLAN sign operation deletion, in described task, discharging the semaphore of described application module application.
20. equipment as claimed in claim 14 is characterized in that, when described the first determination module determines in the switch that VLAN to be deleted comprises in the described switch all VLAN,
Described the second determination module comprises that second determines submodule,
Described second determines that submodule is used for determining that all MAC Address corresponding relations of switch are the MAC Address corresponding relation corresponding with described VLAN to be deleted;
Described the first removing module also is used for:
When described second determines that submodule is determined all MAC Address corresponding relations in the switch for the MAC Address corresponding relation corresponding with described VLAN to be deleted, delete in described switch the first corresponding relation all static mac address corresponding relations in all dynamic MAC address corresponding relations and described switch the second corresponding relation of deletion.
CN2009101314804A 2009-03-31 2009-03-31 Method and equipment for deleting VLAN information Active CN101505282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101314804A CN101505282B (en) 2009-03-31 2009-03-31 Method and equipment for deleting VLAN information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101314804A CN101505282B (en) 2009-03-31 2009-03-31 Method and equipment for deleting VLAN information

Publications (2)

Publication Number Publication Date
CN101505282A CN101505282A (en) 2009-08-12
CN101505282B true CN101505282B (en) 2013-01-16

Family

ID=40977354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101314804A Active CN101505282B (en) 2009-03-31 2009-03-31 Method and equipment for deleting VLAN information

Country Status (1)

Country Link
CN (1) CN101505282B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441866A (en) * 2013-08-13 2013-12-11 北京华为数字技术有限公司 Communication method, system and control equipment of virtual local area networks
CN104394103B (en) * 2014-12-16 2018-04-06 上海斐讯数据通信技术有限公司 A kind of static mac address synchronous method, system and interchanger
CN108768859B (en) * 2018-05-17 2021-05-25 迈普通信技术股份有限公司 Data processing method, device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010026301A (en) * 1999-09-04 2001-04-06 정규석 The Implementation method for the task creation of traffic handling modules and the Tx/Rx functions of UTRAN MAC sublayer based on 3GPP specifications
CN1581819A (en) * 2003-07-31 2005-02-16 华为技术有限公司 Method for realizing address synchronization in independant virtual LAN learning mode
CN1300987C (en) * 2003-04-22 2007-02-14 华为技术有限公司 Method for hot backing up creation and delection of virtual local area network in exchanger
CN1300988C (en) * 2003-04-28 2007-02-14 华为技术有限公司 Method for ensuring consistent configurations among subsystems in distributed VLAN
CN101141279A (en) * 2006-09-04 2008-03-12 中兴通讯股份有限公司 Device for accessing control listing through virtual LAN and its implementing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010026301A (en) * 1999-09-04 2001-04-06 정규석 The Implementation method for the task creation of traffic handling modules and the Tx/Rx functions of UTRAN MAC sublayer based on 3GPP specifications
CN1300987C (en) * 2003-04-22 2007-02-14 华为技术有限公司 Method for hot backing up creation and delection of virtual local area network in exchanger
CN1300988C (en) * 2003-04-28 2007-02-14 华为技术有限公司 Method for ensuring consistent configurations among subsystems in distributed VLAN
CN1581819A (en) * 2003-07-31 2005-02-16 华为技术有限公司 Method for realizing address synchronization in independant virtual LAN learning mode
CN101141279A (en) * 2006-09-04 2008-03-12 中兴通讯股份有限公司 Device for accessing control listing through virtual LAN and its implementing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈明.虚拟局域网中在网络构建中的应用.《漳州职业技术学院》.2006,第8卷(第1期), *

Also Published As

Publication number Publication date
CN101505282A (en) 2009-08-12

Similar Documents

Publication Publication Date Title
CN106020942B (en) A kind of WiFi equipment multiplexing method and device based on multisystem
CN104657213B (en) Using the method and terminal of switching between a kind of system
CN102845035A (en) Method of identifying destination in virtual environment
CN101510854B (en) Method, system and equipment for sharing business load
CN101808010B (en) Equipment management method and equipment management device and main control board
CN101505282B (en) Method and equipment for deleting VLAN information
CN102143138A (en) Method and device for configuring virtual local area network (VLAN) in live migration process of virtual machine
CN110138662A (en) Session entry processing method, device and multiple nucleus system in multiple nucleus system
CN103701653B (en) The processing method of a kind of interface hot plug configuration data and network configuration server
CN102056120A (en) Method and device for sharing communication resources
CN114257550B (en) Automatic control method and device for interface access flow, storage medium and server
CN112150015A (en) Task allocation method and device
CN104426968A (en) Data management method and device
CN108512930A (en) A kind of management method of shared file, device, server and storage medium
CN102006267A (en) Access authentication method and device based on simple network protocol
CN108173665A (en) A kind of method and device of Backup Data
CN105224541A (en) The uniqueness control method of data, information storage means and device
CN104461779B (en) A kind of storage method of distributed data, apparatus and system
JPH07160638A (en) Terminal device for information equipment
JP2008090823A (en) Method and apparatus for receiving mail in real time
CN107547285A (en) A kind of configuration information store method and device
CN106502841A (en) Data back up method and device
RU2289213C2 (en) Method and network architecture for implementing dynamic loading of service voice message on intelligent network
CN101547209B (en) Method and device for updating information table
CN101202968B (en) Method and apparatus for establishing route information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address