CN115567383A - Network configuration method, host server, device, and storage medium - Google Patents

Network configuration method, host server, device, and storage medium Download PDF

Info

Publication number
CN115567383A
CN115567383A CN202211156099.5A CN202211156099A CN115567383A CN 115567383 A CN115567383 A CN 115567383A CN 202211156099 A CN202211156099 A CN 202211156099A CN 115567383 A CN115567383 A CN 115567383A
Authority
CN
China
Prior art keywords
network
virtual network
bridge
virtual
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211156099.5A
Other languages
Chinese (zh)
Inventor
杨强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Resources Digital Technology Co Ltd
Original Assignee
China Resources Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Resources Digital Technology Co Ltd filed Critical China Resources Digital Technology Co Ltd
Priority to CN202211156099.5A priority Critical patent/CN115567383A/en
Publication of CN115567383A publication Critical patent/CN115567383A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Landscapes

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

Abstract

The embodiment of the invention provides a network configuration method, a host server, equipment and a storage medium, and relates to the technical field of virtual networks. The network configuration method applied to the host server comprises the following steps: by acquiring virtual network configuration parameters, creating more than one virtual network sub-interface according to a virtual network label by using a Bond port of Linux Bridge, and generating a virtual network port corresponding to each virtual network sub-interface by using Open vSwitch; then mounting each virtual network port to a corresponding network bridge according to the network bridge service label; finally, the network plane IP address of each bridge is configured to generate a virtual network plane. In the embodiment, the virtual network plane is automatically configured by acquiring the virtual network configuration parameters, and in the configuration process, because the Open vSwitch technology and the Linux Bridge technology are combined, the problem that the two technologies cannot be organically combined in the related technology is solved, so that the configuration parameters of the network plane are unified, and the system maintenance difficulty is reduced.

Description

