[comp.protocols.tcp-ip] Need help with TCP/IP broadcast address

ferencz@cwsys3.cwru.Edu (Don Ferencz) (09/08/88)

Hi there.

I have a rather specific problem dealing with the following variables
(those of you without any of these can safely go on):

We have the Wollongong group's Enhanced TCP/IP Package (WIN-3B) installed
on three AT&T 3B2/310 computers here in our department.  They are
networked with the campus Ethernet connection; and then on out to the
world.

The problem I have is trying to set the default broadcast address
with this particular version of TCP/IP -- the "ifconfig" does _NOT_
support the "broadcast" parameter; thus I am left to programming my own
"sockets" utility to change the default broadcast.  I have no
experience in sockets; however, I have succeeded in opening the
socket to perform an ioctl() to the "ni" driver.  Each SIOCGIFBRDADDR
(for Socket IO Configuration InterFace Get BRoaDcast ADDRess, I assume) fails
with the generic "Invalid Argument", errno = 22.  Is anyone
familiar with this particular package, and its caveats?  Has anyone
got an easier way to change the broadcast address?

This is _quite_ a special interest concern, I'm sure, so just
mail me.  Thanks in advance!

===========================================================================
| Don Ferencz                       |  "All the world's indeed a stage\   |
| ferencz@cwsys3.cwru.EDU           |   And we are merely players\        |
| Dept of Systems Engineering       |   Performers and portrayers"        |
| Case Wetsren Reserve University   |     -- Rush                         |
===========================================================================

mohsen@TWG.COM (Mohsen Mortazavi) (09/16/88)

Version 2.2 of The Wollongong's Group TCP/IP allows you to set the broadcast
address of an interface. The "ifconfig" usage message however did not list
"broadcast" as a vaild parameter. The usage message has now been corrected.
The man page for ifconfig lists broadcast as a vaild parameter.

The default broadcast address for hosts using Version 2.2 (BSD 4.3) is an 
address with the host part of all 1's which is in conformance with RFC 919. 
In 4.2 BSD, the broadcast address was the address with a host par
t of all 0s. 

If you have a mixture of hosts running the 4.2 and 4.3 based TCP/IP, it is best to use a broadcast address with a host part of all 0's which is recognized by
both. In order to do so you need to include an "ifconfig" command in 
/etc/rc2.d/S86win3b to set the broadcast address each time network is started.
You should include the "ifconfig" command after the "inetinit" in this file.
For example, if you have a host with an internet address of 80.0.0.1 you 
should include the following line in S8
6win3b:

	/usr/etc/ifconfig en0 broadcast 80.0.0.0

Where en0 is the interface, and 80 is the network. 

Mohsen Mortazavi
mohsen@twg.com