cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1097
Views
0
Helpful
7
Replies

OSI

networkinitial
Level 1
Level 1

As we know MAC/hardware address is used in network. Want to understand how it works between remote locations. As Example: One location is US and other is Canada. Source is US and Destination is Canada. How source know the MAC of Destination.

1 Accepted Solution

Accepted Solutions

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

Let's try to understand the Concept with the below example:

Source and Destination mac address will be rewritten by every L3 devices in the network during forwarding the traffic. as

 

PC1(aa.aa.aa.aa.aa)------->L3 switch(bb.bb.bb.bb.bb)----------->Firewall (cc.cc.cc.cc.cc)

 

as PC1 Example MAC address is: aa.aa.aa.aa

L3 Switch MAC address is: bb.bb.bb.bb.bb

Firewall MAC address id: cc.cc.cc.cc.cc

 

a Frame started from PC 1 and received in by  Layer 3 switch the first thing it does is strip off the Ethernet header and discard it (assuming it passes error check). The Switch then takes a look at the destination IP. Assuming the switch has a route in its routing table for the destination IP, that route will also contain information about the next-hop. The switch will then construct A NEW ETHERNET HEADER with the MAC address of the next-hop as the destination MAC address and source will replace as self MAC address. This newly packaged frame is then shoved out whatever interface is the appropriate one. 

 

Now the Firewall as received the frame as Source mac address bb.bb.bb.bb.bb and Destination mac address cc.cc.cc.cc.cc

 

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

View solution in original post

7 Replies 7

Dennis Mink
VIP Alumni
VIP Alumni

It uses arp requests to map the ip to the mac and keeps a cam table to find out on which physical port the mac lives so it can switch a frame to that port.

Please remember to rate useful posts, by clicking on the stars below.

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

The scenario you describe most likely involves a path which crosses many Layer3 networks, as such the source device does not require the MAC address of the destination device. It only requires the MAC address of the gateway on it's local subnet.

As the packet traverses the networks, the source and destination IP remains the same, but in the Ethernet frame header the source and destination MAC addresses are constantly changing each time the frame is decapsulated/ encapsulated and forwarded.

 

cheers,

Seb.

As you mentioned that gateway mac is required. Do u mean that packet with unknown destination address means MAC of Gateway.

If I understand your question correctly, when the source device initial needs to send its packet, its network stack will have an IP address, subnet mask and gateway configured. With just those three pieces of information it can determine if the destination IP address is off-link (ie not in the same subnet). If this is the case if must address the Ethernet frame with a destination MAC address of the gateway. It use a ARP to learn the MAC address of the gateway, once it receives an ARP reply from the gateway it can correctly address its Ethernet frame and the IP packet can begin its journey towards its IP destination.

 

cheers,

Seb.

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

Let's try to understand the Concept with the below example:

Source and Destination mac address will be rewritten by every L3 devices in the network during forwarding the traffic. as

 

PC1(aa.aa.aa.aa.aa)------->L3 switch(bb.bb.bb.bb.bb)----------->Firewall (cc.cc.cc.cc.cc)

 

as PC1 Example MAC address is: aa.aa.aa.aa

L3 Switch MAC address is: bb.bb.bb.bb.bb

Firewall MAC address id: cc.cc.cc.cc.cc

 

a Frame started from PC 1 and received in by  Layer 3 switch the first thing it does is strip off the Ethernet header and discard it (assuming it passes error check). The Switch then takes a look at the destination IP. Assuming the switch has a route in its routing table for the destination IP, that route will also contain information about the next-hop. The switch will then construct A NEW ETHERNET HEADER with the MAC address of the next-hop as the destination MAC address and source will replace as self MAC address. This newly packaged frame is then shoved out whatever interface is the appropriate one. 

 

Now the Firewall as received the frame as Source mac address bb.bb.bb.bb.bb and Destination mac address cc.cc.cc.cc.cc

 

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Scenario will be like below

PC1(aa.a) ---> L2_SW(aa.b)---->L3_SW(aa.c)---> ISPRouter1/FW--->........ISPRouter2/FW--->L3_Sw(bb.a.)-->L2_SW(bb.b)-->PC2(bb.c)

Joseph W. Doherty
Hall of Fame
Hall of Fame
NB: All burnt-in MACs are supposed to be (world-wide) unique. So, in theory, it doesn't matter whether the hosts are local or remote, the process of using MACs is the same.

As the other posters have noted, generally remote hosts are interconnected by L3, and MACs are only relevant to the same L2 domain. However, sometimes L2 domains can span across a WAN, and sometimes L3 is used locally (e.g. between VLANs). So, again, the process is the same, L2 or L3, doesn't matter whether you're local or remote, only the L2 and/or L3 topologies matter.

The other posts have also described L3/L2 processing, so I'm not going to repeat that. However, if you have any additional questions, please ask.