## 3 System Model
### Virtual Networking
#### 4.2.2 Route Connection  
In this section, we introduce the construction and connection of routes within the overlay network plane. We design how two potential types of nodes can join the virtual network and perform the corresponding functions based on Kademlia [53]. * Bootstrap Node: In this system, first we need some bootstrap nodes so that nodes can join to the whole P2P network through them. We define a series of bootstrap nodes \(b1,b2,b3,\ldots,bn\in\mathcal{B}\). They are all reachable nodes, \(\mathcal{B}\subseteq\mathcal{R}\). When a node wants to join the P2P network, it first connects to any bootstrap node \(b_{i}\) and then integrates into the whole P2P network according to the algorithm. A total of n bootstrap nodes serve as a backup for each other and also share the pressure of network connection. The bootstrap nodes need to expose the \(NodeID\), IP address and port number \(<NodeID,IP,Port>\) after booting so that nodes can connect to them with this information. The triad can be hard-coded in the system, or it can be dynamically updated and obtained using  
Figure 9: The overlay network is an application layer network with a series of reachable nodes \(r_{1},r_{2},r_{3}\) and unreachable nodes \(u_{1},u_{2}\) in the plane, and they have the same format of 160 bit logical addresses; The lower underlay network represents layers 1 to 4 of the TCP/IP stack, with nodes accessing the network in different ways and at different locations. DNS system. Additionally, load-balanced DNS also allows for a balanced distribution of traffic across bootstrap nodes. * K-bucket: Each reachable node \(\mathcal{U}\) has two k-buckets, which are stored in a binary tree. One of the k-buckets is used to store the logical address information of other reachable nodes, which can be used to find the nearest reachable node quickly. The definition of k-buckets and binary trees, and the update algorithm are the same as the standard Kademlia algorithm. The function \(addbucketR(NodeID,IP,Port)\) is defined to store another reachable node at the reachable node. The other k-bucket of the reachable node is used to store two kinds of data. The first one is the connection session and \(NodeID<session,NodeID>\) of the unreachable nodes to which this node directly maintains connections. The second one store the information of unreachable nodes that maintain connection with other reachable nodes cached by this node, the information of unreachable nodes themselves, and the information of reachable nodes that unreachable nodes maintain connection \(<NodeID_{U},NodeID_{R},IP_{R},Port_{R}>\). Define the function \(addbucketU(Session,NodeID)\) to add the unreachable node information in the second type of k-bucket, and the function \(addbucketUbuff(NodeID_{U},NodeID_{R},IP_{R},Port_{R})\) to add the cache of unreachable nodes. This k-bucket can be represented as a binary tree, as shown in Figure 10. The dashed rectangle at the top represents the result of the middle-order traversal of the binary tree, with the nodes with all binary bits of 1 on the left, decreasing from left to right, and the nodes with all binary bits of 1 on the far right. The following is a dynamic binary tree, where each leaf node is a k-bucket that splits and merges according to certain rules. From the root node down, the left branch of each subtree represents bit 1 and the right branch represents bit 0. Each branch down the binary tree node has a common prefix of logical address. Initially, only the most specific own node is stored in this structure. When the cache of other unreachable nodes or nodes is added, it is inserted into the corresponding k-bucket according to the \(NodeID\) of the node. When the number of nodes in a particular k-bucket reaches the maximum number of nodes K specified by the system, the k-bucket is split before adding more nodes. The next bit of the current subtree is selected for splitting, bit 1 for the left subtree and bit 0 for the right subtree.