[go: up one dir, main page]

CN116599836A - A data forwarding method, device, computer equipment and medium - Google Patents

A data forwarding method, device, computer equipment and medium Download PDF

Info

Publication number
CN116599836A
CN116599836A CN202310607895.4A CN202310607895A CN116599836A CN 116599836 A CN116599836 A CN 116599836A CN 202310607895 A CN202310607895 A CN 202310607895A CN 116599836 A CN116599836 A CN 116599836A
Authority
CN
China
Prior art keywords
data
port
network
driver
data forwarding
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.)
Pending
Application number
CN202310607895.4A
Other languages
Chinese (zh)
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.)
Beijing L&s Lancom Platform Tech Co ltd
Original Assignee
Beijing L&s Lancom Platform Tech 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 Beijing L&s Lancom Platform Tech Co ltd filed Critical Beijing L&s Lancom Platform Tech Co ltd
Priority to CN202310607895.4A priority Critical patent/CN116599836A/en
Publication of CN116599836A publication Critical patent/CN116599836A/en
Pending legal-status Critical Current

Links

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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0847Transmission error
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level

Landscapes

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

Abstract

本公开的实施例提供一种数据转发方法、装置、计算机设备和介质,包括:配置网络数据转发信息,网络数据转发信息用于实现网关设备与交换机之间的数据通达;在配置网络数据转发信息之后,基于网络数据转发信息,将网关设备的网络数据转发至交换机。从而,有效实现数据转发。

Embodiments of the present disclosure provide a data forwarding method, device, computer equipment, and medium, including: configuring network data forwarding information, the network data forwarding information is used to realize data communication between a gateway device and a switch; configuring network data forwarding information Afterwards, based on the network data forwarding information, the network data of the gateway device is forwarded to the switch. Thus, data forwarding is effectively realized.

Description

