Saturday, November 7, 2009

How does Internet works

We have been using Internet for so many year. We send emails, chat for hours together with friends, share pictures, watch videos on youtube, keep playing addicted online games, make calls all over the world just at least price and we ever do our banking virtually (trust the internet and do transaction in greater amounts). So how does internet stuff works actually?

To say simple Internet is more like an "Post Office". Through the post office we transfer our message to required once to an cost of stamps. Same way we do it in the Internet. In the internet data is transferred in the form of packets. Every computer connected to the internet has an unique IP Address. For example if you type an web site name in your browser, your computer first located the exact address of the host server on the internet, then requests for data transfer, after which host server response with data, all this happens in less than a second even when if host server located other part of the world, in fact some trillion Bytes of data is transferred on internet in minutes!!

Now let us see how data transfer happens in an corporate environment actually, when you open an web site in a browser, data is divided into number of IP(Internet Protocol) packets by mail room which decides the size of the packets also, each pack is given with labels such as senders address, receiver address and type of packet it is. Now each packet is given a address for the Proxy server, then packet is now launched on to LAN (Local Area Network) where many other computer may be connected through Ethernet cable, wireless connections etc.,. Now router comes into the picture, it basically does two tasks, it chooses most appropriate for forwarding specific packets to specific destinations among the outgoing interfaces and it sends the packet to outbound logical interface(in simple terms out of LAN i.e., into internet).

In domestic connections we usually may have DSL or ADSL (Asymmetric Digital Subscribe Line) device in which digital data transmission over the wires of a local telephone network is done. In simple terms which will separate connections for internet service and POTS(Plain Old Telephone line) services. ISP(Internet Service Provider) provides a Digital line, this was development over Dial-In connections in which ISP provides direct analog line as in telephone. Download speed of ADSL ranges from 384 kbps to 20 Mbps depending upon line conditions and upload speed is less then download speed. SDSL(Symmetric Digital Subscriber Line) download and upload speed are same.

Let me not hyjack our topic, the packets picked from the local router will move on to centralized router switch, which will route the packet to respective server. Server reads, removes the proxy label attached to it and will allow only valid packets and rest will be smashed. Next packets will head to the firewall, it will serves two purposes, it will block sensitive corporate information going out and prevents the unwanted data coming into intranet from internet. After passing from the firewall packet are picked up by a router which places packets on the internet depending on the avaliable bandwith of internet connection, if the bandwith is not good enough to take the stream of packets comming in from firewall, this may lead to loss of packets.

So these are managed by Protocols like TCP/IP, (Transmission Control Protocol/Internet Protocol). Usually packet transferred by TCP/IP will have acknowledgement back to the sender that packet has reached the destination, if packet does not reach in due time a replacement packet will be sent again. TCP/IP ensures that packets are reach on to the destination by taking fastest and shortest root possible.

Now packets actually entered in to the world of internet, which is more like a spider web with interconnected networks which spans our entire globe. Here router and switches establish links between networks. Routers and switches will route the packets based on the address attached to them. Now Packets have a long way to reach destination, the path they choose may be telephone lines, wireless, satilite or even transocean cables (cables laid under ocean to connect continets), but the packets always take fasted or shortest root possible. Speed of packets is so great that they can round the globe for five times in in a second.

Near the end of the destination you will find another firewall, it again will allow only packets which are relevant (depends upon the firewall setting!), rest of the packet are not entertained. Packets which passes the firewall test are almost in, they line up at interface to reach webserver(here web server can be PC, mobile phone, webcam or may even be mainframe server). One by one packet are received and opened. Information contained is sent on to the webserver applicaiton and packets can be recycled, they can be used to send back the data request by you. Now the packet will have to follow all the above steps all over again and again....

Thanks for reading. Please dont forget to post your comments, suggestions or improvements.