[go: up one dir, main page]

CN109327393B - Network switching destination port determining method and device and switch based on device - Google Patents

Network switching destination port determining method and device and switch based on device Download PDF

Info

Publication number
CN109327393B
CN109327393B CN201811370028.9A CN201811370028A CN109327393B CN 109327393 B CN109327393 B CN 109327393B CN 201811370028 A CN201811370028 A CN 201811370028A CN 109327393 B CN109327393 B CN 109327393B
Authority
CN
China
Prior art keywords
network
port number
value
destination
comparison value
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
CN201811370028.9A
Other languages
Chinese (zh)
Other versions
CN109327393A (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.)
PLA Information Engineering University
Original Assignee
PLA Information Engineering University
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 PLA Information Engineering University filed Critical PLA Information Engineering University
Priority to CN201811370028.9A priority Critical patent/CN109327393B/en
Publication of CN109327393A publication Critical patent/CN109327393A/en
Application granted granted Critical
Publication of CN109327393B publication Critical patent/CN109327393B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

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

Abstract

本发明属于网络通信技术领域,特别涉及一种网络交换目的端口确定方法、装置及基于该装置的交换机,该方法包含:接收待转发数据帧,并获取数据帧的网络协议类型、目的地址和源端口号,生成包含目的地址和源端口号的对比值;通过对比值获取对应散列值,并以散列值为地址,在预设转发表中读取存储有所述地址的转发表项;提取转发表项中已学习对比值和目标端口号,将所述对比值与所述已学习对比值进行匹配,若匹配成功,则将所述目标端口号作为用于转发所述待转发数据帧的目的端口,若未匹配成功,则输出匹配失败通知。本发明能够缓解现有技术中存在的应用多种网络协议的多个数据帧混合转发时的成本增加问题,进一步提升SDN网络架构中数据通信的性能。

Figure 201811370028

The invention belongs to the technical field of network communication, and in particular relates to a method and a device for determining a destination port of a network switch and a switch based on the device. The method includes: receiving a data frame to be forwarded, and obtaining the network protocol type, destination address and source of the data frame. port number, generating a comparison value including the destination address and the source port number; obtaining the corresponding hash value through the comparison value, and using the hash value as the address, read the forwarding table entry that stores the address in the preset forwarding table; Extract the learned contrast value and the target port number in the forwarding entry, match the contrast value with the learned contrast value, and if the match is successful, use the target port number as the data frame for forwarding the to-be-forwarded data frame If the destination port is not successfully matched, a matching failure notification will be output. The invention can alleviate the problem of cost increase in the mixed forwarding of multiple data frames applying multiple network protocols in the prior art, and further improve the performance of data communication in the SDN network architecture.

Figure 201811370028

Description

Network switching destination port determining method and device and switch based on device
Technical Field
The invention belongs to the technical field of network communication, and particularly relates to a method and a device for determining a network switching destination port and a switch based on the device.
Background
The forwarding table, also called forwarding database or routing directory. The bridge depends on a forwarding table to forward frames, the forwarding table is one of core components frequently used by a two-layer network switching chip, the design of the forwarding table is only specific to a certain network protocol or a certain application scenario, for example, the mac forwarding table is only suitable for forwarding of the two layers of the ethernet, and the forwarding of other protocol frames cannot be realized.
Software Defined Networking (SDN), which is a novel Network innovation architecture of the Emulex Network, is an implementation manner of Network virtualization, and its core technology OpenFlow separates a control plane and a data plane of a Network device, thereby implementing flexible control of Network traffic and making the Network become more intelligent as a pipeline. The SDN network may separate the control function and the forwarding function of the network device, so that the control function is all centralized on a remote controller, and the network device is only responsible for forwarding data. Therefore, forwarding of hybrid network protocol data frames can be achieved by using the SDN switch. However, applying the SDN network requires changing an existing network structure, which results in an increase in cost when multiple data frames applying multiple network protocols are mixed and forwarded.
Disclosure of Invention
Therefore, the invention provides a method and a device for determining a network switching destination port and a switch based on the device, so as to solve the problem of cost increase in the prior art when a plurality of data frames applying various network protocols are mixed and forwarded, and further improve the performance of data communication in an SDN network architecture.
According to the design scheme provided by the invention, the method for determining the network switching destination port comprises the following contents:
receiving a data frame to be forwarded, acquiring a network protocol type, a destination address and a source port number of the data frame, and generating a comparison value containing the destination address and the source port number;
obtaining a corresponding hash value through the comparison value, taking the hash value as an address, and reading a forwarding table entry storing the address in a preset forwarding table;
and extracting a learned contrast value and a target port number in a forwarding table item, matching the contrast value with the learned contrast value, if the matching is successful, taking the target port number as a target port for forwarding the data frame to be forwarded, and if the matching is not successful, outputting a matching failure notice.
In the foregoing, according to a comparison value generation rule corresponding to the network protocol type, a comparison value including a destination address and a source port number is generated, and at least a destination address storage corresponding to the network protocol type of an ethernet protocol, a RapidIO protocol, and a fibre channel Fiber channel protocol is preset in the comparison value generation rule.
As described above, the comparison value is calculated using a hash value algorithm to obtain a corresponding hash value.
Preferably, the hash value algorithm is a CRC32 algorithm, or a CRC16 algorithm, or a modulo operation.
In the foregoing, the preset forwarding table includes a plurality of forwarding table entries, and each forwarding table entry at least includes the learned comparison value and the destination port number.
Preferably, the learned comparison value bit width is 49 bits, and the bit width of the destination port number in the forwarding table entry is determined by the number of the destination port.
The network exchange destination port determining device comprises a generating module, a reading module and a matching module, wherein,
the generation module is used for receiving the data frame to be forwarded, acquiring the network protocol type, the destination address and the source port number of the data frame and generating a comparison value containing the destination address and the source port number;
the reading module is used for acquiring a corresponding hash value through the comparison value, taking the hash value as an address and reading a forwarding table item in which the address is stored in a preset forwarding table;
and the matching module is used for extracting the learned comparison value and the target port number in the forwarding table entry, matching the comparison value with the learned comparison value, if the matching is successful, using the target port number as a target port for forwarding the data frame to be forwarded, and if the matching is not successful, outputting a matching failure notice.
In the above apparatus, the generation module generates a comparison value including a destination address and a source port number according to a comparison value generation rule corresponding to the network protocol type, where the comparison value generation rule is a preset content, and at least a destination address storage corresponding to the network protocol type respectively being an ethernet protocol, a RapidIO protocol, and a Fiber channel protocol is preset in the comparison value generation rule.
In the above device, the reading module comprises a plurality of reading sub-modules, each reading sub-module is connected with the generating module and the matching module, each reading sub-module comprises a hash function generating sub-module and a table entry reading sub-module, wherein,
the hash function generation submodule is used for calculating the received comparison value by using a hash value algorithm, acquiring a corresponding hash value and feeding back the corresponding hash value to the table entry reading submodule;
and the table entry reading sub-module is used for reading the forwarding table entry stored with the address in a preset forwarding table according to the received hash value and by taking the hash value as the address.
A switch, comprising the following: a parsing means, a port determining means and a switching means, wherein,
the analysis device is used for sending the data frame to be forwarded obtained by analysis to the port determination device;
the port determining device is used for extracting a destination port number according to the received data frame and sending the destination port number to the switching device;
the switching device is used for forwarding the received data frame to be forwarded by the network according to the destination port number;
the port determining device is realized by adopting the network switching destination port determining device.
The invention has the beneficial effects that:
in the network data forwarding process, the invention outputs the target port number by comparing the value generation, the matching and the table item determination, relieves the problem of cost increase when a plurality of data frames applying a plurality of network protocols are mixed and forwarded in the prior art, can simultaneously support the forwarding table look-up process of a plurality of data frames applying a plurality of network protocols, and further determines the target port number for forwarding the data frame to be forwarded, the target port determination device can be applied to the nodes of the existing network structure, does not need to change the existing whole network structure, avoids the problem of cost increase when a plurality of data frames applying a plurality of network protocols are mixed and forwarded due to the change of the existing network structure, achieves the technical effect of reducing the cost when a plurality of data frames applying a plurality of network protocols are mixed and forwarded, and improves the data communication performance in an SDN network architecture, the method has important guiding significance for SDN network architecture technology and development.
Description of the drawings:
figure 1 is a schematic diagram of an SDN network architecture in an embodiment;
FIG. 2 is a schematic flow chart of the determination method in the embodiment;
FIG. 3 is a schematic diagram of a determining apparatus according to an embodiment;
FIG. 4 is a second schematic diagram of the determining apparatus in the embodiment;
FIG. 5 is a second schematic diagram of the determining apparatus in the embodiment;
fig. 6 is a schematic diagram of an embodiment of a switch.
The specific implementation mode is as follows:
in order to make the objects, technical solutions and advantages of the present invention clearer and more obvious, the present invention is further described in detail below with reference to the accompanying drawings and technical solutions.
At present, a forwarding table is one of core components frequently used by a two-layer network switching chip, and the design of the forwarding table is only directed at a certain network protocol or a certain application scenario, for example, a mac forwarding table is only suitable for forwarding of an ethernet two-layer, and forwarding of other protocol frames cannot be realized. The SDN network may separate the control function and the forwarding function of the network device, so that the control function is all centralized on a remote controller, and the network device is only responsible for forwarding data. As shown in fig. 1, the SDN network architecture includes one controller and three network devices for illustration. In fig. 1, the SDN network structure includes: a controller 14 and three network devices, which are respectively: network device 11, network device 12, and network device 13. The network device 11, the network device 12, and the network device 13 communicate with each other. The controller 14 remotely controls the network device 11, the network device 12, and the network device 13, respectively. Network device 11, network device 12, and network device 13 are responsible only for forwarding of data. For example, the controller 14 may control the network device 11 to support an ethernet network protocol, may also control the network device 11 to support a RapidIO protocol, and may also control the network device 11 to support a Fiber channel protocol. Therefore, forwarding of hybrid network protocol data frames can be achieved by using the SDN switch. However, in view of the problem that the cost is increased when multiple data frames applying multiple network protocols are mixed and forwarded due to the fact that an existing network structure needs to be changed when an SDN network is applied, an embodiment of the present invention, as shown in fig. 2, provides a method for determining a port of a network switch destination, which includes the following contents:
s101, receiving a data frame to be forwarded, acquiring a network protocol type, a destination address and a source port number of the data frame, and generating a comparison value containing the destination address and the source port number;
s102, obtaining a corresponding hash value through the comparison value, taking the hash value as an address, and reading a forwarding table entry storing the address in a preset forwarding table;
s103, extracting a learned contrast value and a target port number in a forwarding table entry, matching the contrast value with the learned contrast value, if the matching is successful, taking the target port number as a target port for forwarding the data frame to be forwarded, and if the matching is not successful, outputting a matching failure notice.
Aiming at the mixed forwarding of a plurality of data frames applying various network protocols in an SDN network architecture, the target port number is output through contrast value generation, matching and table item determination, the technical problem of cost increase in the prior art when the plurality of data frames applying various network protocols are mixed and forwarded can be effectively solved, and the technical effect of reducing the cost in the mixed forwarding of the plurality of data frames applying various network protocols is achieved.
In another embodiment of the present invention, a comparison value including a destination address and a source port number is generated according to a comparison value generation rule corresponding to the network protocol type, and at least a destination address storage corresponding to the network protocol type of the ethernet protocol, the RapidIO protocol, and the fibre channel Fiber protocol is preset in the comparison value generation rule. And if the network protocol type is the Ethernet protocol, the destination address is the destination MAC address. And if the network protocol type is a RapidIO protocol, the destination address is a RapidIO destination ID address. And if the network protocol type is the Fiber channel protocol, the destination address is the Fiber channel destination ID address. Illustratively, the bit width of the comparison value may be 49 bits, and by presetting a plurality of comparison value generation rules, the plurality of comparison value generation rules may be as shown in table 1.
TABLE 1
Figure BDA0001869552910000051
As can be seen from table 1, if the network protocol type is ethernet protocol, bits 1 to 48 of the comparison value can be used to store the destination address, and bit 49 of the comparison value can be used to store the number 0; if the network protocol type is RapidIO protocol, bits 1 to 16 of the comparison value may be used to store the destination address, bits 17 to 32 of the comparison value may each be used to store a number 0, bits 33 to 47 of the comparison value may be used to store the source port number, bits 48 of the comparison value may be used to store a number 0, and bits 49 of the comparison value may be used to store a number 1; if the network protocol type is the Fiber channel protocol, bits 1 to 32 of the comparison value may be used to store the destination address, bits 33 to 47 of the comparison value may be used to store the source port number, bit 48 of the comparison value may be used to store the number 1, and bit 49 of the comparison value may be used to store the number 1.
For the generated comparison value, in another embodiment of the present invention, the comparison value is calculated by a hash value algorithm to obtain a corresponding hash value. And processing the comparison value by using a preset hash value algorithm to obtain a hash value. Preferably, the hash value algorithm may be the CRC32 algorithm or the CRC16 algorithm, or other methods of calculating hash values, such as: and (5) performing remainder operation.
Further, in the embodiment of the present invention, the preset forwarding table may include a plurality of forwarding table entries, where each forwarding table entry includes at least a learned comparison value and a destination port number. Preferably, the learned comparison value bit width is 49 bits, and the bit width of the destination port number in the forwarding table entry is determined by the number of the destination port. Illustratively, if the number of destination ports is greater than 2N-1And is less than or equal to 2NAnd if N is a positive integer, the bit width of the destination port number in the forwarding table entry is N bits. For example, if the number of destination ports is 15, 2 can be obtained3<15<24Therefore, the bit width of the destination port number in the forwarding table entry is 4 bits. Thus, the bit width of the forwarding entry is 53 bits (bit width of the learned comparison value plus the bit width of the destination port number).
Based on the port determination method, an embodiment of the present invention further provides a device for determining a port of a network switch destination, as shown in fig. 3, which includes a generating module 101, a reading module 102, and a matching module 103, wherein,
a generating module 101, configured to receive a data frame to be forwarded, obtain a network protocol type, a destination address, and a source port number of the data frame, and generate a comparison value including the destination address and the source port number;
the reading module 102 is configured to obtain a corresponding hash value through the comparison value, and read a forwarding table entry storing the address in a preset forwarding table by using the hash value as the address;
a matching module 103, configured to extract a learned comparison value and a target port number in a forwarding entry, match the comparison value with the learned comparison value, if matching is successful, use the target port number as a target port for forwarding the data frame to be forwarded, and if not matching is successful, output a matching failure notification.
The port determination device is applied to the nodes of the network structure by redefining the contents of the forwarding table entries, the forwarding table look-up process of a plurality of data frames applying various network protocols can be realized without changing the existing whole network structure, and the method has the advantages of strong universality, easiness in transplanting, easiness in realizing and light weight. Meanwhile, the existing whole network structure is prevented from being changed, so that the deployment is very convenient, and the time cost and the labor cost are saved.
Further, in the above apparatus, in the generating module 101, a comparison value including a destination address and a source port number is generated according to a comparison value generating rule corresponding to the network protocol type, where the comparison value generating rule is a preset content, and at least destination address storages corresponding to network protocol types, respectively, an ethernet protocol, a RapidIO protocol, and a Fiber channel protocol are preset in the comparison value generating rule.
Further, as shown in fig. 4, the reading module 102 includes a plurality of reading sub-modules, such as 23, 24, and 25 in the figure, each of which is connected to the generating module 21 and the matching module 22, and each of which includes a hash function generating sub-module (such as 31, 33, 35 in the figure) and an entry reading sub-module (such as 32, 34, 36 in the figure), wherein,
the hash function generation submodule is used for calculating the received comparison value by using a hash value algorithm, acquiring a corresponding hash value and feeding back the corresponding hash value to the table entry reading submodule;
and the table entry reading sub-module is used for reading the forwarding table entry stored with the address in a preset forwarding table according to the received hash value and by taking the hash value as the address.
In the embodiment of the port determination device, the generation module is configured to receive an a network protocol type, a destination address, and a source port number of a data frame to be forwarded, and generate a comparison value including the destination address and the source port number according to a comparison value generation rule corresponding to the a network protocol type; and meanwhile, the device is also used for receiving the type of the B network protocol, the destination address and the source port number of the data frame to be forwarded, and generating a comparison value containing the destination address and the source port number according to a comparison value generation rule corresponding to the type of the B network protocol. The method and the device realize the forwarding table look-up process of simultaneously supporting a plurality of data frames applying a plurality of network protocols, and further determine the destination port number for forwarding the data frame to be forwarded, and the destination port determining device can be applied to the nodes of the existing network structure without changing the existing whole network structure, so the problem of cost increase caused by changing the existing network structure when a plurality of data frames applying a plurality of network protocols are mixed and forwarded is avoided, therefore, the technical problem of cost increase caused by the fact that the plurality of data frames applying a plurality of network protocols are mixed and forwarded in the prior art is relieved, and the technical effect of reducing the cost when a plurality of data frames applying a plurality of network protocols are mixed and forwarded is achieved. Further, referring to fig. 5, it is described that the port determination apparatus includes three reading modules, i.e., table entry determination units in the figure, and the comparison value generation module 21, the matching module 22 and three table entry determination units; the three table entry determination units are respectively: an entry determination unit 23, an entry determination unit 24, and an entry determination unit 26. The entry determination unit 23 may include: a hash function generation submodule 31 and a reading submodule 32. The entry determination unit 24 may include: a hash function generation submodule 33 and a reading submodule 34. The entry determination unit 26 may include: a hash function generation submodule 37 and a reading submodule 38.
Based on the above port determination apparatus, the present invention further provides a switch, as shown in fig. 6, including the following: parsing means 41, port determination means 42 and switching means 43, wherein,
the analyzing device 41 is configured to send the data frame to be forwarded obtained through analysis to the port determining device;
port determining means 42 for extracting a destination port number according to the received data frame and sending the destination port number to the switching means;
a switching device 43, configured to perform network forwarding on the received data frame to be forwarded according to the destination port number;
the port determining device 41 is implemented by using the port determining device for network switching destination in the above embodiment, thereby fulfilling the mixed forwarding requirement of multiple data frames of multiple network protocols in the SDN network architecture, reducing the deployment cost of the SDN network, being easy to implement, having strong versatility and easy to transplant, avoiding the overall change of the existing network structure, and saving labor and time costs.
Unless specifically stated otherwise, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In all examples shown and described herein, any particular value should be construed as merely exemplary, and not as a limitation, and thus other examples of example embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1.一种网络交换目的端口确定方法,其特征在于,包含如下内容:1. a network switching destination port determination method, is characterized in that, comprises the following content: 接收待转发数据帧,并获取数据帧的网络协议类型、目的地址和源端口号,生成包含目的地址和源端口号的对比值;Receive the data frame to be forwarded, and obtain the network protocol type, destination address and source port number of the data frame, and generate a comparison value including the destination address and the source port number; 通过对比值获取对应散列值,并以散列值为地址,在预设转发表中读取存储有所述散列值的地址的转发表项;Obtain the corresponding hash value by comparing the value, and use the hash value as the address to read the forwarding table entry storing the address of the hash value in the preset forwarding table; 提取转发表项中已学习对比值和目标端口号,将所述对比值与所述已学习对比值进行匹配,若匹配成功,则将所述目标端口号作为用于转发所述待转发数据帧的目的端口,若未匹配成功,则输出匹配失败通知;Extract the learned contrast value and the target port number in the forwarding entry, match the contrast value with the learned contrast value, and if the match is successful, use the target port number as the data frame for forwarding the to-be-forwarded data frame The destination port of , if the match is not successful, a match failure notification will be output; 按照与所述网络协议类型对应的对比值生成规则,生成包含目的地址和源端口号的对比值,该对比值生成规则中至少预设有网络协议类型为以太网协议、RapidIO协议和光纤通道Fiber channel协议相对应的目的地址存储;According to the comparison value generation rule corresponding to the network protocol type, a comparison value including the destination address and the source port number is generated. The comparison value generation rule at least presets the network protocol types as Ethernet protocol, RapidIO protocol and Fibre Channel Fiber. The destination address corresponding to the channel protocol is stored; 预设转发表中包含多个转发表项,每个转发表项中至少包括已学习对比值和目的端口号。The preset forwarding table includes multiple forwarding table entries, and each forwarding table entry at least includes a learned comparison value and a destination port number. 2.根据权利要求1所述的网络交换目的端口确定方法,其特征在于,利用散列值算法对对比值进行计算来获取对应散列值。2 . The method for determining a destination port of a network switch according to claim 1 , wherein the corresponding hash value is obtained by calculating the comparison value using a hash value algorithm. 3 . 3.根据权利要求2所述的网络交换目的端口确定方法,其特征在于,所述散列值算法为CRC32算法,或为CRC16算法,或为求余运算。3 . The method for determining a destination port of a network switch according to claim 2 , wherein the hash value algorithm is a CRC32 algorithm, or a CRC16 algorithm, or a remainder operation. 4 . 4.根据权利要求1所述的网络交换目的端口确定方法,其特征在于,已学习对比值位宽为49位,目的端口号在所述转发表项中的位宽由目的端口数量确定。4 . The method for determining a destination port of a network switch according to claim 1 , wherein the bit width of the learned comparison value is 49 bits, and the bit width of the destination port number in the forwarding table entry is determined by the number of destination ports. 5 . 5.一种网络交换目的端口确定装置,其特征在于,包含生成模块、读取模块和匹配模块,其中,5. A network switching destination port determination device, characterized in that, comprising a generating module, a reading module and a matching module, wherein, 生成模块,用于接收待转发数据帧,并获取数据帧的网络协议类型、目的地址和源端口号,生成包含目的地址和源端口号的对比值;The generation module is used to receive the data frame to be forwarded, obtain the network protocol type, destination address and source port number of the data frame, and generate a comparison value including the destination address and the source port number; 读取模块,用于通过对比值获取对应散列值,并以散列值为地址,在预设转发表中读取存储有所述散列值的地址的转发表项;a reading module, configured to obtain the corresponding hash value by comparing the value, and use the hash value as the address to read the forwarding table entry storing the address of the hash value in the preset forwarding table; 匹配模块,用于提取转发表项中已学习对比值和目标端口号,将所述对比值与所述已学习对比值进行匹配,若匹配成功,则将所述目标端口号作为用于转发所述待转发数据帧的目的端口,若未匹配成功,则输出匹配失败通知;The matching module is used to extract the learned contrast value and the target port number in the forwarding entry, and match the contrast value with the learned contrast value. Describe the destination port of the data frame to be forwarded, if no match is successful, output a match failure notification; 生成模块中,按照与所述网络协议类型对应的对比值生成规则,生成包含目的地址和源端口号的对比值,对比值生成规则为预先设定内容,该对比值生成规则中至少预设有网络协议类型分别为以太网协议、RapidIO协议和光纤通道Fiber channel协议相对应的目的地址存储;In the generation module, according to the comparison value generation rule corresponding to the network protocol type, a comparison value including the destination address and the source port number is generated, the comparison value generation rule is preset content, and the comparison value generation rule at least presets. The network protocol types are the destination address storage corresponding to the Ethernet protocol, the RapidIO protocol and the Fiber channel protocol; 预设转发表中包含多个转发表项,每个转发表项中至少包括已学习对比值和目的端口号。The preset forwarding table includes multiple forwarding table entries, and each forwarding table entry at least includes a learned comparison value and a destination port number. 6.根据权利要求5所述的网络交换目的端口确定装置,其特征在于,读取模块中包含多个读取子模块,每个读取子模块均与生成模块和匹配模块连接,每个读取子模块包含哈希函数生成子模块和表项读取子模块,其中,6. The network switching destination port determination device according to claim 5, wherein the reading module comprises a plurality of reading submodules, and each reading submodule is connected with the generating module and the matching module, and each reading submodule is connected with the generating module and the matching module. The fetch submodule includes a hash function generation submodule and a table entry reading submodule, among which, 哈希函数生成子模块,用于利用散列值算法对接收到的对比值进行计算,获取对应散列值并反馈给表项读取子模块;The hash function generation sub-module is used to calculate the received comparison value by using the hash value algorithm, obtain the corresponding hash value and feed it back to the table entry reading sub-module; 表项读取子模块,用于根据接收到的散列值并以散列值为地址,在预设转发表中读取存储有所述地址的转发表项。The entry reading sub-module is configured to read the forwarding table entry storing the address in the preset forwarding table according to the received hash value and using the hash value as the address. 7.一种交换机,其特征在于,包含如下内容:解析装置、端口确定装置和交换装置,其中,解析装置,用于将解析得到的待转发数据帧发送给端口确定装置;7. A switch, characterized in that it comprises the following content: a parsing device, a port determining device, and a switching device, wherein the parsing device is used to send the parsed data frame to be forwarded to the port determining device; 端口确定装置,用于依据接收到的数据帧提取其目的端口号并发送给交换装置;a port determining device, used for extracting the destination port number according to the received data frame and sending it to the switching device; 交换装置,用于按照目的端口号将接收到的待转发数据帧进行网络转发;a switching device, used for network forwarding the received data frame to be forwarded according to the destination port number; 端口确定装置,采用权利要求5所述的网络交换目的端口确定装置实现。The port determination device is implemented by the network switching destination port determination device of claim 5 .
CN201811370028.9A 2018-11-17 2018-11-17 Network switching destination port determining method and device and switch based on device Active CN109327393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811370028.9A CN109327393B (en) 2018-11-17 2018-11-17 Network switching destination port determining method and device and switch based on device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811370028.9A CN109327393B (en) 2018-11-17 2018-11-17 Network switching destination port determining method and device and switch based on device

