Wednesday, May 8, 2013

NS2 simulator : common fixes Part 1

As I am trying to learn NS2 using the online tutorials, most examples given online are using older versions of NS. I am using NS 2.35 in which many syntax and/or file locations have changed. So I am finding my way out to figure how to fix those common errors popping up when trying those demos.

Will keep updating the page as I keep learning ... :)


Prob 1. On running the multicasting example ex-mcast.tcl on nile.wpi.edu/NS/ it first gave a warning saying:


" Warning dst_ is no longer being supported in NS. dst_ 0xffffffff 
Use dst_addr_ and dst_port_ instead "

Fix: 

step 1: Replace "set mrthandle [$ns mrtproto DM {}] #DM = dense mode" with
             set mproto DM
             set mrthandle [$ns mrtproto $mproto {}]

step 2: Create groups for multicasting by adding the following after the above 2 lines:
            set group1 [Node allocaddr]
            set group2 [Node allocaddr]

step 3: Replace dest_ with dest_addr_ and replace the hexadecimal addresses with the group names you want the node to belong to. eg.
            $udp0 set dst_addr_ $group1
            $udp2 set dst_addr_ $group2

Prob 2: invalid command name "Mac/Csma/Cd" or "Mac/Csma/Ca"

Fix: Replace Mac/Csma/Cd or Mac/Csma/Ca with Mac/802_3

Prob 3: Segmentation fault when trying to use "namtrace-all-wireless"

Fix: In your script you have to change ifq value Queue/DropTail/PriQueue by CMUPriQueue

Sunday, April 21, 2013

The "Ravanayana" ... What if Ravan won???

What if Ravan had won instead of Ram?
What do you people think of it? I think it would have been altogether a different story ...

" Once upon a time, long long ago .. in the Treta yuha lived the noble, just and benevolent king Ravana of Lanka. A devout follower of Lord Shiva, he possessed immense knowledge of vedas and upanishads and was the author of Ravana Samhita - an astrological scripture narrated by Lord Shiva. Ravanayana is the story about his war with bad people and his ultimate victory.




Ram and Lakshman, the princes of Ayodhya were admonished and sent to exile in forest for their misdeeds by their father King Dasaratha. Ram's wife Sita ,a pretty,coy lady feared the repercurssions of living alone in Ayodhya and decided to be with her husband during the exile,she believed the wild forest to be safer than living as a single woman in a repressive society with three royal mother-in-laws.

One day during their exile in forest,Minakshi,the beautiful and much adored sister of King Ravana saw Ram. She was bewitched by his handsome looks and fell for him. Minakshi went upto Ram and expressed her feelings of desire for him. Ram and Laskhaman were shocked at the courage of this woman,back home in Ayodhya no woman would have had the guts to propose a man.They would remain in their ghoongats and would have had only fleeting glances at their bridegrooms before wedding. Without hiding his disgust Lakshman retorted to Minakshi "O you filthy woman,how dare you speak like this.Women should not behave so.See our Sita here,she is a role model of how a woman should be.You are a demon".






Minakshi replied back "O you misogynist,which law of your land forbids women to express their feelings.If a man had done this you would have termed him as a courageous romantic and if a woman does it, she is a demon?.Being a Sita,who does not speak against the men in her household however unjust they are is not how a woman should be". For the first time in their lives the princes of Ayodhya heard a woman speak up against a man. An aghast Lakshman drew his sword and sliced the nose of the unarmed Minakshi.

The news of this demeaning act of attacking an unarmed person,that too a woman, travelled far and wide. The learned sages and the wise rishis wondered how a warrior prince right under the nose of a future king could do this. They were stunned by the ruthlessness and irrational behavior. When the mighty Ravana came to know what had befallen his loving sister,he was enraged and vengeance filled his heart. He rushed in his pushpaka vimana to the place where these two chauvinistic princes were living. To his utter dismay he could not find them in their hut,but he found sita. Though hesitant Ravana knew that to know the value of a woman,the princes of Ayodhya should lose a woman they loved and respected. Ravana imprisoned Sita and took her with him to Lanka.


Ram and Lakshman found that Sita had been abducted.How will they face the world now? How can they ever go back to Ayodhya without her?

The world will chastise their ability and manhood for not being able to safeguard a woman. Their masculine egos would be thrashed and their legacy relegated to oblivion. The princes decided to find out Sita,they started their travel towards south.

