06-03-2008 01:52 AM - edited 03-05-2019 11:23 PM
Hi all, when my pc sends out a broadcast, will the mac address be ff.ff.ff.ff.ff.ff ? what I want to know, is if its a subnet broadcast, does the mac address also get changed to ff.ff.ff.ff.ff.ff ?
06-03-2008 01:59 AM
hey carl,
when your pc sends broadcast the destination mac-address is going to be all f's, but source mac-address will be the mac-addess of your NIC of PC....
Let us know what exactly you want to know....
--gaurav
06-03-2008 02:02 AM
i want to know, that happens when my pc sends a layer 2 broadcast, and a layer 3 broadcast, for both types is the mac address always ff.ff.ff.ff.ff.ff ?
06-03-2008 02:06 AM
Since we're talking about the broadcast in the ethernet header at layer-2, there is no concept of a directed broadcast vs. a standard broadcast, which is distinguished by the layer-3 header. The MAC should be ffff.ffff.ffff in both scenarios.
06-03-2008 02:28 AM
so what is the mac address in a layer 3 broadcast ?
06-03-2008 02:31 AM
ffff.ffff.ffff
06-03-2008 09:44 AM
so its always the same whether its a layer 2 or 3 broadcast then ?
06-03-2008 10:20 AM
Yes, that's correct. They layer-2 (ethernet header) mac address will always be ffff.ffff.ffff
In the layer-3 (IP header), the IP address for a standard broadcast will be 255.255.255.255. For a directed broadcast, it would use the broadcast address of the subnet (last IP address of the subnet).
06-03-2008 11:16 AM
i see, so basically for every layer 2 and 3 broadcast, it will always be broadcast at layer 2 no matter what? so if any ip address sent out with dest ip of 255, will my pc tuen this into a layer 2 broadcast ?
06-03-2008 11:31 AM
So for example, if your pc is 192.168.1.2/24, the directed broadcast for this subnet would be 192.168.1.255. A standard broadcast might look like this
dip = 255.255.255.255
sip = 192.168.1.2
dmac = ffff.ffff.ffff
smac = xxxx.xxxx.xxxx
A directed broadcast would look like this:
dip = 192.168.1.255
sip = 192.168.1.2
dmac = ffff.ffff.ffff
smac = xxxx.xxxx.xxxx
06-03-2008 12:56 PM
To get all hosts in "your" broadcast domain to process the "frame", you need to use a destination MAC address of "ff:ff:ff:ff:ff:ff".
It is this address that conveys to all NICs that receive it, that it is addressed to them, and that they need to process it (strip off the frame, process the packet within).
A Layer 3 broadcast "within" your network would use an IP address of 255.255.255.255, which you will note is not routable.
A "directed" Layer 3 broadcast needs to be delivered to the destination network, and therefore needs to be routable (e.g.: 192.168.1.255).
A "directed" broadcast sent from your host would need to use the destination MAC address of your first-hop router in order for the router to deliver the broadcast to the destination network.
Presumably, when the directed broadcast is placed on the destination network by a router with a connected interface, the destination MAC address would be "ff:ff:ff:ff:ff:ff", in order to get all the hosts on "that" network to process the frame.
06-04-2008 05:26 AM
For Instance lets look at DHCP.
If your host gets its address etc from DHCP, then when you boot up you will send a frame (layer2) with a destination address of ff:ff:ff:ff:ff:ff, in that frame will be an IP datagram with a destination address of 255.255.255.255 and a source address of 0.0.0.0 (cause you don't have an address yet). The frame will have your nics MAC as its source. This packet (frame and datagram) is a broadcast which "can" be forwarded by your router if it is configured to forward DHCP (which most routers "can" be configured to do). It will use UDP ports 67 and 68 and if you look into the DHCP protocol you'll find your hosts MAC address as well
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: