Sunday, 23 September 2012

Balance Transfer in Vodafone,BSNL,Idea,etc..


BSNL :-

Just Type the Sms as GIFT MOBILE NO AMOUNT and send it to 53733.
Ex ;- Type GIFT 9408730260 55 and send it to 53733 .
55 Rupees of Balance is Transferred.
 This trick  is useful to transfer/exchange balance between your friends.

Vodafone :=

Dial *131*AMOUNT*MOBILE NO#. 
E.x:- *131*50*9408730260# 
UNINOR:-

To Transfer Balance In Uninor Just Dial *202*MobileNumber*Amount#.
E.g. *202*9408730260*30# To Transfer 30 Rupees.

How to change your folders background


  • Have the Folder you want to put the background on open!
  • Open up Notepad, then simply paste in this code: 
[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
iconarea_image=***Picture Location Here!***\***Name of File!***
  • Go to your picture (the picture you want to use!) and right click and select properties and find the file location & copy the location!
  • Now go back to ur text document (notepad) and where it says ***Picture Location Here!*** paste the location...u copied in the previous step!
  • Now after u've done that where it says ***Name of File!*** type the name of the file including the .jpg .bmp .bip. jpeg etc
  • Save the text document as "desktop.ini" be sure to remember the .ini extension! click Save as "All Files" not "Text Document" and save the document in the folder where u want the background to be!
  • Now just close the folder and open it again it should show the picture as a background!

Saturday, 25 August 2012

Trace File Format in NS2

In the previous post, I showed you how to create a “trace file” in NS2. In this post, I will show you the interpretation of an NS2 trace file.

Example of trace files :-

When using trace-all in NS2, a trace string is created in a trace file. The trace file would look like this.


Trace file format :-

The format of a trace string is shown below:




where 12 fields of the trace string are as follows.

1. Type Identifier:

 • “+”: a packet enque event
 • “-”: a packet deque event
 • “r”: a packet reception event
 • “d”: a packet drop (e.g., sent to dropHead_) event
 • “c”: a packet collision at the MAC level

2. Time: at which the packet tracing string is created .

3-4. Source Node and Destination Node: denote the IDs of the source and the destination nodes of the tracing object.

5. Packet Name: Name of the packet type

6. Packet Size: Size of the packet in bytes.

7. Flags: A 7-digit flag string

 • “-”: disable
 • 1st = “E”: ECN (Explicit Congestion Notification) echo is enabled.
 • 2nd = “P”: the priority in the IP header is enabled.
 • 3rd : Not in use
 • 4th = “A”: Congestion action
 • 5th = “E”: Congestion has occurred.
 • 6th = “F”: The TCP fast start is used.
 • 7th = “N”: Explicit Congestion Notification (ECN) is on.

8. Flow ID

9-10. Source Address and Destination Address: the format of these two fields is “a.b”, where “a” is the address and “b” is the port.


11. Sequence Number

12. Packet Unique ID

Post processing NS2 Result using NS2 Trace

In this post, I will show you a simple (and perhaps the most common way) to create an NS2 trace file. This trace file contains a lot of information. In fact, it contains too much information, which intimidates NS2 users. Don’t worry about it. We will try to interpret NS2 trace files later. For now, let’s focus on how an NS2 trace file can be created.

To create a trace file, you need to do the following two steps:
  1. Create a file to record tracing information.
  2. Record the tracing information to the created file.
Create a File for Writing :-

Tcl uses a command “open” to open a file. The syntax of the command “open” is as follows:
open <filename> <purpose>
where <filename> is the name of the file to be opened, and <purpose> can be
“w” for writing,
“r” for reading, or
“a” for appending
This statement returns a file handle, which can be used to refer to the opened file.
An example of a Tcl statement which opens a file whose name is “tracefile.tr” for writing and stores to the file handle in the variable $var is shown below:
set var [ open tracefile.tr w ]

Record tracing information in the opened trace file :-

The next step is to record trace information in the opened file. This can be achieved using the following Tcl statement:

$ns trace-all $var

where $ns is the Simulator instance, and $var is the file handle. This statement tells all the tracing objects (e.g., enqT_, deqT_, rcvT_, and drpT_ in the SimpleLink object below) to record information of traversing packets in the trace file whose variable is $var.

There is only one requirement for tracing: The above statement must be located prior to “$ns run”.

After the simulation complete, a trace file would be created. Here is an example of trace files.



The statement “$ns trace-all” inserts tracing object into various places in network topology. The most common place is in a SimpleLink usually used to connect two nodes. The statement “$ns trace-all” inserts few tracing objects into the SimpleLink object as shown above.

A tracing object sits between two NsObject intercepting objects. Once receiving a packet, it prints related tracing information as a line into the trace file. In the above figure, we have four tracing objects:

  • enqT_: Print a line beginning with “+”, indicating an enqueuing event
  • deqT_: Print a line beginning with “-”, indicating a dequeuing event
  • rcvT_: Print a line beginning with “r”, indicating a packet reception event
  • drpT_: Print a line beginning with “d”, indicating a packet dropping event
Tracing Statements in the Trace File:

These tracing objects print information of all traversing packets. Information of packets which do not pass through any of these objects would not appear on the trace file.

The only object responsible for dropping packets in the above figure is queue_. It does so by invoking function drop(p). The function drop(p) in turn sends the packet p to the forwarding NsObject, which in this case is drpT_. It is drpT_, who is responsible for printing dropping information statements (i.e., those begin with ‘d’) in the trace file.

This means that if you drop the packet explicitly (e.g., using drop(p)) without passing the packet through drpT_, no information about dropping packet would appear on the trace file.

IP Routing in NS2



I know. I know. IP is “the most” widely used routing in the computer industry. But, we as people in academic need to be a bit more precise when using buzz words.

IP: refers to IP address. It is different from routing mechanism. IP address is just a hierarchical way of defining an endpoint.
Routing mechanism: is a way of determining the route to get to a given destination. It works according to an underlying routing table.
Routing algorithm: computes a routing table.
Routing protocol: is a set of communication rules, which shall be followed under a certain condition such as a route failure.

Here is a example set of parameters in practice:

Addressing = IP Address
Routing mechanism = Routing table; Route Summary
Routing algorithm = Dijkstra
Routing protocol = OSPF

What about NS2?

By default, NS2 uses the following setting

Addressing = Flat address (1,2,3,…)
Routing mechanism = Address classifiers
Routing algorithm = Dijkstra
Routing protocol = Static (The condition of all the nodes does not change throughout the simulation)

Do You Really Need IP?

I have received quite a few questions like “How do I implement IP in NS2?” My first response would be “this is too vague”. You really have to break down your questions. At least, you have to identify which of the above 4 topics you would like to study.

For example, if you would like to study routing protocols, you’d probably refer to OSPF or BGP routing protocols. If your focus is on the communiation protocols of the routing, you can use the following setting

Addressing: Flat
Routing Mechansism: Classifier
Routing Algrithm: Dijkstra (used by default as a part of OSPF)

which are the default setting of NS2.