Which MAC/IP add. is used

Unanswered Question
Apr 30th, 2007
User Badges:

I had this question on the CCNA exam and wasn't sure about it and can't seem to figure it out from the book. PC A is trying to reach PC B going through a switch, then a router, another switch ending up on PC B. What MAC add. and IP add. is used in this routing/switching, please help?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
mohammedmahmoud Mon, 04/30/2007 - 09:48
User Badges:
  • Green, 3000 points or more


The frame will flow with PC A MAC address as the source of the frame until it reaches the router (and the destination MAC is the router interface facing this subnet), and then the router does a frame rewrite (also called packet rewrite) to route the packet to the subnet were PC B resides, in this packet rewrite process the router places the MAC address of its interface connected to the PC B subnet as the source of the frame (and the destination MAC is changed to be that of PC B).

IP Unicast frames and packets are rewritten before being sent from the Router as follows in order to be able to be sent to the next-hop:

? The Source MAC address is changed from that of the sender to that of the Router.

? The destination MAC address is changed from that of the Router to that of the next-hop.

? The IP TTL value in the IP header is decreased by one. (Routing Hop)

? The IP Header Checksum is recalculated (TTL value is Changed).

? Frame Checksums is recalculated (MAC addresses are changed + Changes in the IP header).

NOTE: IPs are not altered along the path.

I hope that i've been informative.

HTH, please rate if it does help,

Mohammed Mahmoud.

churchillma Mon, 04/30/2007 - 11:14
User Badges:

That's what I originally had thought was correct. I forgot to add though that there are 2 routers connected so 2 different networks. I know this is hard to explain without a graphic, hope it makes sense. I'm assuming the router on PC B's side would be the destination MAC address and the IP address being PC B??

mohammedmahmoud Mon, 04/30/2007 - 11:37
User Badges:
  • Green, 3000 points or more


Look, any router in the path must do packet rewrite, such that any input packet to the router should have the MAC address of its incoming interface as the destination, and any output packet from the router should have the outgoing router interface's MAC address as its source MAC address.

IP addresses are kept unchanged all the path.

The final frame reaching PC B, MUST have the MAC address of PC B as its destination MAC address, and the MAC address of the B network router as its source MAC address.

HTH, please rate if it does help,

Mohammed Mahmoud.

ankbhasi Mon, 04/30/2007 - 09:53
User Badges:
  • Cisco Employee,

Hi Friend,

I believe your PC-A and PC-B both are in different vlans/subnets? If correct then as the packet from out from PC-A it will be having its source mac address , its source ip address, destination ip address of PC-B but destination mac address of router interface and when packets reaches router and router known the destination then routers sends its out changing the source mac address of itself and destination mac address of PC-B and source ip address will remain of PC-A and destination ip will stay same for PC-B.

So in short only mac addresses and vlan id get changed and source and destination ip address remain same.

NOTE: I explained this presuming there is no NAT configuration.



*Pls rate helpfull post


This Discussion