cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1655
Views
10
Helpful
6
Replies

Life of a packet in the OSI model

trane.m
Level 1
Level 1

Hello,

Long story short, i'm reading and learning to be able to take the CCNA later this year.  For this, i'm using flashcards. A lot of the flashcards are made by myself and some are made by others.

I've had difficulties understanding the different purposes and functionalities of the 7 layers in the OSI model. I've searched and read, but i'm having a hard time applying the information in real-life situations.

Some of the flashcards i have, made by others, makes me very aware of this. I don't understand the flashcards they made and i want to be able to understand them, and more importantly, understand whether they're right or wrong. I tried contacting the authors, but they didn't reply. So of course i come here, to this impressive community, for help and wisdom.

 

I hope someone will help me go through 'the life of a packet in the OSI model' as i would call it. What is the packet going through from source to destination? Which layer is responsible for what? Something like "The packet first arrives at the host. This is done through wifi or a cable, which is layer 1. Layer 1 is also responsible for X and Y. Then the packet comes to layer 2, where it......"

 

I want to say i have a lot (some) of basic knowledge about OSI, networking, routing and switching, so i'm not asking you to teach me the whole OSI model from step 1. I think i just need a different angle, maybe a more visual explanation. Some of the flashcards i have difficulties understanding are these:

 

I have a flashcard saying "layer 4 (transport) provides host-to-host communication". I've always been under the impression that the word node is used to describe layer 2 devices and the word host is used to describe layer 3 devices. I hope you understand my confusion when a flashcard suddenly states that layer 4 is responsible for something related to a layer 3 device.

 

I also have a flashcard saying "layer 4 (transport) segments and reassembles data for communications between end hosts". But why? What is the purpose of that? I thought layer 3 provided the required (routing) information for the data to be able to be transported to the right end host and layer 4 was responsible for the transport of the packet (hence the name..... transport)

 

"Layer 7 (Application) identifies communication partners and synchronizes communication". What is meant by identifying? When is someone identified? Because i would say when you have a hosts MAC (layer 2) or IP (layer 3) address, they're identified. You can distinguish them from others. And what is meant by synchronizing communication? As far as i can remember, there is a SFD field in the ethernet packet, responsible for synchronizing the communication.

 

"Layer 5 (Session) establishes, manages, and terminates connections between the local and remote applications". How does it establish and terminate connections?

 

I have rewritten this and rewritten this again. And one more time. It's difficult to me to put into words what i don't understand about it. While writing all this, i realize that i'm very visually dependant. If i can't visualize it, it's very difficult, if not impossible, for me to understand it. So i guess my problem is with the more abstract parts of the OSI model, like the examples i gave.

I hope some of you will take your time to help me 'see' this and understand it. Thank you for reading all this and for your time.

1 Accepted Solution

Accepted Solutions

I have several comments about this:

- the original poster says "i'm having a hard time applying the information in real-life situations." That is understandable because the OSI model is a "model" and does not deal with real life situations. I would suggest that you not worry as much about the OSI model and concentrate more on the TCP/IP model which is much more applicable to the CCNA (and to real life as we experience it now).

- some parts of the OSI model made sense in the time frame when it was developed but make little sense today. For example, my introduction to networking (many years ago) was in an environment of networking using IBM main frame computers. A user at a terminal (typically a 3270 terminal) would communicate with a program running on the mainframe. In a message from the main frame to the user the presentation layer would provide specification of which fields went where on the screen and what properties that field had (was it display only or would it accept input, etc). That made sense and was applicable many years ago but in terms of the CCNA it is not worth much effort to understand.

- to become good at networking (and to some extent to pass the CCNA) it is important to understand the layered approach in networking. Each layer provides services to the layers above and means that layers above do not need to be concerned about what the lower layer does. For example the bit order of a frame on Token Ring is different from the bit order of that frame on Ethernet. In the layered approach nothing above the Data Link layer needs to be concerned about bit order. So pay attention to layers and what they do. But the OSI model (and how many layers are there?) has much less to do with networking in todays environment than the TCP/IP model.

Having said that I will respond to a few points in the original post:

- you say "I've always been under the impression that the word node is used to describe layer 2 devices and the word host is used to describe layer 3 devices. I hope you understand my confusion when a flashcard suddenly states that layer 4 is responsible for something related to a layer 3 device." I think you are too much concerned about whether reference to host belongs to layer 3 or layer 4. A layer 4 protocol is providing services to a host (which was identified in layer 3).

- your say "I also have a flashcard saying "layer 4 (transport) segments and reassembles data for communications between end hosts". But why? What is the purpose of that?" Yes layer 3 does provide information about how to deliver data to the right host. But if the message from the application contains 20,000 bytes it can not be delivered in a single frame/packet. Layer 3 does not know (does not care) about how big the message it and is only concerned with the path how to get to the destination. It is layer 4 Transport that is concerned about whether fragmentation and reassembly are necessary.

