[go: up one dir, main page]

CN111010354B - An optical module admission discrimination method, device, backbone network switch and medium - Google Patents

An optical module admission discrimination method, device, backbone network switch and medium Download PDF

Info

Publication number
CN111010354B
CN111010354B CN201911285986.0A CN201911285986A CN111010354B CN 111010354 B CN111010354 B CN 111010354B CN 201911285986 A CN201911285986 A CN 201911285986A CN 111010354 B CN111010354 B CN 111010354B
Authority
CN
China
Prior art keywords
actual
optical module
admission
port
parameter
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
CN201911285986.0A
Other languages
Chinese (zh)
Other versions
CN111010354A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911285986.0A priority Critical patent/CN111010354B/en
Publication of CN111010354A publication Critical patent/CN111010354A/en
Application granted granted Critical
Publication of CN111010354B publication Critical patent/CN111010354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q11/0067Provisions for optical access or distribution networks, e.g. Gigabit Ethernet Passive Optical Network (GE-PON), ATM-based Passive Optical Network (A-PON), PON-Ring

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Optical Communication System (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种光模块准入判别方法,为了区别从不同端口接入的不同光模块,预先设置了能够将不同光模块的设备信息分别在相应的文件目录下形成不同设备信息文件的映射规则,后续从不同设备信息文件中提取到的实际判别参数,将通过与预设的准入判别参数列表之间的存在性判别,得出相应的光模块是否是允许准入的光模块,并在不允许准入时对相应的端口进行下线处理。通过上述准入判别机制将能够筛选掉所有未按照上述机制生产制造的光模块,从而保障主干网交换机在接入的均是适配的光模块的前提下,得以长期处于高效稳定的工作状态。本申请还同时公开了一种应用于主干网交换机的光模块准入判别装置、主干网交换机及可读存储介质,具有上述有益效果。

Figure 201911285986

The present application discloses a method for judging the admission of an optical module. In order to distinguish different optical modules connected from different ports, a mapping that can form different device information files with the device information of different optical modules in corresponding file directories is preset. Rules, the actual discriminant parameters extracted from different device information files will be judged by the existence of the preset access discriminant parameter list to determine whether the corresponding optical module is an optical module that allows admission, and When the access is not allowed, the corresponding port will be offline. Through the above admission discrimination mechanism, all optical modules that are not manufactured according to the above mechanism will be able to be screened out, thus ensuring that the backbone network switch can be in an efficient and stable working state for a long time under the premise that all connected optical modules are adapted. The present application also discloses an optical module admission judging device applied to a backbone network switch, a backbone network switch and a readable storage medium, which have the above beneficial effects.

Figure 201911285986

Description

Optical module access judgment method and device, backbone network switch and medium
Technical Field
The present invention relates to the field of backbone network switch technologies, and in particular, to a method and an apparatus for judging admission of an optical module applied to a backbone network switch, and a readable storage medium.
Background
With the continuous development of the internet, people are in the information-oriented era, and all life, study and work can not leave the internet. While hardware devices dominate all network connections, switches in network devices provide more connection ports for connecting more devices.
In a large communication network, a backbone switch is a very important hardware device in the whole communication network, and whether the backbone switch can normally function depends on the degree of adaptation between optical module devices accessing its respective ports and the backbone switch. Due to the working property and high requirement on performance of the backbone network switch, only a few manufacturers have manufacturing and production capacity in the market, but the production and manufacturing industry of the optical module connected to each port is relatively simple, but because a unified standard does not exist between the backbone network switch and the optical module nowadays, a series of problems caused by the fact that the optical module is not matched with the backbone network switch occur, and the normal work of the backbone network switch is influenced.
It should be noted that the non-matching herein does not mean that the optical module cannot access the port from the hardware layer, but means deeper matching, that is, the information storage mode, the working logic, the instruction identification mode, the control logic, and other contents of the optical module that are not suitable for the backbone network switch are often independent, so that the backbone network switch cannot process the data sent by the optical module or issue the control instruction to the optical module, and even cause radiation influence on the normal operation of other adapted optical modules.
Therefore, providing a mechanism for judging whether an optical module accessing a port of a backbone switch is allowed to be admitted or not is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The method and the device for judging the access of the optical module are applied to a backbone network switch, the backbone network switch and a readable storage medium, and the purpose is to provide a mechanism for judging whether the optical module accessed to each port is the optical module allowed to be accessed or not for the backbone network switch, so that a series of problems possibly caused by non-adaptive optical modules are solved from the source, the backbone network switch is ensured to be in a continuous, efficient and stable working state, and the experience of a bottom layer user is ensured.
In order to achieve the above object, the present application first provides an optical module admission discrimination method applied to a backbone network switch, including:
reading device information from an optical module of the access port;
forming an equipment information file under a target directory according to the equipment information according to a preset mapping rule; the mapping rule records the corresponding relation between each port and each target directory;
extracting character strings from the equipment information file according to a preset offset to obtain an actual discrimination parameter;
judging whether the actual discrimination parameter appears in a preset admission discrimination parameter list or not; the admission judging parameter list records judging parameters meeting admission requirements;
and if the actual discrimination parameter does not appear in the admission discrimination parameter list, performing offline processing on the port accessed by the optical module.
Optionally, extracting a character string from the device information file according to a preset offset to obtain an actual discrimination parameter, including:
extracting a character string with a first preset length according to a first preset offset from the head subsection of the equipment information file to obtain an actual manufacturer name;
extracting a character string with a second preset length according to a second preset offset from the head subsection of the equipment information file to obtain an actual batch serial number;
and taking the combination of the actual manufacturer name and the actual batch serial number as the actual discrimination parameter.
Optionally, when the actual distinguishing parameter specifically consists of the actual manufacturer name and the serial number of the batch equipment, determining whether the actual distinguishing parameter appears in a preset admission distinguishing parameter list includes:
judging whether the admittance judging parameter list contains the actual manufacturer name;
if the actual manufacturer name is included, judging whether the admission judging parameter list includes the actual batch serial number;
if the actual batch serial number is contained, judging that the actual discrimination parameter appears in the admittance discrimination parameter list;
and if the actual manufacturer name or the actual batch serial number is not contained, judging that the actual discrimination parameter does not appear in the admission discrimination parameter list.
Optionally, before performing offline processing on the port accessed by the optical module, the method further includes:
acquiring a port number accessed by the optical module;
generating admittance rejection prompt information according to the port number and the actual discrimination parameters of the optical module;
displaying the access refusing prompt information through a preset path, and simultaneously recording the access refusing prompt information to an access judging log;
correspondingly, the off-line processing is performed on the port accessed by the optical module, and the off-line processing includes:
and performing offline processing on the corresponding port according to the port number.
Optionally, the offline processing performed by the port accessed by the optical module includes:
and executing down operation on the port accessed by the optical module, and simultaneously controlling a working indicator lamp of the port accessed by the optical module to be in a working state of indicating that the port is offline.
In order to achieve the above object, the present application further provides an optical module admission discrimination device applied to a backbone network switch, including:
the device information reading unit is used for reading the device information from the optical module of the access port;
the device information file forming unit is used for forming a device information file from the device information under a target directory according to a preset mapping rule; the mapping rule records the corresponding relation between each port and each target directory;
the actual discrimination parameter extraction unit is used for extracting character strings from the equipment information file according to a preset offset to obtain an actual discrimination parameter;
the discrimination parameter comparison unit is used for judging whether the actual discrimination parameter appears in a preset admittance discrimination parameter list or not; the admission judging parameter list records judging parameters meeting admission requirements;
and the admittance-refusing offline processing unit is used for offline processing the port accessed by the optical module if the actual discrimination parameter does not appear in the admittance discrimination parameter list.
Optionally, the actual discrimination parameter extracting unit includes:
the actual manufacturer name extracting subunit is used for extracting a character string with a first preset length from the head subsection of the equipment information file according to a first preset offset to obtain an actual manufacturer name;
the actual batch serial number extracting subunit is used for extracting a character string with a second preset length according to a second preset offset from the head subsection of the equipment information file to obtain an actual batch serial number;
and the actual judging parameter combining subunit is configured to use a combination of the actual manufacturer name and the actual batch serial number as the actual judging parameter.
Optionally, when the actual distinguishing parameter specifically consists of the actual manufacturer name and the serial number of the batch equipment, the distinguishing parameter comparing unit includes:
the factory name containing judging subunit is used for judging whether the admission judging parameter list contains the actual factory name or not;
the batch serial number containing judging subunit is used for judging whether the admission judging parameter list contains the actual batch serial number or not when the actual manufacturer name is contained;
the judging subunit is used for judging that the actual distinguishing parameter appears in the admittance distinguishing parameter list when the actual batch serial number is included;
and the non-included judging subunit is used for judging that the actual discrimination parameter does not appear in the admission discrimination parameter list when the actual manufacturer name or the actual batch serial number is not included.
Optionally, the optical module admission discriminating device further includes:
a port number obtaining unit, configured to obtain a port number accessed by the optical module before performing offline processing on the port accessed by the optical module;
the admittance rejection prompt information generating unit is used for generating admittance rejection prompt information according to the port number and the actual discrimination parameter of the optical module;
the prompt information display and log recording unit is used for displaying the admittance refusing prompt information through a preset path and simultaneously recording the admittance refusing prompt information to the admittance judging log;
correspondingly, the off-line processing unit for refusing to admit comprises:
and the admittance refusing offline processing subunit is used for offline processing the corresponding port according to the port number.
Optionally, the admittance rejection offline processing unit includes:
and the port and indicator light processing subunit is used for executing down operation on the port accessed by the optical module and simultaneously controlling the working indicator light of the port accessed by the optical module to be in a working state of indicating that the port is offline.
To achieve the above object, the present application also provides a backbone network switch, including:
a memory for storing a computer program;
and a processor, configured to implement the steps of the optical module admission discrimination method applied to the backbone switch as described in the foregoing when executing the computer program.
To achieve the above object, the present application further provides a readable storage medium, which stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the optical module admission discrimination method applied to the backbone network switch as described in the above.
The optical module admission judging method applied to the backbone network switch comprises the following steps: reading device information from an optical module of the access port; forming an equipment information file under a target directory according to the equipment information according to a preset mapping rule; the mapping rule records the corresponding relation between each port and each target directory; extracting character strings from the equipment information file according to a preset offset to obtain an actual discrimination parameter; judging whether the actual discrimination parameter appears in a preset admission discrimination parameter list or not; the admission judging parameter list records judging parameters meeting admission requirements; and if the actual discrimination parameter does not appear in the admission discrimination parameter list, performing offline processing on the port accessed by the optical module.
Obviously, in the present application, firstly, in order to distinguish different optical modules accessed from different ports, a mapping rule is preset, through the mapping rule, device information of different optical modules can be respectively formed into different device information files under corresponding file directories, and then, actual discrimination parameters extracted from different device information files are subsequently distinguished from a preset access discrimination parameter list, whether the corresponding optical module is an allowed-to-be-accessed optical module is obtained, and offline processing is performed on the corresponding port when the access is not allowed. It can be seen that all optical modules which are not produced and manufactured according to the access judgment mechanism can be screened out through the access judgment mechanism, and the adaptive optical modules are always subjected to availability verification before leaving a factory, so that the backbone network switch can be ensured to be in an efficient and stable working state for a long time.
The application also provides an optical module access judging device applied to the backbone network switch, the backbone network switch and a readable storage medium, and the optical module access judging device has the beneficial effects and is not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an optical module admission discrimination method applied to a backbone network switch according to an embodiment of the present application;
fig. 2 is a flowchart of a method for extracting actual discrimination parameters from an equipment information file according to an embodiment of the present application;
fig. 3 is a flowchart of a method for determining whether to allow admission according to an actual criterion parameter according to an embodiment of the present application;
fig. 4 is a flowchart of another optical module admission discrimination method applied to a backbone network switch according to an embodiment of the present application;
fig. 5 is a block diagram of an optical module admission apparatus applied to a backbone switch according to an embodiment of the present application.
Detailed Description
The method and the device for judging the access of the optical module are applied to a backbone network switch, the backbone network switch and a readable storage medium, and the purpose is to provide a mechanism for judging whether the optical module accessed to each port is the optical module allowed to be accessed or not for the backbone network switch, so that a series of problems possibly caused by non-adaptive optical modules are solved from the source, the backbone network switch is ensured to be in a continuous, efficient and stable working state, and the experience of a bottom layer user is ensured.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of an optical module admission discrimination method applied to a backbone switch according to an embodiment of the present application, where the method includes the following steps:
s101: reading device information from an optical module of the access port;
this step is intended to read the device information from the optical module connected to each port of the backbone network switch. The device information of the device in which the optical module is located is usually stored in a certain path of the optical module in order to be quickly acquired, and the device information includes various information related to the optical module, such as manufacturer information and product lot information of the optical module, and also includes some information related to the device model.
S102: forming an equipment information file under a target directory according to the preset mapping rule by the equipment information;
in other words, the mapping relationship can form the device information acquired from the optical module accessing different ports into independent device information files under the corresponding directories. The target directory may also be understood as a file path, that is to say a corresponding storage path is specified for the device information obtained from each optical module. It should be understood that it is meaningless to assign the same storage path to the optical modules accessed from different ports, because the purpose of this step is to distinguish the device information of different optical modules by different storage paths, so as to facilitate the extraction and discrimination of the following actual discrimination parameters.
Specifically, taking a common backbone switch with two types of ports as an example, which respectively has 25g ports and 100g ports, the mapping rule requires that the device information of an optical module accessing port 0 of the 25g port will form a device information file with number 0050 under a root directory, and then the corresponding relationship may be specifically recorded as "25 _ 0-0050", where "25 _ 0" represents port 0 of the 25g port, and similarly, "100 _ 1-0070" represents that the device information of an optical module accessing port 1 of the 100g port will form a device information file with number 0070 under the root directory. Of course, the mapping rule may be embodied as a corresponding relationship corresponding to each port, or may be a guiding rule that may embody multiple rules, which is not specifically limited herein.
S103: extracting character strings from the equipment information file according to a preset offset to obtain an actual discrimination parameter;
on the basis of S102, in this step, the backbone switch purposefully extracts a character string from each device information file according to a preset offset, so as to obtain an actual discrimination parameter for discriminating whether the corresponding optical module is allowed to be admitted.
It should be understood that, since the actual discrimination parameter is a parameter that can be used to discriminate whether the corresponding optical module is allowed to enter, it should be a parameter that can distinguish between the adapted optical module and the non-adapted optical module, and specifically, the corresponding parameter can be flexibly selected as the extraction object according to the type of the parameter selected as the criterion. And the offset is auxiliary information for guiding extraction operation to extract the character string at a specific position, if the character string is an adaptive optical module, the adaptive optical module should store a subsequent discrimination parameter for discriminating whether the character string can be admitted or not according to the standard, and correspondingly, the character string extracted subsequently is likely to have no practical significance because the non-adaptive optical module does not follow the standard, so that the character string cannot be judged as the non-adaptive optical module through subsequent discrimination.
One implementation, including but not limited to, may be seen in the flowchart shown in fig. 2, which includes the steps of:
s201: extracting a character string with a first preset length according to a first preset offset from a head subsection of the equipment information file to obtain an actual manufacturer name;
specifically, the first preset offset may be 20 bytes, the first preset length is 16 bytes, and the extracted actual manufacturer name applied may be a value named VendorName.
S202: extracting a character string with a second preset length according to a second preset offset from the head subsection of the equipment information file to obtain an actual batch serial number;
specifically, the second preset offset may be 40 bytes, the second preset length is 16 bytes, and the extracted application actual lot serial number may be a value named VendorPN.
S203: determining a corresponding target creation resource area and a corresponding amount of resources required for creation according to the target creation resource area information and the amount of resources required for creation;
s204: and taking the combination of the actual manufacturer name and the actual batch serial number as an actual discrimination parameter.
As can be seen from the flowchart shown in fig. 2, the solution specifically uses two parameters, namely, a manufacturer name and a batch serial number, to form the discrimination parameter, where the manufacturer name is used to identify a manufacturer of the optical module, and the batch serial number is used to identify specific generation information of the optical module, and specific information such as a model number, a generation signal, and the like can be derived from the specific generation information. The reason why the serial number of the batch is added on the basis of the manufacturer name is that the situation that different backbone network switches and different models and batches of optical modules are not adapted is considered.
Of course, other parameter types that may serve a similar purpose may also be obtained in the same manner.
S104: judging whether the actual discrimination parameter appears in a preset admission discrimination parameter list, if so, executing S106, otherwise, executing S105;
the admittance judging parameter list records judging parameters meeting admittance requirements, and the judging parameters are used as criteria.
On the basis of S103, this step is to determine whether the actual discrimination parameter appears in the preset admission discrimination parameter list, and obtain a conclusion whether the corresponding optical module is allowed to be admitted according to the determination result.
Taking the example that the actual discrimination parameter specifically includes the manufacturer name and the batch serial number as shown in fig. 2, that is, the manufacturer names and the batch serial numbers of the plurality of allowed optical modules are recorded in the preset admission discrimination parameter list in advance, and then the optical module having the manufacturer name and the batch serial number of the allowed optical module can be determined as the allowed optical module only by consistency comparison.
One implementation, including but not limited to, may be seen in the flowchart shown in fig. 3, which includes the steps of:
s301: the combination of the actual manufacturer name and the actual batch serial number is used as an actual discrimination parameter;
s302: judging whether the admittance judging parameter list contains the actual manufacturer name, if so, executing S303, otherwise executing S305;
s303: judging whether the admission judging parameter list contains the actual batch serial number, if so, executing S304, otherwise, executing S305;
s304: judging that the actual discrimination parameters appear in an admission discrimination parameter list;
s305: and judging that the actual discrimination parameter does not appear in the admission discrimination parameter list.
As can be seen from the steps shown in fig. 3, according to the present embodiment, only by passing through the manufacturer name and the batch serial number at the same time, the corresponding optical module is determined as an allowed optical module. Of course, in some scenarios, only one of the optical modules may be determined as an allowed-entry optical module, which is mainly used herein to prevent the missing determination as much as possible, and the determination strength may be automatically adjusted according to the difference in the actual application scenarios, and this is not particularly limited herein, and only one feasible example is given.
S105: off-line processing is carried out on a port accessed by the optical module;
in this step, on the basis that the determination result of S104 is that the actual discrimination parameter does not appear in the preset admission discrimination parameter list, it is described that the optical module belongs to an optical module that is not adapted to the backbone network switch, so in order to prevent the backbone network switch from being affected by using the non-adapted optical module, this step directly performs offline processing on the port to which the optical module is accessed, and thus the optical module is completely placed in a shielding state.
Further, before executing this step, related information may also be recorded as a certificate for tracing back at a later time, and one implementation manner including but not limited to:
acquiring a port number accessed by an optical module;
generating admittance rejection prompt information according to the port number and the actual discrimination parameters of the optical module;
and displaying the admission refusing prompt information through a preset path, and simultaneously recording the admission refusing prompt information to an admission judging log.
The preset path can be represented by short messages, mails, interface popup windows, various instant application programs and the like, so that the access refusing prompt message is presented to the manager in time.
Specifically, the offline processing may be embodied as:
and executing down operation on the port accessed by the optical module, and simultaneously controlling a working indicator lamp of the port accessed by the optical module to be in a working state of indicating that the port is offline.
S106: no treatment is done.
This step is based on the determination result of S104 being that the actual discrimination parameter appears in the preset admission discrimination parameter list, which indicates that the optical module belongs to the optical module adapted to the backbone network switch, and therefore, no other processing is required to be performed on the optical module.
According to the optical module access judgment method provided by the embodiment, firstly, in order to distinguish different optical modules accessed from different ports, a mapping rule is preset, different device information files can be formed by the device information of the different optical modules in corresponding file directories through the mapping rule, then, actual judgment parameters extracted from the different device information files are judged according to the existence between the actual judgment parameters and a preset access judgment parameter list, whether the corresponding optical module is an optical module allowed to be accessed is obtained, and offline processing is performed on the corresponding port when the access is not allowed. It can be seen that all optical modules which are not produced and manufactured according to the access judgment mechanism can be screened out through the access judgment mechanism, and the adaptive optical modules are always subjected to availability verification before leaving a factory, so that the backbone network switch can be ensured to be in an efficient and stable working state for a long time.
For convenience of understanding, the present application also provides a specific implementation manner in combination with a specific actual operation manner of a certain backbone network switch, please refer to a flowchart shown in fig. 4:
the mapping relation between the ports and I2C is the mapping rule in the above embodiment, because the optical module essentially serves as an I2C device, and the description of the upper layer is used here instead. The I2C device file is then correspondingly equivalent to the device information file described in the above embodiment. The defined verification list is consistent with the preset admission judgment parameters.
Because the situation is complicated and cannot be illustrated by a list, a person skilled in the art can realize that many examples exist according to the basic method principle provided by the application and the practical situation, and the protection scope of the application should be protected without enough inventive work.
Referring to fig. 5, fig. 5 is a block diagram of an optical module admission apparatus applied to a backbone switch according to an embodiment of the present application, where the apparatus may include:
a device information reading unit 100, configured to read device information from an optical module of the access port;
an equipment information file forming unit 200, configured to form an equipment information file from the equipment information in the target directory according to a preset mapping rule; the mapping rule records the corresponding relation between each port and each target directory;
an actual discrimination parameter extracting unit 300, configured to extract a character string from the device information file according to a preset offset to obtain an actual discrimination parameter;
a discrimination parameter comparison unit 400 configured to determine whether an actual discrimination parameter appears in a preset admission discrimination parameter list; wherein, the admittance judging parameter list records the judging parameter meeting the admittance requirement;
and an admittance refusing offline processing unit 500, configured to perform offline processing on a port to which the optical module is accessed if the actual discrimination parameter does not appear in the admittance discrimination parameter list.
The actual discrimination parameter extracting unit 300 includes:
the actual manufacturer name extracting subunit is used for extracting a character string with a first preset length from the head subsection of the equipment information file according to a first preset offset to obtain an actual manufacturer name;
the actual batch serial number extracting subunit is used for extracting a character string with a second preset length according to a second preset offset from the head subsection of the equipment information file to obtain an actual batch serial number;
and the actual judging parameter combining subunit is used for taking the combination of the actual manufacturer name and the actual batch serial number as the actual judging parameter.
When the actual determination parameter specifically consists of an actual manufacturer name and a batch equipment serial number, the determination parameter comparison unit 400 may include:
the factory name containing judging subunit is used for judging whether the admission judging parameter list contains the actual factory name or not;
the batch serial number comprises a judging subunit, which is used for judging whether the admission judging parameter list comprises the actual batch serial number when the actual factory name is included;
the system comprises a judging subunit, a judging unit and a judging unit, wherein the judging subunit is used for judging that the actual distinguishing parameter appears in an access distinguishing parameter list when the actual batch serial number is contained;
and the non-included judging subunit is used for judging that the actual judging parameter does not appear in the admittance judging parameter list when the actual manufacturer name or the actual batch serial number is not included.
Further, the optical module admission discriminating device may further include:
the port number acquisition unit is used for acquiring the port number accessed by the optical module before offline processing is carried out on the port accessed by the optical module;
the admittance rejection prompt information generating unit is used for generating admittance rejection prompt information according to the port number and the actual discrimination parameters of the optical module;
the prompting information display and log recording unit is used for displaying the admission refusing prompting information through a preset path and simultaneously recording the admission refusing prompting information to the admission judging log;
correspondingly, the admittance rejection offline processing unit can include:
and the admittance refusing offline processing subunit is used for offline processing the corresponding port according to the port number.
Wherein, the admittance rejection offline processing unit can include:
and the port and indicator light processing subunit is used for executing down operation on the port accessed by the optical module and controlling the working indicator light of the port accessed by the optical module to be in a working state of indicating that the port is off-line.
The present embodiment exists as an apparatus embodiment corresponding to the above method embodiment, and has all the beneficial effects of the method embodiment, and details are not repeated here.
The optical module access device can also be formed by another modularized structure, namely a basic information acquisition module and an adaptive verification module. The basic information acquisition module acquires eprom (non-volatile memory) information (namely, port number) of the port according to the position information corresponding to the port, and acquires manufacturer information and serial number information according to a specified offset address. The adaptive verification module defines the content of the adaptive list, compares the basic information, and assembles the port number and the basic information into prompt information when finding out the optical module which is not in the list. And prompting a user through a window, prompting the communication risk of the optical module, and simultaneously carrying out offline operation on the port.
The basic information acquisition module firstly defines the mapping relation between a port and an I2C channel path according to each physical port in the switch, wherein the mapping relation of 25g of the port is '33-0050' corresponding to the port 0, the mapping relation of '32-0050' corresponding to the port 1, and the like, the mapping relation of 100g of the port is '81-0050' corresponding to the port 48, the mapping relation of '80-0050' corresponding to the port 49, and the like. And then filling the data into a specific device file path for obtaining I2C according to the obtained mapping relation data, such as/sys/bus/I2 c/devices/I2 c-32/32-0050/eprom. Setting the offset of a factory name to be 20 according to the standard file definition of the optical module through the acquired path, acquiring 16 bytes of data, converting the data into a character string form and storing the character string form in VendorName, setting the offset of a serial number to be 40, acquiring 16 bytes of data, converting the data into the character string form and storing the character string form in VendorPN.
The adaptive verification module firstly defines a verified optical module list meeting the requirements of the switch, and the list comprises a plurality of manufacturer names and serial numbers meeting the standard. When VendorName and VendorPN are acquired, the optical module list is circulated. If the optical module information does not exist in the list, recombining the port number, the VendorName, the VendorPN and the list information which does not conform to the optical module, calling a display information function, displaying the warning information, and simultaneously recording the warning information into a/var/log/syslog file. And then adopting port offline processing, and indicating that the port is unavailable by configuring port down operation.
Based on the foregoing embodiments, the present application further provides a backbone network switch, which may include a memory and a processor, where the memory stores a computer program, and the processor, when calling the computer program in the memory, may implement the steps provided in the foregoing embodiments. Of course, the backbone switch may also include various necessary network interfaces, power supplies, and other components.
The present application also provides a readable storage medium, on which a computer program is stored, which when executed by an execution terminal or processor can implement the steps provided by the above-mentioned embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It will be apparent to those skilled in the art that various changes and modifications can be made in the present invention without departing from the principles of the invention, and these changes and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1.一种光模块准入判别方法,其特征在于,应用于主干网交换机,包括:1. a method for judging the admission of an optical module, characterized in that, applied to a backbone network switch, comprising: 从接入端口的光模块中读取设备信息;Read device information from the optical module of the access port; 将所述设备信息按预设的映射规则在目标目录下形成设备信息文件;其中,所述映射规则记录了每个端口与每个目标目录之间的对应关系;The device information is formed into a device information file under the target directory according to a preset mapping rule; wherein, the mapping rule records the correspondence between each port and each target directory; 从所述设备信息文件中按预设偏移量提取字符串,得到实际判别参数;Extract the character string according to the preset offset from the device information file to obtain the actual discriminating parameter; 判断所述实际判别参数是否出现在预设的准入判别参数列表中;其中,所述准入判别参数列表中记录有满足准入要求的判别参数;Judging whether the actual discriminating parameter appears in the preset access discriminating parameter list; wherein, the discriminating parameter that meets the access requirement is recorded in the access discriminating parameter list; 若所述实际判别参数未出现在所述准入判别参数列表中,则对所述光模块接入的端口进行下线处理;If the actual discriminating parameter does not appear in the admission discriminating parameter list, perform offline processing on the port to which the optical module is connected; 在对所述光模块接入的端口进行下线处理之前,还包括:Before the offline processing is performed on the port connected to the optical module, the method further includes: 获取所述光模块接入的端口号;Obtain the port number accessed by the optical module; 根据所述端口号和所述光模块的实际判别参数,生成拒绝准入提示信息;According to the port number and the actual discriminant parameter of the optical module, generate an admission rejection prompt message; 通过预设路径显示所述拒绝准入提示信息,并同时记录所述拒绝准入提示信息至准入判别日志;Display the refusal and admission prompt information through a preset path, and simultaneously record the refusal and admission prompt information to the admission judgment log; 对应的,对所述光模块接入的端口进行下线处理,包括:Correspondingly, offline processing is performed on the port accessed by the optical module, including: 根据所述端口号对相应的端口进行下线处理。The corresponding port is offline processed according to the port number. 2.根据权利要求1所述的光模块准入判别方法,其特征在于,从所述设备信息文件中按预设偏移量提取字符串,得到实际判别参数,包括:2. The optical module admission discrimination method according to claim 1, characterized in that, extracting a character string according to a preset offset from the device information file to obtain an actual discriminating parameter, comprising: 从所述设备信息文件的头子节开始,按第一预设偏移量提取第一预设长度的字符串,得到实际厂商名;Starting from the header subsection of the device information file, extract a character string of the first preset length according to the first preset offset to obtain the actual manufacturer name; 从所述设备信息文件的头子节开始,按第二预设偏移量提取第二预设长度的字符串,得到实际批次序列号;Starting from the header subsection of the device information file, extract a character string with a second preset length according to the second preset offset to obtain the actual batch serial number; 将所述实际厂商名和所述实际批次序列号的组合作为所述实际判别参数。The combination of the actual manufacturer name and the actual batch serial number is used as the actual discriminating parameter. 3.根据权利要求2所述的光模块准入判别方法,其特征在于,当所述实际判别参数具体由所述实际厂商名和所述批次设备序列号的组成时,判断所述实际判别参数是否出现在预设的准入判别参数列表中,包括:3. The optical module admission judging method according to claim 2, wherein when the actual judging parameter is specifically composed of the actual manufacturer name and the serial number of the batch of equipment, the actual judging parameter is judged Whether it appears in the preset access judgment parameter list, including: 判断所述准入判别参数列表中是否包含有所述实际厂商名;judging whether the actual manufacturer name is included in the access judging parameter list; 若包含有所述实际厂商名,则判断所述准入判别参数列表中是否包含有所述实际批次序列号;If the actual manufacturer name is included, then determine whether the access discrimination parameter list includes the actual batch serial number; 若包含有所述实际批次序列号,则判定所述实际判别参数出现在所述准入判别参数列表中;If the actual batch serial number is included, it is determined that the actual discriminant parameter appears in the admission discriminant parameter list; 若未包含有所述实际厂商名或所述实际批次序列号,则判定所述实际判别参数未出现在所述准入判别参数列表中。If the actual manufacturer name or the actual batch serial number is not included, it is determined that the actual discriminating parameter does not appear in the admission discriminating parameter list. 4.根据权利要求1至3任一项所述的光模块准入判别方法,其特征在于,所述光模块接入的端口进行下线处理,包括:4. The method for judging the admission of an optical module according to any one of claims 1 to 3, wherein the offline processing of the port to which the optical module is connected comprises: 对所述光模块接入的端口执行down操作,并同时控制所述光模块接入的端口的工作指示灯处于指示端口处于下线的工作状态。The down operation is performed on the port to which the optical module is connected, and at the same time, the working indicator of the port to which the optical module is connected is controlled to be in a working state indicating that the port is offline. 5.一种光模块准入判别装置,其特征在于,应用于主干网交换机,包括:5. An optical module admission judging device, characterized in that, applied to a backbone network switch, comprising: 设备信息读取单元,用于从接入端口的光模块中读取设备信息;a device information reading unit, used for reading device information from the optical module of the access port; 设备信息文件形成单元,用于将所述设备信息按预设的映射规则在目标目录下形成设备信息文件;其中,所述映射规则记录了每个端口与每个目标目录之间的对应关系;a device information file forming unit, configured to form the device information file in the target directory according to a preset mapping rule; wherein, the mapping rule records the correspondence between each port and each target directory; 实际判别参数提取单元,用于从所述设备信息文件中按预设偏移量提取字符串,得到实际判别参数;an actual discriminant parameter extraction unit, used for extracting a character string according to a preset offset from the device information file to obtain an actual discriminant parameter; 判别参数比对单元,用于判断所述实际判别参数是否出现在预设的准入判别参数列表中;其中,所述准入判别参数列表中记录有满足准入要求的判别参数;A discriminant parameter comparison unit, configured to judge whether the actual discriminant parameter appears in a preset access discriminant parameter list; wherein, the access discriminant parameter list records discriminant parameters that meet the access requirements; 拒绝准入下线处理单元,用于若所述实际判别参数未出现在所述准入判别参数列表中,则对所述光模块接入的端口进行下线处理;an admission denial and offline processing unit, configured to perform offline processing on the port accessed by the optical module if the actual judgment parameter does not appear in the admission judgment parameter list; 光模块准入判别装置还包括:The optical module admission discrimination device further includes: 端口号获取单元,用于在对所述光模块接入的端口进行下线处理之前,获取所述光模块接入的端口号;a port number acquiring unit, configured to acquire the port number accessed by the optical module before offline processing is performed on the port accessed by the optical module; 拒绝准入提示信息生成单元,用于根据所述端口号和所述光模块的实际判别参数,生成拒绝准入提示信息;an admission rejection prompt information generating unit, configured to generate admission rejection prompt information according to the port number and the actual discriminating parameter of the optical module; 提示信息显示及日志记录单元,用于通过预设路径显示所述拒绝准入提示信息,并同时记录所述拒绝准入提示信息至准入判别日志;a prompt information display and log recording unit, configured to display the admission refusal prompt information through a preset path, and simultaneously record the admission denial prompt information to the admission judgment log; 对应的,所述拒绝准入下线处理单元包括:Correspondingly, the processing unit for denying access and going offline includes: 端口及指示灯处理子单元,用于根据所述端口号对相应的端口进行下线处理。The port and indicator light processing sub-unit is used for offline processing of the corresponding port according to the port number. 6.根据权利要求5所述的光模块准入判别装置,其特征在于,所述实际判别参数提取单元,包括:6. The optical module admission discrimination device according to claim 5, wherein the actual discrimination parameter extraction unit comprises: 实际厂商名提取子单元,用于从所述设备信息文件的头子节开始,按第一预设偏移量提取第一预设长度的字符串,得到实际厂商名;The actual manufacturer name extraction subunit is used to extract the character string of the first preset length according to the first preset offset, starting from the header subsection of the device information file, to obtain the actual manufacturer name; 实际批次序列号提取子单元,用于从所述设备信息文件的头子节开始,按第二预设偏移量提取第二预设长度的字符串,得到实际批次序列号;an actual batch serial number extraction subunit, used for extracting a character string of a second preset length according to a second preset offset starting from the header subsection of the device information file, to obtain the actual batch serial number; 实际判别参数组合子单元,用于将所述实际厂商名和所述实际批次序列号的组合作为所述实际判别参数。The actual discriminating parameter combination subunit is used for taking the combination of the actual manufacturer name and the actual batch serial number as the actual discriminating parameter. 7.根据权利要求6所述的光模块准入判别装置,其特征在于,当所述实际判别参数具体由所述实际厂商名和所述批次设备序列号的组成时,所述判别参数比对单元,包括:7. The optical module admission judging device according to claim 6, wherein when the actual judging parameter is specifically composed of the actual manufacturer name and the serial number of the batch of equipment, the judging parameter is compared units, including: 厂商名包含判断子单元,用于判断所述准入判别参数列表中是否包含有所述实际厂商名;The manufacturer name includes a judging subunit for judging whether the actual manufacturer name is included in the admission judgment parameter list; 批次序列号包含判断子单元,用于当包含有所述实际厂商名时,判断所述准入判别参数列表中是否包含有所述实际批次序列号;The batch serial number includes a judging subunit for judging whether the actual batch serial number is included in the admission judgment parameter list when the actual manufacturer name is included; 包含判定子单元,用于当包含有所述实际批次序列号时,判定所述实际判别参数出现在所述准入判别参数列表中;Including a judgment subunit, used for judging that the actual judgment parameter appears in the admission judgment parameter list when the actual batch serial number is included; 未包含判定子单元,用于当未包含有所述实际厂商名或所述实际批次序列号时,判定所述实际判别参数未出现在所述准入判别参数列表中。The non-contained determining subunit is used for determining that the actual discriminating parameter does not appear in the admission discriminating parameter list when the actual manufacturer name or the actual batch serial number is not included. 8.一种主干网交换机,其特征在于,包括:8. A backbone network switch, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于在执行所述计算机程序时实现如权利要求1至4任一项所述的应用于主干网交换机的光模块准入判别方法的各步骤。The processor is configured to implement each step of the method for judging the admission of an optical module applied to a backbone network switch according to any one of claims 1 to 4 when executing the computer program. 9.一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机程序,所述计算机程序在被处理器执行时实现如权利要求1至4任一项所述的应用于主干网交换机的光模块准入判别方法的各步骤。9. A readable storage medium, characterized in that, a computer program is stored on the readable storage medium, and the computer program, when executed by a processor, implements the application according to any one of claims 1 to 4. Each step of the optical module admission discrimination method of the backbone network switch.
CN201911285986.0A 2019-12-13 2019-12-13 An optical module admission discrimination method, device, backbone network switch and medium Active CN111010354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911285986.0A CN111010354B (en) 2019-12-13 2019-12-13 An optical module admission discrimination method, device, backbone network switch and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911285986.0A CN111010354B (en) 2019-12-13 2019-12-13 An optical module admission discrimination method, device, backbone network switch and medium

Publications (2)

Publication Number Publication Date
CN111010354A CN111010354A (en) 2020-04-14
CN111010354B true CN111010354B (en) 2022-03-08

Family

ID=70114902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911285986.0A Active CN111010354B (en) 2019-12-13 2019-12-13 An optical module admission discrimination method, device, backbone network switch and medium

Country Status (1)

Country Link
CN (1) CN111010354B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6147995A (en) * 1995-11-15 2000-11-14 Cabletron Systems, Inc. Method for establishing restricted broadcast groups in a switched network
CN103929376A (en) * 2014-04-30 2014-07-16 尹志超 Terminal admission control method based on switch port management
CN104158767A (en) * 2014-09-03 2014-11-19 吕书健 Network access device and network access method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050177642A1 (en) * 2004-01-27 2005-08-11 Tetsuro Motoyama Method and system for managing protocols used to obtain status information from a network device
JP4896397B2 (en) * 2004-12-28 2012-03-14 富士通株式会社 Program, limiting method and computer
CN103051482B (en) * 2012-12-28 2015-09-30 中国航空工业集团公司第六三一研究所 Based on a kind of port isolation of FC switch and the implementation method of recovery
CN103944886B (en) * 2014-03-24 2017-11-10 迈普通信技术股份有限公司 A kind of realization method and system of port security
CN105245338B (en) * 2014-05-26 2019-04-26 中兴通讯股份有限公司 A kind of authentication method and apparatus system
CN105577380A (en) * 2014-10-17 2016-05-11 中兴通讯股份有限公司 Optical module authentication method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6147995A (en) * 1995-11-15 2000-11-14 Cabletron Systems, Inc. Method for establishing restricted broadcast groups in a switched network
CN103929376A (en) * 2014-04-30 2014-07-16 尹志超 Terminal admission control method based on switch port management
CN104158767A (en) * 2014-09-03 2014-11-19 吕书健 Network access device and network access method

Also Published As

Publication number Publication date
CN111010354A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN106354430A (en) Method and device for allocating RAID card based on BMC
CN104915599A (en) Application program monitoring method and terminal
CN108255725A (en) Test method and device
KR20190130933A (en) Method and apparatus for constructing data based blockchain
CN111586022A (en) Firewall opening verification method, electronic device, computer equipment and storage medium
CN114861773A (en) Model training visualization method, device and cloud platform
CN107302459B (en) Service processing method and system
CN115242436B (en) A malicious traffic detection method and system based on command line characteristics
CN111010354B (en) An optical module admission discrimination method, device, backbone network switch and medium
CN115454609A (en) Batch command processing method, device, medium and server of Linux system
CN108183978B (en) Communication equipment IP address configuration method and communication equipment
CN114301657A (en) Account login detection method, device and medium
CN111147542A (en) A method, device, device and medium for setting password-free access
CN111241547A (en) Detection method, device and system for unauthorized vulnerability
CN108959486B (en) Audit field information acquisition method and device, computer equipment and storage medium
CN109784053B (en) Method and device for generating filter rule, storage medium and electronic device
CN116185785A (en) Early warning method and device for file abnormal change
CN115934523A (en) Target test data generation method and device, storage medium and electronic device
TW201523286A (en) Cloud system and method for arranging cloud resource
CN111107089B (en) Method and device for protecting data transmission safety of Android system
CN109189753B (en) Method and device for adding user information in HUE
CN114385428A (en) A test method for terminal equipment and related equipment
CN113364764B (en) Information security protection method and device based on big data
CN112468356A (en) Router interface testing method and device, electronic equipment and storage medium
CN114265744B (en) Enterprise digital asset monitoring method and device, storage medium, terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant