CN114172853A - Flow forwarding and bare computer server configuration method and device - Google Patents

Flow forwarding and bare computer server configuration method and device Download PDF

Info

Publication number
CN114172853A
CN114172853A CN202111454610.5A CN202111454610A CN114172853A CN 114172853 A CN114172853 A CN 114172853A CN 202111454610 A CN202111454610 A CN 202111454610A CN 114172853 A CN114172853 A CN 114172853A
Authority
CN
China
Prior art keywords
virtual
bare metal
switch
target
virtual switch
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.)
Granted
Application number
CN202111454610.5A
Other languages
Chinese (zh)
Other versions
CN114172853B (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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202111454610.5A priority Critical patent/CN114172853B/en
Publication of CN114172853A publication Critical patent/CN114172853A/en
Application granted granted Critical
Publication of CN114172853B publication Critical patent/CN114172853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric

Landscapes

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

Abstract

One or more embodiments of the present specification provide a method and an apparatus for forwarding traffic and configuring a bare metal server, where the method for forwarding traffic is applied to a physical switch connected to the bare metal server, and includes: participating in deploying the virtual switch in response to the received virtual switch deployment instruction; determining a target bare metal server specified by the virtual switch deployment instruction in bare metal servers connected with the physical switch, and associating the target bare metal server to the virtual switch; forwarding, by the virtual switch, the target traffic for the target bare metal server if the target traffic is received.

Description

Flow forwarding and bare computer server configuration method and device
Technical Field
One or more embodiments of the present disclosure relate to the field of computer networks, and in particular, to a method and an apparatus for traffic forwarding and bare metal server configuration.
Background
In a server hosting scenario, different users rent different servers in the same public cloud, so user isolation needs to be implemented at a cloud end. However, with the development trend of cloud native technology and distributed cloud and multi-cloud, a user starts to have a requirement for obtaining a bare computer server from a cloud manufacturer, that is, the user needs the server provided by the cloud manufacturer without installing any unrelated software, and this will require that the deployment of a virtual switch on the server be cancelled, so that the requirement brings a challenge to the user isolation of the cloud, and therefore, how to provide the bare computer cloud service to the client becomes a problem to be solved urgently at present.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a storage medium for configuring a traffic forwarding and bare metal server.
One or more embodiments of the present disclosure provide the following:
according to a first aspect of one or more embodiments of the present specification, a traffic forwarding method is provided, which is applied to a physical switch connected to a bare metal server, and includes:
participating in deploying the virtual switch in response to the received virtual switch deployment instruction;
determining a target bare metal server specified by the virtual switch deployment instruction in bare metal servers connected with the physical switch, and associating the target bare metal server to the virtual switch;
forwarding, by the virtual switch, the target traffic for the target bare metal server if the target traffic is received.
According to a second aspect of one or more embodiments of the present specification, there is provided a bare metal server configuration method applied to a management server, including:
in response to a virtual switch deployment request initiated for a target bare metal server, determining a physical switch connected with the target bare metal server;
sending a virtual switch deployment instruction to the determined physical switch, enabling the determined physical switch to participate in deploying the virtual switch, and associating the target bare metal server to the virtual switch, so that the virtual switch is used for forwarding target traffic, which is received by the determined physical switch and is aimed at the target bare metal server.
According to a third aspect of one or more embodiments of the present specification, there is provided a traffic forwarding apparatus applied to a physical switch connected to a bare metal server, including:
the instruction receiving unit is used for responding to the received virtual switch deployment instruction and participating in deploying the virtual switch;
a bare metal association unit, configured to determine, in a bare metal server connected to the physical switch, a target bare metal server specified by the virtual switch deployment instruction, and associate the target bare metal server to the virtual switch;
and a traffic forwarding unit, configured to forward, by the virtual switch, the target traffic for the target bare metal server when the target traffic is received.
According to a fourth aspect of one or more embodiments of the present specification, there is provided a bare metal server configuration device applied to a management server, including:
the device comprises a request response unit, a virtual switch deployment unit and a virtual switch deployment unit, wherein the request response unit is used for responding to a virtual switch deployment request initiated aiming at a target bare metal server and determining a physical switch connected with the target bare metal server;
and the instruction sending unit is used for sending a virtual switch deployment instruction to the determined physical switch, enabling the determined physical switch to participate in deploying the virtual switch, associating the target bare computer server to the virtual switch, and enabling the virtual switch to be used for forwarding the target traffic, which is received by the determined physical switch and aims at the target bare computer server.
According to a fifth aspect of one or more embodiments herein, there is provided an electronic device, comprising:
a processor; a memory for storing processor-executable instructions; the processor executes the executable instructions to implement the steps of the traffic forwarding method or the configuration method of the bare metal server.
According to a sixth aspect of one or more embodiments herein, there is provided a computer-readable storage medium having stored thereon executable instructions; when executed by a processor, the instructions implement the steps of the traffic forwarding method or the configuration method of the bare metal server.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a network architecture diagram illustrating a configuration of a traffic forwarding and bare metal server according to an exemplary embodiment.
Fig. 2 is a flowchart of a traffic forwarding method provided in the present specification according to an exemplary embodiment.
Fig. 3 is a schematic diagram of a network architecture of a VPC according to an exemplary embodiment.
FIG. 4 is a flow chart of a method for configuring a bare metal server provided by the present specification according to an exemplary embodiment.
Fig. 5 is a schematic structural diagram of an apparatus according to an exemplary embodiment.
Fig. 6 is a block diagram of a traffic forwarding device provided in accordance with an example embodiment of the present specification.
FIG. 7 is a block diagram of a configuration apparatus of a bare metal server provided by the present specification according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Fig. 1 is a schematic diagram of a network architecture for traffic forwarding and bare metal server configuration according to an exemplary embodiment. As shown in fig. 1, the network architecture is a physical network architecture of bare metal cloud (bare metal cloud), the bare metal cloud according to the embodiment of the present disclosure is a light cloud providing bare metal access and hosting, and is formed by a network formed by a plurality of bare metal servers, in the embodiment of the present disclosure, a plurality of physical servers (only 6 bare metal servers and 1 management server are shown in fig. 1) and a plurality of physical switches (only 5 physical switches are shown in fig. 1 as physical switches a to D and a core switch connecting them together), where the core switch is respectively connected to physical switches a to D, the physical switch a is connected to an Internet public network channel or a cloud service channel, the physical switch B is respectively connected to bare metal servers 1 to 3, the physical switch C is connected with the bare metal servers 4-6 respectively, and the physical switch D is connected with the management server.
The physical switches in the embodiments of this specification may include a core layer physical switch, an aggregation layer physical switch, and an access layer physical switch, where the core layer physical switch (e.g., the core switch shown in fig. 1) serves as each aggregation layer physical switch or an intermediate network structure between each access layer physical switch, and is used to connect each two-layer subnet, so as to implement network accessibility of a whole network, the access layer physical switch is a physical switch directly connected to a server device or an external network, for example, physical switches a to D shown in fig. 1 all belong to the access layer physical switch, each physical switch and a device hung below the physical switch form a two-layer network together, devices inside the two-layer network can implement mutual access, and the aggregation layer physical switch generally refers to a physical switch hooked between the access layer physical switch and the aggregation layer physical switch (the network architecture shown in fig. 1 only includes a 2-layer switch structure, thus if the physical switches a-D are considered as access layer physical switches, the convergence layer physical switch is not shown in fig. 1), and of course, the convergence layer physical switch may also be a device (e.g., bare metal server) directly hanging down to be used as an access layer physical switch, and thus, the physical switches a-D shown in fig. 1 may also be considered as convergence layer physical switches.
The Bare Metal Server referred to in the embodiments of the present specification specifically refers to a Bare Metal Server (Bare Metal Server), which belongs to a physical computer in nature, and it does not install any program except an operating system, and is designed for running a dedicated service uploaded by a user, and does not interrupt for a long time. It has high stability, durability and reliability. Bare metal servers are a single-user environment, meaning that the physical resources of a single server may not be shared between two or more users. Because of this physical isolation, bare server does not have the "noisy neighbor" effect that plagues virtual environments. An important benefit of this isolation is performance predictability. Therefore, the bare metal server has the most stable environment and is very suitable for processing a large amount of data. The management server in this embodiment of the present disclosure may manage all other devices in the bare metal cloud, such as the core switch, the physical switch, and the bare metal server, and may obtain mac information and a management IP address of all the other devices (the bare metal cloud may be regarded as an intranet, and the IP addresses in this embodiment of the present disclosure are all intranet IP addresses of corresponding devices in the bare metal cloud), and maintain a global network architecture of the entire bare metal cloud.
Fig. 2 is a flowchart of a traffic forwarding method provided in the present specification according to an exemplary embodiment, and the method is applied to a physical switch connected to a bare metal server, and includes the following steps:
s202: participating in deploying the virtual switch in response to the received virtual switch deployment instruction.
In this embodiment of the present specification, the bare metal server may be a bare metal server in the bare metal cloud shown in fig. 1, where the virtual switch deployment instruction includes a virtual network identifier, and the participating deployment virtual switch includes: creating virtual edge equipment in a virtual network corresponding to the virtual network identifier; wherein the virtual switch is implemented based on the virtual network.
In an embodiment, the virtual switch deployment instruction only includes information of a physical switch (i.e. a local physical switch) of the received virtual switch deployment instruction, for example, an IP address or mac (Medium/Media Access Control) information of the physical switch, and after receiving the virtual switch deployment instruction, the physical switch determines whether the IP address or mac information of the local physical switch matches with the information on the virtual switch deployment instruction, and creates a virtual edge device in a virtual network corresponding to a virtual network identifier if the matching is successful, and since the virtual network only includes one virtual edge device created in the local physical switch, the virtual network in this case only includes the virtual edge device itself, which makes the virtual switch involved in deployment unable to implement port number expansion, and only the effect of user isolation can be realized, because the same physical switch can participate in deploying virtual network equipment in a plurality of different virtual networks (virtual networks corresponding to different virtual network labels), a plurality of virtual switches can participate in deploying, so that the bare computer server hung down is associated to different virtual switches to realize network isolation in the bare computer cloud.
In another embodiment, the virtual switch deployment instruction contains information of a plurality of physical switches; the virtual network comprises virtual edge devices respectively established by the physical switches and network tunnels maintained among the virtual edge devices. Specifically, the virtual switch deployment instruction includes an IP address of at least one target physical switch (an intranet IP address of the target physical device in the bare cloud), so as to indicate, to the physical switch that receives the virtual switch deployment instruction: the IP addresses corresponding to all other virtual edge devices in the virtual network to be created are the IP addresses of the target physical switches except the target physical switch. Therefore, the virtual edge device created in the physical switch can maintain a broadcast domain, which includes the IP addresses of all virtual edge devices in the same virtual network (corresponding to the same virtual network identifier), so that the virtual edge devices inside the virtual network can implement mutual access according to the broadcast domain maintained by themselves, and essentially implemented by constructing network tunnels between different virtual edge devices, that is, the virtual network includes all virtual edge devices and the network tunnels maintained therebetween, so that the physical switches deployed with different virtual edge devices in the same virtual network can also implement mutual access through the virtual network, and based on this, although these physical switches are not directly connected physically, they implement two-layer interworking through the network tunnel technology, thereby logically forming a large two-layer network, the isolation of a two-layer network in the bare metal cloud is realized, so that the two-layer intercommunication of bare metal servers hung under different physical switches becomes possible. In this case, the virtual switch in which the physical switch participates in deployment may logically connect a plurality of physical switches through a network tunneling technique, thereby implementing port number expansion and simultaneously implementing an effect of user isolation.
The Virtual Network according to the embodiment of the present disclosure may include a Virtual Local Area Network (VLAN) or a Virtual eXtensible Local Area Network (VXLAN), and the embodiment of the present disclosure is described in detail below with the Virtual Network being the VXLAN. After receiving the virtual switch deployment instruction, the physical switch first creates a virtual edge device, i.e. a VTEP (VXLAN Tunnel End Point) in VXLAN, locally, where the VTEP is bound with a virtual Network Identifier carried in the virtual switch deployment instruction, i.e. a VNI (VXLAN Network Identifier) in VXLAN, and the VTEP is virtualized inside the physical switch as a virtual device, and the same VTEP can obtain IP addresses of other VTEPs in VXLAN from the virtual switch deployment instruction to maintain a broadcast domain corresponding to the VXLAN, and then the VTEP and other VTEPs bound with the same VNI respectively construct VXLAN tunnels, so that all VTEPs bound with the same VNI and lan tunnels therebetween together form a VXLAN, and since different VTEPs in the same VXLAN (VXLAN) can be deployed in different physical switches respectively, therefore, different physical switches virtualizing VTEPs with the same VNI binding inside can realize network interworking through VXLAN tunnels between VTEPs.
The physical switch connected to the bare metal server in the embodiments of the present description specifically refers to an access layer physical switch or an aggregation layer physical switch.
S204: and determining a target bare metal server specified by the virtual switch deployment instruction in the bare metal servers connected with the physical switch, and associating the target bare metal server to the virtual switch.
In an embodiment of this specification, the virtual switch deployment instruction includes mac information of at least one bare metal server, where the at least one bare metal server is a bare metal server connected to a virtual switch after the virtual switch completes deployment, and the determining a target bare metal server specified by the virtual switch deployment instruction includes: the method includes the steps of matching mac information of a bare metal server connected with a local port with mac information of at least one bare metal server, determining the bare metal server corresponding to the successfully-matched mac information as a target bare metal server, wherein the determined target bare metal server is the bare metal server needing to be associated to a virtual switch.
In this embodiment, a plurality of physical local ports included in the physical switch may be respectively connected to a plurality of bare metal servers, so that mac information of each bare metal server directly connected to the physical switch may be obtained through the ports, thereby maintaining an equipment table in the local physical switch, where mac information of all bare metal servers connected to the local physical switch is recorded. Therefore, when the physical switch receives the virtual switch deployment instruction, the physical switch can search the device table maintained by the local terminal according to the mac information of at least one bare metal server contained in the virtual switch deployment instruction, and when the mac information is hit, the bare metal server corresponding to the hit mac information is determined as the target bare metal server.
On the basis of the foregoing embodiment, the virtual switch deployment instruction includes mac information of at least one bare metal server and an IP address of a physical switch to which the virtual switch deployment instruction is respectively connected, and the method further includes: determining other bare metal servers in the at least one bare metal server except the target bare metal server; and generating routing information according to the mac information of the other bare metal servers and the IP addresses corresponding to the physical switches connected with the bare metal servers, and binding the routing information to a virtual network forwarding table corresponding to the virtual network.
In this embodiment of the present specification, since the virtual switch deployment instruction includes mac information of at least one bare metal server, it is equivalent to indicating a bare metal server that needs to be hung down by the virtual switch to be deployed, so that a virtual private network is constructed in the bare metal cloud, where the virtual private network includes the virtual switch and the bare metal server that is hung down by the virtual switch. For the virtual edge devices in the virtual network implementing the virtual switch, only maintaining the network tunnels between the virtual edge devices in the virtual network cannot achieve mutual access in the bare machine server layer, because in the two-layer network, when the physical switch receives the message transmitted from the bare machine server, the designated target address of the physical switch is mac information rather than an IP address, and therefore, for each virtual edge device, it needs to acquire not only the IP addresses of other virtual edge devices in the virtual network, but also mac information of the bare machine server hung under all the virtual edge devices, so as to construct routing information from the mac information to the corresponding IP address. Therefore, in this embodiment of the present specification, the virtual switch deployment instruction includes mac information of at least one bare metal server and an IP address of a physical switch connected to the mac information, so that the physical switch can learn the mac information of the bare metal server connected to each physical switch, and thus after a target bare metal server directly connected to a home terminal is determined, the physical switch can generate routing information according to the mac information of other bare metal servers except the target bare metal server in the at least one bare metal server and the IP address corresponding to the physical switch connected to the bare metal server, and bind the routing information to a virtual network forwarding table corresponding to the virtual network, where the virtual network forwarding table is maintained as a virtual edge device created on the physical switch of the home terminal. Therefore, after receiving the target traffic of the target bare metal switch, the physical switch at the home terminal sends the target traffic to the virtual edge device created at the home terminal, so that the virtual edge device forwards the target traffic according to the virtual network forwarding table. Obviously, since the correspondence between mac information and IP addresses is recorded in the virtual network forwarding table, in this embodiment of the present specification, the virtual network forwarding table is a link layer forwarding table.
In an embodiment of the present specification, the associating the target bare metal server to the virtual switch includes: and binding the corresponding relation between the mac information of the target bare metal server and the corresponding local port thereof to a virtual network forwarding table corresponding to the virtual network in the form of routing information. The bare metal server connected with the local port can be obtained by checking the local device table, so that the mac information of the target bare metal server and the routing information of the corresponding local port are written in the virtual network forwarding table, and when the message from other virtual edge devices is sent to the virtual edge device, the message can be forwarded to the target bare metal server when the target mac information of the message is the mac information of the target bare metal server. In addition, the corresponding relationship between the mac information of the target bare metal server and the virtual network identifier can be written in the local device table, so that after the target traffic from the target bare metal server is received, the corresponding virtual network can be obtained through device table lookup, and the virtual edge device to which the target traffic should be sent can be determined.
S206: forwarding, by the virtual switch, the target traffic for the target bare metal server if the target traffic is received.
As described above, after the target bare metal server is associated with the virtual router, when the target traffic for the target bare metal server is received, the target traffic is forwarded based on the virtual network forwarding table through the virtual edge device created in the local physical switch. For example, when a message from a target bare metal server is received, first, it is known that the message is from the target bare metal server according to source mac information of the message, then, an equipment table maintained on a physical switch at the home terminal is searched, a virtual network identifier corresponding to the source mac information is searched, so that virtual edge equipment created by a virtual network based on the virtual network identifier on the physical switch at the home terminal is determined to forward the message to the physical switch at the home terminal, and the virtual edge equipment forwards a target flow according to a virtual network forwarding table maintained by the virtual edge equipment; for another example, when a received packet includes a virtual network identifier, first, a corresponding virtual network is determined based on the network identifier, and the packet is forwarded to a virtual edge device created by the local physical switch for the corresponding virtual network after the virtual network identifier is removed, and assuming that the destination mac information of the packet is the mac identifier of the target bare metal server, the packet is directly forwarded to a local port corresponding to the target bare metal server based on a virtual network forwarding table in the virtual edge device, so as to finally forward the packet to the target bare metal server.
In the embodiment of the description, the virtual switch deployment instruction is issued to the physical switch connected with the bare metal server, so that the virtual switch is only deployed by the physical switch, and then the target bare metal server is associated with the virtual switch constructed based on the physical switch, thereby realizing the process of deploying the bare metal server under the virtual switch. Because the virtual switch is not directly deployed on the bare metal server, the bare metal server which is actually deployed, namely the bare metal server which is subsequently delivered to the user, can keep the state of not installing any irrelevant software, and the requirement of the user on renting the bare metal server is met.
In this embodiment of the present specification, the virtual switch and the bare metal server connected to the virtual switch belong to a virtual private cloud VPC corresponding to an initiator user of the virtual switch deployment instruction. In embodiments of the present specification, the virtual switch is managed by a management server in the bare metal cloud, the virtual router deployment instruction being initiated by the management server in response to a user-implemented virtual router deployment operation. The user identities of different users have a binding relationship with the Virtual network identifier, so that after the user logs in the management server through the client, the user can initiate various configuration operations on the VPC (Virtual Private Cloud) of the user through a console on the client, wherein the configuration operations include rule configuration operations and Virtual router deployment operations. For example, after a user initiates a virtual router deployment operation, a corresponding virtual router deployment request is generated and sent to the management server from the client, the management server further generates a virtual router deployment instruction after receiving the virtual router deployment request and sends the virtual router deployment instruction to a corresponding physical switch in the bare metal cloud, and meanwhile, the virtual router deployment instruction carries a virtual network identifier corresponding to the user identity. Through the embodiment of the specification, a user can realize configuration operation on the VPC owned by the user, for example, by initiating virtual switch deployment operation, so as to realize configuration of any number of bare computer servers, so as to add the bare computer servers into the VPC of the user, and thus, a renting function for the bare computer servers is completed.
Fig. 3 is a schematic diagram of a network architecture of a VPC according to an exemplary embodiment. As shown in fig. 3, the VPC of the user includes a virtual router for connecting to the Internet, private line or other cloud services of the public network, and a virtual router, for connecting bare metal server 1, bare metal server 3, bare metal server 4 and bare metal server 5, respectively, as will be appreciated from the foregoing description, the virtual router is essentially implemented by a virtual network, physically connected to bare metal server 1 and bare metal server 3 are physical routers B, the bare metal server 4 and the bare metal server 5 are physically connected with a physical router C, and the physical router B and the physical router C realize two-layer intercommunication through network tunnels between virtual edge devices respectively established, thus, a logical two-layer network is constructed, and at the moment, the bare metal server 1, the bare metal server 3, the bare metal server 4 and the bare metal server 5 can perform two-layer mutual access without perception.
Optionally, the method further includes: and responding to the received rule configuration instruction, and configuring a flow forwarding rule for the virtual switch. In this embodiment of the present specification, the rule configuration instruction includes a virtual network identifier, so that after receiving the rule configuration instruction, the physical switch first needs to determine a corresponding virtual network according to the virtual network identifier, so as to determine a virtual edge device in the corresponding virtual network deployed at a local end, and then configures the virtual edge device based on a flow table, which is carried in the rule configuration instruction and records a traffic forwarding rule of the virtual switch, where the virtual switch is implemented by a virtual network essentially, and therefore, the virtual switch configured in the embodiment of the present specification is an actual virtual switch implemented by the virtual network corresponding to the virtual network identifier, and configuring the virtual edge device is equivalent to configuring the virtual switch. In this specification embodiment, the configuration traffic forwarding rules may be for one or more bare metal servers connected to the virtual switch, and the traffic forwarding rules include security groups and/or access control rules. In this embodiment of the present specification, a rule configuration instruction may be sent to configure a created virtual switch, so that a user may configure a personalized flow control policy for a virtual private network in a bare metal cloud owned by the user.
Fig. 4 is a flowchart of a configuration method of a bare metal server provided by the present specification according to an exemplary embodiment, and the method is applied to a management server, and includes the following steps:
s402: in response to a virtual switch deployment request initiated for a target bare metal server, determining a physical switch connected with the target bare metal server.
In this embodiment, the management server may be a management server in the bare metal cloud shown in fig. 1, the virtual switch deployment request may be initiated by a user at a client that has logged in to the management server, and the virtual switch deployment request is generated by a virtual switch deployment operation in response to a console on the client by the user. For example, a user may perform a virtual switch deployment operation at a console interface on a client after logging the client into a management server and assign the number of bare metal servers that the virtual switch needs to hang down. After the virtual switch deployment request generated by the client is received by the management server, the management server automatically allocates a corresponding number of bare metal servers which are not configured and are in an idle state to be the target bare metal servers according to the number of bare metal servers required to be hung down by the virtual switch, because the management server can globally manage all the devices in the bare metal cloud, the working state, the configuration condition and basic information (such as an IP address, mac information and a position in a network architecture) of each bare metal server can be known. Meanwhile, the management server may further determine a physical switch to which the target bare metal server is physically connected, and when the number of the target bare metal servers is plural and the target bare metal servers are connected to different physical switches, the number of the physical switches to be finally determined is also plural.
S404: sending a virtual switch deployment instruction to the determined physical switch, enabling the determined physical switch to participate in deploying the virtual switch, and associating the target bare metal server to the virtual switch, so that the virtual switch is used for forwarding target traffic, which is received by the determined physical switch and is aimed at the target bare metal server.
The management server sends a virtual switch deployment instruction to the determined physical switch based on the determined IP address of the physical switch. It should be noted that, when the number of the determined physical switches is multiple, for each determined physical switch, the target bare metal server associated with the virtual switch is not all the target bare metal servers, but is the target bare metal server physically connected to the determined physical switch. Since the information that can be obtained locally by different determined physical switches is slightly different, when the virtual switch is not sent as an instruction, a personalized customized virtual switch deployment instruction can be sent to different determined physical switches, for example, the virtual switch deployment instruction sent to a certain determined physical switch can only include IP addresses of all determined physical switches except the determined physical switch, because the IP addresses are known information for the determined physical switch, theoretically, the determined physical switch belongs to redundant information, and when the virtual switch deployment instruction is sent, the redundant information is excluded, so that invalid traffic can be prevented from being increased in a network, and the network load in a bare computer cloud can be reduced. As described above, the virtual network identifier carried in the virtual switch deployment instruction is uniquely determined by the user identity that initiates the virtual switch deployment operation. The behavior of the physical switch after receiving the virtual switch deployment instruction is described in detail in the foregoing embodiments, and is not described here again.
In the embodiment of the description, the virtual switch deployment instruction is issued to the physical switch connected with the bare metal server, so that the virtual switch is only deployed by the physical switch, and then the target bare metal server is associated with the virtual switch constructed based on the physical switch, thereby realizing the process of deploying the bare metal server under the virtual switch. Because the virtual switch is not directly deployed on the bare metal server, the bare metal server which is actually deployed, namely the bare metal server which is subsequently delivered to the user, can keep the state of not installing any irrelevant software, and the requirement of the user on renting the bare metal server is met.
Optionally, any physical switch includes a configuration port, where the configuration port is used to enable the management server to manage the physical switch; the sending of the virtual switch deployment instruction to the determined physical switch includes: and sending a virtual switch deployment instruction to the determined physical switch through the configuration port in the determined physical switch. In this embodiment, the any physical switch may be any physical switch in the bare metal cloud shown in fig. 1, and all physical switches in the bare metal cloud include at least one configuration port, so that when configuring the physical switch, the management server may enter the physical switch through the dedicated configuration port, and meanwhile, a management network implemented based on the physical port may be constructed based on the configuration ports of the physical switches, thereby implementing link separation between data traffic in the management network and other traffic in the bare metal cloud, and avoiding sharing the same link with other traffic in the network, so as to ensure that traffic for the configuration behavior of the physical switch is not interfered by the overall network load.
Optionally, any bare metal server includes a management port, and the management port is used for the management server to manage the bare metal server. Similar to the configuration port on the physical switch, any bare metal server may be any bare metal server in the bare metal cloud shown in fig. 1, and each bare metal server in the bare metal cloud may reserve a management port dedicated to be called by a management server, so that link separation of traffic of a management action from other network traffic is achieved, and it is ensured that traffic of the management action for the bare metal server is not interfered by the overall network load.
The present specification also provides embodiments of an apparatus, an electronic device, and a storage medium, corresponding to embodiments of the foregoing method.
FIG. 5 is a schematic block diagram of an apparatus provided in an exemplary embodiment. Referring to fig. 5, at the hardware level, the apparatus includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, but may also include hardware required for other functions. One or more embodiments of the present description may be implemented in software, such as by processor 502 reading corresponding computer programs from non-volatile storage 510 into memory 508 and then running. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
As shown in fig. 6, fig. 6 is a block diagram of a traffic forwarding apparatus provided in this specification according to an exemplary embodiment, where the apparatus may be applied in the device shown in fig. 5 to implement a traffic forwarding scheme according to this specification, and the apparatus is applied in a physical switch connected to a bare metal server, and may include:
an instruction receiving unit 601, configured to participate in deploying a virtual switch in response to a received virtual switch deployment instruction;
a bare metal association unit 602, configured to determine, in a bare metal server connected to the physical switch, a target bare metal server specified by the virtual switch deployment instruction, and associate the target bare metal server to the virtual switch;
a traffic forwarding unit 603, configured to forward, by the virtual switch, the target traffic for the target bare metal server when the target traffic is received.
Optionally, the virtual switch deployment instruction includes a virtual network identifier, and the instruction receiving unit 601 is specifically configured to:
creating virtual edge equipment in a virtual network corresponding to the virtual network identifier;
wherein the virtual switch is implemented based on the virtual network.
Optionally, the virtual switch deployment instruction includes information of multiple physical switches; the virtual network comprises virtual edge devices respectively established by the physical switches and network tunnels maintained among the virtual edge devices.
Optionally, the virtual switch deployment instruction includes mac information of at least one bare metal server and an IP address of a physical switch connected to each of the bare metal servers, and the apparatus further includes:
a target bare metal determining unit 604, configured to determine other bare metal servers in the at least one bare metal server except the target bare metal server;
and a routing information binding unit 605, configured to generate routing information according to the mac information of the other bare metal servers and the IP address corresponding to the physical switch connected to the bare metal servers, and bind the routing information to a virtual network forwarding table corresponding to the virtual network.
Optionally, the bare metal association unit 602 is specifically configured to:
and binding the corresponding relation between the mac information of the target bare metal server and the corresponding local port thereof to a virtual network forwarding table corresponding to the virtual network in the form of routing information.
Optionally, the virtual network forwarding table is a link layer forwarding table.
Optionally, the virtual switch and the bare metal server connected to the virtual switch belong to a virtual private cloud VPC corresponding to an initiator user of the virtual switch deployment instruction.
As shown in fig. 7, fig. 7 is a block diagram of a configuration apparatus of a bare metal server provided in the present specification according to an exemplary embodiment, where the apparatus may be applied to a device shown in fig. 5 to implement a configuration scheme of the bare metal server according to the present specification, and the apparatus is applied to a management server, and may include:
a request response unit 701, configured to determine, in response to a virtual switch deployment request initiated for a target bare metal server, a physical switch connected to the target bare metal server;
an instruction sending unit 702, configured to send a virtual switch deployment instruction to the determined physical switch, so that the determined physical switch participates in deploying a virtual switch, and associate the target bare die server to the virtual switch, where the virtual switch is used to forward a target traffic, which is received by the determined physical switch and is addressed to the target bare die server, by the virtual switch.
Optionally, any physical switch includes a configuration port, where the configuration port is used to enable the management server to manage the physical switch; the sending of the virtual switch deployment instruction to the determined physical switch includes:
and sending a virtual switch deployment instruction to the determined physical switch through the configuration port in the determined physical switch.
Correspondingly, the present specification also provides an apparatus comprising a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to implement the steps of the traffic forwarding method or the configuration method of the bare metal server provided by all the above method embodiments.
Accordingly, the present specification also provides a computer readable storage medium having executable instructions stored thereon; when executed by a processor, the instructions implement the steps of the traffic forwarding method or the configuration method of the bare metal server provided by all the above method embodiments.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.

Claims (13)

1. A traffic forwarding method is applied to a physical switch connected with a bare metal server, and comprises the following steps:
participating in deploying the virtual switch in response to the received virtual switch deployment instruction;
determining a target bare metal server specified by the virtual switch deployment instruction in bare metal servers connected with the physical switch, and associating the target bare metal server to the virtual switch;
forwarding, by the virtual switch, the target traffic for the target bare metal server if the target traffic is received.
2. The method of claim 1, wherein the virtual switch deployment instruction comprises a virtual network identifier, and wherein the participating deployment virtual switch comprises:
creating virtual edge equipment in a virtual network corresponding to the virtual network identifier;
wherein the virtual switch is implemented based on the virtual network.
3. The method of claim 2, wherein the virtual switch deployment instruction comprises information of a plurality of physical switches; the virtual network comprises virtual edge devices respectively established by the physical switches and network tunnels maintained among the virtual edge devices.
4. The method of claim 3, wherein the virtual switch deployment instruction comprises mac information of at least one bare metal server and an IP address of a physical switch to which each is connected, the method further comprising:
determining other bare metal servers in the at least one bare metal server except the target bare metal server;
and generating routing information according to the mac information of the other bare metal servers and the IP addresses corresponding to the physical switches connected with the bare metal servers, and binding the routing information to a virtual network forwarding table corresponding to the virtual network.
5. The method of claim 2, wherein associating the target bare metal server to the virtual switch comprises:
and binding the corresponding relation between the mac information of the target bare metal server and the corresponding local port thereof to a virtual network forwarding table corresponding to the virtual network in the form of routing information.
6. The method of claim 4 or 5, wherein the virtual network forwarding table is a link layer forwarding table.
7. The method of claim 1, wherein the virtual switch and the bare metal server connected to the virtual switch are attributed to a Virtual Private Cloud (VPC) corresponding to an initiator user of the virtual switch deployment instruction.
8. A configuration method of a bare metal server is applied to a management server and comprises the following steps:
in response to a virtual switch deployment request initiated for a target bare metal server, determining a physical switch connected with the target bare metal server;
sending a virtual switch deployment instruction to the determined physical switch, enabling the determined physical switch to participate in deploying the virtual switch, and associating the target bare metal server to the virtual switch, so that the virtual switch is used for forwarding target traffic, which is received by the determined physical switch and is aimed at the target bare metal server.
9. The method according to claim 8, wherein any physical switch includes a configuration port, and the configuration port is used for enabling the management server to manage the any physical switch; the sending of the virtual switch deployment instruction to the determined physical switch includes:
and sending a virtual switch deployment instruction to the determined physical switch through the configuration port in the determined physical switch.
10. A traffic forwarding device applied to a physical switch connected to a bare metal server, comprising:
the instruction receiving unit is used for responding to the received virtual switch deployment instruction and participating in deploying the virtual switch;
a bare metal association unit, configured to determine, in a bare metal server connected to the physical switch, a target bare metal server specified by the virtual switch deployment instruction, and associate the target bare metal server to the virtual switch;
and a traffic forwarding unit, configured to forward, by the virtual switch, the target traffic for the target bare metal server when the target traffic is received.
11. A bare metal server configuration device is applied to a management server and comprises:
the device comprises a request response unit, a virtual switch deployment unit and a virtual switch deployment unit, wherein the request response unit is used for responding to a virtual switch deployment request initiated aiming at a target bare metal server and determining a physical switch connected with the target bare metal server;
and the instruction sending unit is used for sending a virtual switch deployment instruction to the determined physical switch, enabling the determined physical switch to participate in deploying the virtual switch, associating the target bare computer server to the virtual switch, and enabling the virtual switch to be used for forwarding the target traffic, which is received by the determined physical switch and aims at the target bare computer server.
12. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1-9 by executing the executable instructions.
13. A computer-readable storage medium having stored thereon computer instructions, which, when executed by a processor, carry out the steps of the method according to any one of claims 1-9.
CN202111454610.5A 2021-12-01 2021-12-01 Configuration method and device of traffic forwarding and bare computer server Active CN114172853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111454610.5A CN114172853B (en) 2021-12-01 2021-12-01 Configuration method and device of traffic forwarding and bare computer server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111454610.5A CN114172853B (en) 2021-12-01 2021-12-01 Configuration method and device of traffic forwarding and bare computer server

Publications (2)

Publication Number Publication Date
CN114172853A true CN114172853A (en) 2022-03-11
CN114172853B CN114172853B (en) 2024-04-16

Family

ID=80482112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111454610.5A Active CN114172853B (en) 2021-12-01 2021-12-01 Configuration method and device of traffic forwarding and bare computer server

Country Status (1)

Country Link
CN (1) CN114172853B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225708A (en) * 2022-07-28 2022-10-21 天翼云科技有限公司 Message forwarding method, computer equipment and storage medium
WO2024113776A1 (en) * 2022-11-28 2024-06-06 华为云计算技术有限公司 Data transmission method and related device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2525532A1 (en) * 2011-05-19 2012-11-21 Hitachi Ltd. Method and apparatus of connectivity discovery between network switch and server based on vlan identifiers
US20130266019A1 (en) * 2012-04-09 2013-10-10 Futurewei Technologies, Inc. L3 Gateway for VXLAN
CN105162674A (en) * 2015-10-16 2015-12-16 上海斐讯数据通信技术有限公司 Method and network card for physical machine to access to virtual network
CN106375176A (en) * 2016-08-29 2017-02-01 无锡华云数据技术服务有限公司 Method for accessing physical machine to cloud platform
CN107135134A (en) * 2017-03-29 2017-09-05 广东网金控股股份有限公司 Private network cut-in method and system based on virtual switch and SDN technologies
WO2020219235A1 (en) * 2019-04-26 2020-10-29 Microsoft Technology Licensing, Llc Enabling access to dedicated resources in a virtual network using top of rack switches
WO2021000694A1 (en) * 2019-06-29 2021-01-07 华为技术有限公司 Method for deploying services and scheduling apparatus
US20210021475A1 (en) * 2019-07-18 2021-01-21 International Business Machines Corporation Network layer method of configuration of a bare-metal server in a virtual network
CN112256393A (en) * 2020-10-22 2021-01-22 上海云轴信息科技有限公司 Resource management method and equipment for bare metal server
CN112737860A (en) * 2021-01-06 2021-04-30 浪潮云信息技术股份公司 Method for bare metal server VXLAN access and computer readable medium
WO2021206790A1 (en) * 2020-04-06 2021-10-14 Vmware, Inc. Architecture for stretching logical switches between multiple datacenters

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2525532A1 (en) * 2011-05-19 2012-11-21 Hitachi Ltd. Method and apparatus of connectivity discovery between network switch and server based on vlan identifiers
US20130266019A1 (en) * 2012-04-09 2013-10-10 Futurewei Technologies, Inc. L3 Gateway for VXLAN
CN105162674A (en) * 2015-10-16 2015-12-16 上海斐讯数据通信技术有限公司 Method and network card for physical machine to access to virtual network
CN106375176A (en) * 2016-08-29 2017-02-01 无锡华云数据技术服务有限公司 Method for accessing physical machine to cloud platform
CN107135134A (en) * 2017-03-29 2017-09-05 广东网金控股股份有限公司 Private network cut-in method and system based on virtual switch and SDN technologies
WO2020219235A1 (en) * 2019-04-26 2020-10-29 Microsoft Technology Licensing, Llc Enabling access to dedicated resources in a virtual network using top of rack switches
WO2021000694A1 (en) * 2019-06-29 2021-01-07 华为技术有限公司 Method for deploying services and scheduling apparatus
US20210021475A1 (en) * 2019-07-18 2021-01-21 International Business Machines Corporation Network layer method of configuration of a bare-metal server in a virtual network
WO2021206790A1 (en) * 2020-04-06 2021-10-14 Vmware, Inc. Architecture for stretching logical switches between multiple datacenters
CN112256393A (en) * 2020-10-22 2021-01-22 上海云轴信息科技有限公司 Resource management method and equipment for bare metal server
CN112737860A (en) * 2021-01-06 2021-04-30 浪潮云信息技术股份公司 Method for bare metal server VXLAN access and computer readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张届新;傅志仁;吴志明;徐文华;徐海峰;: "VxLAN在云数据中心组网的应用", 电信科学, no. 09 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225708A (en) * 2022-07-28 2022-10-21 天翼云科技有限公司 Message forwarding method, computer equipment and storage medium
CN115225708B (en) * 2022-07-28 2023-08-08 天翼云科技有限公司 Message forwarding method computer equipment and storage medium
WO2024113776A1 (en) * 2022-11-28 2024-06-06 华为云计算技术有限公司 Data transmission method and related device

Also Published As

Publication number Publication date
CN114172853B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
US11265368B2 (en) Load balancing method, apparatus, and system
US11902364B2 (en) Automatic replacement of computing nodes in a virtual computer network
CN107783815B (en) Method and device for determining virtual machine migration
US11303553B1 (en) Return path trace
CN107317832B (en) Message forwarding method and device
CN108965092B (en) Data message transmission method and device
CN114172853B (en) Configuration method and device of traffic forwarding and bare computer server
JP2019517168A (en) Interconnection between physical and virtual networks
US10574570B2 (en) Communication processing method and apparatus
CN110635987A (en) Message transmission method, device, equipment and machine readable storage medium
CN113326101B (en) Thermal migration method, device and equipment based on remote direct data storage
US11757766B2 (en) Reflection route for link local packet processing
CN111064804B (en) Network access method and device
CN111314450B (en) Data transmission method and device, electronic equipment and computer storage medium
CN113315848A (en) Access control method, device and equipment
CN107659516B (en) Function control method and device for broadband remote access server BRAS
WO2024113895A1 (en) Load balancing method, apparatus and system, system creation method, and device and medium
CN116055446B (en) Cross-network message forwarding method, electronic equipment and machine-readable storage medium
CN116319354B (en) Network topology updating method based on cloud instance migration
CN113810230B (en) Method, device and system for carrying out network configuration on containers in container cluster
CN110740198B (en) Neighbor table item management method and device, electronic equipment and machine-readable storage medium
WO2024001549A9 (en) Address configuration method and electronic device
CN113810230A (en) Method, device and system for carrying out network configuration on containers in container cluster
CN117255018A (en) Network configuration method and device for bare metal instance and computer equipment
CN116208600A (en) File transfer protocol request processing method, device, 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