NS3 Routing Projects

Routing Protocol Projects Using NS3 simulator

NS3 Routing Projects ensure canonical simulation based environment to emulate experiments for various application. We offer M.Tech NS3 projects developed by us for college to students to successfully complete their academic projects. We evaluate reliable routing algorithm with fuzzy logic by NS3 simulation. We analyze various routing protocol in wireless network by NS3 simulation. We compute various routing packets and data transmission using numerous mobile nodes by NS3.

Metrics considered in ns3 routing projects

Metrics considered in ns3 routing projects

Reliable routing algorithm:

We adopt fuzzy logic based reliable routing called RRAF (reliable routing algorithm on fuzzy logic). By this algorithm, we provide parameter such as trust and energy value. It uses AODV protocol for routing. During route discovery process every node insert trust value & energy capacity in route request packet. In this algorithm we use reliability value which generated by destination based upon trust & energy. We use this reliability value for routing process path which ensure great reliability used for routing.

Fuzzy logic wireless multi path routing:

We implement this algorithm from IEEE papers to allocate resource in network based on traffic packets are transmitted repeatly over disjoint path in network. It performs decision based on packet importance. When data transmission request occurs, route request broadcast message by source node to other node in network when packet reach destination path traveled by request packet recorded & that path used for data transmission in network.

FLWLAMR algorithm:

We developed more than 80+ process in NS3 simulation with various networks. We deploy fuzzy logic wireless load aware multi path routing an extension of FLWMR algorithm. We use fuzzy rule to define network state range, fuzzy controller to evaluate network status. When network status is excellent, we perform data transmission among source and destination.

Multiclass FQRA:

By this algorithm, we consider traffic state and bandwidth as input for fuzzy logic. This input help to define fuzzy logic decision. We adopt weighted round robin scheduling algorithm in multicast FQRA toward packets with any queuing delay. We assign weight to each queue contain data. By using weight value, fuzzy controller determines routing process.

SSR:

Source select route is an effective algorithm to identify optimized route among source & destination. We provide maximum relative speed among neighbor nodes, maximum distance among nodes, total number of data transmission are consider to select route. It referred as a better conventional algorithm to get route among source and destination.

Sample code for NS3 Vanet Projects:
This is the sample code for simple VANET network. Using NS3 simulator.
#include “ns3/vector.h”
#include “ns3/string.h”
#include “ns3/socket.h”
#include “ns3/double.h”
#include “ns3/config.h”
#include “ns3/log.h”
#include “ns3/command-line.h”
#include “ns3/mobility-model.h”
#include “ns3/yans-wifi-helper.h”
#include “ns3/position-allocator.h”
#include “ns3/mobility-helper.h”
#include “ns3/internet-stack-helper.h”
#include “ns3/ipv4-address-helper.h”
#include “ns3/ipv4-interface-container.h”
#include
#include “ns3/ocb-wifi-mac.h”
#include “ns3/wifi-80211p-helper.h”
#include “ns3/wave-mac-helper.h”
using namespace ns3;
NS_LOG_COMPONENT_DEFINE (“WifiSimpleOcb”);
void ReceivePacket (Ptr socket)
{
while (socket->Recv ())
{
NS_LOG_UNCOND (“Received one packet!”);
}
}
static void GenerateTraffic (Ptr socket, uint32_t pktSize,
uint32_t pktCount, Time pktInterval )
{
if (pktCount > 0)
{
socket->Send (Create (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic,
socket, pktSize,pktCount – 1, pktInterval);
}
else
{
socket->Close ();
}
}
int main (int argc, char *argv[])
{
std::string phyMode (“OfdmRate6MbpsBW10MHz”);
uint32_t packetSize = 1000; // bytes
uint32_t numPackets = 1;
double interval = 1.0; // seconds
bool verbose = false;
CommandLine cmd;
cmd.AddValue (“phyMode”, “Wifi Phy mode”, phyMode);
cmd.AddValue (“packetSize”, “size of application packet sent”, packetSize);
cmd.AddValue (“numPackets”, “number of packets generated”, numPackets);
cmd.AddValue (“interval”, “interval (seconds) between packets”, interval);
cmd.AddValue (“verbose”, “turn on all WifiNetDevice log components”, verbose);
cmd.Parse (argc, argv);
Time interPacketInterval = Seconds (interval);
NodeContainer c;
c.Create (2);
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
Ptr channel = wifiChannel.Create ();
wifiPhy.SetChannel (channel);
wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11);
NqosWaveMacHelper wifi80211pMac = NqosWaveMacHelper::Default ();
Wifi80211pHelper wifi80211p = Wifi80211pHelper::Default ();
if (verbose)
{
wifi80211p.EnableLogComponents (); // Turn on all Wifi 802.11p logging
}
wifi80211p.SetRemoteStationManager (“ns3::ConstantRateWifiManager”,
“DataMode”,StringValue (phyMode),
“ControlMode”,StringValue (phyMode));
NetDeviceContainer devices = wifi80211p.Install (wifiPhy, wifi80211pMac, c);
wifiPhy.EnablePcap (“wave-simple-80211p”, devices);
MobilityHelper mobility;
Ptr positionAlloc = CreateObject ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (5.0, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel (“ns3::ConstantPositionMobilityModel”);
mobility.Install (c);
InternetStackHelper internet;
internet.Install (c);
Ipv4AddressHelper ipv4;
NS_LOG_INFO (“Assign IP Addresses.”);
ipv4.SetBase (“10.1.1.0”, “255.255.255.0”);
Ipv4InterfaceContainer i = ipv4.Assign (devices);
TypeId tid = TypeId::LookupByName (“ns3::UdpSocketFactory”);
Ptr recvSink = Socket::CreateSocket (c.Get (0), tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
Ptr source = Socket::CreateSocket (c.Get (1), tid);
InetSocketAddress remote = InetSocketAddress (Ipv4Address (“255.255.255.255”), 80);
source->SetAllowBroadcast (true);
source->Connect (remote);
Simulator::ScheduleWithContext (source->GetNode ()->GetId (),
Seconds (1.0), &GenerateTraffic,
source, packetSize, numPackets, interPacketInterval);
Simulator::Run ();
Simulator::Destroy ();
return 0;
}