8

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.

David Schwartz
  • 31,449
  • 2
  • 55
  • 84
F. P.
  • 199
  • 1
  • 1
  • 5

3 Answers3

15

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.

joeqwerty
  • 109,901
  • 6
  • 81
  • 172
5

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.

Dan
  • 15,430
  • 1
  • 36
  • 67
0

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

Nils
  • 7,695
  • 3
  • 34
  • 73
  • 2
    If there's a router between them, then they better not be in the same broadcast domain. – Shane Madden Jan 08 '12 at 03:20
  • Might be a switch-router with the same VLAN, but routing other VLANs. – Nils Jan 08 '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 08 '12 at 23:04