Wednesday, August 12, 2009

What are we waiting for?..Get started now !.

“Don't wait until everything is just right. It will never be perfect. There will always be challenges, obstacles and less than perfect conditions. So what. Get started now. With each step you take, you will grow stronger and stronger, more and more skilled, more and more self-confident and more and more successful.”

We pay a heavy price for our fear of failure. It is a powerful obstacle to growth. It assures the progressive narrowing of the personality and prevents exploration and experimentation. There is no learning without some difficulty and fumbling. If you want to keep on learning, you must keep on risking failure all your life.

(Based on Quotes by Mark Victor Hansen and Gardner, John W.)

Thursday, August 6, 2009

DHCP - DORA Process Explained

When you connect a computer in a network , automatically you will get an ip address for your computer or when you try with ipconfig/release and Ipconfig/renew from your DOS prompt in your system you will get a new ip address.But what exactly happens at the packet level ..here is an attempt to explain this in detail with the Help of Wireshark packet capture .


1) Discover:
Client makes a UDP Broadcast to the server about the DHCP discovery. Asit doesn't know where the DHCP server is reachable in the network it sends UDP broadcast with the source ip address as 0.0.0.0 and destination ip address as 255.255.255.255 with its own MAC address .Unless, we have a DHCP Relay agent in the same subnet, IP helper address, etc. configured on your router. Then the broadcast is forwarded to a specific destination.
2)Offer:

DHCP Server offers to the client with available ip address,lease time sunbnetmask,gateway and DNS information .communication will be established based on the mac-address of client.
3) Request:





In response to the offer Client requests the server . Note that still client is not having the ip address. Now client makes request to the server for the IP information being offerd by the DHCP server .
A client can receive DHCP offers from multiple servers, but it will accept only one DHCP offer and broadcast a DHCP request message. Based on Transaction ID field in the request, servers are informed whose offer the client has accepted. When other DHCP servers receive this message, they withdraw any offers that they might have made to the client and return the offered address to the pool of available addresses.
4)Acknowledge:
Server responds all the Ip Add/mask/gateway/dns/wins info along with the acknowledgement packet.
Last but not least, if none of the DHCP server is availble in your network or the connection is broken to your DHCP server APIPA would automatically assign a unique class B IP address to each machine in the range of 169.254.x.x range.
For more information on DHCP please reffer RFC 2131 .

Sunday, August 2, 2009

RFC 2616-Hypertext Transfer Protocl HTTP 1.1

Hi All , This article is an attempt to explain commonly used protocols in much simple way . Let's start with the most familiar protocol widely used by Netizens while browsing.... that is Http .

Here we go !!...
When you open a browser like IE or Mozilla Firefox , in the address bar you type in http://www.anywebsite.com/ and you will get all the conetnts of the webpage ,but what excactly happens in the background ?...let me try to explain in detail . Setting aside the DNS resolution and the way TCP 3 way handshake takes palce and the way a transport layer virtual circuit established between two programs for the purpose of communication Here we focusing on the way Http works .

The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems.

The HTTP protocol is a request/response protocol. A client sends a request to the server in the form of a requestmethod, Uniform Resource Identifier (URI)-A network data object or service that can be identified by a URI and protocol version, followed by a MIME-like message containing request modifiers, clientinformation, and possible body content over a connection with a server.
Packet Capture 1:

your browser is asking for the page called "http.html". It wants to use the http1.1 protocol. Your browser is in English-US and is Microsoft Internet Explorer 6.0 under WNT 5.1.Your browser wants the connection (socket) stays opened between you and the destination web server it can ask for further files, like pictures included in this page...

Packet Capture 2:
In response to this , the web server knows the page you want and can send it : code 200 means its all OK!! Then, you have some more infos about the server : Apache on Unix, socket closed after html page, last modification date and so on (see attributs page for more information). And finally, the requested file...And Boom!!..you will get the requested webpage on your screen .