Publications (2)

Publication Number Publication Date
CN109327393A CN109327393A (en) 2019-02-12
CN109327393B true CN109327393B (en) 2021-01-22

Family

ID=65258313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811370028.9A Active CN109327393B (en) 2018-11-17 2018-11-17 Network switching destination port determining method and device and switch based on device

Country Status (1)

Country Link
CN (1) CN109327393B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113206807B (en) * 2020-01-31 2022-12-09 伊姆西Ip控股有限责任公司 Method for information processing, electronic device, and computer storage medium
CN114500654B (en) * 2022-02-23 2024-03-22 石家庄通合电子科技股份有限公司 Data forwarding device, power module and data forwarding method
CN114244702B (en) * 2022-02-23 2022-05-31 苏州浪潮智能科技有限公司 Switch configuration management method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827038A (en) * 2010-05-24 2010-09-08 杭州华三通信技术有限公司 Distributed equipment and method for forwarding message in distributed equipment
CN102664816A (en) * 2012-05-30 2012-09-12 迈普通信技术股份有限公司 Device and method for quickly searching MPLS (multi-protocol label switching) forwarding database
CN102957600A (en) * 2011-08-19 2013-03-06 中兴通讯股份有限公司 Method and device for data message forwarding
CN104168201A (en) * 2014-08-06 2014-11-26 福建星网锐捷网络有限公司 Multipath forwarding method and device
CN108521378A (en) * 2018-04-23 2018-09-11 天津芯海创科技有限公司 Heterogeneous protocol message forwarding method, device and network switching equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015039699A1 (en) * 2013-09-20 2015-03-26 Nokia Solutions And Networks Management Gmbh Handling of signaling messages on the data plane in a software-defined architecture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827038A (en) * 2010-05-24 2010-09-08 杭州华三通信技术有限公司 Distributed equipment and method for forwarding message in distributed equipment
CN102957600A (en) * 2011-08-19 2013-03-06 中兴通讯股份有限公司 Method and device for data message forwarding
CN102664816A (en) * 2012-05-30 2012-09-12 迈普通信技术股份有限公司 Device and method for quickly searching MPLS (multi-protocol label switching) forwarding database
CN104168201A (en) * 2014-08-06 2014-11-26 福建星网锐捷网络有限公司 Multipath forwarding method and device
CN108521378A (en) * 2018-04-23 2018-09-11 天津芯海创科技有限公司 Heterogeneous protocol message forwarding method, device and network switching equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"The research on Designs of Multiple Flow Table in the OpenFlow Protocol";LigangDong等;《IEEE》;20181011;全文 *
"基于多协议的端口转发技术研究";陈伟宏等;《控制工程》;20130731;第20卷(第4期);全文 *

