CN113079040B - Port migration method and device - Google Patents

Port migration method and device Download PDF

Info

Publication number
CN113079040B
CN113079040B CN202110313576.3A CN202110313576A CN113079040B CN 113079040 B CN113079040 B CN 113079040B CN 202110313576 A CN202110313576 A CN 202110313576A CN 113079040 B CN113079040 B CN 113079040B
Authority
CN
China
Prior art keywords
port
information
service
identification information
migration
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
CN202110313576.3A
Other languages
Chinese (zh)
Other versions
CN113079040A (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.)
Ziguang Huashan Technology Co ltd
Original Assignee
Ziguang Huashan 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 Ziguang Huashan Technology Co ltd filed Critical Ziguang Huashan Technology Co ltd
Priority to CN202110313576.3A priority Critical patent/CN113079040B/en
Publication of CN113079040A publication Critical patent/CN113079040A/en
Application granted granted Critical
Publication of CN113079040B publication Critical patent/CN113079040B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process

Abstract

The invention provides a port migration method and a device, wherein the method comprises the following steps: receiving a port migration detection message sent by opposite-end equipment; inquiring a port migration detection information table according to the first equipment identification information and the first port identification information; when a target port migration detection information table matched with the first equipment identification information and the first port identification information is inquired, determining whether a port migration condition is met or not according to second port identification information; and when determining that the port migration condition is met, carrying out service configuration synchronization on the service ports before and after migration. The embodiment of the invention can realize automatic port migration and improve the efficiency and the accuracy of the port migration.

Description

