20 December 2008

SENDING BROADCAST MESSAGES

there is a whole class B range of IP addresses reserved for private (LAN) use
which is 192.168.x.x so u can theoretically have up to 65536 comps in a LAN, but
of course some IPs are reserved, such as 192.168.x.0, and 192.168.x.254 is
usually for gateways or who knows what else, and 192.168.x.255 to broadcast to
the whole network.

the US Robotics router i have happens to use a fixed 3rd byte
of "123" so my lan can only have 256 (minus the reserved IPs) computers on it.
my 2 comps are 192.168.123.1 and 192.168.123.2, and in a DOS prompt i can type
net send 192.168.123.2 "hello world" (or use any aliases such as Localhost or my
"computer name" in place of the IP of course) from any comp on my lan and it
will pop up a box on my specific computer as long as i have a prog running that
handles "net send" messages. i'm not sure about all the windows OSes but i know
that in win98 the program is called winpopup.exe (if u dont have it u need to go
into Add/Remove Programs in the control panel, go to the Windows Setup tab, and
select WinPopup from Accessories or something) and in winXP they are handled by
Windows Messenger (which is installed and runs as a service by default in
winXP--so people that dont know anything and don't have firewalls, etc can
recieve the popups if they haven't configured Messenger on their pc yet! i used
to get a few spam messages a day when i had my firewall off).

ok, so now we know how to send the messages and what progs recieve them....but remember i said that the fourth byte of 255 in an IP address broadcasts to the whole network (or the
whole class C that you specify in the 3rd byte)? there u go! try it in
school...get a DOS shell up and type in net send 192.168.x.255 "screw you all"
or something...don't forget the quotes around the text. if u forget the syntax
just type net send help or net send ? and it will tell you.

To find out what to put for the 3rd byte of the IP u could probably type ipconfig in DOS or winipcfg in windows and look at the 3rd byte of your own IP Address and of the Default
Gateway. if they are different, i would suppose that the Gateway would be the
address for true "broadcasting" i.e. the whole LAN but i don't really know.
oh yeah, by the way, u can send messages to external computers and stuff too,
you're not restricted to sending within your LAN. just use an IP address or
hostname or whatever.

Lifehacker