# RPKI Defense Capability Simulation Method Based on Container Virtualization
## 4 The BGP Simulation Network Deployment
### Distributed Simulation Environment Construction for BGP  
The construction of the BGP malicious attack simulation scenario primarily involves the deployment of a large-scale network topology, which requires a flexible, accurate, and rapid construction approach. To address this, we designed an automated simulation network environment construction technique tailored for BGP virtual routers. The specific method is as follows:  
1. Generating the Topology Configuration File: The BGP is an inter-domain routing protocol operating between the ASes. Owing to the large scale of the AS-level network topology, it is necessary to generate a topology deployment file on the basis of the interconnection relationships between the AS nodes. To assess the security advantages of the BGP network environment by deploying additional security mechanisms under the condition of a partial RPKI deployment, the AS nodes need to be randomly selected for RPKI dependent software deployment on the basis of the given deployment percentage. The specific topology configuration information is presented in Table 1.
2. Creating Virtual Networks: To ensure the IP address allocation for the nodes and data exchange between the nodes in the simulated network, upon parsing the network configuration information from the topology configuration file, the Neutron API of the network node is invoked to create a virtual network. Subnets are subsequently assigned to the virtual network, completing the establishment of the virtual network. 3. Creating Virtual Nodes: On the basis of the routing configuration information in the topology configuration file, the virtual router nodes are created by loading the corresponding simulation images. These nodes are associated with their respective virtual networks and obtain network IP addresses. Additionally, the RP nodes belonging to the AS are created as needed. IP addresses are assigned to these nodes on the basis of the created virtual network, and their gateway addresses are modified to the IP addresses of the AS in the same network segment. This is done to achieve interconnection and communication between the RP and the CA server. In the context of virtualized simulation experiments, manually establishing routing configurations on virtual nodes can be time-consuming and cumbersome once the target network topology is determined. Therefore, an automatic loading technique for configuration based on the BGP and the RPKI has been designed to achieve a virtual-level routing configuration. Specifically, on the basis of the routing configuration information in the topology configuration file, configuration details such as AS neighbor relationships and directly connected networks of the virtual router nodes are sent to the configuration program \begin{table}
\begin{tabular}{c c c} \hline \hline
**Configuration Information** & **Attributes** & **Description** \\ \hline \multirow{3}{*}{Network configuration information} & Name & Network’s name \\  & Driver & Network type \\  & Subnet & Specific subnet (1.0.0.0/8) \\ \hline \multirow{6}{*}{Routing configuration information} & Image & Image type \\  & Name & Virtual routing node name \\  & ASN & AS number of virtual router \\  & IP Address & IP address of virtual router \\  & Neighbors & Neighbors of virtual router \\  & Networks & BGP announcement \\  & ROV & Whether to execute ROV \\ \hline \multirow{6}{*}{RP/CA configuration information} & Image & Image Type \\  & Name & Virtual node name \\ \cline{1-1}  & AS Num & Affiliated AS network \\ \cline{1-1}  & IP Address & Virtual node IP address \\ \cline{1-1}  & Gateway & Gateway IP address \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation network topology configuration information. within the virtual router nodes. This process completes the automation of the BGP configuration.