CN114390024B - Access network protocol stack test method, system and storage medium - Google Patents

Access network protocol stack test method, system and storage medium Download PDF

Info

Publication number
CN114390024B
CN114390024B CN202111677414.4A CN202111677414A CN114390024B CN 114390024 B CN114390024 B CN 114390024B CN 202111677414 A CN202111677414 A CN 202111677414A CN 114390024 B CN114390024 B CN 114390024B
Authority
CN
China
Prior art keywords
port number
network element
available
preset
network
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
CN202111677414.4A
Other languages
Chinese (zh)
Other versions
CN114390024A (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.)
Zhongke Nanjing Mobile Communication And Computing Innovation Research Institute
Original Assignee
Zhongke Nanjing Mobile Communication And Computing Innovation Research Institute
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 Zhongke Nanjing Mobile Communication And Computing Innovation Research Institute filed Critical Zhongke Nanjing Mobile Communication And Computing Innovation Research Institute
Priority to CN202111677414.4A priority Critical patent/CN114390024B/en
Publication of CN114390024A publication Critical patent/CN114390024A/en
Application granted granted Critical
Publication of CN114390024B publication Critical patent/CN114390024B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • H04L61/2553Binding renewal aspects, e.g. using keep-alive messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

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

Abstract

The application discloses a method, a system and a storage medium for testing an access network protocol stack, and relates to the technical field of 5G communication. The access network protocol stack testing method comprises the following steps: taking over the network service of a preset operating system; intercepting a first communication request of a preset first network element through the network service after taking over; the first communication request includes a first port number; when the first port number is unavailable, acquiring a preset first available port number, and binding the first available port number with a first network element; searching first identification information corresponding to a first network element, and acquiring a first available port number corresponding to the first identification information; establishing a link of the first network element and the second network element through a first available port number and a second port number preset by the second network element; wherein the second port number is different from the first available port number. The access network protocol stack testing method can solve the problem of mutual conflict of port numbers, and does not need manual operation.

Description

