CN113347046B - Network access method and device - Google Patents

Network access method and device Download PDF

Info

Publication number
CN113347046B
CN113347046B CN202110774321.7A CN202110774321A CN113347046B CN 113347046 B CN113347046 B CN 113347046B CN 202110774321 A CN202110774321 A CN 202110774321A CN 113347046 B CN113347046 B CN 113347046B
Authority
CN
China
Prior art keywords
port
server
address
switch
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110774321.7A
Other languages
Chinese (zh)
Other versions
CN113347046A (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110774321.7A priority Critical patent/CN113347046B/en
Publication of CN113347046A publication Critical patent/CN113347046A/en
Application granted granted Critical
Publication of CN113347046B publication Critical patent/CN113347046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Abstract

The application provides a network access method and a device, wherein the method comprises the following steps: when a network access request is received, a server access model of a server corresponding to the network access request is obtained; determining IP address information and port information required by the server based on the server access model; generating network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number; and sending the network configuration information to a switch corresponding to the switch port number, so that the switch establishes network connection for the server. By applying the method provided by the embodiment of the application, the server access model of the server can be obtained, and the IP address information and the port information are obtained based on the server access model, so that the network configuration information is generated, and the server can be quickly accessed into the network.

Description

Network access method and device
Technical Field
The present application relates to the field of computer networks, and in particular, to a network access method and device.
Background
With the development of computer science and technology, the data center is widely applied to various production operations, and comprises a large number of interconnected servers, so that the servers are generally required to be accessed into a data center network for the expansion requirement of the service so as to ensure the normal execution of the service.
At present, in the network access process of a server, a network configuration script is usually required to be manually written, and network configuration is performed according to the network configuration script, however, by manually writing the script, the efficiency is low, errors are easy, and the server cannot be quickly accessed to the network.
Disclosure of Invention
The application aims to provide a network access method which can quickly access a server to a network.
The application also provides a network access device for ensuring the realization and application of the method in practice.
A network access method, comprising:
when a network access request is received, a server access model of a server corresponding to the network access request is obtained;
determining IP address information and port information required by the server based on the server access model;
generating network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number;
and sending the network configuration information to a switch corresponding to the switch port number, so that the switch establishes network connection for the server.
The method, optionally, the obtaining a server access model of a server corresponding to the network access request includes:
obtaining a model identifier contained in the network access request;
matching the model identification with each alternative server access model in a pre-established server access model set;
and using the alternative server access model successfully matched with the model identification as a server access model of a server corresponding to the network access request.
In the above method, optionally, the generating network configuration information of the server according to the IP address information and the port information includes:
determining the currently unassigned alternative IP addresses and the alternative switch port numbers of each switch in the target switch group; the target exchange unit is an exchange unit adapted to the server access model;
determining an IP address corresponding to the IP address information in each of the alternative IP addresses, and determining a switch port number corresponding to the port information in each of the alternative port numbers;
generating network configuration information of the server according to the IP address corresponding to the IP address information and the switch port number corresponding to the port information.
The above method, optionally, the IP address information includes each IP address type and the number of addresses corresponding to each IP address type;
the determining the IP address corresponding to the IP address information in each of the candidate IP addresses includes:
determining an alternative IP address group of each IP address type in each alternative IP address;
and determining the smallest candidate IP address in the candidate IP address group of each IP address type as the IP address corresponding to the address information.
The method, optionally, the port information includes each port type and the number of switches of each port type;
the determining the switch port number corresponding to the port information in each candidate port number includes:
selecting the number of switches of each port type from the target switch group;
according to the port allocation rule of the server access model, acquiring the port number of each switch of the port types from each selected alternative port number of the switch;
and taking the obtained switch port number of each port type as the switch port number corresponding to the port information.
A network access device, comprising:
the receiving unit is used for acquiring a server access model of a server corresponding to the network access request when the network access request is received;
a determining unit, configured to determine IP address information and port information required by the server based on the server access model;
the generating unit is used for generating network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number;
and the sending unit is used for sending the network configuration information to the switch corresponding to the switch port number, so that the switch establishes network connection for the server.
The above apparatus, optionally, the receiving unit includes:
an obtaining subunit, configured to obtain a model identifier included in the network access request;
the matching subunit is used for matching the model identification with each alternative server access model in a pre-established server access model set;
and the execution subunit is used for taking the alternative server access model successfully matched with the model identification as the server access model of the server corresponding to the network access request.
The above apparatus, optionally, the generating unit includes:
a first determining subunit, configured to determine each of the candidate IP addresses that are not currently allocated, and a candidate switch port number of each switch in the target switch group; the target exchange unit is an exchange unit adapted to the server access model;
a second determination subunit configured to determine an IP address corresponding to the IP address information among the respective alternative IP addresses, and determine a switch port number corresponding to the port information among the respective alternative port numbers;
and the generating subunit is used for generating the network configuration information of the server according to the IP address corresponding to the IP address information and the switch port number corresponding to the port information.
The above device, optionally, the IP address information includes each IP address type and the number of addresses corresponding to each IP address type;
the second determining subunit includes:
the allocation submodule is used for allocating the alternative IP addresses with the corresponding address quantity for each IP address type from small to large in the alternative IP addresses;
and the determining submodule is used for determining each allocated alternative IP address as an IP address corresponding to the IP address information.
The above apparatus, optionally, the port information includes each port type and the number of switches of each port type;
the second determining subunit includes:
a selecting sub-module, configured to select, from the target switch group, the number of switches of each port type;
the acquisition submodule is used for acquiring the port number of the switch of each port type from each selected alternative port number of the switch according to the port allocation rule of the server access model;
and a third determining submodule, configured to determine the obtained switch port number of each port type as the switch port number corresponding to the port information.
Compared with the prior art, the application has the following advantages:
the application provides a network access method and a device, wherein the method comprises the following steps: when a network access request is received, a server access model of a server corresponding to the network access request is obtained; determining IP address information and port information required by the server based on the server access model; generating network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number; and sending the network configuration information to a switch corresponding to the switch port number, so that the switch establishes network connection for the server. By applying the method provided by the embodiment of the application, firstly, the server access model of the server is obtained, the IP address information and the port information are obtained based on the server access model, and then the network configuration information is generated according to the IP address information and the port information, so that the server can be quickly accessed into the network.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a network access method provided by the application;
FIG. 2 is a flowchart of a process for obtaining a server access model according to the present application;
FIG. 3 is a flowchart illustrating a process for generating network configuration information for a server according to the present application;
fig. 4 is a flowchart of a process for determining an IP address corresponding to IP address information according to the present application;
fig. 5 is a flow chart illustrating a process of determining a port number of a switch corresponding to port information according to the present application;
fig. 6 is a schematic structural diagram of a network access device according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the present disclosure, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a network access method which can be applied to electronic equipment, wherein a flow chart of the method is shown in fig. 1, and the method specifically comprises the following steps:
s101: when a network access request is received, a server access model of a server corresponding to the network access request is obtained.
In the embodiment of the application, the server access model characterizes the connection relation between the server and the switch, and the connection relation can comprise the server, the types of the switches connected with the server, the number of the switches of each type and the connection mode of the server and the switch.
Optionally, the network access request may include a server identification and a model identification.
For example, the server access model may include: the server is connected with the pair of production switches respectively through 2 production network lines and performs link dynamic aggregation; 2 out-of-band network wires are respectively connected into a pair of out-of-band switches to perform dynamic link aggregation; one ilo network cable is connected to one out-of-band switch, single port.
Wherein the number of server access models may be one or more.
S102: and determining IP address information and port information required by the server based on the server access model.
In the embodiment of the application, the IP address information and the port information required by the server can be determined according to the connection relation of the server access model.
Optionally, the IP address information may include an IP address type and an address number of the IP address type, and the IP address type may be: an out-of-band address type, a production address type, a ilo address type, etc.
Optionally, the port information may include a port type, a number of switches of the port type, a number of ports on each switch, and the like, and the port type may be: out-of-band port type, production port type, ilo port type, etc.
S103: generating network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number.
In the embodiment of the application, the number of the switch port included in the port configuration information in each network configuration information can be one or more.
Wherein the IP address configuration information may include an IP address.
S104: and sending the network configuration information to a switch corresponding to the switch port number, so that the switch establishes network connection for the server.
In the embodiment of the application, the network configuration information can be generated to the switch corresponding to the switch port number of the configuration information, so that the switch establishes network connection for the server.
By applying the method provided by the embodiment of the application, firstly, the server access model of the server is obtained, the IP address information and the port information are obtained based on the server access model, and then the network configuration information is generated according to the IP address information and the port information, so that the server can be quickly accessed into the network.
In an embodiment of the present application, based on the implementation process, specifically, the process of obtaining a server access model of a server corresponding to the network access request, as shown in fig. 2, specifically includes:
s201: and obtaining the model identifier contained in the network access request.
The network access request may include a model identifier, and the network access request may be triggered by a network administrator executing a server access model selection operation on a preset model selection interface.
S202: and matching the model identification with each alternative server access model in the pre-established server access model set.
In the embodiment of the application, the server access model set can comprise various alternative server access models, and each alternative server model contains the connection relation between the server and the switch.
Wherein each alternative server model may be generated from connection information of the server.
S203: and using the alternative server access model successfully matched with the model identification as a server access model of a server corresponding to the network access request.
In an embodiment of the present application, based on the implementation process, specifically, the process of generating the network configuration information of the server according to the IP address information and the port information, as shown in fig. 3, includes:
s301: determining the currently unassigned alternative IP addresses and the alternative switch port numbers of each switch in the target switch group; the target exchange unit is an exchange unit adapted to the server access model, namely, the target exchange unit comprises an exchanger and an exchanger port number required by the server.
In the embodiment of the application, each alternative IP address which is not allocated currently can be determined in the IP address set.
The target switch group comprises a plurality of switches, the target switch group can improve service for an adaptive batch of server access models, and each switch in the target switch group belongs to the same logic unit.
S302: an IP address corresponding to the IP address information is determined in each of the alternative IP addresses, and a switch port number corresponding to the port information is determined in each of the alternative port numbers.
Wherein, the IP address of corresponding address quantity can be selected for each IP address type of the IP address information in each alternative IP address.
The port addresses of the corresponding port numbers can be selected for each port type of the port information in the alternative port numbers of different switches.
S303: generating network configuration information of the server according to the IP address corresponding to the IP address information and the switch port number corresponding to the port information.
In the embodiment of the application, the network configuration information applied to different switches can be generated according to the IP addresses corresponding to the address types and the switch port numbers of the port types.
In an embodiment of the present application, based on the implementation process, specifically, the IP address information includes each IP address type and the number of addresses corresponding to each IP address type;
the process of determining the IP address corresponding to the IP address information in each of the candidate IP addresses, as shown in fig. 4, includes:
s401: and determining an alternative IP address group of each IP address type in the alternative IP addresses.
Where IP addresses may be pre-programmed with an address range for each IP address type, e.g., one c (e.g., 192.168.1.0/24) as the address range for the production address type, one c (192.168.2.0/24) as the address range for the out-of-band address type, and one c (192.168.3.0/24) as the address range for the ilo address type.
The individual alternative IP addresses in the address range of each IP address type are grouped into a set of IP addresses of that IP address type.
Wherein each alternative IP address in the set of alternative IP addresses for each IP address type is within an address range of that IP address type.
S402: and determining the smallest candidate IP address in the candidate IP address group of each IP address type as the IP address corresponding to the address information.
In the embodiment of the application, the smallest candidate IP address in the candidate IP address group of each IP address type can be used as the IP address of the IP address class.
In an embodiment of the present application, based on the implementation process described above, specifically, the port information includes each port type and the number of switches of each port type;
the process of determining the switch port number corresponding to the port information in each alternative port number, as shown in fig. 5, includes:
s501: and selecting the number of switches of each port type from the target switch group.
In the embodiment of the application, the selected switch is a switch with an idle port number, i.e. with an alternative port number.
For example, two production port type production switches may be selected, and two out-of-band port type out-of-band switches may be selected.
S502: and acquiring the port number of the switch of each port type from each selected alternative port number of the switch according to the port allocation rule of the server access model.
In the embodiment of the present application, for the production port type, the smallest candidate port number among the candidate port numbers of each switch of the selected production port type may be used as the switch port number of the production port type, for example, the smallest candidate port number may be selected from the two production switches respectively,
for an out-of-band port type, the smallest of the individual candidate port numbers of each switch of the selected out-of-band port type may be taken as the switch port number of the out-of-band port type.
For the ilo port type, the largest of the selected individual alternate port numbers of the individual switches may be taken as the switch port number for that ilo type.
S503: and determining the obtained switch port number of each port type as the switch port number corresponding to the port information.
Corresponding to the method shown in fig. 1, the embodiment of the present application further provides a network access device, which is used for implementing the method shown in fig. 1, where the network access device provided in the embodiment of the present application may be applied to an electronic device, and the structural schematic diagram of the network access device is shown in fig. 6, and specifically includes:
a receiving unit 601, configured to obtain a server access model of a server corresponding to a network access request when the network access request is received;
a determining unit 602, configured to determine IP address information and port information required by the server based on the server access model;
a generating unit 603, configured to generate network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number;
and a sending unit 604, configured to send the network configuration information to a switch corresponding to the switch port number, so that the switch establishes network connection for the server.
In an embodiment of the present application, based on the foregoing solution, optionally, the receiving unit 601 includes:
an obtaining subunit, configured to obtain a model identifier included in the network access request;
the matching subunit is used for matching the model identification with each alternative server access model in a pre-established server access model set;
and the execution subunit is used for taking the alternative server access model successfully matched with the model identification as the server access model of the server corresponding to the network access request.
In an embodiment of the present application, based on the foregoing solution, optionally, the generating unit 603 includes:
a first determining subunit, configured to determine each of the candidate IP addresses that are not currently allocated, and a candidate switch port of each switch that is in the target switch group; the target exchange unit is an exchange unit adapted to the server access model;
a second determination subunit configured to determine an IP address corresponding to the IP address information among the respective alternative IP addresses, and determine a switch port number corresponding to the port information among the respective alternative port numbers;
and the generating subunit is used for generating the network configuration information of the server according to the IP address corresponding to the IP address information and the switch port number corresponding to the port information.
In an embodiment of the present application, based on the above-mentioned scheme, optionally, the IP address information includes each IP address type and the number of addresses corresponding to each IP address type;
the second determining subunit includes:
the allocation submodule is used for allocating the alternative IP addresses with the corresponding address quantity for each IP address type from small to large in the alternative IP addresses;
and the determining submodule is used for determining each allocated alternative IP address as an IP address corresponding to the IP address information.
In an embodiment of the present application, based on the foregoing solution, optionally, the port information includes each port type and the number of switches of each port type;
the second determining subunit includes:
a selecting sub-module, configured to select, from the target switch group, the number of switches of each port type;
the acquisition submodule is used for acquiring the port number of the switch of each port type from each selected alternative port number of the switch according to the port allocation rule of the server access model;
and a third determining submodule, configured to determine the obtained switch port number of each port type as the switch port number corresponding to the port information.
The specific principle and execution process of each unit and module in the network access device disclosed in the above embodiment of the present application are the same as those of the network access method disclosed in the above embodiment of the present application, and may refer to corresponding parts in the network access method provided in the above embodiment of the present application, which are not described in detail herein.
In order to solve the problem that a server cannot be quickly accessed to a network in the related art, the embodiment of the application also provides a network access system, which comprises an access model management module, an IP address management module, a switch port management module and a switch configuration issuing module.
When a server access requirement exists, a network administrator selects a corresponding access model in a server access model management module, and if the corresponding model does not exist, an access model is added and registered in the module and selected; the IP address management module distributes server addresses according to the model; the switch port management module allocates spare ports of the switch according to the server access model and generates port configuration by combining the allocated IP addresses, and if the port allocation rule corresponding to the server access model does not exist, a corresponding rule is established by network management; and the switch configuration issuing module issues the configuration to the switch according to the switch port and the configuration content, so that the server is accessed to the network. Each server access model only needs to manually define a template once, and IP allocation, port allocation, configuration generation and issuing can be automatically completed subsequently.
The model management module is used for managing a server access model, such as a server access model A, and comprises a server, wherein 2 production network lines are respectively connected with a pair of production switches to perform link dynamic aggregation; 2 out-of-band network wires are respectively connected into a pair of out-of-band switches to perform dynamic link aggregation; one ilo network cable is connected to one out-of-band switch, single port.
The IP address management module is used for registering IP address planning and use conditions, such as planning a c (for example, 192.168.1.0/24) as a production address, a c (192.168.2.0/24) as an out-of-band address and a c (192.168.3.0/24) as a ilo address; and defines an IP address allocation rule, such as each type of IP address, in order from small to large. As in model 1, 1 production address, one out-of-band address, one ilo address is required. 192.168.1.1, 192.168.2.1, 192.168.3.1 can be allocated respectively.
And the switch port management module is used for recording available access switch information in the network and the port use condition of the switch downlink server. If 2 production switches and 2 out-of-band switches belong to one logic unit, the service can be provided for an adaptive server access model. Defining a port allocation rule of the access model, such as model 1, wherein the port allocation rule is as follows: 2 production ports are needed, the ports on 2 production switches are traversed from small to large respectively, the spare port with the smallest port number is selected, and the spare port is distributed to the equipment on line at this time; 2 out-of-band ports are needed, the ports on 2 out-of-band switches are traversed from small to large respectively, and the spare port with the minimum port number is selected and allocated to the equipment on line at this time; a ilo port is needed, the port of 2 out-of-band switches is traversed from large to small, and the spare port with the largest port number is selected and allocated to the on-line device. Defining port configuration production rules, such as model 1, wherein the production ports are 2 port configuration dynamic port aggregation, and 192.168.1.1 corresponds to vlan; the out-of-band port configures dynamic port aggregation for 2 ports, and 192.168.2.1 is released to correspond to vlan; ilo is single ended, release 192.168.3.1 corresponds to vlan.
And the switch configuration issuing module is used for issuing the configuration to the actual switch equipment according to the information of the switch port management module so as to connect the server network.
By applying the system provided by the embodiment of the application, the automatic server access configuration can be provided, so that the network change is safer and more efficient; a primary template can be defined, and subsequent automatic configuration generation is performed, so that the manual repeated workload is reduced; the automatic configuration gives consideration to flexibility, and can meet the requirement that different servers of the data center access the network through the access model.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
The foregoing has described in detail a network access method provided by the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are provided to assist in understanding the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (8)

1. A network access method, comprising:
when a network access request is received, obtaining a model identifier contained in the network access request;
matching the model identification with each alternative server access model in a pre-established server access model set, wherein each alternative server access model comprises a connection relation between a server and a switch, and each alternative server access model is generated according to the connection information of the server;
an alternative server access model successfully matched with the model identification is used as a server access model of a server corresponding to the network access request, the server access model characterizes the connection relation between the server and the switch, and the connection relation comprises the server, the types of the switches connected with the server, the number of the switches of each type and the connection mode of the server and the switch;
determining IP address information and port information required by the server based on the server access model;
generating network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number;
and sending the network configuration information to a switch corresponding to the switch port number, so that the switch establishes network connection for the server.
2. The method of claim 1, wherein generating network configuration information of the server according to the IP address information and the port information comprises:
determining the currently unassigned alternative IP addresses and the alternative switch port numbers of each switch in the target switch group; the target exchange unit is an exchange unit adapted to the server access model;
determining an IP address corresponding to the IP address information in each of the alternative IP addresses, and determining a switch port number corresponding to the port information in each of the alternative switch port numbers;
generating network configuration information of the server according to the IP address corresponding to the IP address information and the switch port number corresponding to the port information.
3. The method of claim 2, wherein the IP address information includes respective IP address types and a number of addresses corresponding to each of the IP address types;
the determining the IP address corresponding to the IP address information in each of the candidate IP addresses includes:
determining an alternative IP address group of each IP address type in each alternative IP address;
and determining the smallest candidate IP address in the candidate IP address group of each IP address type as the IP address corresponding to the address information.
4. The method of claim 2, wherein the port information includes individual port types and the number of switches per port type;
the determining the switch port number corresponding to the port information in each of the alternative switch port numbers includes:
selecting the number of switches of each port type from the target switch group;
according to the port allocation rule of the server access model, obtaining the port number of each switch of the port types from the port numbers of the selected switches which are alternatives to the selected switches;
and taking the obtained switch port number of each port type as the switch port number corresponding to the port information.
5. A network access device, comprising:
the receiving unit is used for acquiring a server access model of a server corresponding to a network access request when the network access request is received, wherein the server access model characterizes the connection relation between the server and the switch, and the connection relation comprises the server, the types of the switches connected with the server, the number of the switches of each type and the connection mode of the server and the switch;
a determining unit, configured to determine IP address information and port information required by the server based on the server access model;
the generating unit is used for generating network configuration information of the server according to the IP address information and the port information; the network configuration information comprises IP address configuration information and port configuration information; the port configuration information includes a switch port number;
a sending unit, configured to send the network configuration information to a switch corresponding to the switch port number, so that the switch establishes network connection for the server;
the receiving unit includes:
an obtaining subunit, configured to obtain a model identifier included in the network access request;
the matching subunit is used for matching the model identification with each alternative server access model in a pre-established server access model set, wherein each alternative server access model comprises a connection relation between a server and a switch, and each alternative server access model is generated according to the connection information of the server;
and the execution subunit is used for taking the alternative server access model successfully matched with the model identification as the server access model of the server corresponding to the network access request.
6. The apparatus of claim 5, wherein the generating unit comprises:
a first determining subunit, configured to determine each of the candidate IP addresses that are not currently allocated, and a candidate switch port number of each switch in the target switch group; the target exchange unit is an exchange unit adapted to the server access model;
a second determination subunit configured to determine an IP address corresponding to the IP address information among the respective alternative IP addresses, and determine a switch port number corresponding to the port information among the respective alternative switch port numbers;
and the generating subunit is used for generating the network configuration information of the server according to the IP address corresponding to the IP address information and the switch port number corresponding to the port information.
7. The apparatus of claim 6, wherein the IP address information includes respective IP address types and a number of addresses corresponding to each of the IP address types;
the second determining subunit includes:
the first determining submodule is used for determining an alternative IP address group of each IP address type in the alternative IP addresses;
and the second determining submodule is used for determining the smallest candidate IP address in the candidate IP address group of each IP address type as the IP address corresponding to the address information.
8. The apparatus of claim 6, wherein the port information includes individual port types and a number of switches per port type;
the second determining subunit includes:
a selecting sub-module, configured to select, from the target switch group, the number of switches of each port type;
the acquisition submodule is used for acquiring the port number of each switch of the port types from the port numbers of the selected alternative switches of the switch according to the port allocation rule of the server access model;
and a third determining submodule, configured to determine the obtained switch port number of each port type as the switch port number corresponding to the port information.
CN202110774321.7A 2021-07-08 2021-07-08 Network access method and device Active CN113347046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110774321.7A CN113347046B (en) 2021-07-08 2021-07-08 Network access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110774321.7A CN113347046B (en) 2021-07-08 2021-07-08 Network access method and device

Publications (2)

Publication Number Publication Date
CN113347046A CN113347046A (en) 2021-09-03
CN113347046B true CN113347046B (en) 2023-08-25

Family

ID=77483045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110774321.7A Active CN113347046B (en) 2021-07-08 2021-07-08 Network access method and device

Country Status (1)

Country Link
CN (1) CN113347046B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116743566B (en) * 2023-07-19 2023-12-19 北京道迩科技有限公司 Network access method, device and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102271134A (en) * 2011-08-11 2011-12-07 北京星网锐捷网络技术有限公司 Method and system for configuring network configuration information, client and authentication server
CN103117874A (en) * 2013-01-18 2013-05-22 浪潮电子信息产业股份有限公司 Blade server management network rapid configuration method
CN107979497A (en) * 2017-12-26 2018-05-01 北京搜狐新媒体信息技术有限公司 A kind of method of automatic configuration and device
CN111130963A (en) * 2019-12-31 2020-05-08 中国建设银行股份有限公司 Method and device for accessing server to network
WO2020168984A1 (en) * 2019-02-22 2020-08-27 阿里巴巴集团控股有限公司 Network configuration method and apparatus, device, and system
CN111953508A (en) * 2019-05-17 2020-11-17 阿里巴巴集团控股有限公司 Equipment control method and device, switch and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102271134A (en) * 2011-08-11 2011-12-07 北京星网锐捷网络技术有限公司 Method and system for configuring network configuration information, client and authentication server
CN103117874A (en) * 2013-01-18 2013-05-22 浪潮电子信息产业股份有限公司 Blade server management network rapid configuration method
CN107979497A (en) * 2017-12-26 2018-05-01 北京搜狐新媒体信息技术有限公司 A kind of method of automatic configuration and device
WO2020168984A1 (en) * 2019-02-22 2020-08-27 阿里巴巴集团控股有限公司 Network configuration method and apparatus, device, and system
CN111953508A (en) * 2019-05-17 2020-11-17 阿里巴巴集团控股有限公司 Equipment control method and device, switch and electronic equipment
CN111130963A (en) * 2019-12-31 2020-05-08 中国建设银行股份有限公司 Method and device for accessing server to network

Also Published As

Publication number Publication date
CN113347046A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN102035828B (en) Method of using nodes in a home communication network
CN103078965B (en) The IP address management method of virtual machine
CN108255905A (en) Interface calls data processing method, device and computer equipment
CN102316043B (en) Port virtualization method, switch and communication system
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
CN106412143B (en) A kind of visualization distribution method of clustered node IP address
CN112953774B (en) Network topology generation method, system, equipment and computer storage medium
CN113127168A (en) Service distribution method, system, device, server and medium
CN110633130B (en) Virtual memory management method and device based on memory hot plug technology
CN102868770A (en) Method, equipment and system for distributing interface
CN113347046B (en) Network access method and device
CN105468619A (en) Resource distribution method and device used for database connection pool
CN103369038A (en) PaaS (platform as a service) management platform and method
CN109769038A (en) A kind of method and device of configuring internet protocol address
CN108540551A (en) A kind of acquisition methods of server node information and obtain system
CN110519354A (en) A kind of distributed objects storage system and its method for processing business and storage medium
CN105786732A (en) Data access method and apparatus
CN104809026B (en) A kind of method that CPU computing resources are borrowed using remote node
CN113658351A (en) Product production method and device, electronic equipment and storage medium
CN105243078A (en) File resource distribution method, system and apparatus
CN108769118A (en) The choosing method and device of host node in a kind of distributed system
CN115794423A (en) Management method and device of intelligent machine room, electronic equipment and storage medium
CN114363988B (en) Clustering method and device and electronic equipment
CN112787853B (en) Automatic generation method and device of network change scheme and related equipment
CN107493181B (en) Indication method and device of virtual expansion port

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