Also Published As

Publication number Publication date
CN109327393A (en) 2019-02-12

Similar Documents

Publication Publication Date Title
US9215172B2 (en) Hashing-based routing table management
KR102205882B1 (en) System and method for routing traffic between distinct infiniband subnets based on fat-tree routing
US9143441B2 (en) Sliced routing table management
US9197539B2 (en) Multicast miss notification for a distributed network switch
US8792494B2 (en) Facilitating insertion of device MAC addresses into a forwarding database
US9231781B2 (en) Flow distribution algorithm for aggregated links in an ethernet switch
US9246802B2 (en) Management of routing tables shared by logical switch partitions in a distributed network switch
US20180019943A1 (en) Technologies for distributed routing table lookup
CN109327393B (en) Network switching destination port determining method and device and switch based on device
US9203699B2 (en) Constructing and verifying switch fabric cabling schemes
US8817796B2 (en) Cached routing table management
EP3607696A1 (en) Digital signature systems and methods for network path trace
CN103931147A (en) Path Diversity in Connection-Oriented Networks
US11159427B2 (en) Single lookup entry for symmetric flows
CN113132501A (en) System, method, device and medium for managing multiple optical transport network devices by single IP address
US20240297845A1 (en) Encoding Source Routes Using MPLS Sub-Labels
JP2021508212A (en) Network communication method and equipment
CN105227452B (en) data frame forwarding method and device
JP6418167B2 (en) Network control device, network system, network control method, and program
CN116828050A (en) Collective communication method, network card, network equipment and storage medium

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