Meanwhile in Lanka, Sita was put in a ladies community center  There she was mocked and ridiculed by the lankan women. They could not imagine someone so coy and so dependent,and without any ability to rebel or speakup against men. Her misery was compounded when she came to know about the beautiful and intellectual Mandodari, Ravana's wife. People compared Sita's beauty to Mandodari but when they stuck a conversation with her,they scorned her intelligence or rather the lack of it.


On the other side luck favored Ram and Lakshman,they befriended Sugriva,the leader of a dark,strong and muscular race of beings from the south. Sugriva's story,of being exiled for betraying his brother,stuck a chord with Ram and Lakshman. Ram decides to help Sugriva defeat his brother and in return use Sugriva's army to find Sita. As decided Ram killed from hiding Sugriva's brother Vali during their duel. This heinous act of killing another warrior from hiding sent shockwaves across the divine world.There were arguments and debates to discuss which one of the brothers' act was more vile,whether it was Lakshman's act of hurting an unarmed woman or Ram's.




With the help of Sugriva's army and his commander-in-chief Hanuman, Ram was able to find that Sita was imprisoned in the island of Lanka. He decided to build a bridge to cross over to Lanka. Ignoring the pleas of the sea god about the effect of a man made bridge on the ecology of the ocean and detrimental effects to sea life, Ram decided to go ahead. Sugriva's strong and powerful army worked day in and day out and built the bridge to Lanka.

As soon as Ram and Sugriva's army landed in Lanka,the mighty war started.The valor of Sugriva's army was showcased by brave warriors like Hanuman, Jambavan and Angadh,they gave a run to the Ravana's organized army with their guerilla attacks. With the defection of Vibishana, Ravana's brother, during a crucial time of the war,Ram looked like having the upper hand. But the might of Ravana was not easy to overcome,his relentless attacks coordinated by his son,the invincible Indrajit and his brother the mighty Kumbakarna was too much to handle for Sugriva's army.




With sugriva's army wiped out,Ravana entered the battle,he captured both Ram and Lakshman as prisoners of war and admonished them to a life in lanka's prison. As they were being taken to the prison Ram was amazed to see the beauty of Lanka. The well laid streets,the content citizens,the wealth and economic strength of the kingdom left Ram awestruck. From Vibishana, Ram learnt more about the laws of the land and how prosperous a kingdom Lanka is.

Bharata, Ayodhya's king-in-charge,came to know about the fate of his brothers. He sent a special peace mission to Lanka and negotiated for the release of his loved family.He was ready to offer his life as a barter for his brothers'. Touched by this gesture,the noble Ravana ordered for the release of Ram,Lakshman and Sita.


As they were about to abode the vimana to Ayodhya,Ram spoke to Sita, "Dear Sita,my beloved.I love you and trust you more than myself.But with you living in Ravana's abode for so long I as well as our society has every reason to suspect your piety and faithfulness. So I would prefer you to walk through fire to prove that you are the purest". By now, a visibly changed Sita contested this,"Dear Ram, my lord, my ruler.I see your request to be rightful and just. At the same time,during my absence I do know you have lived in the forests and also enjoyed the luxuries of Sugriva's kingdom for a few days.Hence I request you to join with me for walking thru the fire. Let the world know we are the purest".




Taken aback by this Ram decided not to keep the test of fire for Sita, they flew back to Ayodhya and Ram's rule started. Every input he had obtained from Vibishana on Lankan goverance was used efficiently and till today Ram's rule is considered as the golden rule of india....better known as Ram Rajya.

All was well... ;) 



Image source : google

Thursday, March 21, 2013

My 2011 GATE/Post-GATE experience

After getting a lots of requests to share my experience post GATE-2011, I thought I should rather pen down all that I remember about the same. The queries have been mostly from the ones interested to know about MS program in IISc Bangalore or about the written/interview experience here.

So to start with, following is my GATE result:

AIR: 1196
Marks: (will update after checking)
Score : 664
Branch: CSE
Category: General

After GATE, when I checked my score with the answer key published by gate forum, I was standing somewhere around 53-54 but I actually got between 51-52. As per the stats of gate'10 I was expecting my rank to be between 500-600 but when I actually got a rank of 1196, I lost all my hope of getting through that year.

Still, encouraged by a few friends and college seniors, I applied to a few colleges including IITs and IISc. The following are the calls that I got along with the date on which I received the interview call letter:

1) M.Tech from SERC, IISc Bangalore(07/04/11)
2) M.S. from SERC, IISc Bangalore(17/05/11)
3) M.S. from IIT Madras(04/04/11)
4) M.Tech from IIT Madras in second list. (25/06/11)

