How to Start on Intra Domain Protocol Projects Using NS2

To stimulate an Intra-Domain Protocol Projects in NS2 has been includes it operates through protocols are modeled the routing in a single administrative domain or Autonomous System (AS). This protocol contains the OSPF (Open Shortest Path First), RIP (Routing Information Protocol), and EIGRP (Enhanced Interior Gateway Routing Protocol) that are complex in the enterprise or campus networks. Here’s a step-by-step guide for starting intra-domain protocol projects in NS2:

Steps to Start on Intra Domain Protocol Projects Using NS2

  1. Understand Intra-Domain Routing Protocols

Intra-domain protocols are handled the routing inside a network’s boundaries:

  1. RIP (Routing Information Protocol):
    • Distance-vector protocol.
    • Appropriate for minimum networks by basic configuration.
  2. OSPF (Open Shortest Path First):
    • Link-state protocol by fast convergence.
    • It helps the large and hierarchical networks for using range.
  3. EIGRP (Enhanced Interior Gateway Routing Protocol):
    • Hybrid protocol for cisco proprietary.
    • Associate the best structures for link-state and distance-vector routing.
  1. Define Your Project Goals

Select the focus for the project:

  1. Protocol Simulation:
    • Replicate the RIP, OSPF, or EIGRP in a network by detailed topologies.
  2. Performance Comparison:
    • Associate the protocols on parameter metrics such as convergence time, throughput, delay, and scalability.
  3. Protocol Enhancements:
    • Improve the protocols for energy efficiency, QoS, or improved scalability.
  4. Security Mechanisms:
    • Execute and validate the authentication or cryptographic improvements.
  5. Real-World Scenarios:
    • It designs the networks for campus, enterprise, or IoT environments.
  1. Set Up NS2
  1. Install NS2:
    • Use the tool like NS2.35, that has involves the built-in support for similar routing protocols.
  2. Verify Installation:
    • Process for instance of replication for assure operates all correctly.
  1. Simulate Intra-Domain Protocols

Write a TCL script for replicate the desired intra-domain routing protocol.

Example: OSPF Simulation

  1. Set Up the Network Topology:

set ns [new Simulator]

# Trace and animation files

set tracefile [open ospf.tr w]

$ns trace-all $tracefile

set namfile [open ospf.nam w]

$ns namtrace-all $namfile

# Create nodes

set n0 [$ns node]

set n1 [$ns node]

set n2 [$ns node]

set n3 [$ns node]

# Define links

$ns duplex-link $n0 $n1 10Mb 10ms DropTail

$ns duplex-link $n1 $n2 10Mb 10ms DropTail

$ns duplex-link $n2 $n3 10Mb 10ms DropTail

  1. Simulate OSPF Behavior:
    • Replicate the OSPF’s hierarchical structure by range:

set area0 [new Simulator]

set area1 [new Simulator]

# Assign nodes to areas

$area0 duplex-link $n0 $n1 10Mb 10ms DropTail

$area1 duplex-link $n2 $n3 10Mb 10ms DropTail

    • It contains the link-state bring up-to-date for periodically replicate the OSPF operations.

Example: RIP Simulation

  1. Set RIP as the Routing Protocol:

set val(rp) RIP ;# Set RIP as the routing protocol

  1. Assign IP Addresses and Subnets:
    • Use the classless routing:

$n0 set addr_ “192.168.1.1/24”

$n1 set addr_ “192.168.2.1/28”

$n2 set addr_ “192.168.3.1/30”

  1. Add Traffic Sources:
    • We setting the UDP or TCP communication:

set udp [new Agent/UDP]

$ns attach-agent $n0 $udp

set null [new Agent/Null]

$ns attach-agent $n3 $null

$ns connect $udp $null

set cbr [new Application/Traffic/CBR]

$cbr set packetSize_ 512

$cbr set interval_ 0.1

$cbr attach-agent $udp

  1. Run the Simulation:

$ns at 50.0 “finish”

proc finish {} {

global ns tracefile namfile

$ns flush-trace

close $tracefile

close $namfile

exec nam ospf.nam &

exit 0

}

$ns run

  1. Analyze Results

Examine the trace file such as ospf.tr or rip.tr for estimate the performance protocol.

Metrics to Evaluate:

  1. Convergence Time:
    • It takes duration for bring-to-update the routing tables after change the topology.
  2. Packet Delivery Ratio (PDR):
    • The total number of packets sending for delivered the successfully ratio:

awk ‘{if ($1 == “r” && $4 == “AGT”) recd++; if ($1 == “s” && $4 == “AGT”) sent++} END {print “PDR:”, recd/sent*100 “%”}’ ospf.tr

  1. Routing Overhead:
    • Total number of control packets are modified:

awk ‘{if ($7 == “OSPF” || $7 == “RIP”) count++} END {print “Routing Overhead:”, count}’ ospf.tr

  1. Throughput:
    • The number data has delivered successfully for over time.
  1. Visualize Results
  1. Use NAM (Network Animator):
    • Envision for routing bring up-to-date and packet flow:

nam ospf.nam

  1. Plot Metrics:
    • Use the tool like Python, MATLAB, or Excel for plot the performance of metrics such as PDR, delay, and overhead.
  1. Extend or Modify Protocols

To implement advanced features:

  1. Add Energy Efficiency:
    • Alter the protocol for choose the route to  explanation for energy:

double energy = node->energy();

if (energy > threshold) {

// Prefer routes with higher energy

}

  1. Simulate OSPF Areas:
    • It spilt the nodes for various range and connect through router border range.
  2. Security Enhancements:
    • Enhance the authentication mechanisms for routing bring up-to-date.
  1. Advanced Features
  1. Scalability Testing:
    • Replicate the large networks by hundreds of nodes for validate the protocol scalability.
  2. QoS-Aware Routing:
    • Improve the protocols for prioritize the routes according to need for the delay or bandwidth.
  3. Comparison with Inter-Domain Protocols:
    • Associate the intra-domain protocols for sample OSPF by inter-domain protocols for instance BGP.
  1. Document Your Project

Include:

  1. It starts with objectives and problem statement.
  2. Then process for the previous steps based on the network topology and protocol setting.
  3. After gives the outcomes and performance metrics.
  4. Finally it gives the references and insights.

Example Project Ideas

  1. Performance Analysis of OSPF and RIP:
    • Associate the protocols are below the various network sizes and congestion design.
  2. Energy-Aware Intra-Domain Routing:
    • OSPF has improve the consider energy for choose the route.
  3. Secure Routing Protocols:
    • Enhance the authentication or cryptographic methods for RIP or OSPF.
  4. Hierarchical Routing in OSPF:
    • Replicate and examine the OSPF’s multi-area design.
  5. IoT-Specific Intra-Domain Routing:
    • RIP or OSPF are validating the constrained IoT networks.

In the end of the simulation, we should have some knowledge about how the intra domain protocol will perform dynamically from one network to another network in the scenarios like manage the network congestion that were implemented by using ns2 tool. We will elaborate the further helpful information about the intra domain protocol.