Network configuration method, host server, device, and storage medium
Technical Field
The present invention relates to the field of virtual network technologies, and in particular, to a network configuration method, a host server, a device, and a storage medium.
Background
The private cloud platform deployment process includes planning multiple network planes, such as a management network plane, a service network plane, a storage network plane, a Web access network plane, and the like, where the network planes mainly rely on a host server to provide physical network devices or virtual network devices, and different network planes are isolated from each other. Due to the limitation of the physical network card of the host server, most host servers cannot provide enough available physical network cards, so that cloud platform deployment cannot completely rely on the physical network cards, and also needs to rely on part of virtual network cards to provide enough network devices.
The technology for splitting a physical network card into a plurality of virtual network cards in the related technology mainly comprises the following steps: linux virtual Bridge (Linux Bridge) and virtual switching (Open vSwitch, OVS). The virtual network card is configured based on the two technologies, and the following defects exist: 1) The configuration process of the virtual network card in the existing scheme mainly executes a command line manually, the configuration efficiency is low, the configuration parameters cannot be persisted, and the host server needs to be reconfigured after being restarted; 2) In the existing scheme, configuration of a service-related network plane of a private cloud is mainly realized by using Open vSwitch technology support, network configuration of a host server layer is mainly realized by using Linux Bridge technology support, and the two technologies cannot be organically combined to carry out unified configuration, so that maintenance difficulty is high.
Disclosure of Invention
The embodiment of the application mainly aims to provide a network configuration method, a host server, equipment and a storage medium, which can automatically configure a virtual network plane, and combine an Open vSwitch technology and a Linux Bridge technology to perform network configuration, so as to obtain unified configuration parameters and reduce maintenance difficulty.
In order to achieve the above object, a first aspect of the embodiments of the present application provides a network configuration method, including:
acquiring virtual network configuration parameters, wherein the virtual network configuration parameters comprise virtual network tags and bridge service tags;
creating more than one virtual network subinterface according to the virtual network label by using a Bond portal of Linux Bridge, wherein the Bond portal is generated by at least one physical network equipment interface according to a first binding relationship;
generating a virtual network port corresponding to each virtual network sub-interface by utilizing Open vSwitch;
mounting each virtual network port to a corresponding network bridge according to the network bridge service label;
configuring a network plane IP address of each of the bridges to generate a virtual network plane.
In some embodiments, the virtual network tag comprises: a virtual network interface ID and a virtual network interface working mode; the creating more than one virtual network subinterfaces by using the Bond portal of the Linux Bridge according to the virtual network label comprises the following steps:
configuring at least one physical network equipment interface to obtain the first binding information;
configuring a virtual network interface working mode of the Bond network port according to the first binding information, wherein the virtual network interface working mode is a switching mode of at least one physical network device interface, and the virtual network interface working mode comprises one of the following modes: a balanced polling strategy, a master backup strategy, a balanced strategy, a broadcast strategy, dynamic link aggregation, adapter transmission load balancing or adapter adaptive load balancing;
creating, with the Bond portal, one or more virtual network subinterfaces based on the virtual network interface ID.
In some embodiments, the bridge service tag includes: the method comprises the following steps of (1) network bridge service name and network bridge configuration information, wherein the network bridge configuration information comprises: a network address, network mask, or gateway; the mounting each virtual network port to a corresponding bridge according to the bridge service tag includes:
configuring the network of the network bridge according to the network bridge network configuration information;
and mounting each virtual network port to the corresponding network bridge according to the network bridge service name.
In some embodiments, before the obtaining the virtual network configuration parameter, the method further includes:
sending available network card information according to the network card query request;
and receiving the virtual network configuration parameters generated based on the available network card information.
In some embodiments, the obtaining the virtual network configuration parameter includes:
and receiving the virtual network configuration parameters sent by using the Sshpass tool.
In some embodiments, further comprising:
and writing the configuration parameters in the configuration process into the network configuration file of the host server.
In order to achieve the above object, a second aspect of the embodiments of the present application provides a network configuration method applied to a network management server, including:
sending a network card query request to a host server;
receiving available network card information sent by the host server in response to the network card query request;
receiving the virtual network configuration parameters corresponding to the available network card information;
sending the virtual network configuration parameters to the host server by using a Sshpass tool, so that the host server can generate a virtual network plane by using the network configuration method according to any one of the first aspect.
In some embodiments, the receiving the virtual network configuration parameter corresponding to the available network card information includes:
receiving Web request information corresponding to the available network card information;
and generating the virtual network configuration parameters according to the Web request information, wherein the virtual network configuration parameters are script form data.
To achieve the above object, a third aspect of the embodiments of the present application provides a host server, including:
a configuration parameter obtaining unit, configured to obtain a virtual network configuration parameter, where the virtual network configuration parameter includes a virtual network tag and a bridge service tag;
the virtual network subinterface creating unit is used for creating more than one virtual network subinterface according to the virtual network label by using a Bond network port of Linux Bridge, and the Bond network port is generated by at least one master equipment network interface and at least one slave equipment network interface according to a first binding relationship;
a virtual network port generating unit, configured to generate a virtual network port corresponding to each virtual network subinterface by using Open vSwitch;
the bridge mounting unit is used for mounting each virtual network port to a corresponding bridge according to the bridge service tag;
a virtual network plane generating unit, configured to configure a network plane IP address of each bridge to generate a virtual network plane.
In order to achieve the above object, a fourth aspect of the embodiments of the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the network configuration method according to any one of the first aspect or the second aspect when executing the computer program.
To achieve the above object, a fifth aspect of embodiments of the present application provides a storage medium, which is a computer-readable storage medium, and stores a computer program, which when executed by a processor, implements the network configuration method according to any one of the first aspect or the network configuration method according to any one of the second aspect.
According to the network configuration method, the host server, the device and the storage medium, the host server establishes more than one virtual network sub-interface according to the virtual network label by using the Bond port of Linux Bridge through acquiring the virtual network configuration parameters, and then generates the virtual network port corresponding to each virtual network sub-interface by using the Open vSwitch; then mounting each virtual network port to a corresponding network bridge according to the network bridge service label; finally, the network plane IP address of each bridge is configured to generate a virtual network plane. In the embodiment, the virtual network plane is automatically configured by obtaining the virtual network configuration parameters, and in the configuration process, because the Open vSwitch technology and the Linux Bridge technology are combined, the problem that the two technologies cannot be organically combined in the related technology is solved, so that the configuration parameters of the network plane are unified, and the system maintenance difficulty is reduced.
Drawings
Fig. 1 is a flowchart of a network configuration method applied to a host server according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of the operating principle of Linux Bridge applied to the network configuration method of the host server according to another embodiment of the present invention.
Fig. 3 is a flowchart of step S120 in fig. 1.
Fig. 4 is a flowchart of step S140 in fig. 1.
Fig. 5 is a schematic diagram of a network configuration method applied to a host server according to another embodiment of the present invention.
Fig. 6 is a flowchart of a network configuration method applied to a network management server according to an embodiment of the present invention.
Fig. 7 is a flowchart of step S630 in fig. 6.
Fig. 8 is a schematic diagram of a network configuration method applied to a network management server according to another embodiment of the present invention.
Fig. 9 is a schematic Web page of a network configuration method applied to a network management server according to yet another embodiment of the present invention.
Fig. 10 is a block diagram of a network configuration device applied to a host server according to an embodiment of the present invention.
Fig. 11 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The cloud platform deployment process of the private cloud includes planning multiple network planes, such as a management network plane, a service network plane, a storage network plane, a Web access network plane, and the like, where the network planes mainly rely on a host server to provide physical network devices or virtual network devices, and different network planes are isolated from each other. Due to the limitation of the physical network card of the host server, most of the host servers cannot provide enough available physical network cards, so that the cloud platform deployment cannot completely depend on the physical network cards, and needs to depend on partial virtual network cards to provide enough network devices.
The applicant finds that the technology of splitting the physical network card into a plurality of virtual network cards in the related art is mainly as follows: two virtual switching technologies, linux Bridge and Open vSwitch. The virtual network card is configured based on the two technologies, and the following defects exist: 1) The configuration process of the virtual network card in the existing scheme is mainly to manually execute a command line, the configuration efficiency is low, the configuration parameters cannot be persisted, and the host server needs to be reconfigured after being restarted; 2) In the existing scheme, the configuration of a service-related network plane of a private cloud is mainly realized by using an Open vSwitch technology, while the network configuration of a host server layer is mainly realized by using a Linux Bridge technology, and the two technologies cannot be organically combined and configured in a reverse unified manner, so that the maintenance difficulty is high; 3) If the network of the host server is completely supported by using the Open vSwitch technology, the network card of the host server cannot be split into a plurality of virtual network card sub-interfaces with vlan tags.
Based on this, the embodiment of the present invention provides a network configuration method, a host server, a device, and a storage medium, in the network configuration method, the host server creates more than one virtual network subinterfaces according to a virtual network label by obtaining a virtual network configuration parameter through a Bond portal of Linux Bridge, and then generates a virtual network port corresponding to each virtual network subinterface by using Open vSwitch; then mounting each virtual network port to a corresponding network bridge according to the network bridge service label; finally, the network plane IP address of each bridge is configured to generate a virtual network plane. The virtual network plane is automatically configured by acquiring the virtual network configuration parameters, and in the configuration process, because the Open vSwitch technology and the Linux Bridge technology are combined, the problem that the two technologies cannot be organically combined in the related technology is solved, the configuration parameters of the network plane are unified, and the system maintenance difficulty is reduced.
Embodiments of the present invention provide a network configuration method, a host server, a device, and a storage medium, which are specifically described with reference to the following embodiments, and first describe the network configuration method in the embodiments of the present invention.
In order to facilitate understanding of the embodiments of the present application, first, a brief description is given below of a concept of network configuration in conjunction with an example of a specific application scenario.
If a cloud platform of a private cloud needs to plan multiple network planes, such as a management network plane, a service network plane, a storage network plane, a Web access network plane, and the like, most host servers cannot provide enough available physical network cards due to the limitation of the physical network cards of the host servers, so that the deployment of the cloud platform cannot completely rely on the physical network cards, and also needs to rely on part of virtual network cards to provide enough network devices. Therefore, the physical network card needs to be split into different numbers of virtual network cards on the host server according to the network configuration information, and each network card (virtual network card) corresponds to one network plane. According to the method and the device, automatic configuration is introduced in the host layer network configuration process of the existing private cloud, so that a user can automatically configure the virtual network card of the physical host of the cloud platform on the premise of knowing network configuration parameters, and provide physical network equipment or virtual network equipment for each network plane, so that different network planes are isolated from each other. The process of configuring the virtual network card by using the configuration parameters is the network configuration in the embodiment of the present application.
The following first describes a network configuration method in an embodiment of the present invention. The method is applied to the host server, can automatically configure the virtual network required by the cloud platform host server before the OpenStack cloud platform is deployed, and can realize isolation among different virtual networks.
Fig. 1 is an alternative flowchart of a network configuration method according to an embodiment of the present invention, where the method in fig. 1 may include, but is not limited to, steps S110 to S150. Meanwhile, it is understood that the present embodiment does not specifically limit the sequence from step S110 to step S150 in fig. 1, and the sequence of the steps may be adjusted or some steps may be reduced or increased according to actual requirements.
Step S110: and acquiring virtual network configuration parameters.
The virtual network card, also called virtual network adapter, is a network adapter in the simulated network environment by software, and is mainly used for establishing a local area network between remote computers. In one embodiment, the virtual network configuration parameters include a virtual network tag and a bridge service tag, wherein the virtual network tag includes: virtual network interface ID and virtual network interface mode of operation, the bridge service label includes: bridge service name and bridge network configuration information.
In one embodiment, the visual user operation platform can be set up, the network configuration requirements of the user can be acquired on the user operation interface, and the visual operation platform converts the network configuration requirements input by the user into virtual network configuration parameters which can be identified by the computer.
Step S120: and creating more than one virtual network subinterface according to the virtual network label by using the Bond network port of the Linux Bridge.
Linux Bridge is a virtual network device that works in two layers, functions like a physical switch, and is a Bridge. The Bridge can bind other Linux network devices as slave devices and virtualize the devices into ports, and when one slave device is bound to the Bridge, the Bridge is equivalent to a network wire connected with a terminal inserted into a switch port in a real network.
Fig. 2 is a schematic diagram of the working principle of the Linux Bridge in this embodiment.
Referring to fig. 2, the bond0 portal of the bridge device binds three slave devices: a physical network device interface eth0, a virtual device tap0, and a virtual device tap1. For the upper layer of the network protocol stack, only the bond0 network interface is concerned, and the details of the network bridge are not required to be concerned. When receiving the data packet, the slave devices submit the data packet to the bond0 to determine the destination of the data packet, and the bond0 forwards the data packet according to the mapping relation between the MAC address and the port. Since Bridge works on the second layer, the slave devices eth0, tap0 and tap1 bound to the bond0 do not need to set IP any more, and for the upper layer router, the three devices are all located in the same subnet, so that the IP only needs to be set for the bond0, for example, set to 10.0.1.0/24, and at this time, eth0, tap0 and tap1 all go in and out 10.0.1.0/24 network segments through the bond0. Since the bond0 has a corresponding IP, the bond0 port can add to the routing table and send data, and the actual data sending process is completed by a slave device bound by the bond0 port. If the actual network device eth0 itself has an IP, such as 192.168.4.5, which will fail after binding to the bond0 portal, the user program cannot send data to the address of this IP, and only packets whose destination address coincides with the IP address of the bond0 portal will be received by Linux Bridge.
From the above, the Bond port of Linux Bridge can virtually link a plurality of network cards into one network card, so that the plurality of network cards are seen as a single ethernet interface device through the Bond technology and have the same Ip address.
Thus, in one embodiment, at least one physical network device interface is logically associated with a first binding relationship using a Bond portal. For example, two physical network device interfaces may be bound to the Bond portal according to a first binding relationship, that is, the Bond portal is formed by two physical network devices.
In an embodiment, referring to fig. 3, which is a flowchart illustrating a specific implementation of step S120 in an embodiment, in this embodiment, the step S120 of creating one or more virtual network subinterfaces according to a virtual network tag by using the Bond portal of Linux Bridge includes:
step S121, configuring at least one physical network device interface to obtain first binding information.
In an embodiment, a physical portal is selected as a physical network device interface, for example, two physical portals ens f0 and ens f1 are selected, and configured according to the network configuration requirement of Linux Bridge, so as to obtain a first binding relationship.
In an embodiment, the physical network device interfaces are ens f 4f0 and ens f1, which are configured respectively, the configured files are ifcfg-ens f0 and ifcfg-ens f1, and the corresponding configuration information is described as follows:
Figure BDA0003858679880000071
Figure BDA0003858679880000081
taking the configuration information of ifcfg-ens f0 as an example, the configuration information is analyzed as follows:
Figure BDA0003858679880000082
it can be known from the configuration information of ifcfg-ens f 4, that ens f0 is bound to the bond0 network port, and that ens f1 is also bound to the bond0 network port, which is the first binding information in this embodiment, as can be known from the configuration information of ifcfg-ens f 1.
And step S122, configuring a virtual network interface working mode of the Bond network port according to the first binding information.
In an embodiment, when more than one physical network device interface exists in the Bond network interface configured according to the first binding information, it is necessary to set the operating mode of different physical network device interfaces, that is, the operating mode of the virtual network interface is a switching mode of at least one physical network device interface.
In one embodiment, the virtual network interface mode of operation includes one of: a balanced polling policy, a master backup policy, a balanced policy, a broadcast policy, dynamic link aggregation, adapter transmission load balancing, or adapter adaptive load balancing.
The above 7 operation modes are described as an example, in which two physical ports ens f 4f0 and ens f1 constitute a bond0 port.
1) Balanced polling strategy
The data packets are transmitted in sequence, that is, the 1 st packet is transmitted through ens f0, the next packet is transmitted through ens f1, the next packet is transmitted through ens f0, and the process is repeated until the last transmission is finished. This mode can increase bandwidth, achieve link load balancing, and support fault tolerance, and automatically switch to a normal link if one link fails.
2) Primary backup strategy
One of the two physical network ports ens f 4f0 and ens f1 is set as a main device, the other is set as a backup device, all data packets are sent on the main device, only one device is in an active state at the same time, and if the main device is down, the backup device is switched from the backup to the main device to send the data packets. Although the resource utilization rate is low, the mode has fault tolerance capability and can improve the availability of network connection.
3) Balancing strategy
The data packets are transmitted based on a specified transmission policy, for example, in one embodiment, the default transmission policy is: (source MAC address XOR destination MAC address)% of the number of slave devices, and other transmission strategies can be specified by xmit _ hash _ policy option, and this operation mode can provide load balancing and fault tolerance capability, but it needs switch configuration port channel to use xmit _ hash _ policy command.
4) Broadcast strategy
All data packets are sent from any physical network port, and each physical network port transmits one data packet. Although this mode wastes resources, it can implement a redundancy mechanism, improving the reliability of network transmission.
5) Dynamic link aggregation
By creating an aggregation group comprising different network devices, the network devices in the aggregation group share transmission rate and duplex setting parameters. This mode of operation is suitable for situations where there are multiple network devices.
6) Adapter transmission load balancing
And selecting a proper network device for data packet transmission according to the load condition (such as calculating the transmission speed) of each network device, and if the network device which is receiving the data fails, taking over the MAC address of the failed network device by another network device. This mode of operation can improve transmission efficiency.
7) Adapter adaptive load balancing
On the basis of the adapter transmission load balancing, the receiving load condition of each network device is also calculated, and the network devices are distributed in a balanced manner. This mode of operation can improve transmission efficiency.
In an embodiment, the bond0 port is configured according to the first binding information, the specific configuration file is ifcfg-bond0, and the configuration information is:
TYPE = Ethernet (Ethernet TYPE)
BOOTPROTO = none (Start protocol uses Ip address set by user)
NAME = bond0 (net port NAME is bond 0)
DEVICE = bond0 (mesh port is bond 0)
ONBOOT = yes (system startup network switch open)
BOND _ IFACES = "ens f 4f0 ens f1" (the first binding relationship binds two physical ports ens f0 and ens f 1)
BONDING _ MASTER = yes (bond 0 net opening)
BONDING_OPTS="mode=3miimon=100lacp_rate=1xmit_hash_policy=1"
As can be seen from the above bond0 configuration information BONDING _ ops, "mode =3" indicates that the virtual network interface operating mode is: mode =3, i.e. the above balancing strategy; "miimon =100" indicates that the link detection time interval is 100ms, i.e., the link connection status is monitored every 100 ms; "lacp _ rate =1" indicates that a detection packet for detecting whether the host network card is alive is transmitted every 30 seconds (fast) or every second (slow); "xmit _ hash _ policy =1" indicates that the specific transmission policy selects the first transmission policy.
Therefore, a suitable working mode can be selected according to actual service requirements, and then the working mode of the network equipment bound by the Bond network port is configured. A Bond network port is configured under Linux Bridge, the reliability of a host server can be improved through a network card binding technology, the available network broadband can be increased, uninterrupted network service is provided for users, and the service requirement is met.
And step S123, creating more than one virtual network subinterface based on the virtual network interface ID by using the Bond network port.
In one embodiment, the virtual network interface ID is a vlan tag of the virtual network, such as: vlan201, vlan203, vlan204 …, etc., and then create a corresponding number of virtual network subinterfaces from the virtual network's vlan tag. That is, in this embodiment, the virtual network subinterfaces are multiple virtual logical interfaces created by using protocols and technologies to pass at least one physical network device interface (for example, ens f 4f0 and ens f1 described above) through the Bond portal. The virtual network subinterface shares the traffic of the physical network port, and as compared with the virtual network subinterface, the physical network device interface can be considered as a main interface, and each virtual network subinterface is no different from each physical network device interface in terms of function and action. In order to avoid the limitation of the number of network planes by the number of interfaces of the physical network device, the embodiment of the application divides a plurality of virtual network subinterfaces from the interfaces of the physical network device of the router, and realizes the routing and communication among the virtual network subinterfaces.
In one embodiment, the vlan tag is: vlan201, vlan203 and vlan204, the bond0 portal creates three virtual network subinterfaces, which are: the configuration files of the corresponding virtual network subinterfaces are respectively set as follows: ifcfg-bond0.201, ifcfg-bond0.203 and ifcfg-bond0.204, the relevant configuration information is:
Figure BDA0003858679880000101
Figure BDA0003858679880000111
taking the relevant configuration information of the configuration file ifcfg-bond0.201 of the virtual network subinterface bond0.201 as an example, the configuration information is analyzed as follows:
TYPE = vlan (TYPE is virtual network);
phystdevice = bond0 (the associated physical port is bond 0);
BOOTPROTO = static (static starting protocol)
NAME = bond0.201 (virtual network subinterface NAME bond 0.201)
DEVICE = bond0.201 (the network DEVICE of the virtual network subinterface is bond 0.201)
ONBOOT = yes (system startup network switch open)
VLAN = yes (correct IP address is assigned using DHCP or static IP)
VLAN _ ID =201 (virtual network interface ID 201)
As can be seen from the above, in the embodiment of the present application, more than one virtual network subinterfaces are created according to the virtual network tag by using the Bond portal of the Linux Bridge, so as to prepare for a subsequent network plane supporting service requirements.
Step S130: and generating a virtual network port corresponding to each virtual network subinterface by utilizing the Open vSwitch.
Open vSwitch is an Open-source virtual switch, is a bridge, and is implemented as an ethernet switch capable of forwarding a packet received from a port to another port or multiple ports according to a certain flow rule. The virtual network port is a unit for transceiving a data packet by the virtual network subinterface, and is similar to a port of a physical ethernet switch. In Open vSwitch, each virtual network port belongs to a specific bridge, and a data packet received by a virtual network port is processed by a flow rule and sent to other ports, and a data packet from other ports is also sent out.
In an embodiment, a virtual network port corresponding to each virtual network subinterface is configured according to a configuration requirement of a virtual network port in an Open vSwitch.
In one embodiment, the bond0 portal creates three virtual network subinterfaces, which are: bond0.201, bond0.203 and bond0.204, and the configured virtual network ports are respectively as follows: the configuration files configuring the virtual network ports of the bond0_201_port, the bond0_203_port, and the bond0_204 _portare: ifcfg-bond0_201 \/port, ifcfg-bond0_203 _/port and ifcfg-bond0_204 _/port, the associated configuration information is:
Figure BDA0003858679880000121
Figure BDA0003858679880000131
taking the relevant configuration information of the configuration file ifcfg-bond0_201 \ u port of the virtual network port bond0_201 \ u port as an example, the configuration information is analyzed:
cat ifcfg-bond0_201_port
DEVICE = bond0.201 (the virtual network subinterface configured is bond 0.201)
NOBOOT = yes (system startup network card closed)
DEVICETYPE = ovs (virtual network port functions as a switch)
OVS _ BRIDGE = br-mgmt (the BRIDGE is management BRIDGE br-mgmt)
TYPE = OVSPort (TYPE of virtual network port is switch port)
As can be seen from the above, in the embodiment of the present application, the virtual network port corresponding to each virtual network sub-interface is configured according to the configuration requirement of the virtual network port in the Open vSwitch, and the Open vSwitch technology and the Linux Bridge technology are combined, so that the configuration parameters of the network plane are unified, and the system maintenance difficulty is reduced.
Step S140: and mounting each virtual network port to the corresponding bridge according to the bridge service label.
In one embodiment, the bridge service tag includes: bridge service name and bridge network configuration information. The bridge service name is related to a bridge service, such as a management bridge, a Web access bridge, a service bridge, and the like. The bridge network configuration information includes: network address, network mask, or gateway.
In an embodiment, referring to fig. 4, which is a flowchart illustrating a specific implementation of step S140 in an embodiment, in the present embodiment, the step S140 of mounting each virtual network port to a corresponding bridge according to a bridge service tag includes:
step S141, configuring the network of the bridge according to the network configuration information of the bridge.
And step S142, mounting each virtual network port to the corresponding bridge according to the bridge service name.
In one embodiment, the bond0 portal creates three virtual network subinterfaces, which are: bond0.201, bond0.203 and bond0.204, and the configured virtual network ports are respectively as follows: bond0_201_port, bond0_203_port, and bond0_204_port. The bridge comprises: management bridges, web access bridges, and service bridges.
In one embodiment, the bridges are respectively represented as: the management bridge (br-mgmt), the Web access bridge (br-pub) and the service bridge (br-service), the network of the bridge is configured according to the network configuration information of the bridge, and the configuration files corresponding to the three bridges are respectively as follows: the configuration information of the ifcfg-br-mgmt, the ifcfg-br-pub and the ifcfg-br-service is shown as follows:
Figure BDA0003858679880000132
Figure BDA0003858679880000141
taking the relevant configuration information of the configuration file ifcfg-br-pub of the Web access bridge br-pub as an example, analyzing the configuration information:
Figure BDA0003858679880000142
Figure BDA0003858679880000151
it will be appreciated that not every bridge needs to configure the IP addresses of DNS server 1 and DNS server 2, the configuration parameters being chosen according to the actual traffic demands.
From the above, it can be seen that: according to the configuration requirements of the network Bridge in the Open vSwitch, the network parameters of the network Bridge mounted by each virtual network port are configured, and the Open vSwitch technology and the Linux Bridge technology are combined, so that the configuration parameters of a network plane are unified, and the system maintenance difficulty is reduced.
Referring to fig. 5, a schematic diagram of a network configuration method applied to a host server in the embodiment of the present application is shown.
Referring to fig. 5, the physical network device interfaces are ens f0 and ens f1, and are configured according to the network configuration requirements of Linux Bridge, so as to obtain a first binding relationship, as can be known from the configuration information of ifcfg-ens f0, 3534 zxft 354 f0 is bound to the Bond0 network port, as can be known from the configuration information of ifcfg-ens f1, ens f1 is also bound to the Bond0 network port, which is the first binding information in this embodiment, that is, the physical network device interfaces ens f0 and ens f1 are associated to the Bond Linux network port of Linux Bridge. And then selecting a proper working mode according to the actual service requirement, and configuring the working mode of the network equipment bound by the Bond network port. According to the network plane requirement of service needs, three virtual network sub-interfaces are created by using the Bond network port based on the virtual network interface ID, and specifically, the vlan tag is as follows: vlan201, vlan203 and vlan204, the bond0 portal creates three virtual network subinterfaces, which are: bond0.201, bond0.203, and bond0.204. And then generating a virtual network port corresponding to each virtual network subinterface by utilizing the Open vSwitch. Three virtual network sub-interfaces, which are respectively: bond0.201, bond0.203 and bond0.204, and the configured virtual network ports are respectively as follows: bond0_201 \, bond0_203 \, and bond0_204 \. Finally, each virtual network port is mounted to the corresponding bridge according to the bridge service tag, and the bridges are respectively represented as: a management bridge (br-mgmt), a Web access bridge (br-pub), and a service bridge (br-service). The virtual network port bond0_201 \/port is mounted on the management bridge (br-mgmt), the virtual network port bond0_203 \/port is mounted on the Web access bridge (br-pub), and the virtual network port bond0_204 \/port is mounted on the service bridge (br-service).
As can be seen from the above, the Open vSwitch technology and the Linux Bridge technology are combined, according to the obtained virtual network tag and Bridge service tag, more than one virtual network subinterface is created according to the virtual network tag by using the Bond portal of the Linux Bridge, and then a virtual network port corresponding to each virtual network subinterface is generated by using the Open vSwitch; and each virtual network port is mounted to the corresponding network bridge according to the network bridge service tag so as to obtain different network planes, and the configuration parameters of the network planes are unified in the whole configuration process, so that the system maintenance difficulty can be reduced.
Step S150: the network plane IP address of each bridge is configured to generate a virtual network plane.
In an embodiment, after the obtained virtual network port and each corresponding bridge are mounted, in order to implement functions of different network planes, a network plane IP address of each bridge needs to be configured, so that data packet information of a service corresponding to the network plane can be received according to the IP address, and the capability of a group of physical network cards to virtualize a plurality of physical network devices with vlan tags is implemented.
It can be understood that, since each virtual network plane corresponds to one virtual network subinterface, different virtual network planes are isolated from each other.
In an embodiment, the configuration parameters generated in the configuration process, whether the configuration information of the physical network device interface, the bond0 network port, the virtual network subinterface, the virtual network port, or the bridge configuration information, are written into the configuration file of the physical network device, that is, the configuration persistence operation is performed, so that even if the host server is restarted, the operating system loads the network card configuration file, the network configuration cannot be lost. In one embodiment, in the centros 7.6 version (other operating systems are the same) operating system, the network card configuration file path is: the/etc/sysconfig/network-scrIPts/.
The network configuration method provided by the embodiment of the application is applied to a host server, the virtual network configuration parameters are obtained in the configuration process, more than one virtual network sub-interface is created according to a virtual network label by using the Bond port of Linux Bridge, and then the virtual network port corresponding to each virtual network sub-interface is generated by using the Open vSwitch; then mounting each virtual network port to a corresponding network bridge according to the network bridge service label; finally, the network plane IP address of each bridge is configured to generate a virtual network plane. In the embodiment, the virtual network plane is automatically configured by obtaining the virtual network configuration parameters, and in the configuration process, because the Open vSwitch technology and the Linux Bridge technology are combined, the problem that the two technologies cannot be organically combined in the related technology is solved, so that the configuration parameters of the network plane are unified, and the system maintenance difficulty is reduced.
The embodiment of the invention also provides a network configuration method applied to the network management server.
In an embodiment, the network management Server is generally a Server, and is capable of receiving a Web request related to network setting parameters, generating a corresponding configuration script for the Web request, and operating a corresponding host Server through a Sshpass tool to complete corresponding network configuration.
Fig. 6 is an alternative flowchart of a network configuration method applied to a network management server according to an embodiment of the present invention, and the method in fig. 6 may include, but is not limited to, steps S610 to S640. Meanwhile, it is understood that, in this embodiment, the sequence from step S610 to step S640 in fig. 6 is not specifically limited, and the step sequence may be adjusted or some steps may be reduced or increased according to actual requirements.
Step S610, sending a network card query request to the host server.
In an embodiment, before configuring the virtual network card of the host server, related information of an available network card of the host server needs to be queried, and targeted configuration is performed according to the related information of the available network card.
Step S620, receiving the information of the available network card sent by the host server in response to the network card query request.
In an embodiment, after receiving the network card query request sent by the network management server, the host server sends available network card information of itself back to the network management server in response to the request, so as to receive the targeted network configuration information.
Step S630, receiving the virtual network configuration parameters corresponding to the available network card information.
In one embodiment, the network management server displays the available network card information to the user, and the user inputs the virtual network configuration parameters to the network management server according to the available network card information.
In an embodiment, referring to fig. 7, which is a flowchart illustrating a specific implementation of step S630 in an embodiment, in this embodiment, the step S630 of receiving the virtual network configuration parameters corresponding to the available network card information includes:
step S631, receiving the Web request information corresponding to the available network card information.
In one embodiment, in order to enable a user to intuitively configure a virtual network card, front-end software or a Web interface is developed for the user to operate, available network card information is presented to the user in a list form, and Web request information generated by the user according to network configuration parameters selected by the available network card information is received.
In step S632, virtual network configuration parameters are generated according to the Web request information.
In one embodiment, the network management server converts the received Web request information into a virtual network configuration parameter, and the virtual network configuration parameter is script information.
Step S640, sending the virtual network configuration parameters to the host server by using the Sshpass tool.
In an embodiment, the network management server generates a corresponding configuration script according to a received Web request of the virtual network configuration parameters input by the user, and sends the script information of the virtual network configuration parameters to the host server through the Sshpass tool, so that the corresponding host server can generate the virtual network plane by using the network configuration method applied to the host server according to any one of the embodiments.
In the prior art, if a ssh tool is used to log in to a remote host server, an interactive prompt is generated to request a password to be manually input in a default state. When commands such as ssh and scp need to be written into an automation script, manual participation is needed, and automatic ssh remote connection cannot be performed in the script. Therefore, in the present embodiment, the Sshpass tool is used to log in to the remote host server to solve the interaction problem. The Sshpass tool is a simple, lightweight command line tool by which password verification can be performed non-interactively with knowledge of the peer username and password to operate the peer host server.
In one embodiment, in order to enable a user to intuitively configure the virtual network card, front-end software or a Web interface is developed for the user to operate so as to configure the virtual network. Fig. 8 is a schematic diagram illustrating a network configuration method applied to a network management server according to an embodiment of the present application.
In this embodiment, development front-end software or a Web page is installed on a network management Server (e.g., a Server), which is illustrated by taking the Web page as an example, and the Server mainly uses a shpass tool to issue a request to a target host Server and receive a request return value.
Firstly, the Server sends a network card query request to the target host Server, then the target host Server returns available network card information generated in response to the network card query request to the Server, wherein the available network card information is the physical network device interface in the embodiment, and the Server displays the available network card information on a Web page. Referring to the schematic diagram of the Web page of fig. 9, a user selects a corresponding available network card through a network card list displayed on the Web page, and inputs Web request information of virtual network configuration parameters on the Web page, where the Web request information may include: physical network device interface (physical network card in the figure), bond network port, vlan tag (virtual in the figure), bridge (br-mgmt, br-pub and br-service), network address (IP address in the figure), network mask (NETMASK in the figure) or GATEWAY (GATEWAY in the figure).
The Server receives the Web request information, converts the Web request information into script information corresponding to the virtual network configuration parameters and sends the script information to the target host Server. The script information includes interface configuration information, virtual network port configuration information, bridge configuration information and other configuration necessary parameters.
The target host server performs virtual network configuration according to the virtual network configuration parameters, and the virtual network configuration process is described as follows: creating more than one virtual network sub-interface according to the virtual network label by using a Bond network port of the Linux Bridge, and generating a virtual network port corresponding to each virtual network sub-interface by using the Open vSwitch; then mounting each virtual network port to a corresponding network bridge according to the network bridge service label; finally, the network plane IP address of each bridge is configured to generate a virtual network plane.
And finally, the Server sends a network service restart request to the target host Server after the network configuration is completed, and the target host Server restarts the network service according to the network service restart request. The Server sends a request for inquiring the network state to the target host Server after the network is restarted, receives the restarted virtual network state returned by the target host Server, and displays the received virtual network state on a Web page so that a user can intuitively detect the virtual network state.
Referring to fig. 8, in the embodiment of the present application, the virtual switch technology is used, and the automatic configuration of the virtual network of the host server is implemented through software, so that the virtual network of the host server can be configured in one key only by simple interface operation, which has the following advantages: 1) The operation process is simpler, the software can automatically configure the network according to the network planning of the user, and a large number of repeated command line operations are not needed; 2) The operation is more flexible, a single network card can virtualize a large amount of virtual network equipment, and the cloud platform deployment scheme in various forms is adapted; 3) The operation is more stable, all the configurations are persistent, network configuration loss caused by abnormal restart of the system is avoided, physical network port links are redundant, dynamic aggregation is achieved, and the stability and reliability of a host network are guaranteed.
The embodiment of the application can be applied to the following scenes: 1) In the field of cloud computing, when private cloud platforms with different network schemes need to be deployed, automatic network configuration is carried out on a physical host; or, 2) the Devops realm, providing a large number of vlan isolated network devices when physical network resources are limited. It is to be understood that the application scenarios are merely illustrative and are not meant to be used in only the two scenarios described above.
In this embodiment, the obtained virtual network configuration parameters are sent to the host server, so that the host server can automatically configure the virtual network plane, and in the configuration process, because the Open vSwitch technology and the Linux Bridge technology are combined, the problem that the two technologies cannot be organically combined in the related technologies is solved, the configuration parameters of the network plane are unified, and the system maintenance difficulty is reduced.
An embodiment of the present invention further provides a host server, which can implement the network configuration method described above, and with reference to fig. 10, the host server includes:
a configuration parameter obtaining unit 1010, configured to obtain virtual network configuration parameters, where the virtual network configuration parameters include a virtual network tag and a bridge service tag.
A virtual network subinterface creating unit 1020, configured to create, according to the virtual network tag, more than one virtual network subinterface by using a Bond portal of Linux Bridge, where the Bond portal is generated by at least one master device network interface and at least one slave device network interface according to the first binding relationship.
A virtual network port generating unit 1030, configured to generate a virtual network port corresponding to each virtual network subinterface by using Open vSwitch.
The bridge mount unit 1040 is configured to mount each virtual network port to a corresponding bridge according to the bridge service tag.
A virtual network plane generating unit 1050 for configuring a network plane IP address of each bridge to generate a virtual network plane.
The specific implementation of the network configuration apparatus in this embodiment is substantially the same as the specific implementation of the network configuration method applied to the host server, and is not described herein again.
An embodiment of the present invention further provides an electronic device, including:
at least one memory;
at least one processor;
at least one program;
the programs are stored in a memory and a processor executes the at least one program to implement the network configuration method of the present invention implementing the two embodiments described above. The electronic device may be any intelligent terminal or server, such as a mobile phone, a tablet computer, a Personal Digital Assistant (PDA for short), and a vehicle-mounted computer. The server can be an independent server, and can also be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content Delivery Network (CDN), big data and artificial intelligence platform and the like; or may be service nodes in a blockchain system, where a Peer-To-Peer (P2P) network is formed among the service nodes in the blockchain system, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). The server may be installed with a server of the language synthesis system, and the server may interact with the terminal through the server, for example, corresponding software is installed on the server, and the software may be an application that implements a target language speech synthesis method, but is not limited to the above form. The terminal and the server may be connected through communication connection manners such as bluetooth, USB (Universal Serial Bus), or network, which is not limited herein.
Referring to fig. 11, fig. 11 illustrates a hardware structure of an electronic device according to another embodiment, where the electronic device includes:
the processor 1101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, and is configured to execute a relevant program to implement the technical solution provided in the embodiment of the present invention;
the Memory 1102 may be implemented in a ROM (Read Only Memory), a static Memory device, a dynamic Memory device, or a RAM (Random Access Memory). The memory 1102 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present disclosure is implemented by software or firmware, the relevant program codes are stored in the memory 1102 and called by the processor 1101 to execute the network configuration method according to the embodiments of the present disclosure;
an input/output interface 1103 for implementing information input and output;
the communication interface 1104 is used for realizing communication interaction between the device and other devices, and can realize communication in a wired manner (for example, USB, network cable, etc.) or in a wireless manner (for example, mobile network, WIFI, bluetooth, etc.); and
a bus 1105 that transfers information between the various components of the device (e.g., the processor 1101, the memory 1102, the input/output interface 1103, and the communication interface 1104);
wherein the processor 1101, memory 1102, input/output interface 1103, and communication interface 1104 enable communication connections within the device with each other via bus 1105.
An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program, and the computer program, when executed by a processor, implements the network configuration method.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The network configuration method, the host server, the device and the storage medium provided by the embodiment of the invention are applied to the network configuration method of the host server, the virtual network configuration parameters are obtained in the configuration process, more than one virtual network sub-interface is created according to the virtual network label by using the Bond port of Linux Bridge, and then the virtual network port corresponding to each virtual network sub-interface is generated by using the Open vSwitch; then mounting each virtual network port to a corresponding network bridge according to the network bridge service label; finally, the network plane IP address of each bridge is configured to generate a virtual network plane. In the embodiment, the virtual network plane is automatically configured by obtaining the virtual network configuration parameters, and in the configuration process, because the Open vSwitch technology and the Linux Bridge technology are combined, the problem that the two technologies cannot be organically combined in the related technology is solved, so that the configuration parameters of the network plane are unified, and the system maintenance difficulty is reduced.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
It will be appreciated by those skilled in the art that the embodiments shown in the figures are not intended to limit the embodiments of the present application and may include more or fewer steps than those shown, or some of the steps may be combined, or different steps may be included.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, and functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is only one type of division of logical functions, 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 application 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 integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, which includes multiple instructions for enabling 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 methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and the scope of the claims of the embodiments of the present application is not limited thereto. Any modifications, equivalents and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present application are intended to be within the scope of the claims of the embodiments of the present application.