Access network protocol stack test method, system and storage medium
Technical Field
The present application relates to the field of 5G communications technologies, and in particular, to a method, a system, and a storage medium for testing an access network protocol stack.
Background
In the related art, the 5G, that is, the fifth generation mobile communication technology, includes an access network NG-RAN, a core network 5GC and a related support system, and the architecture of the access network includes a centralized processing unit CU (CU network element for short) and a distributed processing unit DU (DU network element for short), where an interface of an interaction message between the CU network element and the core network 5GC is an NG port, and an interface of an interaction message between the CU network element and the DU network element is an F1 port. However, in view of multi-platform migration and compatibility, and interoperability among different vendors, the third generation partnership project 3GPP specifies that a specified port number must be used between interfaces, and in a software code implementation process of a protocol stack, a common implementation scheme is that each network element communicates based on a socket mode, and each network element needs to be matched with a set of ip+ port numbers to perform socket communication.
When the access network protocol stack performs system level test under the multi-network element, multi-interface and multi-connection scenes, in order to meet the socket communication environment, the test case is generally required to be configured, the modification mode adopts manual modification and uses the port number of the non-practical application environment to communicate with different network elements, however, aiming at different multi-network element scenes, each scene needs to manually modify the configured parameters, the operation is complex, and errors caused by manual modification are easy to occur; in addition, the port number of the non-actual application environment is adopted, so that the port number is not a real actual application scene, the test result cannot completely reflect the actual application situation, and the test effect is poor.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the access network protocol stack testing method, the access network protocol stack testing system and the storage medium can solve the problem that port numbers conflict with each other, are free of manual operation, are convenient and quick, are closer to actual application scenes in testing, and are more accurate in testing result.
According to an embodiment of the first aspect of the application, the access network protocol stack testing method is applied to a testing platform and comprises the following steps:
taking over the network service of a preset operating system;
intercepting a first communication request of a preset first network element through the network service after taking over; wherein the first communication request includes a first port number;
when the first port number is unavailable, acquiring a preset first available port number according to a preset first communication strategy, and binding the first available port number with the first network element;
searching first identification information corresponding to the first network element according to the first port number in a preset connection request of the second network element, and obtaining the first available port number corresponding to the first identification information;
establishing a link between the first network element and the second network element through the first available port number and a second port number preset by the second network element; wherein the second port number is different from the first available port number.
According to some embodiments of the present application, when the first port number is unavailable, according to a preset first communication policy, a preset first available port number is obtained, and the first available port number and the first network element are bound, including:
acquiring a preset port data set; wherein the port dataset comprises a plurality of third port numbers in use;
comparing said first port number with each of said third port numbers and determining if they are the same;
when the first port number is the same as the third port number, extracting the first available port number from a preset available port linked list;
replacing the first port number with a first available port number, and binding the first available port number with the first network element;
storing the first available port number, the first port number and first identification information in the first communication request to a preset replacement port linked list; the first identification information is mapped with the first available port number and the first port number one by one.
According to some embodiments of the present application, the searching the first identification information corresponding to the first network element according to the first port number in the preset connection request of the second network element, and obtaining the first available port number corresponding to the first identification information, includes:
Receiving a connection request of the second network element; wherein the connection request includes the first port number;
acquiring the first network element corresponding to the first port number according to the first port number;
and according to the first network element, searching the first identification information corresponding to the first network element in the replacement port linked list, and acquiring a first available port number corresponding to the first identification information.
According to some embodiments of the present application, before searching the first identification information corresponding to the first network element according to the first port number in the preset connection request of the second network element, and obtaining the first available port number corresponding to the first identification information, the method includes:
intercepting a second communication request of a preset second network element through the network service after taking over; wherein the second communication request includes a second port number;
and binding the second port number with the second network element when the second port number is available.
According to some embodiments of the present application, the access network protocol stack test method further includes:
when the second port number is unavailable, acquiring a preset second available port number according to a preset second communication strategy, and binding the second available port number with the second network element;
Establishing a link of the first network element and the second network element through the first available port number and the second available port number; wherein the second available port number is different from the first available port number.
According to some embodiments of the present application, when the second port number is unavailable, according to a preset second communication policy, a preset second available port number is obtained, and the second available port number and the second network element are bound, including:
updating and acquiring the port data set;
comparing said second port number with each of said third port numbers and determining if they are the same;
extracting a second available port number from the available port linked list when the second port number is the same as the third port number;
replacing the second port number with a second available port number, and binding the second available port number with the second network element;
storing the second available port number, the second port number and second identification information in the second communication request to the replacement port linked list; and the second identification information is mapped with the second available port number and the second port number one by one respectively.
According to some embodiments of the present application, the updating and acquiring the port dataset includes:
storing the first available port number in the port dataset;
and acquiring the port data set.
According to some embodiments of the present application, before intercepting, by the network service after taking over, a first communication request of a preset first network element, the method includes:
creating the available port linked list and the alternative port linked list;
and respectively sending signals for starting communication to the first network element and the second network element according to the test cases.
An access network protocol stack test system according to an embodiment of the second aspect of the present application includes:
at least one memory;
at least one processor;
at least one program;
the program is stored in the memory, and the processor executes at least one of the programs to implement the access network protocol stack testing method according to the embodiment of the first aspect.
A computer readable storage medium according to an embodiment of the third aspect of the present application stores computer executable instructions for causing a computer to perform the access network protocol stack test method according to the embodiment of the first aspect.
The access network protocol stack testing method according to the embodiment of the application has at least the following beneficial effects: firstly, taking over a preset network service of an operating system, and intercepting a first communication request of a preset first network element through the taken over network service, wherein the first communication request comprises a first port number; then, when the first port number is unavailable, acquiring a preset first available port number according to a preset first communication strategy, binding the first available port number with a first network element, and further finishing initialization of the first network element; then, according to a first port number in a preset connection request of a second network element, searching first identification information corresponding to the first network element, and obtaining a first available port number corresponding to the first identification information; finally, establishing a link between the first network element and the second network element through the first available port number and a second port number preset by the second network element, wherein the second port number is different from the first available port number. According to the access network protocol stack testing method, port number replacement is carried out on links established by the first network element and the second network element, on one hand, the port number is not required to be modified by manual operation, and complex operation caused by manual modification and errors easily caused by manual operation are removed; on the other hand, the first available port number is the port number used in the actual application scene, and the link is established by adopting the first available port number, so that the test environment is more accurate and close to the actual application, and the test result is more accurate. Therefore, the access network protocol stack testing method can solve the problem of the mutual conflict of port numbers, is free from manual operation, is convenient and quick, is closer to an actual application scene during testing, and has more accurate testing results.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
The application is further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of connection interfaces of each network element in actual use of the 5G system;
FIG. 2 is a schematic diagram of a connection of a 5G system in a conventional test method;
fig. 3 is a connection schematic diagram of an access network protocol stack test system according to an embodiment of the present application;
fig. 4 is an interaction schematic diagram of an access network protocol stack and a test framework module in a multi-user scenario provided in the embodiment of the present application;
FIG. 5 is a flow chart of interactions at test time provided in an embodiment of the present application;
fig. 6 is a workflow diagram of link establishment between an AMF network element and a CUCP network element provided in an embodiment of the present application;
FIG. 7 is an internal workflow diagram of a test framework module provided in an embodiment of the present application;
fig. 8 is a schematic diagram of SCTP link establishment of a plurality of CUCP network elements and CUUP network elements provided in an embodiment of the present application;
fig. 9 is a flow chart of a method for testing an access network protocol stack according to an embodiment of the present application;
Fig. 10 is a connection schematic diagram of an access network protocol stack test system according to another embodiment of the present application.
Reference numerals:
the system comprises an analog core network 100, an access network 110, a test framework module 120, a test case module 130, an analog terminal 140, a memory 200 and a processor 300.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
It should be noted that although functional block diagrams are depicted as block diagrams, and logical sequences are shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the block diagrams in the system. The terms and the like in the description and in the claims, and in the above-described drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In the description of the present application, the meaning of a number is one or more, the meaning of a number is two or more, and greater than, less than, exceeding, etc. are understood to exclude the present number, and the meaning of a number above, below, within, etc. are understood to include the present number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly and the specific meaning of the terms in the present application can be reasonably determined by a person skilled in the art in combination with the specific contents of the technical solution.
In the description of the present application, a description with reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
5G, a fifth generation mobile communication technology, the 5G system comprises an access network (NG-RAN), a core network (5 GC) and a related support system. The access network comprises a centralized processing unit CU (hereinafter referred to as CU network element) and a distributed processing unit DU (hereinafter referred to as DU network element), wherein the CU network element comprises a centralized control plane processing unit CUCP (hereinafter referred to as CUCP network element) and a centralized user plane processing unit CUUP (hereinafter referred to as CUUP network element), and the core network comprises an access and mobility management function unit AMF (hereinafter referred to as AMF network element) and a user plane management function unit UPF (hereinafter referred to as UPF network element). The interface of the interaction message between the CU network element and the core network 5GC is an NG port, and the interface of the interaction message between the CU network element and the DU network element is an F1 port. Specifically, the CUCP network element of the access network and the AMF network element of the core network transmit control plane messages between the core network and the access network through an NG-C interface based on SCTP connection; a control plane message in the access network is transmitted between a CUCP network element of the access network and a DU network element of the access network through an F1-C interface based on SCTP connection; transmitting control plane information related to terminal PDU session between CUCP network element and CUUP network element via E1-C interface based on SCTP connection; user plane data transmission between the core network and the access network is carried between a UPF network element of the core network and a CUUP network element of the access network through a NG-U interface based on GTP-U, and user plane data transmission inside the access network is carried between the CUUP network element and a DU network element through an F1-U interface based on GTP-U.
Note that STCP (Stream Control Transmission Protocol) is a stream control transmission protocol, which is a protocol for simultaneously transmitting a plurality of data streams between two ends of a network connection. GTP (GPRS Tunneling Protocol) is a GPRS tunneling protocol, GTP includes a GTP-U, which is used to transfer user data between the radio access network and the core network in the GPRS core network, and the user data packet may be transmitted in any format of IPv4, IPv6 or PPP; wherein GPRS (General packet radio service) is a general packet radio service.
In view of multi-platform migration and compatibility, and interoperability among different vendors, the 3gpp protocol specifies that a designated port number must be used between interfaces; wherein 3gpp is the third generation partnership project. Specifically, as shown in fig. 1, in practical application, the NG-C interface uses SCTP port number 38412, the F1-C interface uses SCTP port number 38472, the E1-C interface uses SCTP port number 38462, the NG-U interface and the F1-U interface use UDP port number 2152; wherein, UDP (User Data Protocol, user datagram protocol) is a protocol corresponding to TCP, which is one of TCP/IP protocol families; TCP/IP (Transmission Control Protocol/Internet Protocol), transmission control protocol/internetwork protocol, is an industry standard protocol suite designed for Wide Area Networks (WANs).
In the process of realizing codes of a protocol stack, one mainstream implementation scheme is that communication is carried out between network elements based on a socket mode; specifically, a set of AMF network elements, UPF network elements, CUCP network elements, CUUP network elements and DU network elements form a network, and each network element needs a set of IP+port numbers to perform socket communication.
It should be noted that, a socket is a socket, which is an abstraction of endpoints that perform bidirectional communication between application processes on different hosts in a network. One socket is the end of the network where processes communicate, providing a mechanism for application layer processes to exchange data using network protocols. In terms of the position, the socket is connected with the application process in an upper mode, and the socket is connected with the network protocol stack in a lower mode, so that the socket is an interface for the application program to communicate through the network protocol, and is an interface for the application program to interact with the network protocol stack.
In the scenarios of multiple network elements, multiple interfaces and multiple connections, when performing system level testing on an access network protocol stack, as shown in fig. 2, a commonly used test case configuration mode is as follows: one core network is connected with a plurality of CUCP network elements, and the CUCP network elements are connected with a plurality of CUUP network elements and a plurality of DU network elements.
For the multi-network element testing scene, the first implementation mode is to modify configuration manually or by script, and uses non-standard port numbers which can be understood as port numbers which are distinguished and big in actual application, and the first mode has the defect that configuration parameters are required to be modified manually for different multi-network element scenes, so that the automatic testing is not facilitated; meanwhile, the used configuration parameters are not real parameters used by the existing network, and the test effect is poor;
The second implementation manner is to allocate different hosts or IPs for each network element, and perform socket communication by allocating different IPs to multiple instances of the same network element. The second implementation has the disadvantage that each network element needs to occupy one IP or host, which is a great waste of hardware physical resources for the same tester, and is also unfavorable for parallel testing of different testers.
The third implementation mode is a docker container technology popular in recent years, the network element application programs and the operating system environment dependence required by the application programs are packaged into docker container examples, and the docker container examples are operated on a test environment operating system; where dock is an open-source application container engine that allows developers to package their applications and rely on packages into a portable image, then release them to any popular Linux or Windows operating system machine, and also implement virtualization. The containers are completely sandboxed without any interface to each other. The third implementation way only solves the problems of different configurations and inconsistent dependence when the application program runs on different versions of operating system platforms, the network port numbers still cannot be reused among different docker container instances running on the operating system, and meanwhile, when the application program has problems, the debugging of the program is complex.
Based on the technical problems, the application provides an access network protocol stack test system and method, a set of test framework is realized, multiple test users and multiple network element examples can be deployed and operated on the same test PC and the same IP host environment, each network element still uses application program files and configuration parameters consistent with the actual scene of the existing network, namely, each network element uses standard port numbers consistent with the actual scene of the existing network, the problem of request conflict of the same network configuration of an operating system under multi-user parallel test and multi-network element configuration is solved, and multiple network elements of the protocol stack of the multiple test users can operate simultaneously, so that the test efficiency and test accuracy of the access network protocol stack can be improved, and hardware resources required by the test are saved.
The protocol stack can be understood as: various communication protocols are structured and hierarchically expressed, including hierarchical relationships and interfaces among the various layers of protocols. The protocol stack sometimes also represents code that implements a particular protocol.
An access network protocol stack test system according to an embodiment of the present application is described below with reference to fig. 3.
It can be understood that, as shown in fig. 3, the access network protocol stack test system includes: test case module 130, test framework module 120, analog core network 100, access network 110, and analog terminal 140.
It should be noted that, the protocol stack of the access network 110 corresponds to the software to be tested; the test case module 130 is used for providing test cases and controlling a test flow; the analog core network 100 and the analog terminal 140 are both used for providing external interaction of the protocol stack in the test flow, wherein the analog core network 100 and the analog terminal 140 are both auxiliary test modules; the test framework module 120 is used for taking over network services of the operating system and providing socket service requirements; specifically, as shown in fig. 4, the test framework module 120 is configured to intercept network demand services applied by each network element to the operating system, and perform encapsulation and replacement on network elements with the same socket service demands, so that multiple network elements of different test users can be normally started and operated, and parallelization test is ensured.
It should be noted that, as shown in fig. 5, a complete testing procedure of the testing user is as follows:
step 1: the user operates the test case module 130, and the test case module 130 loads the test frame module 120 into an operating system;
step 2: the test framework module 120 takes over the network services of the operating system; the test framework module 120 is configured to intercept a network service request that is provided by a network element to an operating system;
Step 3: the test case module 130 initiates a test environment initialization request to the test framework module 120;
step 4 and step 5: the test framework module 120 sequentially completes the initialization of the available port linked list and replaces the initialization of the port linked list;
step 6: the test case module 130 loads and starts each network element according to the test case configuration;
step 7: the link establishment between the control plane and the user plane is completed among the network elements; i.e., a chaining process of one or more of the NG-C, E1-C, F-C, NG-U or F1-U interfaces.
Step 8: after the network element link is established successfully, the test framework module completes the initialization response of the test environment;
step 9: the test user module loads the running test cases.
Step 7 is described in detail below.
After each network element program is started, the AMF network element of the analog core network 100 needs to complete the establishment of the NG-C SCTP server, a plurality of CUCP network elements complete the establishment of the NG-C SCTP client, and the CUCP network elements initiate the establishment of the NG-C SCTP connection to the AMF network element, and in the three establishment processes, the test framework module 120 intercepts and optimizes the SCTP request of each network element; the problem of the same port number in SCTP requests of all network elements is solved; then establishing links of F1-C, E1-C, NG-U and F1-U with the same establishing flow of NG-C links; after each link is established, the initialization action of the test environment is completed, and the test case module 130 starts and completes the test case.
The test framework module 120 performs repeated replacement of port numbers for SCTP bind/UDP bind events of the multiple network elements, extracts available port numbers from the available port linked list, then performs SCTP bind/UDP bind operation, and writes relevant replacement information into the replacement port linked list.
The test framework module 120 performs repeated replacement of the port number for the SCTP/UDP connect event of the multi-network element, and finds the replaced port number from the replacement port linked list to perform connect operation.
It should be noted that, as shown in fig. 6, when the AMF network element of the analog core network 100 establishes a link with the CUCP network element of the access network 110, the relevant procedure is as follows:
SCTP/UDP server initialization:
step 7.1.1: the AMF network element reads preset configuration; wherein, the configuration of the AMF network element comprises a first port number.
Step 7.1.2: the AMF network element initiates an SCTP bind request to an operating system, wherein the SCTP bind request of the AMF network element comprises a preconfigured first port number; the AMF network element initiates an SCTP bind request, which may be understood as applying for binding with the first port number to the operating system.
Step 7.1.2.1: the test framework module 120 intercepts SCTP bind requests of AMF network elements, extracts a first port number carried therein and judges whether the first port number is available, if the first port number is not available, the first available port number is extracted from a preset available port linked list and replaced with the first port number, and then the first port number, the first available port number and the AMF network element process ID are stored in a replaced port linked list; an ID is understood to be the identification information of each process, each process corresponding to a different ID, the IDs having uniqueness.
Step 7.1.2.2: and calling a sctp bind subroutine of the operating system according to the first available port number, and executing port number binding operation.
Step 7.1.2.3: the test framework module 120 returns the sctp bind subroutine execution result to the AMF network element, which completes the port number binding.
Step 7.1.2.4: the AMF network element performs listening (listen) and receiving (accept) operations through the bound first available port number for subsequent link connections.
Initialization of SCTP/UDP client:
7.1.3 The CUCP network element reads preset configuration; wherein the configuration of the CUCP network element includes a second port number.
Step 7.1.4.1: the test framework module 120 intercepts the SCTP bind request of the CUCP network element, extracts the second port number carried therein and determines whether the second port number is available, and if the second port number is not available, extracts the second available port number from the linked list of available ports and replaces the second port number. And then, storing the second port number, the second available port number and the CUCP network element process ID into a replacement port linked list, wherein the step is mainly to search the second available port number of the CUCP network element when links are established for a plurality of network elements.
Step 7.1.2.2: and calling a sctp bind subroutine of the operating system according to the second available port number, and executing the port number binding operation.
Step 7.1.2.3: the test framework module 120 returns the sctp bind subroutine execution result to the CUCP network element, which completes the port number binding.
Step 7.1.2.4: the CUCP network element calls a subprogram corresponding to the sctp connection of the operating system to initiate a sctp connection request according to preset configuration, wherein the CUCP network element request comprises a first port number;
step 7.1.2.5: the test framework module 120 further searches for an ID corresponding to the AMF network element by intercepting the sctp connect request and reading the first port number, and searches for the AMF network element that is listening (listen) and receiving (accept), thereby obtaining a first available port number corresponding to the ID; the test framework module 120 invokes a corresponding subroutine of the operating system to establish a link between the AMF network element and the CUCP network element according to the first available port number and the sctp connect request.
Step 7.1.2.6: the test framework module 120 returns the result of the sctp connect request to the CUCP network element.
Step 7.1.5: the test framework module 120 resets the available port linked list according to the port number already used in the test case at this time, and at this time, the port number of the last test case part has already been used, so the operating system is also required and traversed to acquire the available port number ending use in the last test case, and add the new available port number to the available port linked list.
Step 7.1.6: the NG-C link establishment is complete.
In the NG-C link establishment process, as shown in fig. 7, the specific workflow and working principle of the test framework module 120 are as follows:
SCTP/UDP server initialization: when an SCTP server is established after an AMF network element is started, an SCTP bind operation initiated by the AMF network element to an operating system is captured by a test framework module 120, the test framework module 120 extracts a first port number (the port number of a NG-C interface service end) carried in the SCTP bind operation, judges whether the port number is available, calls the SCTP bind operation by using the port number if the port number is available, extracts the first available port number from an available port linked list if the port is not available, executes the SCTP bind operation, and stores the original port number, a new port number, a process name and process id information into an alternative port linked list; then the test frame module 120 informs the AMF network element SCTP bind operation to be completed, and then the AMF network element executes listen and accpet operations, and the operations complete the initialization of the AMF network element SCTP server;
SCTP/UDP client initialization: the CUCP network element is used as the SCTP client of the NG-C to initiate the SCTP link establishment to the AMF network element, and the method comprises two steps. Firstly, the CUCP network element executes SCTP bind operation and carries a second port number (the port number of the NG-C interface service end), if the port number is not available, the test framework module 120 searches the available port number in the available port linked list, takes out and uses the new port number to initiate SCTP bind to the operating system, and meanwhile, the test framework module 120 adds the process ID, the process name, the original port number and the new port number of the CUCP network element into the alternative port linked list; wherein the new port number of the CUCP network element and the new port number of the AMF network element are different. After that, the CUCP network element initiates an SCTP connect operation, carrying the IP address of the SCTP server to be linked to and the original port number of the AMF network element, after the test framework module 120 receives the connect request, it will be known that the connection request initiated by the CUCP network element needs to be connected to the AMF network element, the test framework module 120 searches the new port number of the AMF network element corresponding to the ID of the AMF network element process from the replacement port linked list, and the test framework module 120 initiates the SCTP connect operation to the operating system by using the new port number of the AMF network element, and then the test framework module 120 returns to complete the initialization of the SCTP Client of the CUCP network element.
The above is the link establishment procedure between two network elements in step 7.
The link establishment procedure between two or more network elements in step 7 is described below.
As shown in fig. 2, in a multi-network element test environment, the problem of connection conflict between different network elements needs to be solved: how CUUPn-1 is properly connected to CUCPn, rather than CUCP1; similar problems: DUn-1 how to properly connect to CUCPn, rather than to CUCP1; as with the solution of this type of problem, the following will take as an example how the test framework module 120 ensures that a CUUP can be properly connected to a corresponding CUCP:
according to the configuration requirements, as shown in fig. 8, the test frame module 120 starts the CUCP1 network element and the CUUP 1..cuup n-1 network element processes, the CUCP1 network element and the CUUP1 network element send communication requests sequentially, after the CUCP1 network element completes the SCTP server initialization, the test frame module 120 records the current process ID of the CUCP1 network element, and the port number of the CUCP1 network element for listen, that is, the first New port number (New port 1), so that when the subsequent CUUP1 network element initiates the SCTP connection to the CUCP network element.
Further, the test framework module 120 starts up the processes of the CUCPn network element and the CUUPn-1 network element, when there is a New CUCPn-1 that needs to complete SCTP server initialization, the test framework module 120 will complete SCTP server initialization of the CUCPn-1, and at the same time, the process ID of the CUCPn that the test framework module 120 will store, and the port number of the CUCPn network element for listen, that is, the nth New port number (New port), complete the stored data update, and then the SCTP connection request of the started up CUCPn-1.
The test initialization of the configuration can be completed according to the flow, and then test1 test cases can be run; the test case initialization of the test n can be performed without waiting for the end of the test1 test case, and the test case of the test n can be performed after the initialization is completed; compared with the running time of the test case of the minute and hour level, the time for test initialization in the flow is extremely short (second level), so that the effect of parallel multi-user and multi-network element simultaneous test under a single host environment is achieved in the whole test process.
An access network protocol stack test method according to an embodiment of the present application is described below with reference to fig. 9.
It can be understood that as shown in fig. 9, the access network protocol stack testing method is applied to a testing platform and includes:
step S100, taking over the network service of a preset operating system;
step S110, intercepting a first communication request of a preset first network element through the network service after taking over; wherein the first communication request includes a first port number;
step S120, when the first port number is unavailable, acquiring a preset first available port number according to a preset first communication strategy, and binding the first available port number with a first network element;
step S130, according to a first port number in a preset connection request of a second network element, searching first identification information corresponding to the first network element, and obtaining a first available port number corresponding to the first identification information;
step S140, establishing a link between a first network element and a second network element through a first available port number and a second port number preset by the second network element; wherein the second port number is different from the first available port number.
It should be noted that, the first network element may be understood as a network element of the analog core network 100 or a network element of the access network 110, and the second network element may be understood as a network element of the access network 110.
It may be understood that, when the first port number is not available, according to a preset first communication policy, acquiring a preset first available port number, and binding the first available port number with the first network element, including:
acquiring a preset port data set; wherein the port dataset comprises a plurality of third port numbers in use;
comparing the first port number with each third port number and judging whether the first port number and each third port number are the same;
when the first port number is the same as the third port number, extracting a first available port number from a preset available port linked list;
replacing the first port number with a first available port number, and binding the first available port number with a first network element;
storing a first available port number, a first port number and first identification information in a first communication request to a preset replacement port linked list; the first identification information is mapped with the first available port number and the first port number one by one respectively.
It should be noted that, after the first network element is started, a process ID is randomly allocated, where the process ID has uniqueness, and the process ID can be understood as first identification information.
It may be understood that searching for first identification information corresponding to the first network element according to a first port number in a preset connection request of the second network element, and obtaining a first available port number corresponding to the first identification information includes:
Receiving a connection request of a second network element; wherein the connection request includes a first port number;
according to the first port number, a first network element corresponding to the first port number is obtained;
according to the first network element, searching first identification information corresponding to the first network element in the replacement port linked list, and obtaining a first available port number corresponding to the first identification information.
It may be understood that, before searching the first identification information corresponding to the first network element according to the first port number in the preset connection request of the second network element and obtaining the first available port number corresponding to the first identification information, the method includes:
intercepting a second communication request of a preset second network element through the network service after taking over; wherein the second communication request includes a second port number;
and binding the second port number with the second network element when the second port number is available.
According to some embodiments of the present application, the access network protocol stack test method further includes:
when the second port number is unavailable, acquiring a preset second available port number according to a preset second communication strategy, and binding the second available port number with a second network element;
establishing a link of a first network element and a second network element through a first available port number and a second available port number; wherein the second available port number is different from the first available port number.
It may be understood that when the second port number is unavailable, according to a preset second communication policy, acquiring a preset second available port number, and binding the second available port number with the second network element, including:
updating and acquiring a port data set;
comparing the second port number with each third port number and judging whether the second port number is the same as each third port number;
extracting a second available port number from the available port linked list when the second port number is the same as the third port number;
replacing the second port number with a second available port number, and binding the second available port number with a second network element;
storing the second available port number, the second port number and second identification information in the second communication request to a replacement port linked list; the second identification information is mapped with the second available port number and the second port number one by one respectively.
It should be noted that, after the second network element is started, a process ID is randomly allocated, where the process ID has uniqueness, and the process ID is the second identification information.
It will be appreciated that updating and retrieving port datasets includes:
storing the first available port number in a port dataset;
a port dataset is acquired.
It may be understood that, before intercepting, by the network service after taking over, a first communication request of a preset first network element, the method includes:
Creating an available port linked list and a replacement port linked list;
and sending signals for starting communication to the first network element and the second network element respectively according to the test cases.
According to the access network protocol stack testing method of the embodiment of the application, firstly, network service of a preset operating system is taken over, and a first communication request of a preset first network element is intercepted through the network service after taking over, wherein the first communication request comprises a first port number; then, when the first port number is unavailable, acquiring a preset first available port number according to a preset first communication strategy, binding the first available port number with a first network element, and further finishing initialization of the first network element; then, according to a first port number in a preset connection request of a second network element, searching first identification information corresponding to the first network element, and obtaining a first available port number corresponding to the first identification information; finally, establishing a link between the first network element and the second network element through the first available port number and a second port number preset by the second network element, wherein the second port number is different from the first available port number. According to the access network protocol stack testing method, port number replacement is carried out on links established by the first network element and the second network element, on one hand, the port number is not required to be modified by manual operation, and complex operation caused by manual modification and errors easily caused by manual operation are removed; on the other hand, the first available port number is the port number used in the actual application scene, and the link is established by adopting the first available port number, so that the test environment is more accurate and close to the actual application, and the test result is more accurate. Therefore, the access network protocol stack testing method can solve the problem of the mutual conflict of port numbers, is free from manual operation, is convenient and quick, is closer to an actual application scene during testing, and has more accurate testing results.
An access network protocol stack test system according to an embodiment of the present application is described below with reference to fig. 3.
It can be understood that as shown in fig. 10, the access network protocol stack test system includes:
at least one memory 200;
at least one processor 300;
at least one program;
the programs are stored in the memory 200 and the processor 300 executes at least one program to implement the access network protocol stack test method described above. Fig. 10 illustrates a processor 300.
The processor 300 and the memory 200 may be connected by a bus or other means, fig. 10 being an example of a connection by a bus.
The memory 200 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and signals, such as program instructions/signals corresponding to the access network protocol stack test system in the embodiments of the present application. The processor 300 executes various functional applications and data processing by running non-transitory software programs, instructions and signals stored in the memory 200, i.e., implements the access network protocol stack test method of the method embodiment described above.
Memory 200 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store related data of the access network protocol stack test method and the like. In addition, memory 200 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 200 optionally includes memory remotely located with respect to processor 300, which may be connected to the access network protocol stack test system via a network. Examples of such networks include, but are not limited to, the internet of things, software defined networks, sensor networks, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more signals are stored in memory 200 that, when executed by the one or more processors 300, perform the access network protocol stack test method in any of the method embodiments described above. For example, the above-described method steps S100 to S140 in fig. 9 are performed.
A computer-readable storage medium according to an embodiment of the present application is described below with reference to fig. 10.
As shown in fig. 10, the computer-readable storage medium stores computer-executable instructions that are executed by one or more processors 300, for example, by one of the processors 300 in fig. 10, and cause the one or more processors 300 to perform the access network protocol stack test method in the method embodiment described above. For example, the above-described method steps S100 to S140 in fig. 9 are performed.
The system embodiments described above are merely illustrative, in which elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the description of the embodiments above, those skilled in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media and communication media. The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable signals, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and may include any information delivery media.
The embodiments of the present application have been described in detail above with reference to the accompanying drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present application. Furthermore, embodiments of the present application and features of the embodiments may be combined with each other without conflict.

