Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

basic working of TCP/IP

Status
Not open for further replies.

thannara123

Advanced Member level 4
Joined
Jan 7, 2010
Messages
1,455
Helped
120
Reputation
240
Reaction score
111
Trophy points
1,353
Location
God's Own country India, India
Activity points
9,436
Hi experts ,
i like to know the working of TCP/IP .
i have studied the theory of it but i didnt get well the working .
what is the layer (5 layer )
how the layer working ?
How the modem response it ?
please help me ,is there any example to understand
 

ckshivaram

Advanced Member level 5
Joined
Apr 21, 2008
Messages
5,070
Helped
2,149
Reputation
4,304
Reaction score
2,089
Trophy points
1,393
Location
villingen (Germany) / Bangalore
Activity points
30,097
The session layer coordinates applications as they interact on two communicating hosts. In networking, data communications travel on packet-switched not circuit-switched networks, unlike telephone calls. Communication between two computers involves many mini-conversations, thus ensuring that the two computers can communicate effectively. One requirement of these mini-conversations is that each host plays dual roles: requesting service, like a client; and, replying with service, like a server. Determining which role they are playing at any given moment is called dialogue control. The session layer establishes, manages, and terminates sessions between applications. This includes starting, stopping, and resynchronizing two computers who are having a "session."

The session layer decides whether to use two-way simultaneous conversation or two-way alternate communication. This decision is referred to as dialog control. If two-way simultaneous communication is allowed, then the session layer does little in the way of managing the conversation, and allows the other layers of the communicating computers to manage the conversation.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,508
Here's an example from "The Concept of OSI - Explained"

The Session Layer
If you are an ardent user of the Yahoo Messenger or any messenger for that matter and if you are popular among you friends, I am sure you would have faced the crisis of replying to several message windows popping up on your screen. Imagine the complexity of the software (yahoo messenger for ex), it has to cater to serveral connections at the same time. Each window is a connection, the front end (the blank space where you type your message) is the application layer, the smiley's and italics that you conjure up are displayed on the window at the receiving end through the presentation layer and each session is maintained by the session layer.

Every time you open a new chat window the session layer sets up the connection to the yahoo server and any message received for the window is forwarded to the appropriate window or in other words session layer manages the connections and when the window is closed it tears down the connection. If the messenger has a buggy session layer application I shudder to think about the plight of the messenger user, messages meant for one person might end up in the window of another( I hope you got the picture).
Hope the above example clears things up for you. Actually the entire document has very good examples of each of the 7 layers of the OSI Model.
 

gaurav467

Banned
Joined
May 11, 2011
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
0
TCP/IP is arguably the single most important computer networking technology. The Internet and most home networks support TCP/IP as the "language" computers use to find and connect with each other
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,995
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
one can think of 'layers ' from practical application as:

1)application(the sw which is communicating outside--user pgm)
2)just below the application layer is 'tcp'
3)below that 'ip'
4)below that 'datalink layer(mac)

assume that the application has a data to be communicated(i.e) data packets)
'tcp' layer adds 'tcp header' to the packet and pass below.
'ip' layer ' adds ip header to it and pass.
mac layer adds 'ethernet header ' and send out thro net.

so each layer adds its own header to the packet of data.

on the reverse , the first layer that receive the incoming is 'mac layer '
it strips of the header and pass above .
likewise each layer checks its own layer header and strips it.
finally you get the received 'packets ' in the application.

in short , data packets are added with each layer header when transmission.
on reception , each layer strips that layer haeadr and finally yo get the data.
the tcp layer header contains 'port no' also,
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,508
There are two models used to describe TCP/IP, OSI Model and the TCP/IP Model. The OSI Model was developed by of course the OSI Standard Group, while the TCP/IP Model was developed by DARPA DoD.



Depending on who you reference in regards to the TCP/IP Model it has either four or five levels and there is some correlation between the two models as shown by the above photo.

Here is a good comparison of the two models:

The TCP/IP and OSI Network Models

TCP/IP versus OSI

The model you were referring to in your original post is the OSI Model.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,508

navenmou

Full Member level 4
Joined
Sep 25, 2010
Messages
228
Helped
49
Reputation
98
Reaction score
46
Trophy points
1,318
Location
Bangalore, India
Activity points
2,588
yes,we can connect two computers that are in LAN i.e possible by IP address...
 

polo-g40

Full Member level 2
Joined
Jan 12, 2011
Messages
143
Helped
36
Reputation
84
Reaction score
42
Trophy points
28
Location
Gone
Activity points
0
I think a good simple demo environment to learn a lot of TCP/IP programming basics is by looking at sockets on Windows (or whatever). It is particularly easy on windows with Visual Studio Express and its free. You'll see '.BeginConnect' and '.BeginAccept' once you're in the right area. When you make your first "listening socket", make it use address IPAddress.Any (0.0.0.0) and port 80. Make your browser goto 127.0.0.1 (or any). The 'accept' handler will normally have a BeginRead() somewhere. Breakpoint BeginRead()'s handler. When it stops, step through and watch where the data floods in. (look for .EndRead) To display the data in a textbox is more work than you'd think but there's simple ways round that to start.
You write everything layer 4 (of 5) and above (5 and above for OSI) but can go deeper if you want raw IP sockets to make your own protocol to rival TCP or UDP. I dont think ethernet level access is possible so no layer 2of5 programming fun. Everything is in the System.Net.Sockets library and TechNet

Things may look a nightmare if you're starting from scratch, especially if you've got to learn the c#/vb too, but you'll find you can make a working PC to PC simple chat program in about 30 lines of code. (some of them lines are for threadsafeness too). Extend it to whatever once you've got it sussed. For easyness, each connection is passed on to a worker object that runs itself.

If you do look at this stuff, ask me for code anytime. In days of compuserve and home 56k and when things didn't exist off-the-shelf, and for fun, I wrote a (not https) filtering scheduled proxy for 300student/staff PC at the place gone to work to set them up IP. We had 10mbit FDX which was alot in 97 (we got 700kByte/s from microsoft even then), but written in VB3 using 'Catalyst's SocketWrench.ocx' and running on an NT4 twin p2, it handled everything simply and quietly. (up to the time upto the point of getting MS proxy2). All tributes to the reliability of IP and sockets.

Neal :)
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,508
I came across these interesting TCP/IP tutorials and thought I would share the links:

Thank you for visiting the dNet tutorials section! Whenever we get a burst of inspiration, we will add an article explaining how something works. Keep an eye out for articles on internet protocols, Windows programming, WinSock programming, and more. We hope you can learn something interesting from us!
TCP/IP is one of the oldest sets of internet protocols still being used. If you are interested in learning about what makes the Internet work, check out this tutorial. Written by Erik Iverson.

TCP/IP for the Uninitiated: Part 1

This installment looks at how to use tools provided with your operating system to see TCP and related protocols in action. It also describes the flow of data between machines at multiple levels during simple network operations. Written by Erik Iverson.

TCP/IP for the Uninitiated: Part 2

Interesting real life examples.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top