Lets look in to whar Http codes and Http headers are composed of :
In Http Header A first line containing the request statuts.Example : HTTP/1.1 200 OK
1 few line contining some attributes on the request.Example : Content-Type: text/htmlHttp codes sent by the server gives the status on the current http request.Theses codes are
normalized : Informational, request received, continuing process .
















Here are some components in the packet capture detailed ;




The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.If the Request-URI refers to a data-producing process, it is theproduced data which shall be returned as the entityin the response and not the source text of the process, unless that text happens to be the output of the process.


The Referer request-header field allows the client to specify, for the server’s benefit, the address (URI) of the resource from which the Request-URI was obtained.

The Accept request-header field can be used to specify certain media types which are acceptable for the response.Accept headers can be used to indicate that the request is specifically limited to a small set of desired types, as inthe case of a request for an in-line image.The asterisk “*” character is used to group media types into ranges, with “*/*” indicating all media types and“type/*” indicating all subtypes of that type. The media-range MAY include media type parameters that areapplicable to that range.



In a nutshell ;

HTTP uses the client-server model: An HTTP client opens a connection and sends a request message to an HTTP server; the server then returns a response message.

The initial request line is different for the request than for the response. A request line has three parts, separated by spaces: a method name, the local path of the requested resource, and the version of HTTP being used.
A typical request line is:
GET /path/to/file/index.html HTTP/1.0

GET is the most common HTTP method; it says "get me this resource".

Other methods include POST and HEAD.

The HEAD Method HEAD request is just like a GET request, except it asks the server to return the response headers only, and not the actual resource (i.e. no message body). This is useful to check characteristics of a resource without actually downloading it, thus saving bandwidth. Use HEAD when you don't actually need a file's contents.
The response to a HEAD request must never contain a message body, just the status line and headers. A POST request is used to send data to the server to be processed in some way, like by a CGI script.

The path is the part of the URL after the host name, also called the request URI (a URI is like a URL, but more general). The HTTP version always takes the form "HTTP/x.x", uppercase.

Response Line (Status Line)
The initial response line, called the status line, also has three parts separated by spaces: the HTTP version, a response status code that gives the result of the request, and an English reason phrase describing the status code. Typical status lines are:
HTTP/1.0 200 OK
or
HTTP/1.0 404 Not Found
The most common status codes are:
200 OK The request succeeded, and the resulting resource (e.g. file or script output) is returned in the message body.

404 Not Found The requested resource doesn't exist.

301 Moved Permanently

302 Moved Temporarily

303 See Other (HTTP 1.1 only) The resource has moved to another URL (given by the Location: response header), and should be automatically retrieved by the client. This is often used by a CGI script to redirect the browser to an existing file.

500 Server Error An unexpected server error. The most common cause is a server-side
script that has bad syntax, fails, or otherwise can't run correctlyfor HTTP 1.0, and section 10 for HTTP 1.1

How HTTPS works ?



In this section only let me try to describe how the HTTPS communication takes place; Again this is request/protocol . imagaine that you are trying to browse a secure website like https ://anywebsite.com and following process needs to be passed in background ;

1.As we know any browser Like IE 7 or Mozilla firefox will come with the severa l CA issuer certificates .And these certificates will have the Public key for the issuer of the cerfticiate and other information . Its a key used to encrypt the data so that only the reciever is having valid private key will bable to see it .

When anyone wants to use SSL , he needs to purchase a certificate thats signed using the CA's Private key .

2. Once the web browser starts the connection to the secured site allong with the request and other information it will send all supported encryption schemes.

3. The webserver will response the browser client information with the copy of the certificate that is signed using the CA's Private key and information about supported encryption schemes .

4. Once the certificate is downloaded to the browser client , it will be tested against the CA's public key installed on the Web browser ..if everything seems to be okay..then connection will be establiched and data will be downloaded using the secure encryption scheme earier negotiated while SSL handshake .

Let me try explaining the same with the following packet capture ; In this following example connection fails as browser recieves the certificate from server and its tested against the Public key installed in browser and connection won't establish because it turns out be a Bad certificate .









Sunday, March 1, 2009

Michael Phelps - SuperHuman in Action

As I'm sure you already know, on Sunday August 17th 2008, Michael Phelps achieved one of the greatest sporting records of all time by winning an incredible 8 gold medals in a single Olympic games.




Michael's performance was seen by millions of people around the world and we can all learn a great deal about achieving our own goals by analyzing his accomplishment. Here then, are five secrets of success that helped Michael Phelps to transform his dreams into reality.

Secret #1: Think BIG


The first step in Michael Phelps journey was to make the decision to pursue a dream that many people considered impossible. Instead of thinking negative thoughts and limiting his potential, Michael allowed himself to think big.

"If you dream as big as you can dream,
anything is possible."
- Michael Phelps Bold


Your Turn:

In order to discover your real goals, let your imagination run free to dream as big as you can dream. Resist the temptation to limit yourself with negative thoughts. It is only by freeing your imagination that you can discover what it is that you really want from life.

Secret #2: Break it Down

Having identified his ultimate goal, Michael and his coach created a series of short term goals that would eventually lead him to his ultimate objective. In between the Olympics came the National championships, the Pan Pacific championships and the World championships. Each race of each event was a carefully planned stepping stone that would eventually lead Michael to achieve his ultimate goal of becoming the most successful Olympian of all time.

Your Turn:

After identifying your long term goal, take some time to break it down into a series of achievable short term goals. As you move forward, focus on achieving your short term goals one step at a time.

Secret #3: Use the Power of Visualization

One of the most powerful techniques used by elite athletes to achieve their goals is to visualize themselves succeeding each and every day. In his book 'Beneath the Surface', Michael Phelps writes, "When I'm about to fall asleep, I visualize to the point that I know exactly what I want to do: dive, glide, stroke, flip, reach the wall, hit the split time to the hundredth, then swim back again for as many times as I need to finish the race".

Your Turn:

Visualizing your goals before you sleep is a great way to program your subconscious mind. The more you visualize your dreams as a reality, the more motivated and determined you will become.

Secret #4: Put in the Hard Work

No matter how naturally talented Michael Phelps may be, the main reason he achieved his goals was because he was prepared to put in the thousands of hours of grueling hard work necessary to compete at the highest level. According to Michael, "In the four years between the Athens and Sydney Olympics I probably took four or five days off and none of those were holidays"


Your Turn:

Be prepared to put in the hard work required to transform your dreams into reality. There really is no such thing as getting something for nothing. In order to make your dreams a reality you will have to work hard.

Secret #5: Monitor Your Performance Metrics

Every elite athlete understands the importance of using metrics to monitor their performance and progress. Michael's coach Bob Bowman constantly monitors and reviews Michael's split times down to the hundredth of a second. This provides them both with tangible evidence of how Michael is progressing towards achieving his goals.

Your Turn:

As you work towards your goals, figure out your own key metrics. For example, if you are studying, record how many hours of productive work you do each day. Or if you are building a business, record how many potential customers you contact each week. Whatever your goal may be, you will get there faster by recording and constantly improving your performance metrics.

While you may not be pursuing an Olympic gold medal, always remember that your life goals are just as important. I’d like to encourage you today to use some of the same techniques Michael Phelps used to achieve his goals. If you can

(1) Think BIG
(2) Break it down
(3) Utilize the power of visualization
(4) Work hard and
(5) Monitor your performance metrics

you too can conquer the challenges that stand in your way and make your dreams a reality.

Until Next Time,

Dare To Dream!

Saturday, December 13, 2008

Blood Moves on..

kuchh kar guzarne ko
To do something worthwhile
khoon chala khoon chala
Blood moves on.. blood moves on.


aankhon ke sheeshe mein
In the pupil of the eyes
utarne ko khoon chala
To get into, blood moves on (To leave a mark..bloood moves on)
badan se tapak kar
Having dropped from the body
zameen se lipat kar
Embracing the soil
galiyon se, raston se, ubhar kar
Through narrow streets, through roads, it emerged
umad kar
taking curves,Growing in size (like a raging river)
naye rang bharne ko
To fill with new begining of colours
khoon chala khoon chala
Blood moves on.. blood moves on


khuli-si chhot lekar
Carrying an open injury
badi-si tees lekar
Carrying a big cry it oozed
ahista ahista
Slowly slowly
sawaalon ki ungli
While The (pointed) finger of questions
jawaabon ki mutthi
Got the fist (showing strength) of answers
sang lekar
Carrying with it
Khoon chala
Blood Moves on...
kuchh kar guzarne ko
T0 do something worthwhile
khoon chala khoon chala
Blood Moves on.. blood moves on..
aankhon ke sheeshe mein
In the pupil of the eyes
utarne ko khoon chala
To get into, blood moves on..(To leave a mark..bloood moves on)
badan se tapak kar
Having dropped from the body
zameen se lipat kar
Embracing the soil
galiyon se, raston se, ubhar kar
Through narrow streets, through roads, it emerged
umad kar
taking curves,Growing in size (like a raging river)
naye rang bharne ko
To fill with new begining of colours
khoon chala khoon chala
Blood Moves on.. blood Moves on..
khoon chala
Blood Moves on..


( English Transaltion of khoon chala khoon chala...from the movie Rang De Basanti.)

Wednesday, December 3, 2008

The Awakening


Vultures were flying high
Watching their prey with piercing eye
They came silently to the lonely shore,
Seeking for blood and much more


They do man-slaughter for their selfish cause
as they move ahead. blood leaps on the walls


Within minutes they turned everything in to graveyard
Half a man, half a beast...they are worried least


It was not a war zone...
But in between that bloody street…India was lying alone
Shot in the heart, bleeding without a hope
No one to help, no one to guide...even there is no place to hide


But then came a bold and hardy few,
And they brought an unknown wave
Thanks to those Commando crew,
And I knew they were high and brave

Now is the time for awakening
We need to act beyond just talking

Enemy is at our home
We need to wakeup before they make it another burning Rome

Enough is enough. It’s not the time for crying or struggling
It’s the time for awakening
We need to hit back the enemy with such a force
Even we shouldn't give time for them to remorse.

Saturday, September 6, 2008

Angelina jolie Explains OSPF !!




Recently i caught up with Lady Lara Croft Angelina Jolie .This Tomb Raider star is truly amazing , not only she is known as the most sexiest women on this earth even she has one of the best brains..she knows in and out of the Networking Technology...Woaho!!!




Here, She explains about OSPF technology developed by John T. Moy and the Internet Engineering Task Force in 1988 which reverse engineered from an alien spacecraft now widely used in routers across the world which is very intelligent and very dangerous too. It is a social creature that can recognize neighboring OSPF enabled routers and it will initiate a dialog with it’s neighbors.

Me : Hey ,Angelina, wassup...thanks for coming here ...i heard that you are a networking geek ... could you please give us little bit gyaan about OSPF ??

Angelina: Hey, Ranjan ...well, lemme share some knowledge about OSPF with you...here we go!..


In the first phase,Once OSPF routers have communicated with their neighbors by saying Hello to each other , they begin to organize themselves into a Social hierarchy with other routers occupying roles as President, Vice-president and others. This is called “forming adjacencies”.

In the next phase the OSPF routers will send broadcast message to all other OSPF enabled routers. we call it as “Flooding Link State Advertisements”. Once this occurs, every router knows what the entire Social Hirearchy looks like. each and every router will known other routers designation and the place where they situated, each one of this will have a map of the entire hierarchy of the society known as “link state database”. Now they have knowledge of each other, soon they will each run their Shortest Path First algorithm and they will posses enough intelligence to rule the world of networks !!....kinda a powerful community from the future ready to dominate the entire world...isn't it ??

Once they have ran the SPF algorithm...they will find the shortest path to each other no matter what part of the world other router resides in .They will connect each other within the fraction of second!!!

These OSPF routers act as a true team. Each is aware of the entire network. These OSPF routers are bit broad minded and they don't limit themselves to Metrics like hop counts or bandwidth and delay. As a collective force, any router can route any IP packet to any corner on your planet. And they depend on metric known as “cost” for routing.


OSPF behaves differently on different types of networks. Networks can be classified as Broadcast Multi Access such as Ethernet, Non Broadcast Multi Access such as ATM and finally Point to Point such as a frame relay circuit between two sites.


Me : Wow...you know so much about Networking..well , i heard that OSPF is a Link state protocol could you please let me know what is this all about Link state protocol.

Angelina :Ha ha..sure Ranjan, All the routing protocols are divided in to two categories , One is Distance Vector and other one is Link State. and Combined of these two types called Hybrid ,like EIGRP.

Distance vector protocols periodically exchange their routing tables with their neighbor routers. This is known as “routing by rumor” because routers are advertising routes to networks that they are not directly connected to. Distance vector protocols are very easy on a routers CPU but as more routers are added to a network, the exchanging of entire routing tables can use up valuable bandwidth...that is why we have the second one..Link State protocol :-)

Link state protocols monitor the links they have with adjacent routers by using a “hello protocol” to test the status of their links to their neighbors. Link state protocols only advertise their directly connected networks and their active links. Every link state router captures these link state advertisements and pieces these together and create a topology of the entire network or area..then it will run a specified algorithms to decide what will be the best way to route the packets to the remote networsk .Link state protocols are very quite as they only transmit small hello packets and only transmit link state advertisements when an actual change in the network topology has occured. Link state protocols are more CPU intensive, especially when a router is performing the complex “Shortest Path First” calculation based on Dijkstra alogoritm . is the way our OSPF works !...



Me: ohhh!!...that's cool ....i have heard about Areas in OSPF...is that related to Area 51, the place where most alien ships were sighted ??.


Angelina: Heh..he..he ..Ranjan, you are funny...Well,its not about Area 51 ..There OSPF networks divided in to small segments called Areas.In a given area all OSPF routers are aware of each other and all the links between each router in their territory or area. Every OSPF network must have an area known as zero.

for Other OSPF areas are you can number them as “area 2" or “area 3" but all areas must be directly connected to area 0. Area 0 is the backbone area which connects other areas together and carries only inter-area traffic between areas. All the areas under a common administration known as an Autonomous System. OSPF is an Interior Gateway Protocol and is used to route between areas in a common autonomous system but routing between autonomous systems must be handled by an Exterior Gateway Protocol such as BGP.


Me:Angelina, i am really impressed with your knowledge ..in a nutshell, OSPF is just like a Evolution of super artificial intelligent community...isn't it ??.

Angelina :Exactly!!...As an process of evolution it has to go through five stages ;
  1. Form Adjacencies With Neighbors.
  2. Elect a Leader and a Vice Leader.
  3. Discovering Routes.
  4. Determine Which Routes to Use.
  5. Maintain Routing Information.

Thats it !!.


Me : Cool..Thanks Angelina...for providing all the information would like to know advanced OSPF in detail from you on some other time ..its pleasure speaking with you .

Angelina:Sure Ranjan, we will discuss in detail about the Hello Packet and The way OSPF Election will be held ...its really interesting ...But, for now i am in hurry ...Brad is waiting for me... need to go ..Will meet you again in some nice restaurant for candle light dinner ...Take care, bbye.

Me:Oh!!!!! really!!!!!!!!!!!!!!!!!!!!



***********************To be continued*********************************