Monday, June 9, 2008

Networking .. What is it all about

Its amazing how similar computer networks are to human networks. In the end, both are just a set of entities wanting to talk to each other. Humans have etiquettes, computers have protocols. Humans use pre-defined languages to communicate, computers use pre-defined packet formats.Humans use postal addresses (well, at least we used to) for communication, comps use ip or mac addresses. So you see, in the end, its just about that basic need, communication.
This series of articles will try to approach the field of computer networking as just an extension of the concepts inherent in human networking. As we proceed, it is inevitable that the explanations will become more and more technical. The effort from my side will always be to map it to very simple terms.
To begin with, lets define a computer from a network perspective. You will pause here and say that Come'on , I know what a computer is. To which I will say, "define from network perspective". That you have a machine which has loads and loads of applications has nothing to do with the network. The only hardware that matters for the network is what is called a Network Interface. I am purposely not calling it a Network Interface Card, for reasons which will become clearer later.
So, what is a network interface? Very simply defined, network interface is a hardware which allows one to be plugged-in, get connected to the network. The LAN wire that we put in our comps is a network interface. Your bluetooth connection is thru netowrk interface. Infra Red Port is a network interface. Any entity in your comp which allows you to communicate with another comp is a network interface.
How does that map to real world. Any address identifier that you have which makes your location unique and communication possible is an example. Your house address, office address, cubicle number are all address identifiers. As we have diff such identifiers in real life, similarly we may have multiple such identifiers in the world of computer networks.

For communication to happen in real world, what is the condition to be imposed on these identifiers? The necessary condition is that within the geographical range in which the communication is to be established, the mails to be exchanged, the identifier should be unique. Non-uniqueness of the identifier is permissible provided it happens in two diff communication domains. For eg, zip codes of two cities, one in India and one in US may be same. But they will not cause any problem. The Zip code inside India has to be unique.
Similar condition exists fro comp networks.The network identifier should be unique. What is that unique identifier? For majority of applications, what is called the IP Address is that unique entity. Just like when you send a letter, you write the destination address and source address, similarly, for every packet (chunk of the letter) sent on network, where the packet should reach is indicated by the dest IP Address and source indicated by Source IP Address.
Now, you will ask me , hold on what is a packet ? When we send a letter from point A to point B, we follow the following seqeunce:
1. We write the letter
2. Put it in an envelope
3. Write the source and destination address
4. Put it in a mail box
(For those of you are unaware of the above, try writing a letter to someone. Believe me , worth the time and effort. Slowing things down in today's fast world is a a good exp. More on that in some other post.)
In case of computer networks, its not much dissimilar .Replace letter by the data which you need to send.The seq of steps are as follows.
1. Break data so that it can fit into envelopes
2. Put each chunk of data into an envelope
3. Write the source and destination address
4. Send it to your post office (router/switch)
The content that we send finally looks something like this:

where denote single or multiple notifications which are either used for a) sending the packet eo destination b) maintaining/verifyifg the integrity of the packet
and
is just data :)

No comments: