Pages

Kamis, 13 Juni 2013

[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

1 komentar:

Unknown mengatakan...

Ass.wr.wb.

Permisi gan,saya newbie banget masalah NS2 dan apesnya penelitian akhir sy kudu pake NS2 gr2 dsuruh dosenpenguji.. >_<

Sy uda install NS2 gan kebetulan yg versi 2.35..Sy boleh minta contoh script tcl yg ada 1 BS sama 1 Mobile node gak gan buat ngetahuin parameter QoS nya..?

Ohya saya jg mau tanya, agan tau cara instal module wimax di ns 2.35?

Trimakasih

Posting Komentar