cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1122
Views
0
Helpful
5
Replies

Data Link Layer

ray_stone
Level 1
Level 1

Hi, I am bit confused in Data Link Layer. When a sender machine send a data to Reciever machine then it starts from App--Pres--Sess--Transp---Network---Data??? I have understood all upper 5 layer function but in the Network layer the packet has information of Soure and Destination Address then why it needs to have MAC address. Please answer me in details. Thanks

5 Replies 5

On the Datalink Layer you will see or work only with Mac-Adresses. A Switch see only mac adresses he can't interpret IP Adresses , the next layer device the router see the IP Adress and say, this packet with this destination must go out of this interface. The switch see the mac and knows to which port he must send the frame. He has all mac's in this arp table.

Maybe this makes it more clearer:

http://en.wikipedia.org/wiki/Data_link_layer

Sebastian

Istvan_Rabai
Level 7
Level 7

Hi Richard,

The mac-address is an address that is local to an Ethernet LAN.

Theoretically, the same mac-address can be present on different LANs (VLANs).

This is why the mac-address uniquely identifies a device on a single Ethernet LAN(VLAN) only.

To uniquely identify a device globally, you need a network layer address which can be an IP address or any other network layer address.

Cheers:

Istvan

Thanks for your Answeres!! But if one machine is connected directly with router and second machine is also connected with directy a router interface then wht wud happen. Will MAC still work on this???

Exp : Sender-----Int 1 Router A----Int 2 Router A-------Reciever

Hi Richard,

Sender will send the layer2 frame containing the IP packet to Int 1 using the mac-address of Int 1 as the layer2 destination address and its own mac-address as the layer2 source address.

Whe Router A receives this frame, it will decapsulate the IP packet from this frame.

It will then look at the destination IP address of the packet. Using the routing table it will know that it has to send the IP packet to Receiver through Int 2.

Therefore it will encapsulate the IP packet in another layer2 frame. In this case the source mac-address of the frame will be the mac-address of Int 2, the destination mac-address will be the mac-address of Receiver.

Cheers:

Istvan

The Network Layer header hast the Source and Destination Address (IP address) of the sender and the end receiver. The Data Link header has the Source and Destination address (MAC address) of the sender and the following device in the path to reach the sender.

The sender know where it wants to go (Destination IP address), to reach that destination it has to reach the next device in the path and for that it needs the Destination MAC address of that device... once the packet is in that second device (and it still knows where it wants to go (Destination IP address), now it has a new source MAC address and a new destination MAC address because it wants to get to the next device (may be router 2)... once it gets to router 2 (and it still knows where it wants to go) the packet (in its data link header) now has a new MAC Address in its source and destination.... finaly it gets to the last device and it knows that the Destination IP is in its LAN.

Data link header helps the frame to make it to the next device.... Network Layer header helps you to reach the final destination through all the devices.

Hope it is not so confusing.

Rate this if it was helpful.

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: