Skip to content

WDM Ring Network Simulation with OWns

WDM Network Simulation and OWns.

Advances in optical wavelength division multiplexing (WDM) technology, which partitions the available bandwidth into a number of manageable smaller bandwidth channels, have made it a key technology for deployment in future network environments. There is considerable research and commercial activity to achieve optical WDM based networks. Simulation plays an important role in network protocol design, providing researchers with a cost effective method to analyze and study the behavior of proposed protocol models. However, a lack of uniformity in the choice of simulation platforms for optical WDM networks makes it difficult for researchers to exchange and compare obtained results under a common simulation environment. OWns is designed as an extension to the network simulator ns2, a multi-protocol network simulator that is widely-used for networking research and available in the public domain. The key characteristics of WDM networks, such as optical switching nodes, multi-wavelength links, virtual topology constructions, related switching schemes and routing algorithms were incorporated in owns.

The OWns architecture is designed to accommodate specific characteristics of WDM network simulations. As shown in the following figure, the OWns architecture views the physical and logical topology of WDM networks being implemented as the physical layer and the logical layer, respectively. The physical layer consists of optical switching nodes and multi-wavelength links. Packet transmission mechanisms are implemented at the physical layer. The logical layer comprises the routing module and wavelength assignment (WA) module, which together create and maintain the virtual topology.

The OWns circuit-switched architecture is composed of the routing module, the WA module, optical switching nodes, and the multi-wavelength links. The multi-channel structures of multi-wavelength links are centrally maintained in the logical layer. The WA module works along with the routing module to compute wavelength assignment, set up lightpaths, and construct the virtual topology. Relying on the above results, optical nodes forward incoming traffic to the corresponding next hops through multi-wavelength links. The current version of OWns supports circuit switching.

OWns architecture and layers

OWns Components Organization and Interactions

OWns Components Organization and Interactions

Optical switching node:
The WDMNode object is derived from the ns Node object, and it represents an instance of the optical switching node. It consists of a port classifier and a lightpath classifier. The port classifier de-multiplexes and relays incoming packets to their respective sinks, which are the Application/SessionTraffic object. The lightpath classifier interacts with the WAssignLogic object to establish lightpaths for incoming traffic sessions and updates the current state of the virtual topology. The lightpath classifier at a source node always attempts to issue lightpath requests for its generated traffic to the WAssignLogic. On the other hand, a lightpath classifier at an intermediate node of the traffic path simply consults the WAssignLogic to determine forwarding information. The lightpath classifier also simulates the delay introduced by wavelength conversion. The lightpath classifier is implemented as the object Classifier/Addr/Lightpath.

Multi-wavelength link:
The duplex link of ns is extended to form the duplex multi-wavelength link, duplex-FiberLink. It has additional properties, such as the number of wavelengths and per- wavelength bandwidth, used to model the characteristics of optical links. Another major difference from traditional links is the absence of queuing components in multi-wavelength links due to the characteristics of lightpath communication. An abstraction technique is adopted to reduce the complexity of implementing detailed multi-channels on multi-wavelength links. All multi-channel structures, wavelength usage, and virtual topology information are centrally maintained by the WAssignLogic. Error models for the links that allow transmission errors to be simulated are left for future work.

Wavelength assignment (WA) module:
The WA module is responsible for computing wavelength assignment, establishing lightpaths and constructing virtual topologies. The simulator represents the WA module as an object WAssignLogic, which stores information necessary for wavelength as- signment calculation. The first-fit wavelength assignment algorithm is implemented in WAssignLogic as the default wavelength assignment mechanism in OWns. Implementation of a new wavelength assignment algorithm can be done by using classes inherited from WAssignLogic.

Routing module:
The routing module computes the routes needed to establish lightpaths, using certain specified routing algorithms. Since the routing algorithms of traditional networks and those of WDM networks are similar in functionality, the routing module is implemented as the object RouteLogic/Wavelength, which is inherited from the ns routing logic RouteLogic object. The simulator centrally maintains the routing information across networks in the RouteLogic/Wavelength object. OWns currently uses the fixed-alternate shortest path routing algorithm as the default routing. The RouteLogic/Wavelength supplies the WAssignLogic with route information to route incoming traffic. New wavelength routing algorithms can be easily implemented as derived classes based on the RouteLogic/Wavelength object.

The Simulation

Traffic generation plays an important role in simulation for proper understanding of system performance. In ns, existing traffic sources such as CBR, Exponential, and Pareto are designed to be suited for packet switching simulations. Thus, in order to facilitate circuit switching simulations, we need to modify the existing traffic sources to generate session traffic, which is most appropriate for WDM circuit switching simulations. To describe a session traffic, two parameters were introduced: mean session arrival rate (msar_) and mean session holding time (msht_). Both are measured in terms of the traffic between a source-destination pair. Traffic session arrivals are modeled by a Poisson distribution with mean session arrival rate (msar_) as mean, and the holding time of each session has an Exponential distribution with mean session holding time as msht_. The product of mean session arrival rate and mean session holding time represents the traffic load measured in Erlangs. For each session, the packet inter-arrival time distribution is taken to be constant bit rate (CBR), Exponential, or Pareto. Therefore, in addition to specifying mean session arrival rate and mean session holding time for each session traffic, we also need to specify the parameters for each session depending on the packet arrival characteristics. For example, if a session traffic has exponential packet inter- arrival time, we need to specify mean packet size, mean packet rate, mean burst size and mean idle time as parameters. The basic idea of generating session traffic is to control the start and stop time for each session by using the specified session arrival rate (msar_), and session holding time (msht_). When a session starts, its stop time is scheduled at nextOffTime according to its session holding time. Similarly, when a session stops, its next start time is scheduled at nextOnTime according to its session arrival distribution. It was also noted that the packet rate of a session usually differs from others even in the same traffic session. It was defined that the mean packet arrival rate of a session as (rate_). We chose the packet rate for each traffic session from a uniform distribution between (rate_/2) and (rate_*2). This way, using only one session traffic generator in a source and destination pair, we are able to simulate multiple session traffic that were needed for circuit switching based simulations.

In OWns, a class of session traffic source objects namely Application/SessionTraffic/CBR, Application/SessionTraffic/Exponential, and Application/SessionTraffic/Pareto were developed, which are designed to generate three types of session traffic. Traffic is identified and classified by its unique flow id, fid_. The WAssignLogic stores all active traffic session information, such as rate, flow id, traffic source and destination. Meanwhile, session traffic sources constantly send their session updates to the WAssignLogic. When a traffic session starts, it registers with the WAssignLogic object, and then unregisters when the session ends.

In this simulation examples, the RWA algorithm was used with fixed-alternate shortest path routing and first-fit wavelength assignment. We can also enable the wavelength conversion capability for the nodes to study its effect on the network performance. Sparse wavelength conversion scheme can also be used to model the wavelength conversion capability of a network. The wavelength conversion factor (wvlen_conv factor) denotes the percentage of nodes in a network that have conversion capability. The wavelength conversion distance (wvlen_conv_dist) represents the limited-range wavelength conversion capability of a node.


Visualization tool of OWns

nam is an animation tool that reads the trace output generated by ns and produces a visualization. A specific extension to nam, OWnam, is being developed to address the needs of visualizing WDM network simulation scenarios based on OWns. In OWnam, each traffic flow is still visualized by the conventional packet animation approach supported by nam. In order to support the characteristics of WDM networks, the OWnam extension introduces two components: the events monitor and virtual topology statistics.
The events monitor is used to capture and display dynamic events that occur in virtual topologies, such as lightpath requests for arrived traffic sessions, lightpath establishment and tear-down, etc. The events monitor can be activated as a separate window or as an annotation panel of main window. By clicking on a particular event, the playback can be immediately switched to the context where the event occurs. This allows us to detect and examine interesting occurrences.
The conventional animation component of nam only displays the details of data packet transmission over the simulated physical topology, and the dynamic information associated with the virtual topology cannot be visualized and presented to viewers. The virtual topology statistics component is designed to bridge this gap. The dynamic information of the virtual topology involves the state of lightpath establishment, wavelength usage on multi-wavelength links, etc. The virtual topology statistics component provides two ways to display this information. First, clicking on any of displayed links will pop out a one-shot panel showing the information for this link, including current wavelength usage and lightpaths established over this link. Second, a separate window is used to display the dynamic virtual topology.

The Tcl Code for Simulating a Ring Network

Important Parameters of this WDM Simulation

set val(wvlen_routing) WDMSession ;# wvlen routing protocol
set val(wvlen_assign) FirstFit ;# wvlen assignment protocol
set val(node_num) 9 ;# total node number in network
set val(conn_prob) 0.4 ;# nodes connection prob.
set val(topo_seed) 99 ;# seed to create the topology
set val(link_bw) 7Mb ;# all links have the same bandwidth 
set val(link_wvlen_num) 8 ;# all links have the same wvlen number
set val(link_delay) 10ms ;# all links have the same delay
set val(wvlen_conv_factor) 1 ;# wvlen conversion factor, between 0 and 1
set val(wvlen_conv_dist) 8 ;# wvlen conversion distance, <= wvlen num
set val(wvlen_conv_time) 0.024 ;# wvlen conversion time (relative time)
 ;# pkts trasmission time * 3
set val(util_sample_interval) 0.5 ;# link utilization sample interval
set val(wvlen_alloc_path2) 1 ;# wvlen alloc on path2? 0, disable; 1, enable
set val(traf_num) 1 ;# total session-traffics in network

set val(traf_arrival_rate) 0.5 ;# each traffic arrival rate
set val(traf_holding_time) 0.2 ;# each traffic holdingtime

set val(traf_pkt_size) 200 ;# session-traffic packet size
set val(traf_pkt_rate) 2Mb ;# session-traffic packet arrival rate
set val(traf_type) Exponential ;# session-traffic type in network

set val(traf_exp_burst_time) 0.7 ;# expoo traffic average burst time 
set val(traf_exp_idle_time) 0.1 ;# expoo traffic average idle time 

