Hi ns-users,
In my script I would want  set up the Access Point with 2 interfaces in 
2 different channels (chan_a,chan_b), one with the standard 802.11a and 
the other second standard 802.11b.
Please, I have need help in order to understand if my  configuration is 
correct! If isn't, can you give a suggestion to me?
(in my script the configuration of the nodes follows mw-node)

My script:

global val_
set val_(channel)     Channel/Wireless        ;# channel
set val_(propagation) Propagation/TwoRayGround ;# radio-propagation model
set val_(phy)         Phy/WirelessPhy          ;# physical layer
set val_(mac)         Mac/802_11               ;# mac layer
set val_(ifq)         Queue/DropTail/PriQueue  ;# interface queue type
set val_(ll)          LL                       ;# link layer type
set val_(antenna)     Antenna/OmniAntenna      ;# antenna model
set val_(ifqlen)      50                       ;# max packet in ifq
set val_(routing)     None                    ;# routing
set val_(nMn)          2
set val_(nAP)          2
set val_(x)           150
set val_(y)           150
set val_(tr)          esercizi/out5.tr            ;# trace file
set val_(namtr)       esercizi/out5.nam    ;# nam trace file
set val_(stopTime)    15

set chan_a   [new $val_(channel)]
set chan_b   [new $val_(channel)]
............
........
$ns_  wireless-config   -routing        $val_(routing) \
                        -mac            $val_(mac) \
                        -phy            $val_(phy) \
                        -propagation    [new $val_(propagation)] \
                        -topography     $topography_ \
                        -ll             $val_(ll) \
                        -ifq            $val_(ifq) \
                        -ifq-length     $val_(ifqlen) \
                        -antenna        $val_(antenna) \
                        -xyz-trace      on \
                        -ifq-trace      on \
                        -mac-trace      on \
                        -rtm-trace      on \
                        -eot-trace      off

#---portal node
$ns_ node-config -wireless +Portal     ;# enable Portal support
for {set i 0} {$i<$val_(nAP)} {incr i} {             ;#ACCESS POINT

$ns_ wireless-config -channel  $chan_a

   set node_AP($i) [$ns_ node 1.[expr $i+1].0]
   $node_AP($i) set-position [expr 100.0*$i*$i] 100.0 0.0
   set netif_a($i) [$node_AP($i) add-interface "Wireless"]     ;# add 
wireless interface

##802.11a
   set mac_a($i) [new $val_(mac)]
   $mac_a($i) set SlotTime_          0.000050        ;# 50us
   $mac_a($i) set SIFS_              0.000028        ;# 28us
   $mac_a($i) set PreambleLength_    0            ;# no preamble_
   $mac_a($i) set PLCPHeaderLength_  128       ;# 128 bits
   $mac_a($i) set PLCPDataRate_      1.0e6           ;# 1Mbps
   $mac_a($i) set dataRate_          54.0e6          ;# 54Mbps
   $mac_a($i) set basicRate_         1.0e6           ;# 1Mbps

   $netif_a($i) set Pr_ 8.9175e-10           
   $netif_a($i) set Pt_ 0.2818 
   $netif_a($i) set freq_ 5.0e+9
   $netif_a($i) set RXThresh_  1.60607e-10 
   $netif_a($i) set CSThresh_ [expr 0.9*[$netif_a($i) set RXThresh_]]

   $mac_a($i) netif $netif_a($i)


$ns_ wireless-config -channel  $chan_b

  set netif_b($i) [$node_AP($i) add-interface "Wireless"] ;# add 
wireless interface

##802.11b/g
  $netif_b($i) set Pr_ 8.9175e-10             
  $netif_b($i) set Pt_ 0.007214     
  $netif_b($i) set freq_ 2.4e+9
  $netif_b($i) set RXThresh_  7.138e-11  
  $netif_b($i) set CSThresh_ [expr 0.9*[$netif_b($i) set RXThresh_]]

  $netif_b($i) set DSSS_CWMin             15
  $netif_b($i) set DSSS_CWMax             1023
  $netif_b($i) set DSSS_SlotTime         0.000009   
  $netif_b($i) set DSSS_CCATime          0.000003   
  $netif_b($i) set DSSS_RxTxTurnaroundTime     0.000002   
  $netif_b($i) set DSSS_SIFSTime         0.000016    
  $netif_b($i) set DSSS_PreambleLength     96
  $netif_b($i) set DSSS_PLCPHeaderLength     40   
  $netif_b($i) set DSSS_PLCPDataRate         6.0e6    ;#// 6Mbps
  $netif_b($i) set DSSS_MaxPropagationDelay    0.0000005  ;#   // 0.5us

  set mac_b($i) [new $val_(mac)]
  $mac_b($i) set SlotTime_          0.000020        ;# 20us
  $mac_b($i) set SIFS_              0.000010        ;# 10us
  $mac_b($i) set PreambleLength_    144        ;# 144 bits preamble
  $mac_b($i) set PLCPHeaderLength_  48       ;# 48 bits
  $mac_b($i) set PLCPDataRate_      1.0e6      ;# 1Mbps
  $mac_b($i) set dataRate_          11.0e6          ;# 11Mbps oppure 
54Mbps(802.11g)
  $mac_b($i) set basicRate_         1.0e6           ;# 1Mbps

  $mac_b($i) netif $netif_b($i)
}

..........
.........
thanks thanks thanks
Elena

Reply via email to