One key use for per port MAC addresses on switches is for Spanning-tree BPDU's. These are Layer-2 multicasts with source MAC address of the egress switch port.
I would have to brush up on other Layer-2 protocols such as TRILL and SPB, but they might also take advantage of a per port MAC.
Does that help?
First off - your English appears to me to be excellent. Secondly your summation of bridging (question 1) and consequently your understanding of the subject are very good. I would probably word some of that slightly different but your summation is fair and it appears that your understanding is good.
Let's make one assumption at this point to keep things simple - this is all Ethernet and IP.
Having said that there are two steps that I would add to your bridging summation that might clear up your understanding of routing (question 2) a little:
- when your network stack is handed data to transmit there is a route table look up done (every device on an IP network contains a route table - to see it from a command prompt - on linux type "route", on windows type "route print".) to determine two things:
a) which interface to transmit the data out
b) if the destination is directly reachable or is remote (beyond a router).
- Once the route is determined the network stack will ARP for a MAC address.
So when Alice is sending data to Charlie she does a route lookup - it is determined that his machine is directly accessible on the LAN. She then ARPs for his MAC address. Once the route has been determined and the MAC address has been acquired the network stack can then assemble the packet for transmission. This particular conversation as you mentioned only traverses switch A as it inspects the destination MAC.
Now that we have fleshed out question one a little better let's apply some of these concepts to question 2.
When Alice desires to send data to Bob the first step is a route lookup. It is determined that Bob is not on the LAN. Thus the route to Bob is the default route (assuming Router A is configured as such). (As your book points out Router A - and by extension Alice - don't know where Bob is. They only know the general direction - or "route".) So Alice ARPs for Router A. Then assembles the packet with destination IP address(network layer) of Bob and MAC address(datalink layer) of Router A. Upon receiving this packet Router A 1)strips off the MAC address(datalink layer) of Alice 2)does a route lookup 3)ARPs for router B 4)then reassembles the packet with MAC address of Router B. Router B repeats these steps ARPing for Bob and forwards the packet.
So the network layer is assembled at the start - source Alice and destination Bob - and never changes. The datalink layer on the other hand is deleted and reassembled each and every leg of the trip.
Best Answer
Don't confuse the network layers. Each layer has a specific purpose. Also, don't assume that there is only one protocol for each layer. Layer-2 has many protocols, some of which use MAC addresses, and some which don't. Of those that use MAC addresses, some use 48-bit MAC addresses, and some use 64-bit MAC addresses. There are also multiple layer-3 protocols. IPv4, the most used, but not the only, layer-3 protocol, uses 32-bit addresses, but it is being replaced with IPv6, which uses 128-bit addresses. You don't want to replace or upgrade all your layer-2 devices each time you want to run a different layer-3 protocol.
MAC addresses are layer-2 addresses, and they are used to deliver layer-2 frames on a LAN. Switches are layer-2 devices, and they use MAC addresses to create a table of which host is connected to which switch interface. A switch will look at the source MAC address to build its MAC address table, and it will look at the destination MAC address, look it up in its MAC address table, and deliver the frame to the correct port. Absent a destination address in its MAC address table, the switch needs to flood the frame our every other interface, and that is pretty inefficient and wasteful of bandwidth on all the other interfaces. Switches do not look inside the frame to inspect the IP address. This allows layer-2 and switches to carry any layer-3 protocol (IPv4, IPX, IPv6, etc.).
IP addresses are layer-3 addresses, and they are only looked at by layer-3 devices, e.g. routers. A router receiving a layer-2 frame will strip the frame from the layer-3 packet, and it will look up the IP address in its routing table to see to which interface the packet should be switched. The router will build a new layer-2 frame for the new LAN connected to the destination interface.
Layer-2 (MAC address, etc.) is for devices connected to the same layer-2 domain, and layer-3 (IP address, etc.) allows you to send data to other layer-2 domains.