Claims (8)

1. The access network protocol stack testing method is characterized by being applied to a testing platform and comprising the following steps:
taking over the network service of a preset operating system;
intercepting a first communication request of a preset first network element through the network service after taking over; wherein the first communication request includes a first port number;
when the first port number is unavailable, acquiring a preset first available port number according to a preset first communication strategy, and binding the first available port number with the first network element;
searching first identification information corresponding to the first network element according to the first port number in a preset connection request of the second network element, and obtaining the first available port number corresponding to the first identification information;
establishing a link between the first network element and the second network element through the first available port number and a second port number preset by the second network element; wherein the second port number is different from the first available port number;
When the first port number is unavailable, according to a preset first communication policy, acquiring a preset first available port number, and binding the first available port number with the first network element, including:
acquiring a preset port data set; wherein the port dataset comprises a plurality of third port numbers in use;
comparing said first port number with each of said third port numbers and determining if they are the same;
when the first port number is the same as the third port number, extracting the first available port number from a preset available port linked list;
replacing the first port number with a first available port number, and binding the first available port number with the first network element;
storing the first available port number, the first port number and first identification information in the first communication request to a preset replacement port linked list; the first identification information is mapped with the first available port number and the first port number one by one, and the first identification information represents a process ID;
before intercepting a first communication request of a preset first network element through the network service after taking over, the method comprises the following steps:
Creating the available port linked list and the alternative port linked list;
and respectively sending signals for starting communication to the first network element and the second network element according to the test cases.
2. The method for testing the access network protocol stack according to claim 1, wherein searching the first identification information corresponding to the first network element according to the first port number in the preset connection request of the second network element, and obtaining the first available port number corresponding to the first identification information, includes:
receiving a connection request of the second network element; wherein the connection request includes the first port number;
acquiring the first network element corresponding to the first port number according to the first port number;
and according to the first network element, searching the first identification information corresponding to the first network element in the replacement port linked list, and acquiring a first available port number corresponding to the first identification information.
3. The method for testing an access network protocol stack according to claim 1, wherein searching for the first identification information corresponding to the first network element according to the first port number in the preset connection request of the second network element, and before obtaining the first available port number corresponding to the first identification information, includes:
Intercepting a second communication request of a preset second network element through the network service after taking over; wherein the second communication request includes a second port number;
and binding the second port number with the second network element when the second port number is available.
4. The access network protocol stack test method of claim 3, wherein the access network protocol stack test method further comprises:
when the second port number is unavailable, acquiring a preset second available port number according to a preset second communication strategy, and binding the second available port number with the second network element;
establishing a link of the first network element and the second network element through the first available port number and the second available port number; wherein the second available port number is different from the first available port number.
5. The method for testing the protocol stack of the access network according to claim 4, wherein when the second port number is unavailable, according to a preset second communication policy, obtaining a preset second available port number, and binding the second available port number with the second network element, includes:
updating and acquiring the port data set;
Comparing said second port number with each of said third port numbers and determining if they are the same;
extracting a second available port number from the available port linked list when the second port number is the same as the third port number;
replacing the second port number with a second available port number, and binding the second available port number with the second network element;
storing the second available port number, the second port number and second identification information in the second communication request to the replacement port linked list; and the second identification information is mapped with the second available port number and the second port number one by one respectively.
6. The method of testing an access network protocol stack according to claim 5, wherein said updating and obtaining said port dataset comprises:
storing the first available port number in the port dataset;
and acquiring the port data set.
7. The access network protocol stack test system is characterized by comprising:
at least one memory;
at least one processor;
at least one program;
the program is stored in the memory, and the processor executes at least one of the programs to implement the access network protocol stack testing method according to any one of claims 1 to 6.
8. A computer readable storage medium storing computer executable instructions for causing a computer to perform the access network protocol stack test method according to any one of claims 1 to 6.
CN202111677414.4A 2021-12-31 2021-12-31 Access network protocol stack test method, system and storage medium Active CN114390024B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111677414.4A CN114390024B (en) 2021-12-31 2021-12-31 Access network protocol stack test method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111677414.4A CN114390024B (en) 2021-12-31 2021-12-31 Access network protocol stack test method, system and storage medium

Publications (2)

Publication Number Publication Date
CN114390024A CN114390024A (en) 2022-04-22
CN114390024B true CN114390024B (en) 2024-03-19

Family

ID=81200102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111677414.4A Active CN114390024B (en) 2021-12-31 2021-12-31 Access network protocol stack test method, system and storage medium

Country Status (1)

Country Link
CN (1) CN114390024B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024847A (en) * 2015-05-28 2015-11-04 大唐移动通信设备有限公司 Network management system of a single-server multi-network-equipment adapter, and a configuration, start, and operation method of the single-server multi-network-equipment adapter
WO2017076278A1 (en) * 2015-11-06 2017-05-11 华为技术有限公司 Method and device for flexibly processing link between network elements
CN112543473A (en) * 2020-12-29 2021-03-23 中国移动通信集团江苏有限公司 Test method, device and equipment based on network element simulation and computer storage medium
CN112702362A (en) * 2021-03-24 2021-04-23 北京翼辉信息技术有限公司 Method and device for enhancing TCP/IP protocol stack, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140222999A1 (en) * 2011-02-15 2014-08-07 Nokia Siemens Networks Oy Method for the testing of service applications in a value added server of a communication network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024847A (en) * 2015-05-28 2015-11-04 大唐移动通信设备有限公司 Network management system of a single-server multi-network-equipment adapter, and a configuration, start, and operation method of the single-server multi-network-equipment adapter
WO2017076278A1 (en) * 2015-11-06 2017-05-11 华为技术有限公司 Method and device for flexibly processing link between network elements
CN112543473A (en) * 2020-12-29 2021-03-23 中国移动通信集团江苏有限公司 Test method, device and equipment based on network element simulation and computer storage medium
CN112702362A (en) * 2021-03-24 2021-04-23 北京翼辉信息技术有限公司 Method and device for enhancing TCP/IP protocol stack, electronic equipment and storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
3GPP LTE无线链路控制协议研究与系统设计;施渊籍;张玉成;石晶林;;移动通信;20091123;第33卷(第22期);全文 *
3rd Generation Partnership Project. "29835-100".3GPP specs\archive.2021,全文. *
3rd Generation Partnership Project. "29941-110".3GPP specs\archive.2021,全文. *
Nokia Networks.C4-151570 "WebRTC Call flows and Information Elements".3GPP tsg_ct\WG4_protocollars_ex-CN4.2015,(第TSGCT4_70bis_Belgrade期),全文. *
Nokia, Nokia Shanghai Bell, Intel Corporation.R3-180988 "Text Proposal 38.412 for Support of Multiple SCTP associations".3GPP tsg_ran\WG3_Iu.2018,(第TSGR3_99期),全文. *

