Knowledge of destination MAC address

How would a MAC layer look into the MAC header if it is the one to put the MAC header onto the packet coming from upper layer (Network layer)? I am talking about the packet that a node sends out to other node. I am not talking about MAC layer's function after it "receives" the packet from other node. Please let me know how a MAC header is created by a node. It has to some how look at the IP header of the frame coming from above layer in order to append the MAC layer header to the packet.

More specifically, i would like to know that how a node that is sending out a MAC packet would know the destination MAC address? Is it communicated to it by the higher layer? If yes, how is it done for higher layer protocols other than IP?

Thanks in advance.

Aswin

Reply to
Aswin
Loading thread data ...

You are looking for something called Address Resolution Protocol (ARP), for IP Version 4, or Neighbor Discovery (ND), for IPv6. Respectively,

formatting link
and

formatting link
These are used when the destination is on the same IP subnet as the sending host. If the sending host sees that the destination IP address is not on its own IP subnet, then the destination MAC address is the address of the default router (typically).

ARP is not IP-specific, by the way. It can accept any Layer 3 addresses, in principle.

Bert

Reply to
Albert Manfredi

(snip)

(snip)

In principle, but do you know any other than IP that use it?

Apple's ethertalk uses AARP. I don't know where an online reference is. See "Inside AppleTalk, second edition".

DECNet assigns the MAC address based on the DECNet area and node.

formatting link

-- glen

Reply to
glen herrmannsfeldt

Thanks Bert. It was quite useful. I was aware of the ARP but not that it is not specific to IP.

If you can help with another question.. it would be great!!

Now this desitnation address.. is it a part of the data sent by the layer 3 or is there a specific format for sending the same?A similar question would arise for the length/type field of the MAC frame structure.

Thanks in advance.

Aswin

Reply to
Aswin

You're welcome.

Not sure if I understand the question. The returned MAC address goes into an ARP table, and is stored in the sending host for a few minutes. You can see this table in Windows machines by typing "arp -a" at the command line prompt. In fact, if you ping some host you know exists in your IP subnet, you can then measure how long the entry remains in the table. Just keep doing "arp -a" until you see the entry disappear.

When the layer 3 protocol sends a packet down to the Ethernet driver (assuming Ethernet), that's when the ARP table is checked, and that's when the MAC destination address is entered into the Ethernet frame. Or, if the destination's MAC address is not in the table, then the ARP query is sent first, and the IP packet is held up until the ARP reply comes back.

Bert

Reply to
Albert Manfredi

No, but that's why I said "in principle." For example, even IPv6 *could* use ARP. But IPv6 has its own unique mechanism.

Another point is that ARP gets a lot of bad press for using broadcasts for its queries. But once virtually everything was migrated to IPv4, I don't think it made a whole lot of difference anymore. There were not many hosts out there that got interrupted unnecessarily. ND, with its multicast queries, will eventually interrupt all hosts too, if IPv6 becomes the norm.

DECnet had some sort of address resolution protocol. I forget the name. You had to discover all the nodes on your network, but it was a one time deal. Remember? It took a few minutes to populate the table.

Bert

Reply to
Albert Manfredi

Maybe I'm confusing that with LAT?

Bert

Reply to
Albert Manfredi

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.