Hi All, Our website moved to a new URL. Please bookmark the new link: https://ns2bloggers.blogspot.com/

Wednesday 21 December 2016

SOFTWARE DEFINED NETWORKS (SDN) SIMULATION IN NS2

Hi,
  Today we are going to have a look on software defined network simulation. Before that I will explain what a software defined network means?

Software-defined networking (SDN) is an approach to computer networking that allows network administrators to manage network services through abstraction of lower-level functionality. SDN is meant to address the fact that the static architecture of traditional networks doesn't support the dynamic, scalable computing and storage needs of more modern computing environments such as data centers. This is done by decoupling or disassociating the system that makes decisions about where traffic is sent (the control plane) from the underlying systems that forward traffic to the selected destination (the data plane).
SDN was commonly associated with the OpenFlow protocol (for remote communication with network plane elements for the purpose of determining the path of network packets across network switches) since the latter's emergence in 2011. Since 2012, however, many companies have moved away from OpenFlow, and have embraced different techniques. These include Cisco Systems' Open Network Environment and Nicira's network virtualization platform.
SD-WAN applies similar technology to a wide area network (WAN).


Features of SDN:
  • It’s an open standards-based.
  • Pro-grammatically configured.
  • Directly programmable.
  • Centrally managed .
  • Agile.
Types of tiers in SDN architecture:
  • Application tier.
  • Control plane tier.
  • Infrastructure or Data-plane tier.
Benefits of SDN:
  • Deliver agility and flexibility.
  • Reduce capEx.
  • Enable innovation.
  • Reduce OpEx.
Sample Codes:


SDN::SDN(nsaddr_t id) : Agent(PT_SDN),btimer(this), htimer(this), ntimer(this),   rtimer(this), lrtimer(this), rqueue() {
                   
  index = id;
  seqno = 2;
  bid = 1;
   LIST_INIT(&nbhead);
  LIST_INIT(&bihead);
   logtarget = 0;
  ifqueue = 0;
  xpos=0.0;
  ypos=0.0;
  zpos=0.0;
  MobileNode *iNode;
 }
  
void
BroadcastTimer::handle(Event*) {
   agent->id_purge();
  Scheduler::instance().schedule(this, &intr, BCAST_ID_SAVE);
 }

void
HelloTimer::handle(Event*) {
    agent->sendHello();
   double interval = MinHelloInterval + 
                 ((MaxHelloInterval - MinHelloInterval) * Random::uniform());
   assert(interval >= 0);
   Scheduler::instance().schedule(this, &intr, interval);
}
  
void
NeighborTimer::handle(Event*) {
  agent->nb_purge();
  Scheduler::instance().schedule(this, &intr, HELLO_INTERVAL);
}
  
void
RouteCacheTimer::handle(Event*) {
  agent->rt_purge();
  Scheduler::instance().schedule(this, &intr, FREQUENCY);
 }

For sample video, Click here