• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Layer 2/3 Routing Question

James Bond

Diamond Member
I've been confused about this forever.

When one host is sending info to another host, I'm confused about the layer 2 and 3 addressing.

SETUP:
Host_A MAC: AAAA-AAAA-AAAA NIC IP: 192.168.102.2
Host_B MAC: BBBB-BBBB-BBBB NIC IP: 192.168.101.2
Router_1 MAC: 1111-1111-1111 SERIAL0 IP: 192.168.1.1 ETHERNET0 IP: 192.168.101.1
Router_2 MAC: 2222-2222-2222 SERIAL1 IP: 192.168.1.2 ETHERNET1 IP: 192.168.102.1

So as you can see, it goes:

HOST_A ===Ethernet=== ROUTER_1 ---Serial--- ROUTER_2 ===Ethernet=== HOST_B

I know that the layer 2 frame is stripped on each hop and replaced. What I'm not sure about is when does the Layer 2 destination/source address change? When does the Layer 3 destination/source address change?

Could someone give me a play by play please? Assuming a packet was being transferred from HOST_A to HOST_B?
 
layer3 source and destination address do not change. (before anybody corrects me, let's just keep it simple 😉 )

layer2 address are only signficant on a single segment.

So in your example router one replaces the layer2 information with it's outgoing interface layer2 address, looks up the route and sends it out the serial interface (i'm keeping it simple, because normally there isn't a mac address on a wan circuit, they use different layer2 addressing). router 2 picks it up and then puts it's layer2 address of it's outgoing interface and then puts the frame onto the wire.

to make it simple, layer2 addresses only change when they cross a layer3 boundary (a router)
 
And when you say "puts its layer 2 address of its outgoing interface", you mean, the Layer 2 source address is being updated to the outgoing interface of that router, right?
 
yes. think about what is happening...a frame is being delivered. that's layer2. packet remains the same.

so since the interface of the router is really just a NIC - it uses the layer2 address of that interface.
 
Wait.. Given the host and router interface IP's wouldnt it go like this instead?

HOST_A ===Ethernet=== ROUTER_2 ---Serial--- ROUTER_1 ===Ethernet=== HOST_B
 
So the destination MAC in the frame is ALWAYS the NEXT hop, and the source MAC in the frame is ALWAYS the PREVIOUS hop.

Just making sure, is that correct?
 
hops are normally associated with layer3 devices.

but if you're talking about mac addresses as packets move from router to router, you're correct.
 
Back
Top