LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Error while running tcl file in ubuntu 12.04 (https://www.linuxquestions.org/questions/linux-newbie-8/error-while-running-tcl-file-in-ubuntu-12-04-a-4175484425/)

mulyead 11-13-2013 06:41 AM

Error while running tcl file in ubuntu 12.04
 
Hello,

I am using ns2.34 on Ubuntu 12.04. I installed NS2.34 on ubuntu and also able to install ns-BGP on it. While running a tcl script (which is downloaded from http://www2.ensc.sfu.ca/~ljilja/cnl/...-2.34-BGP.html) i am getting following error.

@ubuntu1204s:~/ns-allinone-2.34/ns-2.34/tcl/bgp/test$ ns drop-peer2.tcl

DROP-PEER2 Validation Test:

Three ASes connected in a line, each with one router.
AS 1 AS 0 AS 2
n1 }------{ n0 }------{ n2


(_o10 cmd line 1)
invoked from within
"_o10 cmd get-bgp-agent"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o10" line 2)
(SplitObject unknown line 2)
invoked from within
"$n0 get-bgp-agent"
invoked from within
"set bgp_agent0 [$n0 get-bgp-agent]"
(file "drop-peer2.tcl" line 27)

Please help me with the solution of the same.

Thanks in advance

knudfl 11-13-2013 03:49 PM

Welcome to LQ.

Which "Ubuntu 12.04" are you using ? i686 ? x86_64 ?
** This command will tell : $ uname -m <Enter>

Your errors : Looks like corrupt build of BGP ?

BGP info : http://www.linuxquestions.org/questions/tags/bgp/
Binary package, bgp-ns-2.34-ubuntu1004_i386.deb, post #28 →
http://www.linuxquestions.org/questi...984/page2.html
... Can be installed on any 32bits Ubuntu : i686.

Code:

$ ns-bgp drop-peer2.tcl

DROP-PEER2 Validation Test:

 Three ASes connected in a line, each with one router.
  AS 1      AS 0      AS 2
  n1 }------{ n0 }------{ n2

Simulation starts...

 time: 0.25
 n0 (ip_addr 10.0.0.1)  defines a network 10.0.0.0/24.

 time: 0.25
 n1 (ip_addr 10.0.1.1)  defines a network 10.0.1.0/24.

 time: 0.25
 n2 (ip_addr 10.0.2.1)  defines a network 10.0.2.0/24.

 time: 31 
 dump routing tables in all BGP agents:

BGP routing table of n0
BGP table version is 4, local router ID is 10.0.0.1
Status codes: * valid, > best, i - internal.
    Network            Next Hop      Metric  LocPrf  Weight Path
*>  10.0.1.0/24        10.0.1.1/32          -      -      - 1       
*>  10.0.2.0/24        10.0.2.1/32          -      -      - 2       
*>  10.0.3.0/24        self                  -      -      -         

BGP routing table of n1
BGP table version is 4, local router ID is 10.0.1.1
Status codes: * valid, > best, i - internal.
    Network            Next Hop      Metric  LocPrf  Weight Path
*>  10.0.1.0/24        self                  -      -      -         
*>  10.0.2.0/24        10.0.0.1/32          -      -      - 0 2     
*>  10.0.3.0/24        10.0.0.1/32          -      -      - 0       

BGP routing table of n2
BGP table version is 4, local router ID is 10.0.2.1
Status codes: * valid, > best, i - internal.
    Network            Next Hop      Metric  LocPrf  Weight Path
*>  10.0.1.0/24        10.0.0.1/32          -      -      - 0 1     
*>  10.0.2.0/24        self                  -      -      -         
*>  10.0.3.0/24        10.0.0.1/32          -      -      - 0       


 time: 90.26 
 dump routing tables in all BGP agents:

BGP routing table of n0
BGP table version is 5, local router ID is 10.0.0.1
Status codes: * valid, > best, i - internal.
    Network            Next Hop      Metric  LocPrf  Weight Path
*>  10.0.2.0/24        10.0.2.1/32          -      -      - 2       
*>  10.0.3.0/24        self                  -      -      -         

BGP routing table of n1
BGP table version is 6, local router ID is 10.0.1.1
Status codes: * valid, > best, i - internal.
    Network            Next Hop      Metric  LocPrf  Weight Path
*>  10.0.1.0/24        self                  -      -      -         

BGP routing table of n2
BGP table version is 5, local router ID is 10.0.2.1
Status codes: * valid, > best, i - internal.
    Network            Next Hop      Metric  LocPrf  Weight Path
*>  10.0.2.0/24        self                  -      -      -         
*>  10.0.3.0/24        10.0.0.1/32          -      -      - 0       

Simulation finished. Executing nam...


knudfl 11-13-2013 03:56 PM

P.S. :
The proof version of "drop-peer2.tcl" is included in the bgp package / patch:
ns-2.34/tcl/bgp/test

* Ref. ns-2.34-bgp_2.0_patch .

-

mulyead 11-14-2013 11:30 AM

Thanks for your help....

After installing the said Binary package, bgp-ns-2.34-ubuntu1004_i386.deb now i am able to run the tcl files.

I am using ubuntu 12.04 - i686


Thanks a lot


All times are GMT -5. The time now is 02:05 AM.