Source IP and MAC address

Unanswered Question
Nov 7th, 2007
User Badges:

2 PC's connected by 2 routers in between. PC1 sends to PC2. When the data reaches PC2 what is the source MAC and IP. Is it the closest router to 2? Is it the IP of PC1 and MAC of router2? Been digging through my Cisco press books and cannot find it. Please let me know if further clarification is needed of the example.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.
Jon Marshall Wed, 11/07/2007 - 07:41
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi


PC1 -> R1 -> (fa0/1) R2 (fa0/0) -> PC2


When data reaches PC2


source Mac address = R2 fa0/0

source IP address = PC1


Source and destination IP address do not change (unless your are Natting somewhere).


Source and destaintion mac-addresses change at each layer 3 hop.


HTH


Jon

jshanley7 Wed, 11/07/2007 - 08:40
User Badges:

Had a feeling that was it, just wanted to confirm. Thank-you !

pipemajor Wed, 11/07/2007 - 08:40
User Badges:

So the following is true?


PC1 -> SW1 -> R1 (gateway) -> SW2 > PC2


PC1 sends an IP packet to PC2 with source IP of PC1 and destination IP of PC2.


It is framed on Ethernet by PC1 NIC with souce MAC of PC1 but destination MAC of... R1?


SW1 has R1's MAC in it's MAC-Addr table so forwards the unicast out the port to R1. No changes to anyone's MAC or IP addresses.


When packet reaches R1, it strips of the layer 2 frame (with old src MAC of PC1 and dest MAC of R1) routes it out Ethernet port toward PC2 with PC2's destination MAC and IP addresses but with R1's source IP and MACs?


SW2 again leaves IP and MAC addresses untouched?

Jon Marshall Wed, 11/07/2007 - 12:13
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi


Yes to all of that. SW2 will not rewrite either the mac-address or the IP address. Just for completeness


when PC1 sends packet to PC2 the destination mac-address is the mac-address of the interface on R1 that connects to the PC1 network. When R1 sends the frame out to PC2 the source mac-address is now the mac-address of the interface on R1 that connects to PC2 network.


HTH


Jon

pipemajor Wed, 11/07/2007 - 13:07
User Badges:

Are you sure everything is true? My statement asked if R1 changed the source IP of the packet fowarded out the ethernet port connected to PC2's LAN to R1's IP address on the interface connected to the PC2 LAN.


Sounds like the source and destination IP addresses never change. If they did, then how would an ICMP packet ever make it back to PC1?

Jon Marshall Wed, 11/07/2007 - 13:20
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Oops, sincere apologies, i read it a bit too quick for my own good. As i said in my original answer the source and destination IP addresses never change (NAT aside) so you are correct in this post in that R1 will not change the IP addresses at all just the mac-addresses.


Jon

Actions

This Discussion