A method for building a router IPv6 test environment based on Kathara

By building an IPv6 testing environment using Kathara, the problem of incomplete IPv6 testing environments in existing technologies is solved. It realizes an independently configurable and conveniently analyzed testing environment, improving testing efficiency and consistency.

CN116389247BActive Publication Date: 2026-07-21SICHUAN TIANYI COMHEART TELECOM
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN TIANYI COMHEART TELECOM
Filing Date
2023-03-15
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The existing IPv6 testing environment is incomplete, relies on third-party servers, resulting in limited configuration options, difficulty in troubleshooting, and cumbersome manual setup.

Method used

A router IPv6 test environment was built using Kathara, by virtualizing routers R1 and R2 and ordinary computers PC1 and PC2, and manually writing configuration files and startup scripts to ensure device independence and startup order.

Benefits of technology

It provides a fully functional testing environment that facilitates problem analysis, improves testing efficiency and result consistency, and has good scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389247B_ABST
    Figure CN116389247B_ABST
Patent Text Reader

Abstract

The application discloses a method for building a router IPv6 test environment based on Kathara, which comprises the following steps: S1, building a test environment and virtually building routers R1 and R2 and common computers PC1 and PC2 by using a basic image; S2, respectively writing configuration files of the routers R1 and R2; S3, respectively writing a basic configuration file and a running script of the router R2; S4, respectively writing start scripts of the routers R1, R2 and the common computers PC1 and PC2; and S5, configuring start dependency relations of the routers R1, R2 and the common computers PC1 and PC2 and controlling a start sequence. Each virtual device of the application is a complete Linux host, and the running state of a service process and a running log can be conveniently checked, so that it is convenient to analyze which party causes a problem when the problem occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a method for building a router IPv6 test environment based on Kathara. Background Technology

[0002] With the depletion of global IPv4 addresses, the availability requirements for IPv6 networks are increasing, necessitating higher testing and acceptance standards for IPv6 network equipment. However, the current IPv6 testing environment is neither perfect nor standardized, relying on third-party IPv6 server providers (such as Mikrotik's software routers) for support. But using third-party IPv6 servers for testing has the following drawbacks:

[0003] (1) There are few configuration options available, and the application scenarios of IPv6 cannot be fully tested.

[0004] (2) Due to the closed-source nature, it is not easy to determine who caused the problem when a problem occurs in the test scenario.

[0005] (3) For test scenarios where third-party services cannot be configured, testers need to manually set up an IPv6 test environment, which is quite troublesome. Summary of the Invention

[0006] The purpose of this invention is to provide a method for building a router IPv6 test environment based on Kathara, so as to solve the technical problem that it is not easy to determine the source of the problem when the test environment has problems.

[0007] This invention is achieved using the following technical solution: a method for building a router IPv6 test environment based on Kathara, comprising the following steps:

[0008] S1: Set up a test environment and use the base image to virtualize routers R1 and R2 and ordinary computers PC1 and PC2;

[0009] S2: Write the configuration files for routers R1 and R2 respectively;

[0010] S3: Write the basic configuration file and runtime script for router R2 respectively;

[0011] S4: Write the startup scripts for routers R1 and R2 and ordinary computers PC1 and PC2 respectively;

[0012] S5: Configure the startup dependencies between routers R1 and R2 and ordinary computers PC1 and PC2, and control the startup order.

[0013] Further, step S1 specifically involves: using Kathara to build a test environment, configuring Kathara's base image as kathara / quagga, and enabling IPv6 functionality.

[0014] Furthermore, the base image contains a dibbler-server, a radvd server, a pppd server, and a pppoe-server.

[0015] Furthermore, step S2 includes the following sub-steps:

[0016] S21: Write the configuration files for the pppd server and radvd server of router R1;

[0017] S22: Write the configuration file for the PPPoE-server server and the IPv6-up script for router R2.

[0018] Furthermore, step S3 includes the following sub-steps:

[0019] S31: Write the basic configuration file for the dibbler-server server of router R2;

[0020] S32: Write the script to run the dibbler-server on router R2.

[0021] Furthermore, the basic configuration file includes an address pool, expiration date, and DNS signals.

[0022] Furthermore, step S4 includes the following sub-steps:

[0023] S41: Write the startup scripts for ordinary computers PC1 and PC2, and configure the static IPv6 address for the eth0 interface;

[0024] S42: Write the startup script for router R1, and immediately use the configuration file to make PPP dialing after it starts up;

[0025] S43: Write the startup script for router R2, configure the interface addresses, and start the radvd service and pppoe-server service.

[0026] Furthermore, step S5 specifically involves: establishing the boot dependencies between routers R1 and R2 and ordinary computers PC1 and PC2 to ensure the boot order of the devices.

[0027] The advantages of this invention are as follows: The servers are manually set up, and all configuration parameters can be arbitrarily configured according to the needs of the test scenario; each virtual device is a fully functional Linux host, and the running status and logs of service processes can be easily viewed, facilitating analysis of which party is at fault when problems occur. Once the simulation environment is configured, it can be easily moved to other testers' computers, ensuring consistency of test results among different testers and improving testing efficiency; it has good scalability; when adding other network devices to the network, only the configuration of the connected devices needs to be modified. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0029] Figure 1 This is a block diagram illustrating the principle of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0031] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0032] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0033] Example 1

[0034] See Figure 1 A method for setting up a router IPv6 test environment based on Kathara includes the following steps:

[0035] Step 1: Install the Kathara environment. Configure the base image for Kathara as kathara / quagga, enable IPv6, and install the dibbler-server, radvd, pppd, and pppoe-server servers within the base image. Kathara is a Docker-based network emulation tool that inherits the lightweight advantages of Docker, allowing for fast startup of virtual network devices. It's used to virtualize routers and hosts within a network environment, where each network device operates independently, and all network configurations can be modified independently.

[0036] Step two, according to Figure 1 Write the configuration file lab.conf for the Kathara virtual environment, and use the base image to virtualize routers R1 and R2, and ordinary computers PC1 and PC2.

[0037] Step 3: Write the startup scripts for ordinary computers PC1 and PC2, and configure the static IPv6 address for the eth0 interface.

[0038] Step 4: Write the configuration file for the pppd server of router R1, configure the dial-up password, information to be obtained after dialing, etc.; configure the configuration file for the radvd server and assign addresses to the downstream hosts.

[0039] Step 5: Write the startup script for router R1. Once it starts up, immediately use the configuration file to make PPP dialing.

[0040] Step 6: Write the configuration file for the PPPoE-server on router R2, as well as the IPv6-up script. The key components of the IPv6-up script are dynamically generating the configuration file for the dibbler-server and starting the dibbler-server service on the corresponding PPP interface.

[0041] Step 7: Write the basic configuration file for the dibbler-server of router R2, configuring information such as address pool, validity period, and DNS.

[0042] Step 8: Write the script to run the dibbler-server on router R2, record the prefix when allocating the IPv6 proxy prefix, and add static routes based on this prefix.

[0043] Step 9: Write the startup script for router R2, configure the interface addresses, and start the radvd service and pppoe-server service.

[0044] Step 10: Write the boot dependencies for PC1 and PC2 and routers R1 and R2 to ensure the boot order of the devices.

[0045] Step 11: Bind network B to the physical interface of the physical machine so that the device under test can connect.

[0046] The above are the steps for setting up an IPv6 testing environment. The usage of this environment is as follows:

[0047] 1. Connect the WAN port of the device under test to the physical interface bound in step eleven above.

[0048] 2. Use the `kathara lstart` command to start the test environment and begin testing.

[0049] Based on the above embodiments, the present invention has at least the following technical effects: In this invention, the servers are all manually set up, and all configuration parameters can be arbitrarily configured according to the needs of the test scenario; each virtual device is a fully functional Linux host, and the running status and logs of the service processes can be easily viewed, facilitating analysis of which party is at fault when problems occur. After the simulation environment is configured, it can be easily moved to other testers' computers, ensuring consistency of test results among different testers and improving testing efficiency; it has good scalability; when adding other network devices to the network, only the configuration of the connected devices needs to be modified.

[0050] It should be noted that, for the sake of simplicity, the foregoing embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.

[0051] The above embodiments describe the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Modifications and variations made by those skilled in the art without departing from the spirit and scope of the invention should be within the protection scope of the appended claims.

Claims

1. A method for building a router IPv6 test environment based on Kathara, characterized in that, Includes the following steps: S1: Set up a test environment and use the base image to virtualize routers R1 and R2 and ordinary computers PC1 and PC2; Step S1 is specifically: Use Kathara to set up a test environment, configure the Kathara base image as kathara / quagga, and enable IPv6; The base image has dibbler-server, radvd server, pppd server and pppoe-server installed. S2: Write the configuration files for routers R1 and R2 respectively; step S2 includes the following sub-steps: S21: Write the configuration files for the pppd server and radvd server of router R1; S22: Write the configuration file and IPv6-up script for the PPPoE-server of router R2; S3: Write the basic configuration file and runtime script for router R2 respectively; step S3 includes the following sub-steps: S31: Write the basic configuration file for the dibbler-server server of router R2; S32: Write the script to run the dibbler-server on router R2; The basic configuration file includes the address pool, validity period, and DNS signals; S4: Write the startup scripts for routers R1 and R2 and ordinary computers PC1 and PC2 respectively; step S4 includes the following sub-steps: S41: Write the startup scripts for ordinary computers PC1 and PC2, and configure the static IPv6 address for the eth0 interface; S42: Write the startup script for router R1, and immediately use the configuration file to make PPP dialing after it starts up; S43: Write the startup script for router R2, configure the interface addresses, and start the radvd service and pppoe-server service; S5: Configure the startup dependencies between routers R1 and R2 and ordinary computers PC1 and PC2, and control the startup order.

2. The method for building a router IPv6 test environment based on Kathara as described in claim 1, characterized in that, Step S5 specifically involves: establishing the boot dependencies between routers R1 and R2 and ordinary computers PC1 and PC2 to ensure the boot order of the devices.