cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2877
Views
9
Helpful
6
Replies

Source IP and MAC address

jshanley7
Level 1
Level 1

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.

6 Replies 6

Jon Marshall
Hall of Fame
Hall of Fame

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

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

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?

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

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?

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

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: