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

Re: [ns] MPLS simulation



Haobo,


	This is the error (at the end of the message) that is busting my b*lls.

	Somehow, the RtModule/MPLS/TE class can't get the make-ldp method, that
resides on its parent class (RtModule/MPLS). That's my guess.

	I am really lost on this one.

	Another question: what the mpls-node Simulator method does? And where
it is
supposed to be used? I've looked around but found no reference to it
anywhere.

	Do you have any comments or sugestions about any of these problems?
	


	Tulius

----------------------------------------------
* the simulation script that causes the error---

#
# make nodes & MPLSnodes
#
set Node0  [$ns node]
set Node1  [$ns node]
set Node2  [$ns node]

$ns node-config -MPLS ON

  $ns node-config -MPLSTE ON
  set LSR3      [$ns node]        <<<< I've tried many combinations.
None worked
  $ns node-config -MPLSTE OFF

  set LSR4      [$ns node]
  set LSR5      [$ns node]
  set LSR6      [$ns node]
  set LSR7      [$ns node]
  set LSR8      [$ns node]
  set LSR9      [$ns node]
  set LSR10     [$ns node]
  set LSR11     [$ns node]
  set LSR12     [$ns node]
  set LSR13     [$ns node]
$ns node-config -MPLS OFF


#
# configure ldp agents on all mpls nodes
#
for {set i 3} {$i < 14} {incr i} {
    for {set j [expr $i+1]} {$j < 14} {incr j} {
 set a LSR$i
 set b LSR$j
 eval $ns LDP-peer $$a $$b  <<<<<<<<<< error line
    }
}

----------------------------------------------
* the new Simulator class method that is called
Simulator instproc LDP-peer { src dst } {
 # Establish LDP-peering between node $src and $dst. The names src and
 # dst does NOT indicate a single-direction relationship.
        if { ![$src is-neighbor $dst] } {
  return
 }
 set ldpsrc [[$src get-module "MPLS"] make-ldp] <<<<<
 set ldpdst [[$dst get-module "MPLS"] make-ldp] <<<<<
 $ldpsrc set-peer [$dst id]
 $ldpdst set-peer [$src id]
        $self connect $ldpsrc $ldpdst
}



------------------------
* the error message-----------------

invalid command name ""
    while executing
"[$src get-module "MPLS"] make-ldp"
    (procedure "_o3" line 5)
    (Simulator LDP-peer line 5)
    invoked from within
"_o3 LDP-peer $LSR3 $LSR4"
    ("eval" body line 1)
    invoked from within
"eval $ns LDP-peer $$a $$b"
    ("for" body line 5)
    invoked from within
"for {set i 3} {$i < 14} {incr i} {
    for {set j [expr $i+1]} {$j < 14} {incr j} {
 set a LSR$i
 set b LSR$j
 eval $ns LDP-peer $$a $$b
    }
}"
    (file "mate1-ping-test05.tcl" line 129)
----------------------------------