Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Imagine you have some network configured like this

+-----+   +------+   +------+   +-----+
|comp.|---|bridge|---|router|---|comp.|
|  A  |---|   B  |---|   C  |---|  D  |
+-----+   +------+ ^ +------+   +-----+
                   |
                    -- Here!

If computer A sends an ethernet packet to computer D...

  1. The source IP is going to be A and the destination IP is going to be D.
  2. What are going to be the MAC addresses on it at the marked segment?

I think I narrowed it down to two possibilities:

  • Possibility 1:
    • Source MAC is B
    • Destination MAC is C
  • Possibility 2:
    • Source MAC is A
    • Destination MAC is D

Which -- if any -- is correct?

Thanks for your time?

PS: I expect to be commended on my ASCII art skills. Be sure to leave a comment below.

share|improve this question
1  
Your ASCII art is a work of beauty –  SimonJGreen Jan 7 '12 at 18:05
    
Just fixed some rather important question details. Sorry to anyone who might have started answering :( –  Francisco P. Jan 7 '12 at 18:07
    
/me deletes my answer –  SimonJGreen Jan 7 '12 at 18:09
3  
Is this your homework? –  pfo Jan 7 '12 at 18:16
2  
@pfo - doesn't matter if it is homework. Just as long as prior knowledge is shown, and there are specific questions. Both of these are fulfilled. I wish all homework questions were this well though out. –  Mark Henderson Jan 9 '12 at 5:26

3 Answers 3

up vote 12 down vote accepted

Source MAC = A

Destination MAC = C

Why: When A needs to send data to another host it first determines whether or not the detination host is on the local network. Upon determining that the destination is not local, A sends the data to it's configured default gateway, which is C.

Why not B? Because switches (bridges) when operating at layer 2 don't modify the source or destination MAC address. A router on the other hand, will modify the source MAC address, substituting the original source MAC address with it's own MAC address.

Why not D? Because A knows that D is not on the local network and that it is not directly reachable. A knows that it needs to send the data to it's DG and will ARP for the DG rather than ARP'ing for D.

share|improve this answer

Generally, at the point in your diagram:

Source MAC: A - as bridges and switches don't normally rewrite anything, so this will be untouched.

Destination MAC: I believe this will be C, as the computer will deliberately send the packet to its default gateway as it knows (From the IP and Subnet Mask) that the computer isn't on its network segment.

If the source MAC wasn't C, it would never get there as the bridge wouldn't know where to send it. The bridge will not be aware of any MAC address beyond the router.

Edit: I don't have it to hand to check, but Ciscos Packet Tracer is excellent for this kind of question because it will show you the packet step my step.

As an aside, I'd forget about bridges and just stick to switch terminology. They're basically the same and I don't bridges exist anywhere now.

share|improve this answer
    
bridges are making a huge comeback thanks to virtualization –  Jim B Jan 8 '12 at 4:04

Possibility 2. Source-MAC A is not changed by the bridge. Destination MAC is D if both computers are in the same broadcast domain.

share|improve this answer
1  
If there's a router between them, then they better not be in the same broadcast domain. –  Shane Madden Jan 8 '12 at 3:20
    
Might be a switch-router with the same VLAN, but routing other VLANs. –  Nils Jan 8 '12 at 22:04
    
Fair enough, but then as far as the communication between those two nodes is concerned, it's just a switch (and should be called that in a logical diagram like this). –  Shane Madden Jan 8 '12 at 23:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.