views:

35

answers:

2

What does destination mac address field contains, when the source doesn't know address of remote machine ? (say opening page from google.com from my machine)

And while broadcasting the packet, what does mac-address field contains?

A: 

This is going back a bit, but from my understanding, the destination MAC address is always somewhere on the local loop. Here's a (very) simplified view of your packet:

+-----------------------+---------------------+------+
|                       |                     |      |
| Ethernet header (MAC) | IP header (IP addr) | Data |
|                       |                     |      |
+-----------------------+---------------------+------+

You'd address your IP packet to google.com, and then address the Ethernet(? not sure on the terminology here.) packet to your router, who'll unwrap it a little, find out where it's supposed to be going, work out the best way to get there, then wrap it up with the MAC of the next hop and push it out. The next hop will do the same, till eventually Google recieves your request and the packet is fully unwrapped and processed.

Broadcasting addresses are something else entirely, and I honestly don't know, sorry.

Matthew Scharley
+1  A: 

The destination MAC address is always that of the next-hop to the destination. For a destination like google.com, that is likely to be the MAC of the gateway associated with the default route on your machine.

For broadcast packets, the special "all-stations" MAC address is used: ff:ff:ff:ff:ff:ff.

caf