How to Start Integrated Access and Backhaul Networks Using NS2
To start an Integrated Access and Backhaul (IAB) Network project in Network Simulator 2 (NS2) which encompasses to replicate the integration of access networks for user equipment such as smartphones, IoT devices and backhaul networks for sending data among the access points and core networks. IAB networks are one of the significant portions of 5G and beyond, since they integrate the access, backhaul modules in a unified infrastructure for enhancing efficiency and minimizing the costs within mobile communication systems.
NS2 is a robust network simulator which is often utilised for designing the network protocols and interaction but it can be adjusted to replicate the access and backhaul communication for an IAB network. This guide will help you understand the process, from setup to implementation and testing IAB network project.
Steps to Start IAB Networks Projects in NS2
Step 1: Understand the Key Components of an IAB Network
An IAB network incorporates both access and backhaul modules for more effective data distribution. Following is a core modules of IAB networks:
- Access Network:
- Base Stations (gNBs): These are reliable to associate toward the user devices such as smartphones and IoT devices through wireless access technologies such as 5G NR (New Radio) or Wi-Fi.
- User Equipment (UE): Devices, which link to the base stations for internet access like smartphones, IoT devices.
- Backhaul Network:
- Backhaul Links: These connections are high-capacity links, which transmit traffic from the access points to the key network that is typically used fiber-optic or microwave links.
- Router or Aggregator Nodes: These nodes combine the information from the access points and send it to the core network.
- Integrated Access and Backhaul (IAB) Nodes:
- Relay Nodes (IAB-R): These nodes perform as access points which offering the connectivity to UEs and backhaul relays that needs to sending information to/from the core network.
- Core Network:
- The central portion of the network in which information is transmitted to/from the internet or data center.
Step 2: Install NS2
Initially, we should set up the NS2 environment on the system.
- Go to the official NS2 website for downloading and install it based on the operating system.
- After installation then we can confirm it by executing the following command:
ns
It must go to the NS2 in terminal.
Step 3: Define the Network Architecture
We can make a network topology, which contains both access network components (base stations, user equipment) and backhaul network components (router or aggregator nodes, backhaul links) for an IAB network. Below is a simple network topology configuration:
- Access Nodes (gNBs): It offers connectivity to the user devices.
- Backhaul Links: Link the access points to aggregation or key network nodes.
- Relay Nodes (IAB-R): Transmit interaction among the access points and backhaul.
- Core Network Nodes: It denotes the core network or data center using these nodes.
Step 4: Create the NS2 Simulation
Now, we will need to replicate a simple IAB network in which user equipment links to a base station, and the base station contains a backhaul connection via a relay node.
Example: IAB Network with Base Stations, User Equipment, and Backhaul Links
# Create the simulator object
set ns [new Simulator]
# Create network nodes
set core_node [$ns node] ;# Core Network Node (e.g., aggregation router)
set access_node1 [$ns node] ;# Base Station 1 (gNB)
set access_node2 [$ns node] ;# Base Station 2 (gNB)
set relay_node1 [$ns node] ;# Relay Node 1 (IAB-R)
set user_node1 [$ns node] ;# User Equipment 1 (UE)
set user_node2 [$ns node] ;# User Equipment 2 (UE)
# Define the links between nodes
# Access link between user equipment and base stations
$ns duplex-link $user_node1 $access_node1 10Mb 50ms DropTail
$ns duplex-link $user_node2 $access_node2 10Mb 50ms DropTail
# Backhaul links (for transmitting data from base stations to core network)
$ns duplex-link $access_node1 $relay_node1 100Mb 10ms DropTail
$ns duplex-link $access_node2 $relay_node1 100Mb 10ms DropTail
$ns duplex-link $relay_node1 $core_node 1000Mb 5ms DropTail
# Set mobility model (Static nodes in this case)
$ns node-config -motion “fixed” -x 0 -y 0 -z 0 ;# Core Network Node
$ns node-config -motion “fixed” -x 200 -y 200 -z 0 ;# Access Node 1
$ns node-config -motion “fixed” -x 300 -y 300 -z 0 ;# Access Node 2
$ns node-config -motion “fixed” -x 400 -y 400 -z 0 ;# Relay Node 1
$ns node-config -motion “random” -x 500 -y 500 -z 0 ;# User Node 1
$ns node-config -motion “random” -x 600 -y 600 -z 0 ;# User Node 2
# Define traffic sources (simulate data traffic between user and core network)
set udp_access1 [new Agent/UDP]
set udp_access2 [new Agent/UDP]
set udp_core [new Agent/UDP]
# Attach UDP agents to nodes
$ns attach-agent $user_node1 $udp_access1
$ns attach-agent $user_node2 $udp_access2
$ns attach-agent $core_node $udp_core
# Define traffic applications (e.g., CBR for constant bit rate traffic)
set cbr1 [new Application/Traffic/CBR]
$cbr1 attach-agent $udp_access1
$cbr1 set packetSize_ 512
$cbr1 set interval_ 0.1 ;# Sending data every 0.1 seconds
set cbr2 [new Application/Traffic/CBR]
$cbr2 attach-agent $udp_access2
$cbr2 set packetSize_ 512
$cbr2 set interval_ 0.1
# Start the traffic at time 1.0 and stop at time 5.0
$ns at 1.0 “$cbr1 start”
$ns at 5.0 “$cbr1 stop”
$ns at 1.0 “$cbr2 start”
$ns at 5.0 “$cbr2 stop”
# Finish the simulation after 6 seconds
$ns at 6.0 “finish”
# Define finish procedure
proc finish {} {
global ns
$ns flush-trace
exit 0
}
# Run the simulation
$ns run
Explanation of the Script:
- Simulator Setup:
- set ns [new Simulator]: It makes the NS2 simulator entity.
- Node Creation:
- Nodes are generated for the Core Network, Base Stations (gNBs), Relay Node (IAB-R), and User Equipment (UE).
- Network Links:
- Access Links: It replicates the interaction among the user equipment and base stations which has 10 Mbps, 50 ms delay.
- Backhaul Links: Mimic interaction among the base stations and relay node, and then from the relay node to the core network that have 100 Mbps, 10 ms delay, 1 Gbps core link.
- Mobility:
- In this case, nodes are describes like immobile, for dynamic mobility however it can modify the mobility pattern.
- Traffic Generation:
- UDP agents are frequently utilised for interaction among the user nodes and the core network.
- Make constant data traffic among the nodes (for instance, patient data in an IAB setup) using the CBR (Constant Bit Rate) traffic application.
- Simulation Timing:
- Traffic simulation begins at time 1.0 and stops at time 5.0. The simulation ends at time 6.0.
Step 5: Run the Simulation
We need to store the script like IAB_network_simulation.tcl and then run the simulation NS2:
ns IAB_network_simulation.tcl
It will make a trace file (*.tr), which records the events and interactions within the simulation.
Step 6: Analyze the Results
We examine the simulation outcomes to utilise AWK for obtaining certain performance parameters such as packet reception, delay, throughput, and loss:
awk ‘{ if ($1 == “r”) print $0 }’ tracefile.tr > received_packets.txt
For visual analysis, Envision the simulation outcomes with Xgraph:
xgraph tracefile.tr
Step 7: Extend the Simulation
We will prolong the IAB network simulation including more advanced aspects like:
- Mobility:
- Execute the mobility for User Equipment (UE) and Access Points (gNBs), replicating the real-world scenarios such as mobile users and dynamic topology.
- Advanced Traffic Patterns:
- Replicate diverse kinds of traffic like video streaming, real-time communications, or IoT data traffic for further traffic models.
- QoS Management:
- Execute the Quality of Service (QoS) approaches to manage the latency-sensitive applications like voice, video within the IAB network.
- Security:
- Integrate the security aspects such as encryption and authentication, making sure the network integrity.
- Network Optimization:
- Replicate the network slicing, load balancing, or resource allocation strategies for enhancing the performance of network within an IAB configuration.
- 5G and Beyond:
- Design 5G NR integration with IAB and beyond for higher capacity, lower latency, and enhanced efficiency.
Step 8: Documentation and Reporting
For academic or research purposes, we can provide detailed insights like:
- Topology Diagram: Make a diagram for envisioning the network that contains Access Nodes, Relay Nodes, and Core Network.
- Traffic Types: Record the kinds of traffic like CBR, video, IoT data that are created.
- Performance Metrics: It offer to envision the performance parameters like throughput, latency, and packet loss for both access and backhaul modules.
Conclusion
To start an IAB network project in NS2 that needs to replicate both integration of access and backhaul networks for making a unified interaction infrastructure. The script permits to replicate a simple IAB network including base stations, relay nodes, and backhaul links, whereas making data traffic. We will need to prolong and enhance the simulation by means of integrating the mobility, security, QoS, and enhancing the network resources for more realistic and in-depth studies within 5G’s and beyond context.
Employing NS2 environment, we have developed a robust simulation process to replicate and analyze the Integrated Access and Backhaul Networks project, with more information to be disclosed in the upcoming manual.