//
archives

wireless

This category contains 10 posts

Analysis of 802.11 MAC code in NS-2

0. MAC in ns-2 LAN is within Berkeley Architecture, WLAN cannot create with “newLan” command Ethernet could be created as a LAN with common bandwidth and delay. 1. The general structure of MAC related sourcecode: mac.cc, mac.h MAC class is derived from Bi-Connector class. Local Variables: pktTx_ pktRx_ Macstate_ : index_ : mac address Basic … Continue reading

Different transmission speeds and queue length in 802.11

Different transmission speeds in 802.11

Test hidden terminal in 802.11

Test transmission range in 802.11

Understand IEEE 802.11 MAC Standard

Undesrstanding Carrier Sense & Back Off: Consider the following two questions about IEEE 802.11 Standard: Carrier Sense is provided by the physical layer, thus, when MAC layer get a packet to transmit. It will initiate a carrier sense mechanism, and it took >= DIFS time to determine that the channel is free, thus, at least … Continue reading

Interfaces of Wireless MAC in ns-2

General Architecture of a mobile node in ns-2:   the relationship of MAC could be found in ns-mobilenode.tcl. The source code: Actually, from top to down path, the structure is  ll  —>  ifq —-> mac —> netif . for packets going up, it is netif —> mac —>ll. Thus, ifq is only used for down … Continue reading

Headers and Addresses in ns-2

Notice that by default, all packet headers are included. A diagram:   Common-header: Access method: What’s in common header (refer to ./common/packet.h) ch->ptype() : protocl type. e.g. PT_DSR shows this is a signaling message for DSR protocol, not a normal DATA packet ch->size(); ch->direction() : Up or Down ch->uid() ch->iface(): Interface ch->next_hop(): next hop for … Continue reading

Wireless Simulation Scenarios in ns-2

1. Node Movement and Topology Generation Instead of specifying and control each nodes’ position and movement pattern, we use a CMU tool “setdest” to generate large number of nodes and there movements. The tool use a random waypoint model. setdest Setdest tool is used to generate the positions of nodes and their moving speed and … Continue reading

Running Wireless Simulations in ns2

In this section, you are going to learn to use the mobile wireless simulation model available in ns. The section consists of two parts. In the first subsection, we discuss how to create and run a simple 2-node wireless network simulation. In second subsection, we will extend our example (in subsection 1) to create a … Continue reading