Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

How MAC addresses are changed by routers for forwarding?

Assuming Host A has packets to go to Host B in the following all-Ethernet connection:

Host A --- Switch A --- Router A --- Router B --- Switch B --- Host B

Host A and B are in different subnets, and their default gateways are Router A and Router B vlan interfaces. My question is when Router A forward the packets to Router B, does it change packets' source MAC to it outgoing interface MAC and destination MAC to Router B's incoming interface MAC?

Thanks a lot

2 REPLIES
New Member

Re: How MAC addresses are changed by routers for forwarding?

qwhuang,

Basically, Router A knows the MAC address of because of ARP. So it will strip the source and destion MAC addresses from the outgoing frame. It will replace it with its outgoing interface as the source MAC address and it will use Router B's interface closest to it as the destination MAC address. Once the frame has been recreated, it will send it.

Hall of Fame Super Silver

Re: How MAC addresses are changed by routers for forwarding?

Hello,

>> when Router A forward the packets to Router B, does it change packets' source MAC to it outgoing interface MAC and destination MAC to Router B's incoming interface MAC?

yes if the interface between the two routers is a LAN otherwise the ip packet is encapsulated inside a different type of frame (HDLC, PPP, or FR) to be sent out to RB.

only the ip packet travels unchanged (TTL is reduced and header checksum recalculated at each router hop) the frame that transports the ip packet is changed at each router hop.

This process is called packet rewrite and the router can store in its forwarding tables all the information that is needed.

RB MAC address in case of a LAN link is learned from ARP and can be refreshed by a routing protocol for example.

In some older books like Comer "Internetworking with TCP/IP" the action of the router is called inter networking meaning this capability to make communicate different media.

This is one of the strong point of IP

Hope to help

Giuseppe

198
Views
0
Helpful
2
Replies