Monday, August 17, 2009

Thinking out of the box !!

It is January 1996..Larry and Sergey, Two Stanford computer science grad students, begin collaborating on a pathbreaking innovative idea of a search engine called BackRub.BackRub operates on Stanford servers for a year – eventually taking up too much bandwidth.


Just two years after Sun co-founder Andy Bechtolsheim writes a check for $100,000 to an entity that doesn’t exist yet – a company called Google Inc.And with that money Google sets up workspace in Susan Wojcicki’s garage at 232 Santa Margarita, Menlo Park.

It's now just 13 years later, Google Inc has just grown up from a small office in garage to skyscrapers with Multi-Billion dollar Business spanning accorss almost all part of the world.Proving Google as the closest thing to an Omniscient (all-knowing) entity in existence....Because google search engine knows everything!!and every one knows Google!!! :-)



In 1934,Bill Hewlett and Dave Packard electrical engineers from Stanford University go on a two-week camping and fishing trip in the Colorado mountains during which they become close friends. Bill continues graduate studies at MIT and Stanford while Dave takes a job with General Electric.

With the encouragement of Stanford professor and mentor Fred Terman, the two decide to start a business "and make a run for it" themselves. Bill and Dave formalize their partnership January 1, 1939. They decide the company's name with a coin toss.

As their first venture Bill and Dave begin part-time work in rented garage with $538 in working capital..Now,This shed has grown up to a most renowned Business in the world with the name of
Hewlett-Packard.

It's true!...Another exhilarating achievement story about a startup grown from a garage to epiccenter of innovative thinking..its all started with a College Dropout who couldn't see the value in formal college education and had struggled a lot during his initial days without having any place to sleep and proper food to eat. He didn't have a dorm room, so he slept on the floor in friends' rooms .He used to walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple.

In 1976,When he was just 20 started a company with the help of his friend in his parents garage .they worked hard, and in 10 years Apple had grown from just the two of them in a garage into a $2 billion company with over 4000 employees.

The first few years or so things went well. But then steve and his board of directors visions of the future began to diverge and eventually they fired Steve jobs from his own company.

True!!...An optimist is one who makes opportunities of his difficulties.After being fired fromApple, Without losing heart He Discovered a little animation company that needed a vision.Liked the product so much he bought the company and named it as Pixar Animation Studios, which has created eight of the most successful and beloved animated films of all time: Toy Story, A Bug's Life, Toy Story 2, Monsters, Inc., Finding Nemo, The Incredibles, Cars and Ratatouille. Pixar has won 20 Academy Awards and its films have grossed more than $4 billion at the worldwide box office to date.

In the meantime, without steve jobs Apple Inc became just like a body without soul . In1996 Apple reinstated Jobs as the Chief Executive Officer .Later he helped to grow Apple from a company bordering on bankruptcy in the 1990s to a very successful company today . Now ,Apple leads the industry in innovation with revolutionary and truely amazing products like iPod and iPhones.


When i was a kid ...i was so keen to watch SachinTendulakr playing cricket match against pakistan .Still i remember about his debut match when he was just 16 , It was common belief those days that a young boy like sachin won't be able to keep the nerve against the piercing pakistan bowling attack for too long . But, defying all our beliefs Sachin destroyed the much feared Pakistan bowling attack and clearly showed his authority of a class batsman .I was not sure what was going through his mind at that point of time. but, it resulted in Paradigm shift in peoples thinking about the way we look at game of cricket.

There are thousand examples like above we can find in our real life.These people are no different from us.They are not "chosen one" .But,They themselves chosen to be different from others. These people think differently, unconventionally with a new perspective much different from set of beliefs we follow. They invent. They imagine. They heal.They explore. They create. They inspire.They push the human race forward And They change the way we see our world forever!! :-)


Friday, August 14, 2009

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 .