+ Reply to Thread
Results 1 to 6 of 6
  1. Junior Member
    Join Date
    Jun 2011
    Posts
    22
    #1

    Default Destination MAC address?

    Hello,

    I am confused as to what destination MAC will be in a layer 2 frame. In the below example:

    PC1>>>SW1>>>>R1 e0/1 interface>>>>SW2>>>Server 1

    If PC1 wants to send information to Server one on a different subnet with R1 in the middle, will the destination MAC in the frame leaving PC1 be the MAC for SW1 or the MAC for the e0/1 interface on R1?

    Thank you.
    Reply With Quote Quote  

  2. SS -->
  3. ProEthicalHacker.com fuz1on's Avatar
    Join Date
    Dec 2014
    Location
    silicon valley, where we speak that bay area slang
    Posts
    938

    Certifications
    CCNA CCENT ITIL SSCA SSVVP WSQD WSQI Cloud+ Mobility+ Security+ Linux+ Network+ Server+ Project+ A+ HIT LPIC-1 CLA11 ACE ace/PACA SSBBP SSLP CMS SCP
    #2
    I think the keywords here are MAC (physical address) and Layer 2 frame. Which device deals with Layer2?
    Reply With Quote Quote  

  4. Junior Member
    Join Date
    Jun 2011
    Posts
    22
    #3
    A "switch" deals with layer 2. But then again I could go on the router and do a "show ip arp 10.xxxx or use the MAC of the host xxxx.xxxx.xxxx and the router will show me a mapping of the MAC to IP.
    Reply With Quote Quote  

  5. Junior Member
    Join Date
    Jun 2011
    Posts
    22
    #4
    I am still not sure if PC1 would use the destination MAC of the routers interface or the switch that sits between. Any help would be greatly appreciated. Thank you.
    Reply With Quote Quote  

  6. Senior Member
    Join Date
    Nov 2013
    Posts
    146
    #5
    The switch is a transparent Layer2 device. The only time you send a frame with a destination MAC Address of a switch is when you want to send traffic "to" a switch.

    In the scenario above, the destination MAC address of the frame will be that of the Router's e0/1 interface. The frame is sent "through" the switch (not "to").

    Remember, when a device receives a frame with it's MAC Address as the destination, it will strip the frame header/trailer and inspect the packet for further forwarding. This is the desired behavior, we want the router to strip the frame and forward the packet based on Layer3 information. Had the switch de-encapsulated the frame, it wouldn't know what to do with the packet.
    Reply With Quote Quote  

  7. No longer active.
    Join Date
    Jul 2016
    Posts
    413
    #6
    I know that this thread is a little old, but I feel that it's a very good question. While I respect the answer that late_collision has provided, the detail for me, remains a little fuzzy, so I decided to run the scenario in CPT and document the results here, so that I and others may learn from it.

    The scenario is that PC1 requests a web page from the SERVER.
    The request travels... PC1 >> SW1 >> R1 >> SW2 >> SERVER.
    ARP Requests and Replies, aside.
    Looking at L2 operations only.

    Destination MAC Address.jpg

    PC1 forms an Ethernet Data Frame (the payload being a IP Packet), using the information contained in its ARP Table, and encapsulates it with...

    DEST MAC: 0006.2A58.0201
    SRC MAC: 0060.700B.38EA

    PC1 >> SW1

    SW1: Receives the Frame on its Inbound Stack and Decapsulates to read DEST & SRC MAC Addresses.
    SW1: Sees from its CAM Table that the DEST MAC is on its Gi0/1 port, transfers the Frame to its Outbound Stack, re-encapsulates and transmits. Note that the DEST & SRC MAC Addresses have not been changed.

    DEST MAC: 0006.2A58.0201
    SRC MAC: 0060.700B.38EA

    SW1 >> R1

    R1: Receives the Frame on its Inbound Stack and Decapsulates to read DEST MAC. It matches the receiving port, so the Frame has now reached its destination.

    R1: Decapsulates the IP Packet to read the DEST IP Address (at L3), finds the DEST IP and transfers over to its Outbound Stack.

    R1: Finds the corresponding MAC Address in its ARP Table, re-encapsulates with new DEST & SRC MAC Addresses, and transmits.

    DEST MAC: 00D0.58B8.578E
    SRC MAC: 0006.2A58.0202

    R1 >> SW2

    SW2: Receives the Frame on its Inbound Stack and Decapsulates to read DEST & SRC MAC Addresses.
    SW2: Sees from its CAM Table that the DEST MAC is on its Fa0/1 port, transfers the Frame to its Outbound Stack, re-encapsulates and transmits. Note that the DEST & SRC MAC Addresses have not been changed.

    DEST MAC: 00D0.58B8.578E
    SRC MAC: 0006.2A58.0202

    SW2 >> SERVER

    When the SERVER is ready to return whatever has been requested, it simply switches the DEST & SRC MAC Addresses around before the return Frame is encapsulated and transmitted.

    DEST MAC: 0006.2A58.0202
    SRC MAC: 00D0.58B8.578E

    The process is now run in reverse, back to PC1.

    I've certainly learned from doing this and I hope others will also learn from it also. I'd encourage others to duplicate this and study the ARP process also.
    Last edited by rob42; 11-05-2016 at 10:02 PM.
    No longer an active member
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks