Skip to content

Commit

Permalink
:dice: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
YousefEZ committed Apr 7, 2024
1 parent 65c0354 commit 7a5b2e4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 29 deletions.
9 changes: 5 additions & 4 deletions run_ns3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ delay_vals=("0ms" "10ms" "20ms" "30ms" "40ms" "60ms" "80ms" "100ms")
for delay_val in "${delay_vals[@]}"; do
echo "Delay Primary value: $delay_val"
for policy_number in 20 40 60 80 99; do
run_experiment "delay_primary" "$delay_val" "$policy_number" &
false && run_experiment "delay_primary" "$delay_val" "$policy_number" &
done
done

Expand All @@ -38,13 +38,14 @@ delay_vals=("0ms" "10ms" "20ms" "30ms" "40ms" "60ms" "80ms" "100ms")
for delay_val in "${delay_vals[@]}"; do
echo "Delay Alternate value: $delay_val"
for policy_number in 20 40 60 80 99; do
run_experiment "delay_alternate" "$delay_val" "$policy_number" &
false && run_experiment "delay_alternate" "$delay_val" "$policy_number" &
done
done

# Bandwidth primary experiments
echo "Bandwidth Primary experiments"
bandwidth_vals=("200Kbps" "225Kbps" "250Kbps" "275Kbps" "300Kbps" "325Kbps" "350Kbps" "375Kbps" "400Kbps")
#bandwidth_vals=("200Kbps" "225Kbps" "250Kbps" "275Kbps" "300Kbps" "325Kbps" "350Kbps" "375Kbps" "400Kbps")
bandwidth_vals=("1.5Mbps" "1.6Mbps" "1.7Mbps" "1.8Mbps" "1.9Mbps" "2.0Mbps" "2.1Mbps" "2.2Mbps" "2.3Mbps" "2.4Mbps" "2.5Mbps")
for bandwidth_val in "${bandwidth_vals[@]}"; do
echo "Bandwidth Primary value: $bandwidth_vals"
for policy_number in 20 40 60 80 99; do
Expand All @@ -58,7 +59,7 @@ bandwidth_vals=("200Kbps" "225Kbps" "250Kbps" "275Kbps" "300Kbps" "325Kbps" "350
for bandwidth_val in "${bandwidth_vals[@]}"; do
echo "Bandwidth Alternate value: $bandwidth_vals"
for policy_number in 20 40 60 80 99; do
run_experiment "bandwidth_alternate" "$bandwidth_val" "$policy_number" &
false && run_experiment "bandwidth_alternate" "$bandwidth_val" "$policy_number" &
done
done

Expand Down
14 changes: 8 additions & 6 deletions src/combined-baseline-no-udp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ uint32_t seed = 1;
uint32_t segmentSize = 1024;
uint32_t MTU_bytes = segmentSize + 54;

std::string bandwidth_udp_access = "1Mbps";


// Topology parameters
std::string bandwidth_primary = "300Kbps";
std::string bandwidth_access = "200kbps";
std::string bandwidth_udp_access = "100kbps";
std::string bandwidth_primary = "2Mbps";
std::string bandwidth_access = "2.5Mbps";
std::string delay_bottleneck = "20ms";
std::string delay_access = "20ms";
std::string delay_alternate = "20ms";
std::string bandwidth_alternate = "300kbps";
std::string bandwidth_alternate = "1Mbps";

void SetupTCPConfig()
{
Expand Down Expand Up @@ -262,13 +264,13 @@ int main(int argc, char* argv[])
BulkSendHelper tcp_source("ns3::TcpSocketFactory",
InetSocketAddress(receiver_addr, tcp_port));
tcp_source.SetAttribute("MaxBytes",
UintegerValue(100000)); // 0 for unlimited data
UintegerValue(1000000)); // 0 for unlimited data
tcp_source.SetAttribute("SendSize",
UintegerValue(1024)); // Packet size in bytes

tcp_apps.push_back(tcp_source.Install(tcp_devices.Get(i)));
tcp_apps.back().Start(Seconds(0.0));
tcp_apps.back().Stop(Seconds(10.0));
tcp_apps.back().Stop(Seconds(20.0));
}

// Packet sink setup (Receiver node)
Expand Down
16 changes: 10 additions & 6 deletions src/combined-baseline-udp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,17 @@ uint32_t segmentSize = 1024;
uint32_t MTU_bytes = segmentSize + 54;

// Topology parameters
std::string bandwidth_primary = "300Kbps";
std::string bandwidth_access = "200kbps";
std::string bandwidth_udp_access = "100kbps";

std::string bandwidth_primary = "2Mbps";
std::string bandwidth_access = "1Mbps";
std::string bandwidth_udp_access = "1.6Mbps";