Claims (11)

1. A network configuration method applied to a host server is characterized by comprising the following steps:
acquiring virtual network configuration parameters, wherein the virtual network configuration parameters comprise virtual network tags and bridge service tags;
creating more than one virtual network subinterface according to the virtual network label by using a Bond portal of Linux Bridge, wherein the Bond portal is generated by at least one physical network equipment interface according to a first binding relationship;
generating a virtual network port corresponding to each virtual network sub-interface by utilizing Open vSwitch;
mounting each virtual network port to a corresponding network bridge according to the network bridge service tag;
configuring a network plane IP address of each of the bridges to generate a virtual network plane.
2. The network configuration method of claim 1, wherein the virtual network tag comprises: a virtual network interface ID and a virtual network interface working mode; the creating more than one virtual network subinterfaces by using the Bond portal of the Linux Bridge according to the virtual network label comprises the following steps:
configuring at least one physical network equipment interface to obtain the first binding information;
configuring a virtual network interface working mode of the Bond network port according to the first binding information, wherein the virtual network interface working mode is a switching mode of at least one physical network device interface, and the virtual network interface working mode comprises one of the following modes: a balanced polling strategy, a master backup strategy, a balanced strategy, a broadcast strategy, dynamic link aggregation, adapter transmission load balancing or adapter adaptive load balancing;
creating, with the Bond portal, one or more virtual network subinterfaces based on the virtual network interface ID.
3. The method of claim 1, wherein the bridge service tag comprises: the bridge service name and the bridge network configuration information, the bridge network configuration information includes: a network address, network mask, or gateway; the mounting each virtual network port to a corresponding bridge according to the bridge service tag includes:
configuring the network of the network bridge according to the network bridge network configuration information;
and mounting each virtual network port to the corresponding network bridge according to the network bridge service name.
4. The network configuration method according to claim 1, wherein before the obtaining the virtual network configuration parameters, the method further comprises:
sending available network card information according to the network card query request;
and receiving the virtual network configuration parameters generated based on the available network card information.
5. The network configuration method according to claim 1, wherein the obtaining the virtual network configuration parameters comprises:
and receiving the virtual network configuration parameters sent by using the Sshpass tool.
6. The network configuration method according to any one of claims 1 to 5, further comprising:
and writing the configuration parameters in the configuration process into the network configuration file of the host server.
7. A network configuration method is applied to a network management server, and is characterized by comprising the following steps:
sending a network card query request to a host server;
receiving available network card information sent by the host server in response to the network card query request;
receiving the virtual network configuration parameters corresponding to the available network card information;
sending the virtual network configuration parameters to the host server using a Sshpass tool to enable the host server to generate a virtual network plane using the network configuration method of any of claims 1 to 6.
8. The method according to claim 7, wherein the receiving the virtual network configuration parameters corresponding to the available network card information includes:
receiving Web request information corresponding to the available network card information;
and generating the virtual network configuration parameter according to the Web request information, wherein the virtual network configuration parameter is script-form data.
9. A host server, comprising:
a configuration parameter obtaining unit, configured to obtain a virtual network configuration parameter, where the virtual network configuration parameter includes a virtual network tag and a bridge service tag;
the virtual network subinterface creating unit is used for creating more than one virtual network subinterface according to the virtual network label by using a Bond network port of Linux Bridge, and the Bond network port is generated by at least one master equipment network interface and at least one slave equipment network interface according to a first binding relationship;
a virtual network port generating unit, configured to generate a virtual network port corresponding to each virtual network sub-interface by using Open vSwitch;
the bridge mounting unit is used for mounting each virtual network port to a corresponding bridge according to the bridge service tag;
a virtual network plane generating unit, configured to configure a network plane IP address of each bridge to generate a virtual network plane.
10. An electronic device, characterized in that the electronic device comprises a memory and a processor, the memory storing a computer program, the processor implementing the network configuration method of any one of claims 1 to 6, or the network configuration method of any one of claims 7 or 8, when executing the computer program.
11. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the network configuration method of any one of claims 1 to 6, or the network configuration method of any one of claims 7 or 8.
CN202211156099.5A 2022-09-22 2022-09-22 Network configuration method, host server, device, and storage medium Pending CN115567383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211156099.5A CN115567383A (en) 2022-09-22 2022-09-22 Network configuration method, host server, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211156099.5A CN115567383A (en) 2022-09-22 2022-09-22 Network configuration method, host server, device, and storage medium

