Detailed Description
the technical solution in the embodiments of the present invention will be described below with reference to the accompanying drawings.
fig. 1 is a schematic diagram of a network architecture to which the embodiments of the present application are applicable. As shown in fig. 1, APP (application) is mainly various upper layer application programs for fulfilling user's intention, and an SDN (Software defined Network) controller is mainly responsible for service deployment, configuration, Network device management, Network state monitoring, and the like of a Network, and since determining a Network topology is a basis for performing Network monitoring and path computation, the SDN controller needs to determine connection relationships between switches and servers in the SDN, that is, to determine a Network topology relationship in the SDN, before performing Network monitoring and path computation, the server 101 may communicate with the server 102 through the switch 120, and the server 101 may also communicate with the server 103 or the server 104 through the switch 120, the switch 130, and the switch 110, and the above Network architecture to which the embodiments of the present application are applied is merely illustrative, and is not limited thereto, for example, the servers in fig. 1 may also be personal computers or other electronic devices, the switches may also be routers, and the number of switches and servers is not limited to the number shown in fig. 1.
Fig. 2 is a schematic flow chart of a method for transmitting a packet according to the present application. As shown in fig. 2, the method 200 includes:
S201, the aggregation switch acquires a first message which accords with a first transmission protocol.
The aggregation switch may obtain the first message from the core switch, may also obtain the first message from other aggregation switches, and may also obtain the first message from the access switch.
S202, the aggregation switch generates a second message according with a second transmission protocol according to the first message.
After the aggregation switch acquires the first message, the aggregation switch processes the first message to generate a second message conforming to a second transmission protocol, and a specific process of generating the second message according to the first message can be performed according to a related method in the prior art, which is not described herein again.
S203, the aggregation switch sends the second message to a target access switch so that the target access switch transmits the second message to a server in a transparent mode, wherein the target access switch does not support the second transmission protocol.
And after the aggregation switch generates a second message, the second message is sent to a target access switch, the target access switch is an access switch connected with the server, the target access switch is configured with a transparent transmission command, and when the target access switch receives the second message, the second message is immediately forwarded to the server from a port of the target access switch connected with the server without any processing.
in the embodiment of the present application, the aggregation switch is a new device supporting a second transmission protocol (for example, a protocol related to an overlay technology), and has a relatively high processing capability, the target access switch is an old device that does not support the second transmission protocol, and the processing capability is relatively low, the aggregation switch with the relatively high processing capability is used to process the first packet, and the transparent transmission command is configured in the target access switch, so that the second packet directly reaches the server without being processed, and thus, the old device can be fully utilized while the high network performance is maintained, and the cost of network deployment is reduced.
Optionally, the first transmission protocol is a VLAN transmission protocol, and the second transmission protocol is a VxLAN transmission protocol.
optionally, before the aggregation switch sends the second packet to the target access switch, the method further includes:
S204, the aggregation switch determines the topological relation between the aggregation switch and the server.
S205, the aggregation switch determines the target access switch from a plurality of access switches according to the topological relation.
In the embodiment of the application, the aggregation switch may determine the topological relation according to manually configured information, or may determine the topological relation according to a command of an SDN controller. And determining a forwarding path of the second message according to the topological relation, so that a target access switch can be determined from the plurality of access switches.
Optionally, the determining, by the aggregation switch, a topological relation between the aggregation switch and the server includes:
s206, the aggregation switch receives the equipment information of the server.
s207, the aggregation switch determines the topological relation according to the equipment information.
The aggregation switch may also determine the topological relationship based on device information of the server. For example, a server sends an LLDP (Link Layer Discovery Protocol) message, where the LLDP message carries device information of the server, and a target access switch receives the LLDP message and then immediately passes the LLDP message to a convergence switch, and the convergence switch may determine a topological relationship with the server according to the received LLDP message, so that a forwarding path of the message may be determined without using an SDN controller, and information overhead in a network is reduced.
optionally, the aggregation switch is a virtual switch.
In this embodiment of the application, the second switch may be a physical switch, or may be one virtual switch among a plurality of virtual switches virtualized by one physical switch, where software and hardware are isolated among the plurality of virtual switches and are not affected by each other, and each virtual switch exclusively allocates its own system resource to independently operate a network service, so that the cost of network deployment may be reduced.
Fig. 3 is a schematic flow chart of another method for transmitting a message provided by the present application. As shown in fig. 3, the method 300 includes:
S301, the aggregation switch acquires a second message conforming to a second transmission protocol from the access switch, and the access switch does not support the second transmission protocol.
the aggregation switch may obtain the second message from other aggregation switches, and may also obtain the second message from an access switch, where the access switch does not support the second transport protocol, and the access switch obtains the second message from, for example, a server and then transparently transmits the second message to the aggregation switch.
s302, the aggregation switch generates a first message according with a first transmission protocol according to the second message.
after the aggregation switch acquires the second message, the aggregation switch processes the second message to generate a first message conforming to the first transmission protocol, and the specific process of generating the first message according to the second message can be performed according to a related method in the prior art, which is not described herein again.
s303, the aggregation switch sends the first message.
the aggregation switch may send the first message to the core switch, may send the first message to other aggregation switches, and may send the first message to other access switches.
In the embodiment of the present application, the aggregation switch is a new device supporting a second transmission protocol (for example, a protocol related to an overlay technology), and has a relatively high processing capability, the access switch is an old device not supporting the second transmission protocol, and the processing capability is relatively low, the aggregation switch with the relatively high processing capability is used to process the first packet, and the transparent transmission command is configured in the access switch, so that the second packet directly reaches the aggregation switch without being processed, and thus, the old device can be fully utilized while the high network performance is maintained, and the cost of network deployment is reduced.
Optionally, the first transmission protocol is a VLAN transmission protocol, and the second transmission protocol is a VxLAN transmission protocol.
Optionally, the aggregation switch is a virtual switch.
In this embodiment of the application, the second switch may be a physical switch, or may be one virtual switch among a plurality of virtual switches virtualized by one physical switch, where software and hardware are isolated among the plurality of virtual switches and are not affected by each other, and each virtual switch exclusively allocates its own system resource to independently operate a network service, so that the cost of network deployment may be reduced.
The method for transmitting a packet according to the embodiment of the present application is described in detail above with reference to fig. 2 and fig. 3, and the apparatus for transmitting a packet according to the embodiment of the present application is described in detail below with reference to fig. 4 and fig. 5.
Fig. 4 shows an apparatus 400 for transmitting a message according to an embodiment of the present application. As shown in fig. 4, the apparatus 400 includes:
An obtaining module 401, configured to obtain a first message conforming to a first transmission protocol;
A generating module 402, configured to generate a second packet according to a second transmission protocol according to the first packet acquired by the acquiring module 401;
A sending module 403, configured to send the second packet generated by the generating module 402 to a target access switch, so that the target access switch transparently transmits the second packet to a server, where the target access switch does not support the second transport protocol.
In this embodiment of the present application, the apparatus 400 supports a second transmission protocol (for example, a protocol related to an overlay technology), and has a relatively high processing capability, the target access switch is an old device that does not support the second transmission protocol, and the processing capability is relatively low, the apparatus 400 with the relatively high processing capability is used to process the first packet, and the transparent transmission command is configured in the target access switch, so that the second packet directly reaches the server without being processed, and thus, the old device can be fully utilized while the high network performance is maintained, and the cost of network deployment is reduced.
Optionally, the first transmission protocol is a virtual local area network VLAN transmission protocol, and the second transmission protocol is a virtual extensible local area network VxLAN transmission protocol.
Optionally, the apparatus 400 further comprises:
A determining module 404, configured to determine a topological relationship between the aggregation switch and the server; and the target access switch is determined from a plurality of access switches according to the topological relation.
In this embodiment of the application, the apparatus 400 may determine the topological relation according to information configured manually, or may determine the topological relation according to a command of an SDN controller. And determining a forwarding path of the second message according to the topological relation, so that a target access switch can be determined from the plurality of access switches.
Optionally, the determining module 404 is specifically configured to: receiving the equipment information of the server through the acquisition module; and determining the topological relation according to the equipment information.
Therefore, the forwarding path of the message can be determined without an SDN controller, and the information overhead in the network is reduced.
Optionally, the apparatus is a virtual switch. Thereby reducing the cost of network deployment.
Fig. 5 shows an apparatus 500 for transmitting a message according to an embodiment of the present application. As shown in fig. 5, the apparatus 500 includes:
An obtaining module 510, configured to obtain a second packet conforming to a second transmission protocol from an access switch, where the access switch does not support the second transmission protocol;
A generating module 520, configured to generate a first packet according to a first transmission protocol according to the second packet acquired by the acquiring module 510;
A sending module 530, configured to send the first packet generated by the generating module 520.
in this embodiment of the present application, the apparatus 500 supports a second transmission protocol (for example, a protocol related to an overlay technology), has a relatively high processing capability, the access switch is an old device that does not support the second transmission protocol, the processing capability is relatively low, the apparatus 400 with the relatively high processing capability is used to process the first packet, and the transparent transmission command is configured in the access switch, so that the second packet directly reaches the apparatus 500 without being processed, thereby fully utilizing the old device while maintaining a relatively high network performance, and reducing the cost of network deployment.
Optionally, the first transmission protocol is a virtual local area network VLAN transmission protocol, and the second transmission protocol is a virtual extensible local area network VxLAN transmission protocol.
optionally, the apparatus is a virtual switch. Thereby reducing the cost of network deployment.
As shown in fig. 6, an embodiment of the present application further provides an apparatus 600 for transmitting a packet, where the apparatus 600 includes: the network controller 630, the memory 620 and the processor 610, wherein the processor 610, the memory 620 and the network controller 630 communicate with each other through internal connection paths to transmit control and/or data signals, the memory 620 is used for storing instructions, and the processor 610 is used for executing the instructions stored in the memory 620 to control the network controller 630 to receive or transmit data.
the network controller 630 is configured to obtain a first packet conforming to a first transmission protocol;
The processor 610 is configured to generate a second packet conforming to a second transmission protocol according to the first packet acquired by the network controller 630;
The network controller 630 is further configured to send the second packet generated by the processor 610 to a target access switch, so that the target access switch transparently transmits the second packet to a server, where the target access switch does not support the second transport protocol.
It should be understood that, in the embodiment of the present Application, the Processor 610 may be a Central Processing Unit (CPU), and the Processor 610 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 620 may include both read-only memory and random access memory, and provides instructions and data to the processor 610. A portion of the memory 620 may also include non-volatile random access memory. For example, the memory 620 may also store device type information.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 610. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 620, and the processor 610 reads the information in the memory 620 and performs the steps of the above method in combination with the hardware thereof. To avoid repetition, it is not described in detail here.
Optionally, the first transmission protocol is a VLAN transmission protocol, and the second transmission protocol is a VxLAN transmission protocol.
optionally, the processor 610 is further configured to: determining a topological relation between the aggregation switch and the server; and determining the target access switch from a plurality of access switches according to the topological relation.
Optionally, the processor 610 is specifically configured to: receiving device information of the server through the network controller 630; and determining the topological relation according to the equipment information.
Optionally, the device 600 is a virtual switch.
it should be understood that the device 600 for transmitting a packet according to the embodiment of the present application may correspond to the aggregation switch and the apparatus 400 in the embodiment of the present application, and may correspond to a corresponding main body in executing the method according to the embodiment of the present application, and the above and other operations and/or functions of each module in the device 600 are respectively for implementing a corresponding flow of the method in fig. 2, and are not described herein again for brevity.
therefore, in this embodiment of the present application, the device 600 supports the second transmission protocol (for example, a protocol related to an overlay technology), and has a relatively strong processing capability, the target access switch is an old device that does not support the second transmission protocol, and the processing capability is relatively weak, the device 600 with the relatively strong processing capability is used to process the first packet, and the transparent transmission command is configured in the target access switch, so that the second packet directly reaches the server without being processed, and thus, the old device can be fully utilized while the relatively high network performance is maintained, and the cost of network deployment is reduced.
As shown in fig. 7, an embodiment of the present application further provides an apparatus 700 for transmitting a packet, where the apparatus 700 includes: a processor 710, a memory 720 and a network controller 730, wherein the processor 710, the memory 720 and the network controller 730 communicate with each other via an internal connection path to transmit control and/or data signals, the memory 720 is used for storing instructions, and the processor 710 is used for executing the instructions stored in the memory 720 to control the network controller 730 to receive or transmit data.
The network controller 730 is configured to obtain a second packet conforming to a second transmission protocol from an access switch, where the access switch does not support the second transmission protocol;
The processor 710 is configured to generate a first packet conforming to a first transmission protocol according to the second packet acquired by the network controller 730;
The network controller 730 is further configured to send the first packet generated by the processor 710.
it should be understood that in the embodiments of the present application, the processor 710 may be a CPU, and the processor 710 may also be other general purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
the memory 720 may include both read-only memory and random-access memory, and provides instructions and data to the processor 710. A portion of memory 720 may also include non-volatile random access memory. For example, memory 720 may also store device type information.
in implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 710. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 720, and the processor 710 reads the information in the memory 720 and performs the steps of the above method in combination with the hardware thereof. To avoid repetition, it is not described in detail here.
optionally, the first transmission protocol is a VLAN transmission protocol, and the second transmission protocol is a VxLAN transmission protocol.
Optionally, the processor 710 is further configured to: determining a topological relation between the aggregation switch and the server; and determining the target access switch from a plurality of access switches according to the topological relation.
Optionally, the processor 710 is specifically configured to: receiving device information of the server through the network controller 730; and determining the topological relation according to the equipment information.
optionally, the device 700 is a virtual switch.
It should be understood that the device 700 for transmitting a packet according to the embodiment of the present application may correspond to the aggregation switch and the apparatus 500 in the embodiment of the present application, and may correspond to a corresponding main body in executing the method according to the embodiment of the present application, and the above and other operations and/or functions of each module in the device 700 are respectively for implementing a corresponding flow of the method in fig. 3, and are not described again here for brevity.
Therefore, in this embodiment of the present application, the device 700 supports the second transmission protocol (for example, a protocol related to an overlay technology), and has a relatively strong processing capability, the access switch is an old device that does not support the second transmission protocol, and the processing capability is relatively weak, the device 700 with the relatively strong processing capability is used to process the second packet, and the transparent transmission command is configured in the access switch, so that the second packet directly reaches the aggregation switch without being processed, and thus, the old device can be fully utilized while the relatively high network performance is maintained, and the cost of network deployment is reduced.
in the embodiment of the present application, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the inherent logic of the processes, and should not limit the implementation processes of the embodiment of the present application.
in addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
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. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, 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 through some interfaces, devices or units, 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 computer readable storage medium. 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.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.