Data forwarding method, device, computer equipment and medium
Technical Field
Embodiments of the present disclosure relate to the field of data processing technologies, and in particular, to a data forwarding method, apparatus, computer device, and medium.
Background
The switch is a network device for forwarding an electrical (optical) signal, the gateway is a device for connecting two networks, and the gateway can move data between different protocols, such as an IP gateway. When data forwarding is carried out between the two, the data forwarding is realized through a plurality of network interfaces of the gateway equipment.
However, the data forwarding process is complex and not efficient.
Disclosure of Invention
Embodiments described herein provide a data forwarding method, apparatus, computer device, and medium that overcome the above-described problems.
According to a first aspect of the present disclosure, there is provided a data forwarding method, including:
configuring network data forwarding information, wherein the network data forwarding information is used for realizing data access between gateway equipment and a switch;
and after the network data forwarding information is configured, forwarding the network data of the gateway device to the switch based on the network data forwarding information.
In an alternative manner, the configuring the network data forwarding information includes:
initializing an intranet port and an extranet port;
setting a data tag of the internal network port and a data tag of the external network port based on a preset communication protocol, wherein the data tag is used for describing port inlet and outlet indication information;
configuring the IP address of the intranet port and the IP address of the extranet port;
configuring a working mode of the intranet port and a working mode of the extranet port, wherein the working modes comprise: full duplex mode and half duplex mode.
In an alternative manner, the method further comprises:
detecting the connection state of the intranet port and the connection state of the extranet port;
and when the connection state of the internal network port and the connection state of the external network port are determined to be connected, counting the number of packets and the type of error packets in the process of forwarding the network data of the gateway equipment to the switch.
In an alternative manner, the initializing the intranet port and the extranet port includes:
determining a data port of the gateway device;
setting a preset first number of data ports in the data ports of the gateway equipment as the intranet ports and the rest data ports as the extranet ports;
or, setting the preset second number of data ports in the data ports of the gateway device as the external network ports, and setting the rest data ports as the internal network ports.
In an alternative manner, the configuring the network data forwarding information includes:
in the system of the gateway device, a first driver is mounted, wherein the first driver is used for describing a driving switch controller;
a second driver is mounted and an MDIO tool is integrated into the second driver.
In an alternative manner, the configuring the network data forwarding information includes:
introducing multiple paths of input/output respectively mode MDC signal lines and MDIO signal lines;
mounting a third driver in the system of the gateway device to access a switch chip register;
and mounting a fourth driver and a fifth driver, wherein the fourth driver and the fifth driver both depend on a sixth driver, and the sixth driver is used for realizing the function driving of the switch.
In an alternative manner, the method further comprises:
acquiring the number of packets and the type of error packets in the process of forwarding the network data of the gateway equipment to the switch;
and processing forwarding abnormality of the network data based on the packet number and the error packet type.
In a second aspect, according to the present disclosure, there is provided a data forwarding apparatus, including:
the configuration module is used for configuring network data forwarding information, and the network data forwarding information is used for realizing data access between gateway equipment and a switch;
and the forwarding module is used for forwarding the network data of the gateway equipment to the switch based on the network data forwarding information after the network data forwarding information is configured.
In an alternative manner, the configuration module is specifically configured to:
initializing an intranet port and an extranet port;
setting a data tag of the internal network port and a data tag of the external network port based on a preset communication protocol, wherein the data tag is used for describing port inlet and outlet indication information;
configuring the IP address of the intranet port and the IP address of the extranet port;
configuring a working mode of the intranet port and a working mode of the extranet port, wherein the working modes comprise: full duplex mode and half duplex mode.
In an alternative manner, the method further comprises: the device comprises a detection module and a statistics module.
The detection module is used for detecting the connection state of the intranet port and the connection state of the extranet port;
and the statistics module is used for counting the number of packets and the type of error packets in the process of forwarding the network data of the gateway equipment to the switch when the connection state of the intranet port and the connection state of the extranet port are determined to be connected.
In an alternative manner, the configuration module is specifically configured to:
determining a data port of the gateway device;
setting a preset first number of data ports in the data ports of the gateway equipment as the intranet ports and the rest data ports as the extranet ports;
or, setting the preset second number of data ports in the data ports of the gateway device as the external network ports, and setting the rest data ports as the internal network ports.
In an alternative manner, the configuration module is specifically configured to:
in the system of the gateway device, a first driver is mounted, wherein the first driver is used for describing a driving switch controller;
a second driver is mounted and an MDIO tool is integrated into the second driver.
In an alternative manner, the configuration module is specifically configured to:
introducing multiple paths of input/output respectively mode MDC signal lines and MDIO signal lines;
mounting a third driver in the system of the gateway device to access a switch chip register;
and mounting a fourth driver and a fifth driver, wherein the fourth driver and the fifth driver both depend on a sixth driver, and the sixth driver is used for realizing the function driving of the switch.
In an alternative manner, the method further comprises: an acquisition module and a processing module.
The acquisition module is used for acquiring the number of packets and the type of error packets in the process that the network data of the gateway equipment is forwarded to the switch;
and the processing module is used for processing the forwarding exception of the network data based on the packet number and the error packet type.
In a third aspect, a computer device is provided, comprising a memory in which a computer program is stored, and a processor implementing the steps of the data forwarding method as in any of the above embodiments when the computer program is executed.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the data forwarding method as in any of the above embodiments.
The data forwarding method provided by the embodiment of the application configures network data forwarding information, wherein the network data forwarding information is used for realizing data access between gateway equipment and a switch; after the network data forwarding information is configured, the network data of the gateway device is forwarded to the switch based on the network data forwarding information. Thus, through the configured network data forwarding information, the data access between the gateway equipment and the switch is effectively realized.
The foregoing description is only an overview of the technical solutions of the embodiments of the present application, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present application can be more clearly understood, and the following specific embodiments of the present application are given for clarity and understanding.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following brief description of the drawings of the embodiments will be given, it being understood that the drawings described below relate only to some embodiments of the present disclosure, not to limitations of the present disclosure, in which:
fig. 1 is a schematic flow chart of a data forwarding method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a data forwarding device according to an embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the disclosure.
It is noted that the elements in the drawings are schematic and are not drawn to scale.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. It will be apparent that the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments, which can be made by those skilled in the art based on the described embodiments of the present disclosure without the need for creative efforts, are also within the scope of the protection of the present disclosure.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the presently disclosed subject matter belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the specification and relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein. As used herein, a statement that two or more parts are "connected" or "coupled" together shall mean that the parts are joined together either directly or joined through one or more intermediate parts.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of the phrase "an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: there are three cases, a, B, a and B simultaneously. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Terms such as "first" and "second" are used merely to distinguish one component (or portion of a component) from another component (or another portion of a component).
In the description of the present application, unless otherwise indicated, the meaning of "plurality" means two or more (including two), and similarly, "plural sets" means two or more (including two).
In order to make the person skilled in the art better understand the solution of the present application, the technical solution of the embodiment of the present application will be clearly and completely described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a data forwarding method according to an embodiment of the present disclosure, and as shown in fig. 1, a specific process of the data forwarding method includes:
s110, configuring network data forwarding information.
Wherein the network data forwarding information may be used to enable data access between the gateway device and the switch.
For example, the network data forwarding information may include: upstream port information, downstream port information, forwarding protocols, network protocol (Internet Protocol, IP) addresses, port modes of operation or drivers, etc.
It should be noted that the network data forwarding information may include, but is not limited to, the foregoing: upstream port information, downstream port information, forwarding protocol, network protocol (Internet Protocol, IP) address, port mode of operation, and driver.
And S120, after the network data forwarding information is configured, forwarding the network data of the gateway equipment to the switch based on the network data forwarding information.
After the network data forwarding information is configured successfully, the network data forwarding of the gateway device can be realized to the switch on the basis of the configured network data forwarding information.
In this embodiment, network data forwarding information is configured, where the network data forwarding information is used to implement data access between the gateway device and the switch; after the network data forwarding information is configured, the network data of the gateway device is forwarded to the switch based on the network data forwarding information. Thus, through the configured network data forwarding information, the data access between the gateway equipment and the switch is effectively realized.
In some embodiments, configuring network data forwarding information includes:
initializing an intranet port and an extranet port; setting a data tag of an internal network port and a data tag of an external network port based on a preset communication protocol, wherein the data tag is used for describing port inlet and outlet indication information; configuring an IP address of an intranet port and an IP address of an extranet port; the working modes of the intranet port and the working modes of the extranet port are configured, wherein the working modes comprise: full duplex mode and half duplex mode.
The intranet port may be an uplink port, and is used as a processing interface of the internal network data. The external network port can be a downlink port and is used as a processing interface of external network data.
The preset communication protocol may be an 802.3q protocol. The data tag of the internal network port and the data tag of the external network port are set based on a preset communication protocol, and may be the data tag of the internal network port and the data tag of the external network port respectively set based on a VLAN (Virtual Local Area Network ) through an 802.3q protocol.
For example, the data tag of each internal network port and the data tag of each external network port may be set in a digital tag mode, when the digital tag is 1, the internal network port/external network port is determined to be a network data input port, and when the digital tag is 2, the internal network port/external network port is determined to be a network data output port.
When the IP address of the intranet port and the IP address of the extranet port are configured, the configuration may be implemented through custom configuration, for example, the IP address of the intranet port is set to 10.10.1.1, and the IP address of the extranet port is set to 10.10.1.2.
After the working modes of the internal network port and the external network port are configured, an adaptive adjusting control can be further set to start the adaptive adjusting control to carry out adaptive matching on the port working modes of the gateway equipment based on the mode configuration of the switch.
Therefore, the configuration of the intranet port, the extranet port, the data label of the intranet port, the data label of the extranet port, the IP address of the intranet port, the IP address of the extranet port, the working mode of the intranet port and the working mode of the extranet port is realized, so that the data forwarding can be realized effectively.
Wherein initializing the intranet port and the extranet port comprises: determining a data port of the gateway device; setting the preset first number of data ports in the data ports of the gateway equipment as intranet ports and the rest data ports as extranet ports; or, setting the preset second number of data ports in the data ports of the gateway equipment as external network ports and the rest data ports as internal network ports.
For example, the gateway device has 8 data ports, and among the 8 ports, the first four ports are set as intranet ports, and the last four ports are set as extranet ports; alternatively, among the 8 ports, the first two ports are set as external network ports, and the last six ports are internal network ports. Therefore, the data transmission efficiency can be further improved through the variable port setting.
In some embodiments, the method of the present embodiment may further include:
detecting the connection state of an intranet port and the connection state of an extranet port; and when the connection state of the internal network port and the connection state of the external network port are determined to be connected, counting the number of packets and the type of error packets in the process that the network data of the gateway equipment is forwarded to the switch.
The detection results of the connection state of the internal network port and the connection state of the external network port may be as follows.
Wherein, "Link status: up" indicates that the ports are connected, "Link speed:2500Mbps" indicates that the connection speed is 2500Mbps, "Link duplex: full-duplex" indicates that the duplex mode is full duplex, "MTU:1500" indicates that the length of the data packet transmittable in the network is 1500 bytes, "Promitus mode: enabled" indicates that the Promiscuous mode is enabled.
The number of packets in the process of forwarding the network data of the gateway device to the switch may include: the transmission amount of network data and the reception amount of network data. Therefore, the forwarding condition of the network data can be effectively known by counting the number of packets and the type of the error packets in the process of forwarding the network data of the gateway equipment to the switch.
After counting the number of packets and the type of error packets in the process of forwarding the network data of the gateway device to the switch, the method of the embodiment may further include: acquiring the number of packets and the type of error packets in the process of forwarding the network data of the gateway equipment to the switch; based on the number of packets and the type of error packet, processing forwarding exception of network data. Therefore, the discovered error packets can be processed abnormally in time based on the number of the packets and the type of the error packets.
In other embodiments, configuring network data forwarding information includes:
mounting a first driver in a system of gateway equipment, wherein the first driver is used for describing a driving switch controller; the second driver is mounted and the MDIO tool is integrated into the second driver.
Wherein the first driver may be Marvell Unified Marvell SOHO Driver. The second driver may be Intel Ixgbe Driver, which provides a way for the user to directly access the switch (e.g., marvell Switch IC) registers from the Intel SOC (single chip microcomputer) by integrating the GPIO to MDIO tool into Intel Ixgbe Driver.
By modifying the DPDK TestPMD example, the operation of Intel Ixgbe Driver is changed from a kernel mode to a user mode by bypassing the characteristics of a kernel protocol stack and a driver, and the traffic of the exchange port is forwarded in high performance through the SOC by means of a program modified by the TestPMD.
In still other embodiments, configuring network data forwarding information includes:
introducing multiple paths of input/output respectively mode MDC signal lines and MDIO signal lines; mounting a third driver in a system of gateway equipment to access a switching chip register; and mounting a fourth driver and a fifth driver, wherein the fourth driver and the fifth driver both depend on a sixth driver, and the sixth driver is used for realizing the function driving of the switch.
For example, two paths of GPIOs (input/output) are led out from the SOC to simulate SDA/SCK of MDC/MDIO respectively, a third driver (such as MDIO-lanner-GPIO driver) is mounted, so that the SOC can directly access and access the register of the exchange chip, and a fourth driver (such as Mv88e6xxx. Ko) and a fifth driver (such as dsa_bark. Ko) are both dependent on a sixth driver (such as phylink. Ko) to realize control of a physical interface.
Fig. 2 is a schematic structural diagram of a data forwarding device according to the present embodiment, where the data forwarding device may include: a configuration module 210 and a forwarding module 220.
A configuration module 210, configured to configure network data forwarding information, where the network data forwarding information is used to implement data access between the gateway device and the switch.
And a forwarding module 220, configured to forward the network data of the gateway device to the switch based on the network data forwarding information after configuring the network data forwarding information.
In this embodiment, optionally, the configuration module 210 is specifically configured to:
initializing an intranet port and an extranet port; setting a data tag of the internal network port and a data tag of the external network port based on a preset communication protocol, wherein the data tag is used for describing port inlet and outlet indication information; configuring the IP address of the intranet port and the IP address of the extranet port; configuring a working mode of the intranet port and a working mode of the extranet port, wherein the working modes comprise: full duplex mode and half duplex mode.
In this embodiment, optionally, the method further includes: the device comprises a detection module and a statistics module.
And the detection module is used for detecting the connection state of the internal network port and the connection state of the external network port.
And the statistics module is used for counting the number of packets and the type of error packets in the process of forwarding the network data of the gateway equipment to the switch when the connection state of the intranet port and the connection state of the extranet port are determined to be connected.
In this embodiment, optionally, the configuration module 210 is specifically configured to:
determining a data port of the gateway device; setting a preset first number of data ports in the data ports of the gateway equipment as the intranet ports and the rest data ports as the extranet ports; or, setting the preset second number of data ports in the data ports of the gateway device as the external network ports, and setting the rest data ports as the internal network ports.
In this embodiment, optionally, the configuration module 210 is specifically configured to:
in the system of the gateway device, a first driver is mounted, wherein the first driver is used for describing a driving switch controller; a second driver is mounted and an MDIO tool is integrated into the second driver.
In this embodiment, optionally, the configuration module 210 is specifically configured to:
introducing multiple paths of input/output respectively mode MDC signal lines and MDIO signal lines; mounting a third driver in the system of the gateway device to access a switch chip register; and mounting a fourth driver and a fifth driver, wherein the fourth driver and the fifth driver both depend on a sixth driver, and the sixth driver is used for realizing the function driving of the switch.
In this embodiment, optionally, the method further includes: an acquisition module and a processing module.
And the acquisition module is used for acquiring the number of packets and the type of error packets in the process that the network data of the gateway equipment is forwarded to the switch.
And the processing module is used for processing the forwarding exception of the network data based on the packet number and the error packet type.
The data forwarding device provided by the disclosure is used for realizing data access between gateway equipment and a switch by configuring network data forwarding information; after the network data forwarding information is configured, the network data of the gateway device is forwarded to the switch based on the network data forwarding information. Thus, through the configured network data forwarding information, the data access between the gateway equipment and the switch is effectively realized.
The embodiment of the application also provides computer equipment. Referring specifically to fig. 3, fig. 3 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device includes a memory 310 and a processor 320 communicatively coupled to each other via a system bus. It should be noted that only computer devices having components 310-320 are shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer device may be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. The computer device can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 310 includes at least one type of readable storage medium including non-volatile memory (non-volatile memory) or volatile memory, such as flash memory (flash memory), hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random access memory (random access memory, RAM), read-only memory (ROM), erasable programmable read-only memory (erasable programmable read-only memory, EPROM), electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), programmable read-only memory (programmable read-only memory, PROM), magnetic memory, magnetic disk, optical disk, etc., which may include static RAM or dynamic RAM. In some embodiments, memory 310 may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 310 may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, or a Flash Card (Flash Card) provided on the computer device. Of course, memory 310 may also include both internal storage units for computer devices and external storage devices. In this embodiment, the memory 310 is typically used to store an operating system installed on a computer device and various types of application software, such as program codes of the above-described methods. In addition, the memory 310 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 320 is typically used to perform the overall operations of the computer device. In this embodiment, the memory 310 is used for storing program codes or instructions, the program codes include computer operation instructions, and the processor 320 is used for executing the program codes or instructions stored in the memory 310 or processing data, such as the program codes for executing the above-mentioned method.
Herein, the bus may be an Industry standard architecture (Industry StandardArchitecture, ISA) bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) bus, or an extended Industry standard architecture (Extended Industry StandardArchitecture, EISA) bus, among others. The bus system may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
Still another embodiment of the present application provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads computer readable program code stored in a computer readable medium, such that the processor is capable of performing the functional actions specified in each step or combination of steps in the above-described method; a means for generating a functional action specified in each block of the block diagram or a combination of blocks.
The computer readable medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor system, apparatus or device, or any suitable combination of the foregoing, the memory storing program code or instructions, the program code including computer operating instructions, and the processor executing the program code or instructions of the above-described methods stored by the memory.
The definition of memory and processor may refer to the description of the embodiments of the computer device described above, and will not be repeated here.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The functional units or modules in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RandomAccess Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps other than those listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of first, second, third, etc. does not denote any order, and the words are to be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1.一种数据转发方法,其特征在于,包括:1. A data forwarding method, characterized in that, comprising: 配置网络数据转发信息,所述网络数据转发信息用于实现网关设备与交换机之间的数据通达;Configuring network data forwarding information, the network data forwarding information is used to realize data communication between the gateway device and the switch; 在配置所述网络数据转发信息之后,基于所述网络数据转发信息,将所述网关设备的网络数据转发至所述交换机。After configuring the network data forwarding information, forward the network data of the gateway device to the switch based on the network data forwarding information. 2.根据权利要求1所述的方法,其特征在于,所述配置网络数据转发信息,包括:2. The method according to claim 1, wherein said configuring network data forwarding information comprises: 初始化内网端口和外网端口;Initialize the internal network port and external network port; 基于预设通信协议设置所述内网端口的数据标签和所述外网端口的数据标签,所述数据标签用于描述端口进出口指示信息;Setting the data label of the internal network port and the data label of the external network port based on a preset communication protocol, the data label is used to describe port import and export indication information; 配置所述内网端口的IP地址和所述外网端口的IP地址;Configure the IP address of the internal network port and the IP address of the external network port; 配置所述内网端口的工作模式和所述外网端口的工作模式,所述工作模式包括:全双工模式和半双工模式。Configuring the working mode of the internal network port and the working mode of the external network port, the working modes include: full-duplex mode and half-duplex mode. 3.根据权利要求2所述的方法,其特征在于,还包括:3. The method according to claim 2, further comprising: 检测所述内网端口的连接状态和所述外网端口的连接状态;Detecting the connection status of the internal network port and the connection status of the external network port; 在确定所述内网端口的连接状态和所述外网端口的连接状态为已连接时,统计所述网关设备的所述网络数据转发至所述交换机过程中的封包数量以及错误包类型。When it is determined that the connection state of the internal network port and the connection state of the external network port are connected, the number of packets and the type of error packets in the process of forwarding the network data of the gateway device to the switch are counted. 4.根据权利要求2所述的方法,其特征在于,所述初始化内网端口和外网端口,包括:4. The method according to claim 2, wherein the initialization of the internal network port and the external network port comprises: 确定所述网关设备的数据端口;Determine the data port of the gateway device; 设置所述网关设备的所述数据端口中,预设的第一数量个数据端口为所述内网端口,剩余数据端口为所述外网端口;Among the data ports of the gateway device, the preset first number of data ports are the internal network ports, and the remaining data ports are the external network ports; 或者,设置所述网关设备的所述数据端口中,预设的第二数量个数据端口为所述外网端口,剩余数据端口为所述内网端口。Alternatively, among the data ports of the gateway device, the preset second number of data ports are the external network ports, and the remaining data ports are the internal network ports. 5.根据权利要求1所述的方法,其特征在于,所述配置网络数据转发信息,包括:5. The method according to claim 1, wherein said configuring network data forwarding information comprises: 在所述网关设备的系统中,挂载第一驱动器,所述第一驱动器用于描述驱动交换机控制器;In the system of the gateway device, a first driver is mounted, and the first driver is used to describe and drive a switch controller; 挂载第二驱动器,并将MDIO工具集成到所述第二驱动器中。Mount a second drive and integrate the MDIO tools into said second drive. 6.根据权利要求1所述的方法,其特征在于,所述配置网络数据转发信息,包括:6. The method according to claim 1, wherein the configuring network data forwarding information comprises: 引入多路输入/输出分别模式MDC信号线和MDIO信号线;Introduce multi-channel input/output respectively mode MDC signal line and MDIO signal line; 在所述网关设备的系统中,挂载第三驱动器,以访问交换芯片寄存器;In the system of the gateway device, mount a third driver to access the switch chip register; 挂载第四驱动器和第五驱动器,所述第四驱动器和所述第五驱动器均依赖第六驱动器,所述第六驱动器用于实现所述交换机的功能驱动。A fourth driver and a fifth driver are mounted, and both the fourth driver and the fifth driver depend on a sixth driver, and the sixth driver is used to realize the function driving of the switch. 7.根据权利要求3所述的方法,其特征在于,还包括:7. The method according to claim 3, further comprising: 获取所述网关设备的所述网络数据转发至所述交换机过程中的封包数量以及错误包类型;Obtaining the number of packets and the type of error packets in the process of forwarding the network data of the gateway device to the switch; 基于所述封包数量以及所述错误包类型,处理所述网络数据的转发异常。Based on the packet quantity and the error packet type, the forwarding exception of the network data is processed. 8.一种数据转发装置,其特征在于,包括:8. A data forwarding device, characterized in that, comprising: 配置模块,用于配置网络数据转发信息,所述网络数据转发信息用于实现网关设备与交换机之间的数据通达;The configuration module is used to configure network data forwarding information, and the network data forwarding information is used to realize data communication between the gateway device and the switch; 转发模块,用于在配置所述网络数据转发信息之后,基于所述网络数据转发信息,将所述网关设备的网络数据转发至所述交换机。A forwarding module, configured to forward the network data of the gateway device to the switch based on the network data forwarding information after configuring the network data forwarding information. 9.一种计算机设备,其特征在于,包括存储器和处理器,存储器中存储有计算机程序,处理器执行计算机程序时实现如权利要求1~7中任一所述的数据转发方法。9. A computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the data forwarding method according to any one of claims 1-7 is implemented. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,计算机程序被处理器执行时实现如权利要求1~7中任一所述的数据转发方法。10. A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the data forwarding method according to any one of claims 1-7 is realized.
CN202310607895.4A 2023-05-26 2023-05-26 A data forwarding method, device, computer equipment and medium Pending CN116599836A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310607895.4A CN116599836A (en) 2023-05-26 2023-05-26 A data forwarding method, device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310607895.4A CN116599836A (en) 2023-05-26 2023-05-26 A data forwarding method, device, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN116599836A true CN116599836A (en) 2023-08-15

