[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] State Dependent Routing




Dear NS-USERS:

     I am a new NS user, and planning to implement a new routing protocol 
to test a routing algorithm. We can call it State Dependent Optimal(SDO) routing. 
The idea is probabily from circuit switching network.

Supposed the following information are known:
1. trunk capabilities, 
2. current trunk loads, 
3. the distribution of arrival rate of requests
4. the distribution of holding time of requests
5. the distribution of effective bandwidth of requests
 
The accepting of each request to the network entails a risk of blocking one or
more later requests which use the same resource. Let's call the probability of 
blocking "cost".

The optimal route is the route with the minimum cost. 

I am thinking of using centralized routing, just like Session routing, and using MPLS
to route request. 

1. define a new 

"Class RouteLogic_Sdo : public RouteLogic"

2. define a new method, which implement the SDO algorithm

"RouteLogic_Sdo::compute_routes()" 

4. use the "RouteLogic instproc notify{}" to trigger the 
"Agent/rtProto/Sdo proc compute-all {}" recomputing of routes whenever a new request 
is coming  

Here is 4 of my questions

1. Is there any similiar works I can use?

2. The FEC defined in MPLS is the destination address of a packet. So all the packets
to that node will have the same label. That does not work for me. I need to label the 
packets from different requests differently. So I can put the requests on different 
routes. How can I do that? One of the answers maybe define the FEC based on 
src/dst/port. then come to the  next question.

3. How to tell if a request is end? When a request is end, I have to remove the label
for that request. Otherwise, an exponential distributed traffic source will use the
same label for the whole simulation.
 
4. I can not make the MPLS LDP agent work ... :( 
The simple TCL script is paste at the end of this letter. There is no error or warning
msgs. But not LDP packets dumped and all of the 3 table( PFT, LIB and ERB) are empty.

I am really appreciated any suggestions!

Thank you for patient!

Best regards,

Sincerely
Zhibing Wang


############################################################################

set ns [new Simulator]

set nf [open test-mpls.nam w]
$ns namtrace-all $nf
#set pft [open pft.tar w]
proc finish {} {
    global ns nf pft
    $ns flush-trace
    close $nf
#   close $pft
    exec nam test-mpls.nam &
    exit 0
}

######## topo info ##############################
set n(0) [$ns node]
set n(1) [$ns node]
$ns node-config -MPLS ON
set LSR(2) [$ns node]
set LSR(3) [$ns node]
set LSR(4) [$ns node]
set LSR(5) [$ns node]
set LSR(6) [$ns node]
set LSR(7) [$ns node]
set LSR(8) [$ns node]
$ns node-config -MPLS OFF
set n(9) [$ns node]
set n(10) [$ns node]

$ns duplex-link $n(0) $LSR(2) 1Mb 10ms DropTail
$ns duplex-link $n(1) $LSR(2) 1Mb 10ms DropTail

$ns duplex-link $LSR(2) $LSR(3) 1Mb 10ms DropTail
$ns duplex-link $LSR(3) $LSR(4) 1Mb 10ms DropTail
$ns duplex-link $LSR(4) $LSR(8) 1Mb 10ms DropTail

$ns duplex-link $LSR(2) $LSR(5) 1Mb 10ms DropTail
$ns duplex-link $LSR(5) $LSR(6) 1Mb 10ms DropTail
$ns duplex-link $LSR(5) $LSR(4) 1Mb 10ms DropTail
$ns duplex-link $LSR(6) $LSR(7) 1Mb 10ms DropTail
$ns duplex-link $LSR(6) $LSR(8) 1Mb 10ms DropTail
$ns duplex-link $LSR(7) $LSR(8) 1Mb 10ms DropTail

$ns duplex-link $LSR(7) $n(9) 1Mb 10ms DropTail
$ns duplex-link $LSR(8) $n(10) 1Mb 10ms DropTail

##########topo info ###################################

################ ldp info ##################

#configure ldp agents on all mpls nodes

for {set i 2} {$i<9} { incr i} {
    for {set j [expr $i+1]} {$j<9} {incr j} {
	set a LSR($i)
	set b LSR($j)
	eval $ns LDP-peer $$a $$b
    }
}

#$ns configure-ldp-on-all-mpls-nodes
Classifier/Addr/MPLS set control_driven_ 1

#
# Set ldp-message color in NAM
#
$ns ldp-request-color       blue
$ns ldp-mapping-color       red
$ns ldp-withdraw-color      magenta
$ns ldp-release-color       orange
$ns ldp-notification-color  yellow
#################### ldp info ###########

$ns rtproto Session

######### traffic src ##################

#Create a CBR agent and attach it to node n0
set cbr0 [new Agent/CBR]
$ns attach-agent $n(0) $cbr0
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$cbr0 set fid_ 1

#Create a CBR agent and attach it to node n1
set cbr1 [new Agent/CBR]
$ns attach-agent $n(1) $cbr1
$cbr1 set packetSize_ 500
$cbr1 set interval_ 0.005
$cbr1 set fid_ 2

#Create a Null agent and attach it to node n3
set null0 [new Agent/Null]
$ns attach-agent $n(9) $null0

#Connect the traffic sources with the traffic sink
$ns connect $cbr0 $null0  
$ns connect $cbr1 $null0

#########traffic src ###############################33




######### events #######################

#Schedule events for the CBR agents
$ns at 0.5 "$cbr0 start"
$ns at 1.0 "$cbr1 start"
$ns at 4.0 "$cbr1 stop"
$ns at 4.5 "$cbr0 stop"
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish"

$ns rtmodel-at 1.5 down $LSR(5) $LSR(6)
$ns rtmodel-at 3.0 up $LSR(5) $LSR(6)

#################### events ###############

############## dump ldp info to stdout #############
Agent/LDP set trace_ldp_ 1
Classifier/Addr/MPLS set trace_mpls_ 1
############## dump ldp info to stdout #############

############# dump MPLS/LDP packets of a LSR##########
$ns at 0.1 "[$LSR(2) get-module MPLS] trace-mpls"
$ns at 0.8 "[$LSR(2) get-module MPLS] trace-ldp"
############# dump MPLS/LDP packets of a LSR##########

############## dump the 3 tables ###############
$ns at 0.7 "[$LSR(2) get-module MPLS] erb-dump"
$ns at 0.7 "[$LSR(2) get-module MPLS] lib-dump"
$ns at 0.7 "[$LSR(2) get-module MPLS] pft-dump "
############## dump the 3 tables ###############


$ns run


##########################################################################