Port migration method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a port migration method and apparatus.
Background
During the operation of the network device, a situation of service port migration may occur. For example, when a service port fails, a chip problem causes a batch failure of the service port of the chip, a single board problem causes a batch failure of the service port of the single board, and the like, service port migration is required.
In order to restore traffic as soon as possible, the failed port (i.e., the failed traffic port) needs to be migrated to the available free port, and the traffic configuration of the original port (i.e., the failed port) needs to be synchronized to the new port (the available free port).
However, practice shows that the current port migration scheme is to change service configuration manually, and the operation efficiency is low; and manual operation is prone to errors when there are many ports to be migrated.
Disclosure of Invention
The invention provides a port migration method and a port migration device, which aim to solve the problems of low efficiency and high error probability of the traditional port migration scheme.
According to a first aspect of the embodiments of the present invention, there is provided a port migration method, including:
receiving a port migration detection message sent by opposite-end equipment; the port migration detection packet carries first device identification information and first port identification information, wherein the first device identification information is used for identifying the opposite terminal device, the first port identification information is used for identifying a first port, and the first port is a service port for sending the port migration detection packet;
inquiring a port migration detection information table according to the first equipment identification information and the first port identification information; for any local service port of the local service port, the port migration detection information table corresponding to the local service port is used for recording port identification information of an opposite service port establishing service connection with the local service port, equipment identification information of equipment to which the opposite service port belongs, and port identification information of the local service port;
When a target port migration detection information table matched with the first equipment identification information and the first port identification information is inquired, determining whether a port migration condition is met or not according to second port identification information; the second port identification information is the port identification information of the local service port recorded in the target port migration detection information table;
and when determining that the port migration condition is met, carrying out service configuration synchronization on the service ports before and after migration.
According to a second aspect of the embodiments of the present invention, there is provided a port migration apparatus, including:
a receiving unit, configured to receive a port migration detection packet sent by an opposite-end device; the port migration detection packet carries first device identification information and first port identification information, wherein the first device identification information is used for identifying the opposite terminal device, the first port identification information is used for identifying a first port, and the first port is a service port for sending the port migration detection packet;
the table entry maintenance unit is used for inquiring a port migration detection information table according to the first equipment identification information and the first port identification information; for any local service port of the local service port, the port migration detection information table corresponding to the local service port is used for recording port identification information of an opposite service port establishing service connection with the local service port, equipment identification information of equipment to which the opposite service port belongs, and port identification information of the local service port;
A determining unit, configured to determine whether a port migration condition is satisfied according to second port identification information when the table entry maintenance unit queries a target port migration detection information table that matches the first device identification information and the first port identification information; the second port identification information is the port identification information of the local service port recorded in the target port migration detection information table;
and the port migration unit is used for carrying out service configuration synchronization on the service ports before and after migration when the determining unit determines that the port migration condition is met.
By applying the technical scheme disclosed by the invention, the port migration detection message sent by the opposite terminal equipment is received, the port migration detection information table is inquired according to the first equipment identification information and the first port identification information carried in the port migration detection message, when the target port migration detection information table matched with the first equipment identification information and the first port identification information is inquired, whether the port migration condition is met or not is determined according to the second port identification information of the local service port recorded in the target port migration detection information table, and further, when the port migration condition is determined to be met, the service configuration synchronization is carried out on the service ports before and after the migration, the automatic migration of the ports is realized, and the efficiency and the accuracy of the port migration are improved.
Drawings
Fig. 1 is a schematic flowchart of a port migration method according to an embodiment of the present invention;
fig. 2A to fig. 2B are schematic views of a scenario of port migration according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a transmission flow of an LLDP packet according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a receiving flow of an LLDP packet according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a port migration apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic flow chart of a port migration method according to an embodiment of the present invention is shown in fig. 1, where the port migration method may include the following steps:
it should be noted that, the sequence numbers of the steps in the embodiment of the present invention do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the internal logic of the process, and should not constitute any limitation to the implementation process of the embodiment of the present invention.
Step 101, receiving a port migration detection message sent by opposite-end equipment; the port migration detection packet carries first device identification information and first port identification information, the first device identification information is used for identifying an opposite terminal device, the first port identification information is used for identifying a first port, and the first port is a service port for sending the port migration detection packet.
In the embodiment of the invention, in order to realize automatic port migration, the equipment with service connection can send a port migration detection message to the opposite equipment through the port with service connection.
For example, for any service port, when the service port UP (open), the port migration detection packet may be sent to the peer device through the service port at regular time.
For example, the port migration detection packet sent through any service port may carry port identification information of the service port and device identification information of the local device.
Similarly, for any device, a port migration detection packet sent by the peer device may also be received through the local service port, where the port migration detection packet may carry device identification information (referred to as first device identification information) for identifying the peer device and port identification information (referred to as first port identification information) for identifying a service port (referred to as a first port) of the peer device that sends the port migration detection packet.
Step 102, inquiring a port migration detection information table according to the first equipment identification information and the first port identification information; for any local service port of the local service port, the port migration detection information table corresponding to the local service port is used for recording port identification information of an opposite service port establishing service connection with the local service port, device identification information of a device to which the opposite service port belongs, and port identification information of the local service port.
In the embodiment of the present invention, for any service port, an information table (referred to as a port migration detection information table herein) may be established for a service connection between the service port and a corresponding service port of an opposite-end device (which may be referred to as an opposite-end service port), where the port migration detection information table may be used to record port identification information of the service port (which may be referred to as a local service port), port identification information of the opposite-end service port, and device identification information of a device to which the opposite-end service port belongs.
Correspondingly, when a port migration detection message sent by an opposite-end device is received, first device identification information and first port identification information carried in the port migration detection message may be acquired, and according to the first device identification information and the first port identification information, a port migration detection information table may be queried to determine whether a port migration detection information table (referred to herein as a target port migration detection information table) matching the first device identification information and the first port identification information exists, that is, the recorded port identification information of the opposite-end service port is the first port identification information, and the device identification information of the device to which the opposite-end service port belongs is the port migration detection information table of the first device identification information.
103, when a target port migration detection information table matched with the first equipment identification information and the first port identification information is inquired, determining whether a port migration condition is met according to the second port identification information; the second port identification information is the port identification information of the local service port recorded in the target port migration detection information table.
In the embodiment of the present invention, when a target port migration detection information table matching with the first device identification information and the first port identification information is queried, whether a port migration condition is satisfied or not may be determined according to port identification information (referred to as second port identification information herein) of a local service port recorded in the target port migration detection information table, so as to determine whether port automatic migration is required or not.
In an example, if a matching port migration detection information table is not queried according to the first device identification information and the first port identification information, that is, the target port migration detection information table does not exist, a port migration detection information table corresponding to the first device identification information and the first port identification information may be created, where the port migration detection information table may include the first device identification information, the first port identification information, and port identification information of a local service port that receives the port migration detection packet.
And step 104, carrying out service configuration synchronization on the service ports before and after migration when the port migration condition is determined to be met.
In the embodiment of the invention, when the port migration condition is determined to be met, service configuration synchronization can be carried out on the service ports before and after migration, namely, the service configuration of the port before migration is synchronized to the port after migration.
For example, after completing the service configuration synchronization, the service configuration of the port before migration may be deleted.
For example, assuming that the port migration is port 1 to port 2, the traffic configuration of port 1 may be synchronized to port 2, and the traffic configuration of port 1 may be deleted.
It can be seen that, in the method flow shown in fig. 1, a port migration detection message is exchanged between devices with service connection through a service port, and a port migration detection information table is maintained, when a port migration detection message of an opposite device is received, a matching port migration detection information table is queried according to device identification information and port device identification carried in the port migration detection message, and when a port migration condition is satisfied according to port identification information of a local service port recorded in the queried matching port migration detection information table under the condition that the matching port migration detection information table is queried, service configuration synchronization is performed on service ports before and after migration, so that automatic migration of the ports is realized, and efficiency and accuracy of port migration are improved.
In some embodiments, in step 104, satisfying the port migration condition may include:
the third port identification information is inconsistent with the second port identification information; the third port identification information is used for identifying a third port, and the third port is a service port of the local terminal device which receives the port migration detection message.
In this embodiment, when the target port migration detection information table is matched according to the first device identification information and the first port identification information, the second port identification information may be compared with the port identification information (referred to as third port identification information herein) of the service port, where the local device receives the port migration detection packet.
If the third port identification information is inconsistent with the second port identification information, it can be determined that the port migration condition is satisfied, and service configuration synchronization is performed on the service ports before and after migration.
For example, if the third port identification information is consistent with the second port identification information, it may be determined that the port migration condition is not satisfied, and the port migration process may not be required.
In an example, for any local service port of the local end device, the port migration detection information table corresponding to the local service port is further used for recording service configuration check information;
The service configuration check information includes service configuration check information of the opposite service port recorded in the port migration detection information table, and in step 104, the method meets the port migration condition, and may further include:
the second service configuration checking information is consistent with the first service configuration checking information; the port migration detection message also carries first service configuration check information, and the first service configuration check information is determined by the opposite terminal device according to the service configuration information of the first port; the second service configuration check information is service configuration check information of an opposite service port recorded in a target port migration detection information table, and the service configuration check information of the opposite service port is determined by the device to which the opposite service port belongs according to the service configuration information of the opposite service port;
and/or the presence of a gas in the gas,
the service configuration check information includes the service configuration check information of the local service port recorded in the port migration detection information table, and in step 104, the method that meets the port migration condition may further include:
the fourth service configuration verification information is consistent with the fifth service configuration verification information; the fourth service configuration check information is service configuration check information of a second port recorded in the target port migration detection information table, the second port is a local service port identified by second port identification information, the service configuration check information of the second port is determined by the local terminal device according to the service configuration information of the second port, and the fifth service configuration check information is determined by the local terminal device according to the current service configuration information of the second port.
In this example, considering that when the service configuration of one of the two service ports with service connection is changed but the service configuration of the other service port is not changed in a matching manner, service interaction between the two service ports may not be performed, or even an error occurs, in order to ensure the security of service configuration synchronization during automatic port migration, when the ports are migrated automatically, the service configuration of the service ports may be checked, and whether a port migration condition is satisfied is determined according to a result of the service configuration check.
Correspondingly, the port migration detection information table may further record service configuration check information.
For any port migration detection information table, the service configuration check information recorded in the port migration detection information table may include service configuration check information of an opposite service port recorded in the port migration detection information table, and/or service configuration check information of a local service port recorded in the port migration detection information table.
Taking as an example that the service configuration check information recorded in the port migration detection information table may include service configuration check information of an opposite service port recorded in the port migration detection information table, and service configuration check information of a local service port recorded in the port migration detection information table.
The port migration detection packet may also carry service configuration check information (referred to as first service configuration check information herein) of the first port, where the first service configuration check information is determined by the peer device according to the service configuration information of the first port.
For example, the service configuration Check information may be calculated by the device according to the service configuration information of the local service port by using a specified Algorithm (e.g., a Message-Digest Algorithm (MD 5), a Cyclic Redundancy Check (CRC) Algorithm, etc.).
Wherein, the same service configuration information is calculated by the appointed algorithm to obtain the same result; different service configuration information is calculated by the specified algorithm to obtain different results.
When the matched target port migration detection information table is queried according to the first device identification information and the first port identification information, on one hand, the service configuration information (referred to as second service configuration check information herein) of the opposite-end service port recorded in the target port migration detection information table may be compared with the first service configuration check information carried in the port migration detection packet to determine whether the service configuration information of the opposite-end service port changes.
On the other hand, the present service configuration information of the local service port may be queried according to the port identification information of the local service port recorded in the target port migration detection information table, and corresponding service configuration check information (referred to as fifth service configuration check information herein) is determined according to the service configuration information, and the fifth service configuration check information is compared with the service configuration information (fourth service configuration check information herein) of the local service port (i.e., the second port) recorded in the target port migration detection information table, so as to determine whether the service configuration information of the second port changes.
When the third port identification information is inconsistent with the second port identification information, the second service configuration check information is consistent with the first service configuration check information, and the fourth service configuration check information is consistent with the fifth service configuration check information, that is, the local service port having service connection with the opposite service port is changed, but the service configuration information of the opposite service port and the service configuration information of the original local service port (the local service port corresponding to the port identification information of the local service port recorded in the port migration detection information table) are not changed, it can be determined that the port migration state is satisfied.
When any one of the third port identification information and the second port identification information is inconsistent, the second service configuration verification information and the first service configuration verification information are consistent, and the fourth service configuration verification information and the fifth service configuration verification information are consistent is not satisfied, it can be determined that the port migration condition is not satisfied, and the port migration processing is not performed.
As can be seen, when the port migration detection packet carries service configuration check information (such as the first service configuration check information), and the port migration detection information table records service configuration check information (such as service configuration check information of an opposite-end service port and/or service configuration check information of a local service port), it may be determined whether a port migration condition is satisfied according to the second port identification information and the service configuration check information carried in the port migration detection packet, so as to improve the security of automatic port migration.
In one example, when any one of the information recorded in the target port migration detection information table except for the first device identification information and the first port identification information is changed, the corresponding information recorded in the target port migration detection information table may be updated to the changed information.
In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the technical solutions provided by the embodiments of the present invention are described below with reference to specific examples.
In this embodiment, in order to implement automatic port migration, a conventional LLDP packet may be extended, and a new TLV (Type/Length/Value) for carrying service configuration check information is added to check the service configuration of the device port, so as to ensure security.
The newly added TLV (which may be referred to as Configuration MD5 TLV) may be an unused, reserved basic TLV type in the LLDP protocol, or an enterprise private newly added customization in the defined TLV type is organized.
In this embodiment, the device identification information is a Chassis ID (subrack identification), and the Port identification information is a Port ID (Port identification) as an example.
In this embodiment, for example, the Port migration detection information table (may also be referred to as a service configuration check information table) records device identification information of the peer device, Port identification information of the peer service Port, service configuration check information of the peer service Port, Port identification information of the Local service Port (may be referred to as a Local Port ID), and service configuration check information of the Local service Port.
Referring to fig. 2A, a schematic structural diagram of a specific application scenario provided in the embodiment of the present invention is shown in fig. 2A, where the specific application scenario may include a device 210 and a device 220, and the device 210 establishes a service connection with a service port 221 of the device 220 through a service port 211.
Assuming that the device identification information of the device 210 is chatiss a, and the port identification information of the service port 211 of the device 210 is port 1; the port identification information of service port 221 of device 220 is port 1.
Based on the application scenario shown in fig. 2A, taking the implementation flow at the device 220 side as an example:
when the service port 221IUP of the device 220 is used, the device 220 may calculate an MD5 value (i.e., the service configuration check information) according to the service configuration information of the service port 221.
Optionally, in order to improve controllability of the port auto-migration scheme and improve compatibility of the port auto-migration scheme with a conventional port migration scheme, the port auto-migration function (which may also be referred to as an LLDP auto-migration function) may be selectively enabled or disabled according to requirements.
When the LLDP automatic migration function is enabled, carrying out the port automatic migration flow according to the scheme provided by the embodiment of the invention; when the LLDP auto-migration function is not enabled, port migration may be implemented according to a conventional scheme, and at this time, when sending an LLDP packet, the new Configuration MD5 TLV is not carried (i.e., sending a normal LLDP packet).
The following description will be made by taking an example of enabling the LLDP auto-migration function.
In this embodiment, when the MD5 value of the service Configuration information of the port 221 is determined, the device 220 may send, to the device 210 through the port 221, an LLDP packet carrying the Configuration MD5 TLV (i.e., the port migration detection packet described above).
Alternatively, after the port 221UP, the device 220 may start a periodic transmission timer, and when the periodic transmission timer expires, transmit the LLDP packet, and reset the periodic transmission timer.
The sending flow of the LLDP packet may be as shown in fig. 3.
The implementation process of the device 210 sending the LLDP message through the port 211 is similar to the implementation process of the device 220 sending the LLDP message through the port 221.
In this embodiment, when the device 220 receives, through the Port 221, the LLDP packet sent by the device 210 through the Port 211, it may obtain the value MD5 in the sessions ID (i.e., sessions a), Port ID (i.e., Port1) and Configuration MD5 TLV in the LLDP packet.
When the device 220 does not enable the LLDP auto-migration function, or the LLDP message does not carry the Configuration MD5 TLV, the device 220 may process the LLDP message according to a normal LLDP message processing flow.
In this embodiment, the device 220 may query the local port detection information table with chatsis a and port1 to determine whether there is a matching port migration detection information table, that is, the recorded device identification information of the peer device is chatsis a, and the device identification information of the peer device is the port migration detection information table of port1 (that is, the target port migration detection information table).
Assume that device 220 queries the target port migration detection information table, the information of which is shown in table 1:
TABLE 1
Figure BDA0002990916550000111
Wherein, the config1_ MD5 is calculated by the device 210 according to the service configuration information of the port 211 by using an MD5 algorithm; config2_ MD5 is calculated by device 220 using the MD5 algorithm according to the traffic configuration information of port 221.
It should be noted that, when the device 220 does not query the target port migration detection information table, the port migration detection information table shown in table 1 may be created.
Similarly, the port migration detection information table in the device 210 may be shown in table 2:
TABLE 2
Figure BDA0002990916550000112
In this embodiment, after querying the target port migration detection information table, the device 220 may query current service Configuration information of the local service port (i.e., the port 221) according to port identification information of the local service port recorded in the target port migration detection information table, calculate service Configuration checking information by using an MD5 algorithm according to the current service Configuration information of the port 221, and determine whether a port migration condition is satisfied according to the calculated service Configuration checking information, the service Configuration checking information (MD 5 value in Configuration MD5 TLV) carried in the received LLDP message, and the target port migration detection information table.
Wherein, satisfying the port migration condition comprises:
1. the port identification information of the service port of the LLDP packet carrying the Configuration MD5 TLV, which is received by the device 220, is inconsistent with the port identification information of the local service port recorded in the target port migration detection information table;
2. the service Configuration check information in the LLDP message carrying Configuration MD5 TLV received by the device 220 is consistent with the service Configuration check information of the opposite service port recorded in the target port migration detection information table;
3. according to the port identification information of the local service port recorded in the target port migration detection information table, inquiring the current service configuration information of the local service port, and calculating by using an MD5 algorithm to obtain an MD5 value, which is consistent with the service configuration verification information of the local service port recorded in the target port migration detection information table.
When the device 220 queries the matching target port migration detection information table according to the device identification information and the port identification information in the received LLDP message and determines that the port migration condition is satisfied, service configuration synchronization is performed on the service ports before and after migration.
For example, referring to fig. 2B, assume that at some point, port 221 of device 220 fails (Down) and the traffic connection between device 220 and port 211 of device 210 is migrated to port 222.
Assume that the port identification information of port 222 is port2, and the current service configuration information of port 222 is def _ config.
When the device 220 receives, through the port 222, the LLDP packet carrying the Configuration MD5 TLV sent by the device 210 through the port 211, it may query the local port migration detection information table according to the device identification information (i.e., sessions a) and the port identification information (i.e., port1) carried in the LLDP packet, and determine that there is matching target port migration detection information, i.e., the port migration detection information table shown in table 1.
Device 220 may query the current service configuration information (assumed to be config2) of the local service port according to the port identification information (i.e., port1) of the local service port recorded in the port migration detection information table shown in table 1, and calculate an MD5 value (assumed to be config2_ MD5) by using an MD5 algorithm.
The device 220 may compare the port identification information (port2) of the service port that receives the LLDP packet with the port identification information (i.e., port1) of the local service port recorded in the port migration detection information table shown in table 1, the MD5 value (assumed to be config1_ MD5) in the Configuration MD5 TLV carried in the LLDP packet, and the service Configuration check information (i.e., config1_ MD5) of the opposite service port recorded in the port migration detection information table shown in table 1, and the config2_ MD5 and the service Configuration check information (i.e., config2_ MD5) of the local service port recorded in the port migration detection information table shown in table 1, respectively, and find that the above-mentioned port migration condition is satisfied, at this time, the device 220 may perform automatic migration of the port, synchronize the service Configuration information of the port 221 to the port 222, and delete the service Configuration information of the port 221.
The device 220 may update the port migration detection information table recorded in table 1, where the updated port migration detection information table may be as shown in table 3:
TABLE 3
Figure BDA0002990916550000131
In this embodiment, when the device 210 receives, through the port 211, the LLDP packet carrying the Configuration MD5 TLV sent by the device 220 through the port 222, the device identification information (sessions B) and the port identification information (port2) carried in the LLDP packet are obtained, and the local port migration detection information table is queried according to the device identification information and the port identification.
If a matching port migration detection information table is not found, the device 210 may create a corresponding port migration detection information table and create a port migration detection information table as shown in table 4 (assuming that port migration is not completed at this time):
TABLE 4
Figure BDA0002990916550000132
The def _ config _ MD5 is calculated by the device 220 according to the service configuration information (i.e., def _ config) of the port 220 before the port migration is completed, using the MD5 algorithm.
When the device 220 completes the automatic port migration and the device 210 receives the LLDP packet carrying the Configuration MD5 TLV sent by the device 220 through the port 222 through the port 211 again, the matching target port migration detection information table, that is, the port migration detection information table shown in table 4, is queried according to the device identification information (sessions B) and the port identification information (port2) carried in the LLDP packet.
Device 210 may query the current service configuration information (assumed to be config1) of the corresponding local service port according to the port identification information (i.e., port1) of the local service port recorded in the port migration detection information table shown in table 4, and calculate an MD5 value (i.e., config1_ MD5) by using an MD5 algorithm.
The device 210 may compare the port identification information (port1) of the service port that receives the LLDP packet with the port identification information (i.e., port1) of the local service port recorded in the port migration detection information table shown in table 4, the MD5 value (assumed to be config2_ MD5) in the Configuration MD5 TLV carried in the LLDP packet, and the service Configuration verification information (i.e., def _ config _ MD5) of the opposite service port recorded in the port migration detection information table shown in table 4, and the service Configuration verification information (i.e., config1_ MD5) of the local service port recorded in the port migration detection information table shown in table 4, and when it is found that the port migration detection condition is not satisfied, the device 210 may update the port migration detection information table shown in table 4.
The updated port migration detection information table may be as shown in table 5:
TABLE 5
Figure BDA0002990916550000141
The flow of receiving the LLDP packet may be as shown in fig. 4.
It can be seen from the above description that, in the technical solution provided in the embodiment of the present invention, a port migration detection message is exchanged between devices connected by a service port, and a port migration detection information table is maintained, when a port migration detection message of an opposite device is received, a matching port migration detection information table is queried according to device identification information and a port device identification carried in the port migration detection message, and when a matching port migration detection information table is queried, service configuration synchronization is performed on service ports before and after migration when it is determined that a port migration condition is satisfied according to port identification information of a local service port recorded in the queried matching port migration detection information table, so that automatic migration of the ports is realized, and efficiency and accuracy of port migration are improved.
Referring to fig. 5, a schematic structural diagram of a port migration apparatus according to an embodiment of the present invention is shown in fig. 5, where the port migration apparatus may include:
a receiving unit 510, configured to receive a port migration detection packet sent by an opposite end device; the port migration detection message carries first equipment identification information and first port identification information, wherein the first equipment identification information is used for identifying opposite-end equipment, the first port identification information is used for identifying a first port, and the first port is a service port for sending the port migration detection message;
A table entry maintenance unit 520, configured to query the port migration detection information table according to the first device identification information and the first port identification information; for any local service port of the local service port, the port migration detection information table corresponding to the local service port is used for recording port identification information of an opposite service port establishing service connection with the local service port, equipment identification information of equipment to which the opposite service port belongs, and port identification information of the local service port;
a determining unit 530, configured to determine whether a port migration condition is satisfied according to the second port identification information when the table entry maintaining unit 520 queries the target port migration detection information table matching the first device identification information and the first port identification information; the second port identification information is the port identification information of the local service port recorded in the target port migration detection information table;
a port migration unit 540, configured to, when the determining unit 530 determines that the port migration condition is satisfied, perform service configuration synchronization on the service ports before and after migration.
In some embodiments, the port migration condition is satisfied, including:
the third port identification information is inconsistent with the second port identification information; the third port identification information is used for identifying a third port, and the third port is a service port of the local terminal device which receives the port migration detection message.
In some embodiments, for any local service port of the local device, the port migration detection information table corresponding to the local service port is further configured to record service configuration check information;
the service configuration check information includes service configuration check information of the opposite service port recorded in the port migration detection information table, and satisfies port migration conditions, and further includes:
the second service configuration checking information is consistent with the first service configuration checking information; the port migration detection message also carries first service configuration check information, and the first service configuration check information is determined by the opposite terminal equipment according to the service configuration information of the first port; the second service configuration check information is service configuration check information of an opposite service port recorded in a target port migration detection information table, and the service configuration check information of the opposite service port is determined by the device to which the opposite service port belongs according to the service configuration information of the opposite service port;
and/or the presence of a gas in the gas,
the service configuration check information includes service configuration check information of the local service port recorded in the port migration detection information table, and satisfies a port migration condition, and further includes:
the fourth service configuration verification information is consistent with the fifth service configuration verification information; the fourth service configuration check information is service configuration check information of the second port recorded in the target port migration detection information table, the second port is a local service port identified by the second port identification information, the service configuration check information of the second port is determined by the local terminal device according to the service configuration information of the second port, and the fifth service configuration check information is determined by the local terminal device according to the current service configuration information of the second port.
In some embodiments, the entry maintenance unit 520 is further configured to update, when any one of the information recorded in the target port migration detection information table except for the first device identification information and the first port identification information is changed, the corresponding information recorded in the target port migration detection information table to the changed information.
In some embodiments, the entry maintenance unit 520 is further configured to create a port migration detection information table corresponding to the first device identification information and the first port identification information if the target port migration detection information table is not queried, where the port migration detection information table includes the first device identification information, the first port identification information, and the port identification information of the local service port that receives the port migration detection packet.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
It can be seen from the above embodiments that, port migration detection messages are exchanged between devices with service connections through service ports, and a port migration detection information table is maintained, when a port migration detection message of an opposite device is received, a matching port migration detection information table is queried according to device identification information and port device identification carried in the port migration detection message, and when a port migration condition is determined to be satisfied according to port identification information of a local service port recorded in the queried matching port migration detection information table under the condition that the matching port migration detection information table is queried, service configuration synchronization is performed on the service ports before and after migration, thereby implementing automatic port migration and improving efficiency and accuracy of port migration.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method for port migration, comprising:
receiving a port migration detection message sent by opposite-end equipment; the port migration detection packet carries first device identification information and first port identification information, wherein the first device identification information is used for identifying the opposite terminal device, the first port identification information is used for identifying a first port, and the first port is a service port for sending the port migration detection packet;
inquiring a port migration detection information table according to the first equipment identification information and the first port identification information; for any local service port of the local service port, the port migration detection information table corresponding to the local service port is used for recording port identification information of an opposite service port establishing service connection with the local service port, equipment identification information of equipment to which the opposite service port belongs, and port identification information of the local service port;
When a target port migration detection information table matched with the first equipment identification information and the first port identification information is inquired, determining whether a port migration condition is met or not according to second port identification information; the second port identification information is the port identification information of the local service port recorded in the target port migration detection information table;
and when determining that the port migration condition is met, carrying out service configuration synchronization on the service ports before and after migration.
2. The method of claim 1, wherein satisfying the port migration condition comprises:
the third port identification information is inconsistent with the second port identification information; the third port identification information is used for identifying a third port, and the third port is a service port of the local terminal device which receives the port migration detection message.
3. The method according to claim 2, wherein for any local service port of the local device, the port migration detection information table corresponding to the local service port is further configured to record service configuration check information;
the service configuration check information includes service configuration check information of an opposite service port recorded in the port migration detection information table, and the service configuration check information satisfies the port migration condition, and further includes:
The second service configuration checking information is consistent with the first service configuration checking information; the port migration detection message also carries first service configuration check information, and the first service configuration check information is determined by the opposite terminal device according to the service configuration information of the first port; the second service configuration check information is service configuration check information of the opposite service port recorded in the target port migration detection information table, and the service configuration check information of the opposite service port is determined by the device to which the opposite service port belongs according to the service configuration information of the opposite service port;
and/or the presence of a gas in the gas,
the service configuration check information includes service configuration check information of the local service port recorded in the port migration detection information table, and the service configuration check information satisfies the port migration condition, and further includes:
the fourth service configuration verification information is consistent with the fifth service configuration verification information; the fourth service configuration check information is service configuration check information of a second port recorded in the target port migration detection information table, the second port is a local service port identified by the second port identification information, the service configuration check information of the second port is determined by the local terminal device according to the service configuration information of the second port, and the fifth service configuration check information is determined by the local terminal device according to the current service configuration information of the second port.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
when any one of the information recorded in the target port migration detection information table except for the first device identification information and the first port identification information changes, updating the corresponding information recorded in the target port migration detection information table to the changed information.
5. The method according to claim 1, wherein after querying a port migration detection information table according to the first device identification information and the first port identification information, further comprising:
if the target port migration detection information table is not queried, a port migration detection information table corresponding to the first device identification information and the first port identification information is created, and the port migration detection information table comprises the first device identification information, the first port identification information and port identification information of a local service port receiving the port migration detection message.
6. A port migration apparatus, comprising:
a receiving unit, configured to receive a port migration detection packet sent by an opposite-end device; the port migration detection packet carries first device identification information and first port identification information, wherein the first device identification information is used for identifying the opposite terminal device, the first port identification information is used for identifying a first port, and the first port is a service port for sending the port migration detection packet;
The table entry maintenance unit is used for inquiring a port migration detection information table according to the first equipment identification information and the first port identification information; for any local service port of the local service port, the port migration detection information table corresponding to the local service port is used for recording port identification information of an opposite service port establishing service connection with the local service port, equipment identification information of equipment to which the opposite service port belongs, and port identification information of the local service port;
a determining unit, configured to determine whether a port migration condition is satisfied according to second port identification information when the table entry maintenance unit queries a target port migration detection information table that matches the first device identification information and the first port identification information; the second port identification information is the port identification information of the local service port recorded in the target port migration detection information table;
and the port migration unit is used for carrying out service configuration synchronization on the service ports before and after migration when the determining unit determines that the port migration condition is met.
7. The apparatus of claim 6, wherein the satisfying of the port migration condition comprises:
The third port identification information is inconsistent with the second port identification information; the third port identification information is used for identifying a third port, and the third port is a service port of the local terminal device which receives the port migration detection message.
8. The apparatus according to claim 7, wherein for any local service port of the local device, the port migration detection information table corresponding to the local service port is further configured to record service configuration check information;
the service configuration check information includes service configuration check information of an opposite service port recorded in the port migration detection information table, and the service configuration check information satisfies the port migration condition, and further includes:
the second service configuration checking information is consistent with the first service configuration checking information; the port migration detection message also carries first service configuration check information, and the first service configuration check information is determined by the opposite terminal device according to the service configuration information of the first port; the second service configuration check information is service configuration check information of the opposite service port recorded in the target port migration detection information table, and the service configuration check information of the opposite service port is determined by the device to which the opposite service port belongs according to the service configuration information of the opposite service port;
And/or the presence of a gas in the atmosphere,
the service configuration check information includes service configuration check information of the local service port recorded in the port migration detection information table, and the service configuration check information satisfies the port migration condition, and further includes:
the fourth service configuration checking information is consistent with the fifth service configuration checking information; the fourth service configuration check information is service configuration check information of a second port recorded in the target port migration detection information table, the second port is a local service port identified by the second port identification information, the service configuration check information of the second port is determined by the local terminal device according to the service configuration information of the second port, and the fifth service configuration check information is determined by the local terminal device according to the current service configuration information of the second port.
9. The apparatus according to claim 7 or 8,
the table entry maintenance unit is further configured to update the corresponding information recorded in the target port migration detection information table to changed information when any one of the information recorded in the target port migration detection information table except for the first device identification information and the first port identification information changes.
10. The apparatus of claim 6,
the table entry maintaining unit is further configured to create a port migration detection information table corresponding to the first device identification information and the first port identification information if the target port migration detection information table is not queried, where the port migration detection information table includes the first device identification information, the first port identification information, and port identification information of a local service port that receives the port migration detection packet.
CN202110313576.3A 2021-03-24 2021-03-24 Port migration method and device Active CN113079040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110313576.3A CN113079040B (en) 2021-03-24 2021-03-24 Port migration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110313576.3A CN113079040B (en) 2021-03-24 2021-03-24 Port migration method and device

