Ask for Data Link layer (OSI Protocol)

Hi Guys,
I Curiously learning about data Link Layer, but i still not understand, when frame created.

as long as i know, for Data link layer has 2 sub layers

  • Logical Link Control (communicate from / to upper layer )
  • Mac (communicate after LLC has been crated segment to Physical Layer)

any body to explain how it works?
i have been searching tutorial/simulator, but still not found.
can you give me tutorial like ebook or link.


and if i have topology as bellow:

 Router->Switch->Switch->PC

does switch 2 still keep the frame from switch 1? or switch 2 create new frame?

thanks guys

Assuming that switch 2 receives the frame correctly it will transmit a copy of it on the interface towards the destination MAC address - assuming it has that MAC address in its tables (i.e. it knows which interface the destination MAC address is on). If it doesn’t it will flood the frame out of all interfaces except the interface it received the frame on. This assumes a typical unicast frame.

ok.. i see…
switch 2 just forward the frame from switch 1, and not create new header?

Strictly speaking it constructs a new frame with the original content. What is your real question? Does it change the SRC MAC address? No it does not…

thanks for your reply,
i mean every packet/frame out/in from interface(From switch 1) to other interface(switch 2), the packet/frame will get a new encapsulation , right it? even it doesn’t created new frame.

I am not sure which level of encapsulation you are referring to but essentially although a switch regenerates the frame it will for most intents look the same on the wire as the original frame. The MAC addresses in the header do not change. This assumes a standard unicast frame and no 802.1Q VLAN involved. If the switch acting as an access/trunk device for VLANs then the frame could well be changed on the way through the switch.

i have found the concept for encapsulation
http://www.visualland.net/view.php?cid=1028&protocol=Encapsulation&title=2.%20Router%20encap

here i paste for summary

2. Why encapsulation?    The short answer: To comply with OSI layered reference model.    
 Now the longer answer. This question is really about "Why OSI model?"     Network is complicated. 
The same function can be done by different technologies. And technology changes fast. We often need to integrate unproven new technologies without destabilizing existing implementations.
To deal with this problem, OSI proposed a 7 layer reference model. It breaks down network into 7 layers. 
Each layer serves one purpose. OSI model defines layer interfaces. This way, changes inside a layer won't affect the layer above and below it.  
Each layer has a set of layer-specific network control parameters. 
They are encoded into a corresponding header. This is called encapsulation. Commonly used headers are link, network, transport, and protocol. They are corresponding to OSI layer 2, 3, 4, 5 respectively.    


   For example, link layer is implemented by many layer 2 technologies. When delivering a packet through several hops, the packet's link header may be encapsulated several times due to different link technologies used between hops. For example,  point-to-point serial link, Ethernet link, wireless link, and ATM link.

In your original question you were asking about the situation as a frame is passed from one switch to the other (all at layer 2). Excluding complications caused by VLANs such a frame does not undergo further encapsulation - the second switch simply regenerates the frame it received on its input ingress interface on the egress interface. There is no change to the encapsulation.

In broad terms, encapsulation tends to imply a move downwards through the network stack and de-encapsulation tends to imply a move upwards through the network stack.