However as I had already converted my seat in M.S. degree in IISc Bangalore, I didn't go for M.Tech written/interviews in IIT Madras.

My Experience With IISc

M.Tech: My first experience with IISc was for M.Tech in April'2011. Here we had to clear the written test on clearing which we could appear for the interviews on the same or next day. However, the written test was more of mathematical with lots of formula based questions and some basic maths questions from class 11/12. However as I had lost touch with books after GATE results and also due to my job, I could  not fare well in the written and could not clear it.

Hence a piece of advice from my end.. don't lose touch with your books after the results are out. If not this year, it will help you prepare for your next year.

M.S. : It was June and this time I was all determined that I would study properly and prepare for atleast 3-4 subjects but that finally didn't work out as planned due to work on weekdays and me getting a bit lazy on weekends. I finally ended up brushing the concepts of DBMS and computer networks.

On reaching the venue, we were asked to appear for a 30 min written test which comprised of 5 questions, each with part (a) and (b). It covered topics like data structures, algorithms, networks & matrix theory. The best part here was that the questions were more on analytic side rather than formula based questions.

Luckily this time I had cleared the written and was the first one to go for interview in that day's slot. I was asked what subjects I had prepared for. I told them DBMS & comp networks. However I was told that there was no intakes in DBMS lab so had to change my second subject to Data Structures & I had not touched that subject after GATE exam. The interview went on for around 45-50 minutes in which except 2 questions which were from CN, rest everything was asked from DS mainly concentrating on trees and graph theory. The whole interview went on with questions being fired by professors sitting in a panel of 5 and I had to continuously do board work and keep on explaining the stuffs.

The best part about the MS interview was that the questions being asked was more conceptual rather than direct formula based stuffs so if you are familiar with the basics of the subject, it would be easier for you to crack the interview. Also I was not able to question 1-2 questions properly but don't worry much about that. They are more concerned here with the approach you use when analyzing something new rather than at the accuracy of each question.

The next thing is that I was somehow mentally prepared that I have to appear for gate'12 so I was very relaxed during the written and interviews which helped me recall the known stuffs. So would advice you all to keep your calm when appearing for written/interviews for any college.

Hope this helps!!
Feel free to ask further in case u need more help!!

ALL THE BEST!!! :)

Link to my entry "How I prepared for GATE": http://words-of-the-fallen-angel.blogspot.com/2013/10/how-i-prepared-for-gate.html

Note: Please keep in mind that with rank around 500 or more, the chances of getting into core branch is less but chances of getting written/interview call from interdisciplinary branches are there.

Monday, March 11, 2013

My First Experience With Shooting


I have never been much of a shooter and have always been very bad with games that need to aim at stuffs. Shooting with a rifle at a bunch of multicolored balloons, pinned to a dirty white cloth three feet away at crowded Durga Puja fairs in home town has been the extent of my exposure to the trigger and the target (and I was bad even at that).

A few days back when I saw a deal for Nishaan Sports Shooting Academy, Bangalore offering 30 Rounds of Starter Air Rifle Shooting worth Rs 200 @ Rs 90 instead, it caught my interest and attention. After seeing that the online reviews for the place was good, I, along with a friend bought the deal from timesdeal and headed towards our destination on a sunny Sunday afternoon. Through out the 1.5 hrs that we had to spend in the bus to reach BTM Layout, 2nd stage, I kept on cursing the sun, the pollution and the traffic.

 I find myself in a narrow corridor painted a fluorescent green, shocking enough to do serious damage to your existence, even before you think of guns and ammo. One of the corridor walls displays framed posters with motivational text – “Perfection is Our Goal” and “Knock the ‘T’ off the Can’t”. I can see the corridor end a few feet away and possibly leading into some sort of a lobby or a hall, but I hear no voices. I wait for a few seconds to see if I would hear gun shots, but the only sound that reaches my ears is that of the ever-angry Bangalore traffic bustling on the road below.

On reaching inside, I see a girl shooting at her target with an imported rifle and an instructor standing aside. Just nearby is the counter where we showed him the coupons we bought online and pay him Rs 180(for the two of us). Knowing my history with aims and targets, I am yet not sure if this is really good idea for me but finally I also decide to take a chance just for fun.

