cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
365
Views
0
Helpful
6
Replies

Seperating OSI layers from bits

network_geek
Level 1
Level 1

Hi All,

 

I have a query for you all, which you might be able to guide me on this:

 

How does a switch/router, that receives bits on a link able to separate and create the packet back from the one sent by sender.

For example a switch has received 010101...., how would it know that 010 is meant for data link layer and 101 meant for network link layer and so on, although this is just an example to explain the question.

 

If there is still any confusion as to what I asked please let me know in comments.

 

Thank you!

6 Replies 6

Hello,

 

that is a very interesting question. Obviously, each layer in the OSI models adds something to the original raw data (e.g. a header) and encapsulates it. I am not sure if the amount of bits actually matters, I think each layer just looks for the corresponding header...

Hello @Georg Pauwen!


Thank you for your reply. Respectfully, the amount of bits added by each layer is variable per protocols/standards running on that specific layer, an example of that would be IPv4 vs IPv6.


I am waiting for others to contribute more on this so we can take this discussion ahead.

 

Thank you!

Hello,

 

you probably know more about this stuff than I do. The way I learned it is that each layer changes specific bits in the header. A good source might be the corresponding RFC (linked below):

 

https://www.ietf.org/rfc/rfc1122.txt

physical Layer send 
0000011111000001111100001111   then idle then 0000000000000111111110000111

the receiver build bytes by bytes, 
we config the link with for example 802.3 format 

 

receiver match the 802.3 format with bytes builds and check CRC in end with byte and format of 802.3 to check that the bit is correct send and there is no lost.

NOW 802.3 format include source, destination ..... until the begin of Network Packet, 
so the receiver will count bytes until the network packet.

if there is any different between both side then the link will be UP/DOWN 

Joseph W. Doherty
Hall of Fame
Hall of Fame

At the L2 and L3 layers, bits are either assigned into "fields" of a fixed number of bits or such a "fixed" number of bits provides the "size" of a subsequent grouping of bits.  That's how a network host knows how to "parse" a frame's contents, and how the same device knows how, for example, to parse a data portion of a frame into a packet.

Unsure whether you question also encompasses L1, but how does a network device "know" where these "fields" start, or even, how do they "know" when a bit is actually being received and whether it's on or off?

At the high level, at L1, there's generally some special "signal", on the media, that when it ends/stops indicates bits are are now being sent.  I.e. the receiver can then "know" here's the first bit, and then it just keeps counting them, and by their positional count, "knows" what field they are part of.

Further, on many media, bits are not sent individually, instead of group of bits are sent, concurrently as a specific signal which allows the receiver to "decode" the bits.

Generally different media standards, have their own way of doing L1.  For example, although fastEthernet is 10x faster than 10 Mbps Ethernet, each bit might not be transmitted 10x faster, rather it's often some combination of how fast signals are being modulated and how much information each signal contains.

 

 

mlund
Level 7
Level 7

Hi

Look at this, there are some good stuff.

https://www.ciscopress.com/articles/article.asp?p=2348264

In short, 

"preamble" and "start of frame" is like, hey there wake up.

then comes destination and source

after that comes lenght/type, and this one is telling what is to be expected to see in the data-field. For example 0800 (hex) is telling that this i an ipv4 packet.

Then comes the ipv4 header, and in this header, there are fields that specify how long is it, and what typa of ip is it, for example type 17 (hex=11) specifies that this is udp.

/Mikael

Review Cisco Networking products for a $25 gift card