std::string delay_bottleneck = "20ms";
std::string delay_access = "20ms";
std::string delay_alternate = "20ms";
std::string bandwidth_alternate = "300kbps";

std::string bandwidth_alternate = "1Mbps";


void SetupTCPConfig()
{
Expand Down Expand Up @@ -310,13 +314,13 @@ int main(int argc, char* argv[])
BulkSendHelper tcp_source("ns3::TcpSocketFactory",
InetSocketAddress(receiver_addr, tcp_port));
tcp_source.SetAttribute("MaxBytes",
UintegerValue(100000)); // 0 for unlimited data
UintegerValue(500000)); // 0 for unlimited data
tcp_source.SetAttribute("SendSize",
UintegerValue(1024)); // Packet size in bytes

tcp_apps.push_back(tcp_source.Install(tcp_devices.Get(i)));
tcp_apps.back().Start(Seconds(0.0));
tcp_apps.back().Stop(Seconds(10.0));
tcp_apps.back().Stop(Seconds(20.0));
}

// Packet sink setup (Receiver node)
Expand Down
19 changes: 12 additions & 7 deletions src/combined-frr-no-udp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,19 @@ void setAlternateTarget(const NetDeviceContainer& devices,
uint32_t segmentSize = 1024;
uint32_t MTU_bytes = segmentSize + 54;


std::string bandwidth_udp_access = "1Mbps";


// Topology parameters
std::string bandwidth_primary = "300Kbps";
std::string bandwidth_access = "200kbps";
std::string bandwidth_udp_access = "100kbps";
std::string bandwidth_primary = "2Mbps";
std::string bandwidth_access = "2.5Mbps";
std::string delay_bottleneck = "20ms";
std::string delay_access = "20ms";
std::string delay_alternate = "20ms";
std::string bandwidth_alternate = "300kbps";

std::string bandwidth_alternate = "1Mbps";


void SetupTCPConfig()
{
Expand Down Expand Up @@ -311,13 +316,13 @@ int main(int argc, char* argv[])
BulkSendHelper tcp_source("ns3::TcpSocketFactory",
InetSocketAddress(receiver_addr, tcp_port));
tcp_source.SetAttribute("MaxBytes",
UintegerValue(100000)); // 0 for unlimited data
UintegerValue(1000000)); // 0 for unlimited data
tcp_source.SetAttribute("SendSize",
UintegerValue(1024)); // Packet size in bytes

tcp_apps.push_back(tcp_source.Install(tcp_devices.Get(i)));
tcp_apps.back().Start(Seconds(0.0));
tcp_apps.back().Stop(Seconds(10.0));
tcp_apps.back().Stop(Seconds(20.0));
}

// Packet sink setup (Receiver node)
Expand All @@ -332,7 +337,7 @@ int main(int argc, char* argv[])
InetSocketAddress(Ipv4Address::GetAny(), udp_port));
ApplicationContainer udp_sink_app = udp_sink.Install(nodes.Get(4));
udp_sink_app.Start(Seconds(2.0));
udp_sink_app.Stop(Seconds(10.0));
udp_sink_app.Stop(Seconds(20.0));

// LFA Alternate Path setup
// Set up an alternate forwarding target, assuming you have an alternate
Expand Down
14 changes: 8 additions & 6 deletions src/combined-frr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ uint32_t segmentSize = 1024;
uint32_t MTU_bytes = segmentSize + 54;

// Topology parameters
std::string bandwidth_primary = "300Kbps";
std::string bandwidth_access = "200kbps";
std::string bandwidth_udp_access = "100kbps";

std::string bandwidth_primary = "2Mbps";
std::string bandwidth_access = "1Mbps";
std::string bandwidth_udp_access = "1.6Mbps";

std::string delay_bottleneck = "20ms";
std::string delay_access = "20ms";
std::string delay_alternate = "20ms";
std::string bandwidth_alternate = "300kbps";
std::string bandwidth_alternate = "1Mbps";

void SetupTCPConfig()
{
Expand Down Expand Up @@ -286,13 +288,13 @@ int main(int argc, char* argv[])
BulkSendHelper tcp_source("ns3::TcpSocketFactory",
InetSocketAddress(receiver_addr, tcp_port));
tcp_source.SetAttribute("MaxBytes",
UintegerValue(100000)); // 0 for unlimited data
UintegerValue(500000)); // 0 for unlimited data
tcp_source.SetAttribute("SendSize",
UintegerValue(1024)); // Packet size in bytes

tcp_apps.push_back(tcp_source.Install(tcp_devices.Get(i)));
tcp_apps.back().Start(Seconds(0.0));
tcp_apps.back().Stop(Seconds(10.0));
tcp_apps.back().Stop(Seconds(20.0));
}

// Packet sink setup (Receiver node)
Expand Down

0 comments on commit 7a5b2e4

Please sign in to comment.