Publications (1)

Publication Number Publication Date
CN115567383A true CN115567383A (en) 2023-01-03

Family

ID=84741917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211156099.5A Pending CN115567383A (en) 2022-09-22 2022-09-22 Network configuration method, host server, device, and storage medium

Country Status (1)

Country Link
CN (1) CN115567383A (en)

Similar Documents

Publication Publication Date Title
US11095504B2 (en) Initializing network device and server configurations in a data center
US9313088B2 (en) Network system and network managing method
US9137105B2 (en) Method and system for deploying at least one virtual network on the fly and on demand
US10938660B1 (en) Automation of maintenance mode operations for network devices
CN112235122B (en) Automatic selection of software images for network devices
CN107317768B (en) Traffic scheduling method and device
EP3787232A1 (en) Network configuration method, device, and system
US11258661B2 (en) Initializing server configurations in a data center
US20220345331A1 (en) Two-layer private line network system, configuration method, and device
WO2017114363A1 (en) Packet processing method, bng and bng cluster system
CN111182022B (en) Data transmission method and device, storage medium and electronic device
CN113242299A (en) Disaster recovery system, method, computer device and medium for multiple data centers
CN115567383A (en) Network configuration method, host server, device, and storage medium
CN110545240B (en) Method for establishing label forwarding table and forwarding message based on distributed aggregation system
CN111835544B (en) Monitoring method and system of virtual router based on user mode protocol stack
CN110417599B (en) Main/standby node switching method and node server
CN113923149A (en) Network access method, device, network system, electronic equipment and storage medium
CN111953786A (en) System, method and device for recording messages in whole network, network equipment and storage medium
CN116915837B (en) Communication method and communication system based on software defined network
US10277700B2 (en) Control plane redundancy system
CN108965494A (en) Data transmission method and device in data system
US11570260B1 (en) Data collection configuration file generation
CN116319514B (en) Data processing method and related device
CN113556694B (en) Information sending method, device, system, equipment and medium
CN116546019A (en) Traffic management method, device, equipment and medium based on service grid

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