- you say ""Layer 7 (Application) identifies communication partners and synchronizes communication". What is meant by identifying?" Identification is not just which device are we talking to but identifies what program it is. Is this for a program to calculate the interest on your mortgage, or is this a spell checker, or is this a web browser (and in that case if it IE, or FireFox, or Safari).

- you say "Layer 5 (Session) establishes, manages, and terminates connections between the local and remote applications". How does it establish and terminate connections? This is perhaps a bit tricky. I believe that the key to understanding this is to focus on what is established and terminated. It is not establishing a connection between hosts. It is establishing a connection between application programs. So if you are at a computer and have sent a request to calculate the interest on your mortgage, it establishes a session to the program that does mortgage calculation. The program makes it calculation, sends the results, and then uses layer 5 to say "I am done, terminating communication".

I hope this is helpful. If you have follow up questions please send them.

 

HTH

Rick

View solution in original post

6 Replies 6

two Host connect to SW and R exchange some data 
data open HTTP using TCP
there is clock which is use UDP

two same host have mac/L3 address BUT still there are two data type clock an HTTP so each one need some thing like flag to make each host distinguish which one.
here TCP with specific Port and UDP with specific Port come.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Possibly, the first thing that might be confusing you, the OSI model, is a MODEL, i.e. real world implementations often don't come near it, at least for actually "using" all seven layers, in sequence. (BTW, you might review the TCP/IP model, and compare it to the OSI model.)

Yes, in the OSI model, layer 3, in IP, uses packets which are routed, but generally there's something "above" packets, i.e. something that pushes data down to those packets, extracts that data from packets, and uses it.  The "higher" (than L3) layers in the OSI model, provides a framework or structure, for how "higher" layers might be structured.

You mention OSI's L4.  Realize, one reason for OSI models, is to try to avoid every network application needing to provide all the functions it needs to logically communicate with some other application.  Consider, IP doesn't guarantee delivery or delivery order, two functions that almost any network application will want to have.

So, we have L4, in the OSI model, support such common functions, so the application doesn't need to.  In IP, these functions are provided by TCP.  (BTW, in IP, UDP is also part of OSI's L4, providing a more "basic" set of transport functions, such as port numbers, again saving an application needing to build its own functional equivalent.)

In the OSI model, layers 5, 6 are not as "standard", because there's no very "common" list of requirements that software, at these layers, need to support.  Layer 7, though, does have more "standard" real-world, application specific, representations.

More information, also nicely comparing other network layer, both model and real-world, might be found in Wiki OSI model.

Some interesting information in the Wiki article might be:

The OSI protocol suite that was specified as part of the OSI project was considered by many as too complicated and inefficient, and to a large extent unimplementable.[41] Taking the "forklift upgrade" approach to networking, it specified eliminating all existing networking protocols and replacing them at all layers of the stack. This made implementation difficult and was resisted by many vendors and users with significant investments in other network technologies. In addition, the protocols included so many optional features that many vendors' implementations were not interoperable.[41]

Although the OSI model is often still referenced, the Internet protocol suite has become the standard for networking. TCP/IP's pragmatic approach to computer networking and to independent implementations of simplified protocols made it a practical methodology.[41] Some protocols and specifications in the OSI stack remain in use, one example being IS-IS, which was specified for OSI as ISO/IEC 10589:2002 and adapted for Internet use with TCP/IP as RFC 1142.

I have several comments about this:

- the original poster says "i'm having a hard time applying the information in real-life situations." That is understandable because the OSI model is a "model" and does not deal with real life situations. I would suggest that you not worry as much about the OSI model and concentrate more on the TCP/IP model which is much more applicable to the CCNA (and to real life as we experience it now).

- some parts of the OSI model made sense in the time frame when it was developed but make little sense today. For example, my introduction to networking (many years ago) was in an environment of networking using IBM main frame computers. A user at a terminal (typically a 3270 terminal) would communicate with a program running on the mainframe. In a message from the main frame to the user the presentation layer would provide specification of which fields went where on the screen and what properties that field had (was it display only or would it accept input, etc). That made sense and was applicable many years ago but in terms of the CCNA it is not worth much effort to understand.

- to become good at networking (and to some extent to pass the CCNA) it is important to understand the layered approach in networking. Each layer provides services to the layers above and means that layers above do not need to be concerned about what the lower layer does. For example the bit order of a frame on Token Ring is different from the bit order of that frame on Ethernet. In the layered approach nothing above the Data Link layer needs to be concerned about bit order. So pay attention to layers and what they do. But the OSI model (and how many layers are there?) has much less to do with networking in todays environment than the TCP/IP model.

Having said that I will respond to a few points in the original post:

- you say "I've always been under the impression that the word node is used to describe layer 2 devices and the word host is used to describe layer 3 devices. I hope you understand my confusion when a flashcard suddenly states that layer 4 is responsible for something related to a layer 3 device." I think you are too much concerned about whether reference to host belongs to layer 3 or layer 4. A layer 4 protocol is providing services to a host (which was identified in layer 3).

- your say "I also have a flashcard saying "layer 4 (transport) segments and reassembles data for communications between end hosts". But why? What is the purpose of that?" Yes layer 3 does provide information about how to deliver data to the right host. But if the message from the application contains 20,000 bytes it can not be delivered in a single frame/packet. Layer 3 does not know (does not care) about how big the message it and is only concerned with the path how to get to the destination. It is layer 4 Transport that is concerned about whether fragmentation and reassembly are necessary.

- you say ""Layer 7 (Application) identifies communication partners and synchronizes communication". What is meant by identifying?" Identification is not just which device are we talking to but identifies what program it is. Is this for a program to calculate the interest on your mortgage, or is this a spell checker, or is this a web browser (and in that case if it IE, or FireFox, or Safari).

- you say "Layer 5 (Session) establishes, manages, and terminates connections between the local and remote applications". How does it establish and terminate connections? This is perhaps a bit tricky. I believe that the key to understanding this is to focus on what is established and terminated. It is not establishing a connection between hosts. It is establishing a connection between application programs. So if you are at a computer and have sent a request to calculate the interest on your mortgage, it establishes a session to the program that does mortgage calculation. The program makes it calculation, sends the results, and then uses layer 5 to say "I am done, terminating communication".

I hope this is helpful. If you have follow up questions please send them.

 

HTH

Rick

Jesus christ Richard, is there anything you don't know? You really have a gift of decomplicating things, it is impressive. It would be easier for me to just have your phone number, haha.

 

Thank you!

Thank you. I have been doing networking for a long time and have learned a lot. And now I enjoy sharing what I have learned. For 7 years I was certified to teach official Cisco classes. I taught the CCNA class (and so the layered approach is very familiar because I taught it). I also taught the Routing class, the Switching class, and the SNA class (which is why I know about the bit order difference between Token Ring and Ethernet). In spite of how much I have learned I still sometimes make mistakes, like in my response about your question about layer 4 segments and reassembles data and I stated that this was about fragmentation. I woke up this morning and said to myself "that was stupid". IP fragmentation is really a layer 3 function. So take lots of what I said with a grain of salt.

HTH

Rick

"So take lots of what I said with a grain of salt."

Laugh, indeed - so true for many of us.

Having actually having had written/maintained 3270 terminals communicating with IBM mainframe computers, how it worked might not be exactly as Rick describes (likely somewhat depends on what model terminal controller was being used, i.e. don't recall SNA always being required between terminals, controller, mainframe, but it's been so long, I'm unsure), but what he explains about layers, i.e. basically one layer not knowing how adjoining layers do what they do, and non-adjacent layers, perhaps, not even knowing of the existence of those other layers, is what the OSI model (or any layered model or functional modules), tries to accomplish.  In the "on-line" application programs Rick alludes to, we worked with a screen map which did hide from us, how the terminal (actually the terminal controller - actually a separate "computer") was made to do the things Rick mentions, like creating display only fields, input fields (with some possible entry restrictions - like alpha or numeric only), and more (I recall) like blinking or "bolding" a field, etc. (even, on later terminals, color -- wowee!).

Again, what's important, although we didn't "know" how many layers there might have been, between our application and the terminal display, to use it, it was something like set display "Name:", no input, at row 1, column 1, length 5 and set NAME, input, at row 1, column 7, length 40.

Another example of layers, application programs almost always don't "know" how to physically write to a disk drive, they just open "files" and read and/or write data sequentially for/by some "block" number.

Also, although Rick mentions its IP L3 that deals with fragmentation, IP L3 packets and L4 TCP segments both have size limitations, usually often much bigger than the L2 media can support.  Yet layers above L4 don't "see" these size limitations.  To them, something like FTP might copy a TB sized file from one host to another, without any regard to L2 (frame), L3 (packet) and/or L4 (TCP segment) data structure size limitations.  (Interestingly, by default, L3 will base its packet size on what it believes L2 can support, and L4 [TCP] will base its segment size on what it believes L3 can support.  I.e. an example of the L4 layer doing something based on L2, but without direct interaction with L2.  Also an example where layers "hide" how something is done, but may "show" information useful to adjoining layers.)

In the OSI models, other layers might encrypt the file's data for actual transmission and/or change encoding from 7/8 bit ASCII to one of the Unicode standards.

Anyway, although like Rick, real-world networks are more like the IP/TCP model (as I mentioned in my OP), but for networking understanding, normally you're expected to "know" the OSI model.

PS:

For a "fun" thing to think about, what layer is something like RIP/OSPF/BGP routing on, in the OSI model?  (A question which arises on these forums from time to time.)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card