Family

ID=87598941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310607895.4A Pending CN116599836A (en) 2023-05-26 2023-05-26 A data forwarding method, device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN116599836A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464403A (en) * 2002-06-26 2003-12-31 京东方科技集团股份有限公司 Physical insulated switchboard and insulating control method
CN101610215A (en) * 2009-07-21 2009-12-23 杭州华三通信技术有限公司 A kind of routing conversion and a kind of gateway device
CN109802985A (en) * 2017-11-17 2019-05-24 北京金山云网络技术有限公司 Data transmission method, device, equipment and read/write memory medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464403A (en) * 2002-06-26 2003-12-31 京东方科技集团股份有限公司 Physical insulated switchboard and insulating control method
CN101610215A (en) * 2009-07-21 2009-12-23 杭州华三通信技术有限公司 A kind of routing conversion and a kind of gateway device
CN109802985A (en) * 2017-11-17 2019-05-24 北京金山云网络技术有限公司 Data transmission method, device, equipment and read/write memory medium

Similar Documents

Publication Publication Date Title
US7480303B1 (en) Pseudo-ethernet switch without ethernet media-access-controllers (MAC's) that copies ethernet context registers between PCI-express ports
US10848442B2 (en) Heterogeneous packet-based transport
US8069293B1 (en) Flexible server network connection upgrade systems and methods
EP3042297B1 (en) Universal pci express port
US10152441B2 (en) Host bus access by add-on devices via a network interface controller
US11048569B1 (en) Adaptive timeout mechanism
Lu et al. {ServerSwitch}: A programmable and high performance platform for data center networks
US8489778B2 (en) Method and apparatus for using a single multi-function adapter with different operating systems
US9037768B2 (en) Virtual-interrupt-mode interface and method for virtualizing an interrupt mode
CN112527709B (en) PCIe expansion switching system, method, electronic equipment and storage medium
CN116599836A (en) A data forwarding method, device, computer equipment and medium
US7512695B2 (en) Method and system to control the communication of data between a plurality of interconnect devices
US7565580B2 (en) Method and system for testing network device logic
CN107291641B (en) Direct memory access control device for a computing unit and method for operating the same
CN108733871B (en) Pure software simulation bus communication method
US20080189392A1 (en) Computer system with lan-based i/o
CN108289117B (en) Multi-party access system based on FPGA and processing method
CN113630294A (en) Switch modularization detection method and device
WO2005067255A1 (en) Method, apparatus, system, and article of manufacture for grouping packets
Zang et al. PROP: Using PCIe-based RDMA to accelerate rack-scale communications in data centers
CN115643223A (en) Interrupt signal transmission method and device
CN110489331B (en) Method for testing mobile communication driver, terminal device and storage medium
CN105684378A (en) Efficiently replicate packets across network security appliances
CN114500411B (en) Data forwarding system, method, computing device and programmable logic device
CN116436808A (en) Flow analysis equipment and method

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