Publications (2)

Publication Number Publication Date
CN113079040A CN113079040A (en) 2021-07-06
CN113079040B true CN113079040B (en) 2022-07-29

Family

ID=76613691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110313576.3A Active CN113079040B (en) 2021-03-24 2021-03-24 Port migration method and device

Country Status (1)

Country Link
CN (1) CN113079040B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102368836A (en) * 2011-09-23 2012-03-07 烽火通信科技股份有限公司 Method for realizing flexible configuration transference between passive optical network (PON) ports
CN104604182A (en) * 2013-08-13 2015-05-06 华为技术有限公司 Service channel configuration method, optical line terminal and passive optical network
CN111510435A (en) * 2020-03-25 2020-08-07 新华三大数据技术有限公司 Network security policy migration method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8806150B2 (en) * 2011-03-28 2014-08-12 Hitachi, Ltd. Computer system and Fibre Channel migration method
US8995287B2 (en) * 2011-12-09 2015-03-31 Brocade Communication Systems, Inc. AMPP active profile presentation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102368836A (en) * 2011-09-23 2012-03-07 烽火通信科技股份有限公司 Method for realizing flexible configuration transference between passive optical network (PON) ports
CN104604182A (en) * 2013-08-13 2015-05-06 华为技术有限公司 Service channel configuration method, optical line terminal and passive optical network
CN111510435A (en) * 2020-03-25 2020-08-07 新华三大数据技术有限公司 Network security policy migration method and device

