Can someone help explain pls?

I3astardsI3astards Member Posts: 40 ■■□□□□□□□□
When hosts are NOT on the same network, what does a router do to the frame's MAC addresses? Does the destination address modify to the routers MAC and NOT the destination node, is that right?

Im not too sure about how the MAC's change if the fram travels through a router and is heading for a host on another network!? pls explain.

Comments

  • stuh84stuh84 Member Posts: 503
    When going through a router, the source MAC address is changed to that of the outgoing interface of the router and the destination of the next hop along the way. The IPs will stay the same, but the MAC addresses change.
    Work In Progress: CCIE R&S Written

    CCIE Progress - Hours reading - 15, hours labbing - 1
  • I3astardsI3astards Member Posts: 40 ■■□□□□□□□□
    Thanks for that, its cleared things up in my head about it all now :)

    Do routers actually have built-in MAC'S (manufacturer assigned)???
  • stuh84stuh84 Member Posts: 503
    Yeah, practically every networking device with ethernet has them.
    Work In Progress: CCIE R&S Written

    CCIE Progress - Hours reading - 15, hours labbing - 1
  • I3astardsI3astards Member Posts: 40 ■■□□□□□□□□
    Thanks for that!

    Does the source MAC address keep changing to the previous router or stay as the original?? say you are on the 3rd hop, will the senders MAC be that of hop 2's address, or the original routers MAC address (hop1)??

    Do routers actually have built-in MAC'S (manufacturer assigned)???
  • stuh84stuh84 Member Posts: 503
    The MAC address fields in the frame changes through every point that it crosses a layer 3 boundary (i.e. any interface with an IP that needs to leave by a different route).
    Work In Progress: CCIE R&S Written

    CCIE Progress - Hours reading - 15, hours labbing - 1
  • I3astardsI3astards Member Posts: 40 ■■□□□□□□□□
    stuh84 wrote: »
    The MAC address fields in the frame changes through every point that it crosses a layer 3 boundary (i.e. any interface with an IP that needs to leave by a different route).


    do you mind explaing this pls???
  • stuh84stuh84 Member Posts: 503
    Think of it like this, in a very basic sense: -

    Switches forward at Layer 2 (the Data Link layer) which is using MAC addresses to forward data, hence the MAC addresses need to stay the same when it goes through a switch

    Routers forward at Layer 3, (the network layer) using IPs, the Source and Destination MAC address mean nothing to a router, as it has the IP addresses to work upon, so it just removes the source and destination MACs from the data, adds new ones (the source MAC will become the outgoing interface of this router, the destination MAC will become the destination interface it needs to reach).

    This is a basic and generalised view, let me know if that makes things clearer or even muddier!
    Work In Progress: CCIE R&S Written

    CCIE Progress - Hours reading - 15, hours labbing - 1
  • Cisco InfernoCisco Inferno Member Posts: 1,034 ■■■■■■□□□□
    ok and say after going through the internet and isp's it reaches the router of the network its destined to...what becomes of that mac address? moving into the network towards the host now, is the destination mac address now a switch? or the destination host's?

    kinda blurry on encapsulation....oy vey
    2019 Goals
    CompTIA Linux+
    [ ] Bachelor's Degree
  • stuh84stuh84 Member Posts: 503
    ok and say after going through the internet and isp's it reaches the router of the network its destined to...what becomes of that mac address? moving into the network towards the host now, is the destination mac address now a switch? or the destination host's?

    kinda blurry on encapsulation....oy vey

    Depends on the topology, is it going through more routers? Or does it just go to a switch, or if its a home router, is the next hop purely the host?

    If its going through more routers, the same process applies, MAC addresses change at each hop, Layer 3 forwarding happens. If its going through switches, layer 2 forwarding, so will have the source MAC of the router it got into the network with, and have the hosts MAC address as the destination. The same would apply if it was going to a destination host directly, source MAC of the router, destination MAC of the host.
    Work In Progress: CCIE R&S Written

    CCIE Progress - Hours reading - 15, hours labbing - 1
  • Cisco InfernoCisco Inferno Member Posts: 1,034 ■■■■■■□□□□
    ah ok i was thinking the source address would be the switch.
    also how would it know the destination mac of the host? is that all controlled and predetermined by the upper layers?
    2019 Goals
    CompTIA Linux+
    [ ] Bachelor's Degree
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    http://www.techexams.net/forums/ccna-ccent/60645-mac-addresses-arp.html

    Check that thread. I went into some fairly in depth explanations there of how and when MAC address changes occur.
  • I3astardsI3astards Member Posts: 40 ■■□□□□□□□□
    Thanks Stuh for explaining this....


    Correct me if I'm wrong, if a frame is going to a host on the same network then the destination MAC will be the recieving hosts & source MAC the host which sent the frame, right?

    however, If the frame is going to another network (via router) then the source MAC becomes the routers. When leaving the router, to go to destination host, the destination MAC is the intended hosts and the source MAC is the routers to which it has just come from, right? I'm doing this example with only one hop.
  • cisco_nerdcisco_nerd Member Posts: 198
    Correct me if I'm wrong, if a frame is going to a host on the same network then the destination MAC will be the recieving hosts & source MAC the host which sent the frame, right?

    Yes, if the hosts are connected via the same switch, in mosts instances this is correct
    however, If the frame is going to another network (via router) then the source MAC becomes the routers. When leaving the router, to go to destination host, the destination MAC is the intended hosts and the source MAC is the routers to which it has just come from, right? I'm doing this example with only one hop.

    Yes this is correct for your example icon_cool.gificon_cool.gif
  • I3astardsI3astards Member Posts: 40 ■■□□□□□□□□
    cisco_nerd wrote: »
    Yes, if the hosts are connected via the same switch, in mosts instances this is correct



    Yes this is correct for your example icon_cool.gificon_cool.gif


    woop woop, someone is learning!! thanks all! :)
Sign In or Register to comment.