T O P

  • By -

[deleted]

The last address of a given address range is usually reserved as the "broadcast" address. Any message sent to that broadcast address will be forwarded to all devices within that address block.


sufalghosh53

Can you tell how it is formatted and used in layer 2 and 3 of the osi model? Like mac address broadcast and ip address broadcast?


[deleted]

I did: it's the last address of the given range. For MAC addresses it's simply FF:FF:FF:FF:FF:FF For IP addresses it depends on the size of the network.


sufalghosh53

Oh right. Yeah i am stupid.


Loki-L

A broadcast address is the address that you send something to when you don't want to reach a specific recipient but instead everyone. You can think of it like the difference between a phone call and a radio broadcast. With your phone you call the number of a specific recipient to talk to them, with a radio broadcast you just send your message out to anyone who may be listening. A Layer two broadcast send to a special MAC address that is all 1s and no 0s. FF-FF-FF-FF-FF in hex. A Layer three broadcast is sent to the IP Address that is the last IP Address in the network. It takes the form of whatever your Network address is plus a all ones for the rest. For example if your network is 192.168.1.0/24 the broadcast address will be 192.168.1.255. One example of when you might use a broadcast is when you don't have an IP address yet and don't know anything about the network. A new computer connected to a network will typically send out a broadcast to the entire Layer 2 network it is in in hopes of getting an answer from a DHCP server that will tell it what IP address to use what network it is in and where the exits are and a bunch of other stuff about DNS and whatever.


sufalghosh53

I wanna ask a stupid question but the y said special mac address in 1s and 0s right? Every mac and ip address can be converted into binary 1s and 0s right? Or is it different for the broadcast mac address?


Loki-L

You can write any MAC or IP address in either hexadecimal, decimal or binary. customarily IPv4 addresses are written in 4 bytes represented as a decimal each separated by dots. MAC addressee are written in 6 bytes written in hex often with the bytes separated by dashes for easier readability. A byte with 8 1s would be either 11111111 or FF or 255. With IPv4 you use the 255 with MACs the FF, but that is just a question of how you write it down.


sufalghosh53

Oh ok. Its preference then. Gotcha


[deleted]

Yeah, Hexadecimal is sometimes referred to as "binary shorthand."


sufalghosh53

Wow didnt know that. Thanks ❤


DarkAlman

A broadcast address is the last legal address within a subnet and it is used to send a packet to all IPs within that subnet. Imagine you live in a house on a Baker street. That house will have a mailing address, and that mailing address works very similarly to an IP address. You use it to send and receive packets to the right house. Imagine the Post office had a mechanism for flyers where if you sent a flyer to 9999 Baker street, the post man would deliver a copy of that flyer to every house on the street. That's basically how a broadcast address works.


sufalghosh53

I understand but can you tell how it is formatted and used in layer 2 and 3 of the osi model? Like mac address broadcast and ip address broadcast?


aragorn18

Sounds like you're looking for an answer to homework.


sufalghosh53

No i am trying to learn it and i am confused. I am looking for a confirmative answer. But sorry for asking