Also Published As

Publication number Publication date
CN113079040A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
US20170286158A1 (en) Migration Of Virtual Machines
FI125109B (en) Method for administering network device data and a network management system
CN108259215B (en) Equipment management method and device
CN103516824A (en) Network topology identification method based on IP layer and devices
CN111158865A (en) Method for realizing multiplexing virtual serial port
CN107547374B (en) Aggregation route processing method and device
CN110413629B (en) Method for checking data consistency of heterogeneous database based on log analysis
CN112202678A (en) MAC address synchronization method, system, device and medium
WO2020010906A1 (en) Method and device for operating system (os) batch installation, and network device
US20240106708A1 (en) Fabric availability and synchronization
JP2011044955A (en) Setting change method by network manager equipment and program, control method and program of network equipment, network manager equipment, and network equipment
CN113079040B (en) Port migration method and device
WO2016015606A1 (en) Method for locating port connection error and related device
CN112243139B (en) Program distribution synchronization method and system of multimedia terminal
US10931529B2 (en) Terminal device management method, server, and terminal device for managing terminal devices in local area network
CN115426258B (en) Information configuration method, device, switch and readable storage medium
CN109831339B (en) System log management method and log server
CN108418709B (en) Port aggregation method and device
CN114661231A (en) Storage synchronization method and device for parameter change records of power grid monitoring master station system
CN1330147C (en) Automatic discovering method of resilient packet ring (RPR) equipment
CN114979061B (en) Method, device, equipment and medium for responding ARP (address resolution protocol) of intelligent network card
CN114157555B (en) Access information synchronization method
CN115865844B (en) Virtual-real combined dynamic flow scheduling method and device based on SDN (software defined network) and NDN (non-dynamic network)
CN117421185B (en) Cascade topology structure detection method, system, device and medium
CN112953835B (en) Data transmission method, device and system

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