set val(traf_max_req) 50 ;# max requests number
set val(traf_start_time) 0.0 ;# session-traffic starting time
set val(traf_stop_time) 0.0 ;# session-traffic stoping time


Helper Functions

# helper functions

set nshome "/root/ns-allinone-2.1b6/ns-2.1b6"

source $nshome/OWNS/tcl/ns-wdm-trafgen.tcl
source $nshome/OWNS/tcl/ns-wdm-stat.tcl

# Source the topo generators code

source $nshome/OWNS/tcl/ns-wdm-topo-gen.tcl


Creating a WDM Ring Network

#A 9-node heterogeneous unidirectional ring network with three different switch architectures. 
for {set i 0} {$i < 9} {incr i} {
 set n($i) [$ns $node]
 # create a session-traffic receiver for each node
 set sink($i) [new Agent/$sinker]
 $ns attach-agent $n($i) $sink($i)

$ns at 0.0 "$n(0) color orange"
$ns at 0.0 "$n(1) color green"
$ns at 0.0 "$n(2) color red"
$ns at 0.0 "$n(3) color orange"
$ns at 0.0 "$n(4) color green"
$ns at 0.0 "$n(5) color red"
$ns at 0.0 "$n(6) color orange"
$ns at 0.0 "$n(7) color green"
$ns at 0.0 "$n(8) color red"

 $ns start-config-wassignlogic

 $ns wvlen-conversion $conv_f $conv_d $conv_t

 $ns alloc-wvlen-path2 $path2

 $ns util-sample-interval $interval

 $ns max-req $maxreq

 # EDGES (from-node to-node length a b):
 if {$verbose} { 
 puts -nonewline "Creating links 0..."
 flush stdout 
 set i 0 
 foreach t { 
 {0 1 20ms} 
 {1 2 20ms} 
 {2 3 20ms} 
 {3 4 20ms} 
 {4 5 20ms} 
 {5 6 20ms} 
 {6 7 20ms} 
 {7 8 20ms} 
 {8 0 20ms} 
 } { 
 $ns duplex-FiberLink $n([lindex $t 0]) $n([lindex $t 1]) $linkBW [lindex $t 2] Null $wvlens
 incr i 
 if {[expr $i % 100] == 0} { 
 puts "creating link $i..." 
 #$ns rtmodel-at 8.0 down $n(0) $n(8) 
 return 9

eval create-topology ns WDMNode SessionTrafficRcvr $val(link_bw) $val(link_wvlen_num) \
 $val(wvlen_conv_factor) $val(wvlen_conv_dist) $val(wvlen_conv_time) \
 $val(wvlen_alloc_path2) $val(util_sample_interval) $val(traf_max_req)


Setting up the Traffic

# Define different colors for traffics
for { set i 0 } { $i < $val(traf_num) } { incr i } {
 eval $ns color $i $color([expr $i % $color_num])

# Wvlen routing protocol and assigning mechanism
$ns wrouting-proto $val(wvlen_routing)
$ns wassign-proto $val(wvlen_assign)

create-traffic ns traffic WDMNode SessionTrafficRcvr $val(node_num) $val(traf_num) \
 $val(traf_pkt_size) $val(traf_pkt_rate) \
 $val(traf_arrival_rate) $val(traf_holding_time) \
 $val(traf_exp_burst_time) $val(traf_exp_idle_time)

# Schedule session-traffic for WDM network
for { set i 0 } { $i < $val(traf_num) } { incr i } {
 $ns schedule-sessiontraffic $traffic($i) \
 $val(traf_start_time) $val(traf_stop_time)


Procedure Implementations

#Ring Topology Creation
# Create a Random Ring topology
proc create-topology {nsns node sinker linkBW wvlens conv_f conv_d conv_t path2 interval maxreq } {
 upvar $node n
 upvar $nsns ns
 upvar $sinker sink

 set verbose 1

 if {$verbose} { 
 puts "Creating WDMNodes..." 
#Traffic Creation
# Create random traffics
proc create-traffic { sim trafsrc node sinker nodenum trafnum pktsize rate traf_arrival_rate traf_holding_time arg1 arg2} {
 upvar $sim ns
 upvar $trafsrc src
 upvar $node n
 upvar $sinker sink

 set i 0
 foreach pair {
 { 0 5 }
 } {
 set sid [lindex $pair 0] 
 set did [lindex $pair 1] 

 set src($i) [create-Exponential-traffic $n($sid) $sink($did) $pktsize $rate $traf_arrival_rate $traf_holding_time $i $arg1 $arg2]
 incr i

A Simulated 9-node Ring network 




A Simulated 9-node Ring network with some traffic



OWNS extensions have been successfully added in ns2 version 2.1b6.
A preliminary ring network was constructed and visualized using Network Animation tool


For Assistance in Protocol Implementation, Simulations & Analysis of Industrial as well as Scholarly Research Works, you may Contact Us.

WhatsApp chatDiscuss Through WhatsApp

Call 91 9843779735

Send an e-Mail Message.

This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.

WhatsApp Discuss Through WhatsApp