Pages

Kamis, 13 Juni 2013

error HSTCP ns2.31 HMIPv6

1.011414 HA 0.1.0 updated, MH back home, packet 110
1.012005 HA 0.1.0 updated, MH back home, packet 112
1.012619 MH 0.1.19 received reply from BS 0.1.0 [COA: 0.1.0], packet 103
1.013269 HA 0.1.0 updated, MH back home, packet 105
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
    _o113: no target for slot -1
    _o113 type: Classifier/Port/Reserve
content dump:
classifier _o113
    0 offset
    0 shift
    2147483647 mask
    3 slots
        slot 0: _o116 (CMUTrace/Recv)
        slot 2: _o1201 (CMUTrace/Recv)
        slot 255: _o131 (CMUTrace/Recv)
---------- Finished standard no-slot{} default handler ----------
root@nurhay:~/code#

[SOLVED] ns2.31 HMIPv6 error

today i get error while editing my ns2 source code..
i need to simulate 10 Mobile nodes and 10 Correspondent nodes, which all of the pair must communicate each others.

here the error

--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
    _o24: no target for slot 0
    _o24 type: Classifier/Port/Reserve
content dump:
classifier _o24
    0 offset
    0 shift
    2147483647 mask
    1 slots
        slot 1: _o25 (Classifier/Addr/MIPDecapsulator)
---------- Finished standard no-slot{} default handler ----------


then as always, i ask to google, finnaly i find this reference

============================================================
No Slot Errors
This post discussed about common error “no-slot” in regards to classifier. This occurs when you are trying to access a certain slot which contains no pointer to an NsObject.
Example: Trying to access slot “-1”:
Slot “-1” is represented by slot_[-1]. We know that this element does not exist in C++. So what NS2 does is it check whether slot “-1” contains any pointer to an NsObject. Obviously, there is nothing in slot_[-1]. So you should see the error message below:
—- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) —-_o18: no target for slot -1 _o18 type: Classifier/Hash/Dest content dump: classifier _o18 0 offset 0 shift 2147483647 mask 1 slots slot 2: _o116 (Classifier/Port) -1 default
How Does This Error Occur?
From [ this post ], you need to understand the basic of NS2. If not and if you are lucky, you may get away with nice result. But if you are not so lucky you might see errors such as the one shown above.
NS2 has its own systematic way of doing things. When you modify something, you need to to know what you are doing. Example of things that might have gone wrong is you are trying to forward packets to a certain NsObject, but you did not install the NsObject properly in, say, slot_[i].
How can you fix this?
Make sure that the NsObject exists in the slot you are forwarding the packet to. You may have to add route or attach agents to relevant slots.

http://www.ns2ultimate.com/post/520626807/classifier-no-slot-error

============================================================


so, i try to trace my source code, i get wrong when giving the initial of configuration

this my first program, that give an error above :

set MN9 [$ns_ node 0.1.10]
[$MN1 set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]


after read the reference i make modification bellow :
(wrong confiwith my MN)

set MN9 [$ns_ node 0.1.10]
[$MN9 set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]

#another errorr

0.033048 BS 0.1.0 forwarding reg-request from 0.1.33 to HA 0.0.0, packet 17
MAC_802_11: accessing MAC cache_ array out of range (src 34, dst 0, size 20)!
0.033759 BS 0.1.0 forwarding reg-request from 0.1.34 to HA 0.0.0, packet 15
MAC_802_11: accessing MAC cache_ array out of range (src 37, dst 0, size 20)!
0.034630 BS 0.1.0 forwarding reg-request from 0.1.37 to HA 0.0.0, packet 12
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
    _o24: no target for slot 0
    _o24 type: Classifier/Port/Reserve
content dump:
classifier _o24
    0 offset
    0 shift
    2147483647 mask
    1 slots
        slot 1: _o25 (Classifier/Addr/MIPDecapsulator)
---------- Finished standard no-slot{} default handler ----------
root@nurhay:~/code#

because i get wrong when give number of MN
my wrong initial code :

set val(nn)             10                          ;# number of mobilenodes

solution :

set val(nn)             20                          ;# number of mobilenodes


#the other wrong


0.015845 BS send ADS 0.3.0
0.022372 HA 0.1.0 updated, MH back home, packet 2
0.025146 HA 0.1.0 updated, MH back home, packet 4
0.025897 HA 0.1.0 updated, MH back home, packet 7
0.027472 HA 0.1.0 updated, MH back home, packet 8
0.029732 BS 0.1.0 forwarding reg-request from 0.1.36 to HA 0.0.0, packet 11
0.030324 BS 0.1.0 forwarding reg-request from 0.1.32 to HA 0.0.0, packet 19
0.033048 BS 0.1.0 forwarding reg-request from 0.1.33 to HA 0.0.0, packet 17
0.033759 BS 0.1.0 forwarding reg-request from 0.1.34 to HA 0.0.0, packet 15
0.034630 BS 0.1.0 forwarding reg-request from 0.1.37 to HA 0.0.0, packet 12
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
    _o24: no target for slot 0
    _o24 type: Classifier/Port/Reserve
content dump:
classifier _o24
    0 offset
    0 shift
    2147483647 mask
    1 slots
        slot 1: _o25 (Classifier/Addr/MIPDecapsulator)
---------- Finished standard no-slot{} default handler ----------
root@nurhay:~/code#

solution :

(in progress)

hahha i know my problem is

set MN7 [$ns_ node 0.1.8]
[$MN1 set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]

 oooo i forget to edit,, here the solution

set MN7 [$ns_ node 0.1.8]
[$MN7 set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]

same with  this
set CN10 [$ns_ node 0.1.31]
[$CN1 set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]
i must change to
set CN10 [$ns_ node 0.1.31]
[$CN10 set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]


what the funny coding, i get the other error

0.672006 MH 0.1.28 has new coa (0.3.0) and new map (1023.2047.2047)
0.672006 Complete L2 handoff
0.672580 MH 0.1.8 has new coa (0.3.0) and new map (1023.2047.2047)
0.672580 Complete L2 handoff
0.891348 BS send ADS 0.2.0
1.000340 BS send ADS 0.1.0
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
    _o908: no target for slot -1
    _o908 type: Classifier/Port/Reserve
content dump:
classifier _o908
    0 offset
    0 shift
    2147483647 mask
    3 slots
        slot 0: _o911 (CMUTrace/Recv)
        slot 2: _o1562 (CMUTrace/Recv)
        slot 255: _o926 (CMUTrace/Recv)
---------- Finished standard no-slot{} default handler ----------


hmmm
this the human error hahhaha'


#Setup a TCP connection
set tcp1 [new Agent/TCP]
$ns_ attach-agent $CN1 $tcp1

set null1 [new Agent/TCPSink]
$ns_ attach-agent $MN1 $null1
$ns_ connect $tcp $null1

#Setup a FTP
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1

i must fix like this (bellow)

#Setup a TCP connection
set tcp1 [new Agent/TCP]
$ns_ attach-agent $CN1 $tcp1

set null1 [new Agent/TCPSink]
$ns_ attach-agent $MN1 $null1
$ns_ connect $tcp1 $null1

#Setup a FTP
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1




and all is well







thank you

Selasa, 11 Juni 2013

[SOLVED] nam error ns2.31 on ubuntu 10.04 with fhmipv6 patch

when i installed ns2.31 on ubuntu 10.04 to simulate HMIPv6 i get error in nam

[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox {
%W yview scroll [expr {- (%D)}] units
}
bind Li..."

after several time i search in google i find the answer and it's work properly

here the solution

edit source in root@nurhay:~/ns-allinone-2.31/tk8.4.14/generic# gedit tkBind.c
in line 589 add this code

#ifdef GenericEvent
/* GenericEvent */ 0,
#endif

save
then re install your ns by type
root@nurhay:~/ns-allinone-2.31# ./install






then validate it again

root@nurhay:~/ns-allinone-2.31/ns-2.31# ./validate





there is the output  tadaaaa