After I complete some formalities of entering my name in a register and pay attention to the instructor as he explains what I was getting myself into. He tells me that the range is designed for 10 meters Air Rifles and Air Pistol and as a first-timer I would be shooting with the Rifle. The Pistol is harder to master and it will be some time before I will be comfortable with it. He then appears from the booth carrying a small box and sheets of paper with targets printed on them. He explains that I have thirty shots and opens the box to reveal thirty tiny pellets stored inside.

The targets are square in shape, made of thick paper around six inches each side with concentric circles neatly printed on them. Hitting the outermost circle gets you a single point which increases as you go towards the center with the two innermost circles fetching you ten points. Circles 7-10 are painted black and the instructor indicates that is where I will end up shooting all the time, if I practice regularly for a couple of weeks. 

The instructor illustrates the rather simple procedure of loading the pellet into the rifle and taking aim and I proceed to replicate it. I can see that I will not be wearing those cool headphone looking things or the transparent glasses which I have noticed shooters wearing, but there isn't time to fret over that as I am handed the rifle and asked to take my first shot. He then explains that to take aim I must first align the tiny marker at the head of the rifle to the target, then align that marker to a D shaped viewing panel right above the trigger. After the target is locked in view, he tells me to forget about it and focus only on the trigger and the press it in one smooth motion without any jerk or change in pressure.


We take position, the rifle butt pushing against the top right corner of my chest, my feet parallel to the target. I follow instructions and take aim and a deep breath, then hold it for a while trying to make the rifle stable and fix my eyes at the target. And then I let my finger go. It would have been a beautiful moment had everything gone as per plan. Instead, by the time I press the trigger, I can feel my hands and the rifle shaking like Shakira bringing on the World Cup and instead of a neat swoosh, the imaginary sound triggered by my moving finger is more like ‘thuk thataak’.

My first pellet lands somewhere outside the largest circle instead the center of the paper which I am actually targeting. Then the second pellet lands somewhere in circle 7 and the 3rd one hits the wall. The same thing keeps repeating for some 2-3 more shots. The instructor can see I am getting nowhere and so once in a while takes the rifle from my hands, again gives me instructions to properly stand and aim, tells me to correct my line of sight and keeps offering words of encouragement.

Then around the 8th or 9th time, I finally get a hit i.e. in the black circle so I get somewhat happy and encouraged to continue. By that time, my friend who came along somehow got the physics of the stuff wrong so hardly 2-3 of his pellets hit the paper n rest went to the wall. Somehow seeing myself better than him at making my shots on the paper atleast also was a source of encouragement for me(Sorry dude!).

After wasting around 9-10 of his shots, he finally figured out the right way to aim and shoot and ended up hitting the paper some 15 times out of which around 4 times he breached the black circles. However I have never been good at these stuffs but somehow I end up with around 20 out of 30 pellets piercing through the page out of which 4 times I breached the black circle and one was at the border separating the black circles from the white ones.


Finally after shooting for around 30-40 minutes, we were sweaty and tired. So we thank the instructor for the nice experience and walk out with our target sheets. Thought I would love to try it again but knowing my history with these stuffs, I have to think about it again!! ;)

Wednesday, December 12, 2012

The Ultimate Love...


I looked into
his eyes and asked
why do u love me so much
how is ur heart so vast

how do u read my eyes
how do u see my pain
how do u remain so calm
even when I go insane



he looked into
my eyes and said
'coz u r the greatest gift
I ever possesed

coz u r my princess
my angel, my life
you're the best daughter
One could ever have...

Thursday, October 25, 2012

A Dark Dream ...


Dream..

today I am scared
of myself n u
wishing you would
never come true...

leave me in peace
leave me alone
a scary world
today u have shown...

where no one was mine
and no one I knew
every heart was dark
n every eye was new...

bring me back to the world
which is real and mine
where few hearts r still pure
and few eyes still shine...

Tuesday, October 16, 2012

Relationship Status : Just Friends ???

They were the best friends, with a big heart and even bigger egos.

Every time a big fight would end up with a cold war of 3-4 months where no one would admit their fault or take the initiative to go talk first. Though worried about each other and bugging the mutual friends for each other's updates but they would be loyally holding on to their egos.

However when in the "no war" mode, they were almost inseparable. Together through out the day and on phone at night, they were the closest friends one could ever find.


He : Hey cutie pie, u were asking something?

She : well yeah, we have been together for so long... Don't u think we should redefine our relationship status ??

He : well, we are friends.. what else??

She : u have got many other friends but u r with me most times, so it must be something special??

He : well, no. lets make things straight, u r just a friend like others.

She : well then, I don't talk to my friends at 2am unless urgent. Goodnight 'friend'.