Also Published As

Publication number Publication date
CN114390024A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
US11003480B2 (en) Container deployment method, communication method between services, and related apparatus
US10831574B2 (en) Remote procedure call method for network device and network device
CN108287723B (en) Application interaction method and device, physical machine and system
US5848234A (en) Object procedure messaging facility
US11856065B2 (en) Data transmission for service integration between a virtual private cloud and an intranet
US20220014434A1 (en) Slice Resource Deployment Method and Apparatus, and Slice Manager and Computer Storage Medium
US11743117B2 (en) Streamlined onboarding of offloading devices for provider network-managed servers
US20140337471A1 (en) Migration assist system and migration assist method
CN109600380B (en) Data transmission method and device
CN114390024B (en) Access network protocol stack test method, system and storage medium
CN111294319A (en) Method and device for realizing OpenVPN network isolation under DPDK framework
CN105873234B (en) Method and device for establishing connection between virtualized network function and network element management system
CN115801770A (en) Large file transmission method based on full-user-state QUIC protocol
US10761883B2 (en) Program executing apparatus and program execution method
CN112667359A (en) Data transparent transmission method, electronic equipment and storage medium
CN113709264A (en) Address acquisition method, equipment, system and storage medium
CN115378993B (en) Method and system for supporting namespace-aware service registration and discovery
CN112749129B (en) File processing method, file processing server, file aggregation server and device
CN115499385B (en) Method for preventing packet loss during thermal migration of vDPA virtual machine
CN111371723B (en) Method and device for realizing PPTP VPN network isolation under DPDK framework
EP4161207A1 (en) Base station device and method for operating base station device
US20230105269A1 (en) Virtualized network service deployment method and apparatus
JP4138707B2 (en) Session connection apparatus and session connection method
CN117435456A (en) Debugging method, device, electronic equipment and computer readable storage medium
WO1994028486A1 (en) Method of selecting a server object to service a client object request within a network environment

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