Dear Readers: HWS has recently started a new project for the students of engineering ====> The Engineering Projects


Write at HWS !!!

Guest Posting

Sunday, May 29, 2011

COMPUTER NETWORKS: CHAPTER 5- OSI model cont.






COMPUTER NETWORKS: CHAPTER 5- OSI model cont.

hello guys ... how is it going ? my gal ditched me :(
anyway i give a damn ...
so we just finished a brief introduction of THE OSI model. today m gonna take a look
at how OSI model works in real life ..here we go baby
(if u are confused a bit about ports and all that dont worry , i will cover it )

ok as you can see in picture , there is a user on left hand side who is using a browser
to connect to internet . say he is typing to www.facebook.com and hits enter or click on go
or watever.Now wat happens when u do that .... ur computer sends a message to a DNS server
which stands for domain name service, and the work of DNS server is to convert ur address
like facebook.com to its ip address.And suppose the IP of ur computer is X.X.X.X and the IP of
the server u r looking for is Y.Y.Y.Y.Now after connecting DNS server , your browser now
knows that it need to go to Y.Y.Y.Y .Now top layer that is application layer asks a webpage coz thats wat ur browser requested, now data passes down to presentation layer which converts or formats it to standard format which is http in this case .Again data is passed to session layer , it says ok this is a separate request so m gonna create a new session so that i dont get confused when reply comes, bcoz at a moment u may b surfing net with multiple tabs.then it passes it down to transport layer, this layer
first decide this is gonna be a reliable transaction or unreliable ... that means it decides that it is
gonna use TCP or UDP (dont panic)..
tcp is for reliable transfer and udp is for unreliable transfer.
now in web browsers TCP works .So server at facebook.com .

DESTINATION PORT


one other very very important thing it does and that is it defines SOURCE and DESTINATION port nos.
suppose a server is both web and email server and u requested a webpage ... how servre gonna
understand that u need a webpage ... for that this layer sets the DESTINATION port to 80 , which is for
http requests .... by this server will understand that ur request is http (web page) not smtp (email).

SOURCE PORT


It is also necessary to assign a source port no. now source port no. is important , suppose in u have 3 browsers and
u have opened google , gmail and facebook..... and u requested something in facebook , requests processed then sent then response comes in ... how ur computer gonna decide that this data is for which browser ??? gmail , google or faebook !!!
so ur source port is assigned randomely and uniqely ... say its 1897

now wat happens ... ur computer requests to server saying my destination port 80, server understands that its a http requests again says my source port is 1897 ... server understands that in response destination port must be 1897. so when response comes in ur computer realises that the data is to be displayed on the browser which
is opening facebook.com

now data goes to network layer which adds SOURCE and DESTINATION IP addresses.which will be original source
and final destination address which will be X.X.X.X and Y.Y.Y.Y
now moving down to data link layer , it adds source and destination MAC addresses, which are physically burned
in ur network card.in next chapter we gonna discuss why MAC address is needed.
physical layer converts data to electric signal
m done ... this chapter is over .... enjoy guys ..and feel free to ask anything...

ABOUT PICS


in first two pics u can see i have established two ftp sessions with two servers 1.>cet.edu.in 2.>cisco.com .. in 3rd pic u can see i have issued netstat command which shows all the connections .. so u can see 2 ftp connections but with different ports (in first coloumn)
thank you :)
STEALTHBASTARD

About the Author

I am XEO Hacker, the founder of Hack With Style (HWS). I am blogging since 2009 before that I just search things and now I am sharing my knowledge through this plateform.I'm also a freelance writer on topics related to Website Hacking,Website Optimization (SEO), blogger customizations and making money online.
In 61 people's circles

Subscribe To Get FREE Tutorials!


Respected Readers:
As a 21 year old student, the only income I rely on is my pocket money. Bearing the running costs of HWS Blog has become really difficult. We educate thousands of bloggers a week with our tutorials. To help us go forward with the same spirit, a small contribution from your side will highly be appreciated.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 

Recent Posts

Join Me On Facebook

700+ Followers

Followers


meet women in Ukraine contatore visite website counter
DMCA.com

Recent Comments

Follow Me On Twitter

1112+ Followers