[comp.protocols.tcp-ip] Problems starting vv0 Proteon PROnet-10 driver

herber@bgsuvax.UUCP (08/04/87)

OK, this is a good one......

I have 2 4.3BSD VAXen on an ethernet using Interlan interfaces (il0) and 
a Proteon, PROnet-10 using Proteon pronet interfaces (vv0).  I have just 
changed from using class A address numbers (we didn't talk to anyone else 
in the world) to a class B Internet address using subnetting.  Everything 
worked all along with the class A addresses.

When I tried the following sequence of commands in /etc/rc.local,

ifconfig vv0 inet 129.1.1.1 netmask 0xffffff00
ifconfig il0 inet 129.1.2.3 netmask 0xffffff00 
ifconfig lo0 localhost

the ifconfig for the vv0 interface fails with an

"ifconfig: ioctl (SIOCSIFADDR): Can't assign requested address"

and the internet address is left at 0.0.0.0.  The netmast is correctly set
at 0xffffff00 though (see below);

# ifconfig vv0
vv0: flags=63,UP,BROADCAST,NOTRAILERS,RUNNING>
	inet: 0.0.0.0 netmask ffffff00
#

If I try the EXACT SAME ifconfig vv0 statement AFTER the initial failure,
it works and the address is correctly set at 129.1.1.1.

I then switched the order of the statements in the /etc/rc.local to

ifconfig lo0 localhost
ifconfig il0 inet 129.1.2.3 netmask 0xffffff00 
ifconfig vv0 inet 129.1.1.1 netmask 0xffffff00

and reboot, it works just fine the FIRST TIME........

ARGH!!!!!!!!!

I looked at the if_vv.c driver and the error is returned to the ioctl() that
is used in ifconfig to initialize the address.  The error is returned in
if_vv.c when the host node number on the board is not the same as that of
the host number in the address.  It looks to be some kind of a problem when
using the subnetting/netmask features.

Now that I found a combination that works, I will continue to use it but
I would love to hear someone's opinion (guess, even:-) of why this doesn't
work consistantly.
-- 

Steve Herber			CSNET herber@bgsu.edu
Sr. Systems Programmer		UUCP  ...!osu-eddie!bgsuvax!herber
Bowling Green State Univ.

fedor@DEVVAX.TN.CORNELL.EDU (Mark Fedor) (08/06/87)

	Here is a fix and explanation to the problem....
	This was posted to USENET some time ago, I get no credit
	for this fix, but I should get something for finding
	this article out of all the tons of News articles I
	have saved.... :^)

	Hope this helps!

	Mark

-----------------------------------
Article 3887 of net.unix-wizards:
>From: ron@BRL.ARPA
Newsgroups: net.unix-wizards
Subject: brl-vgr Bug Report
Message-ID: <4577@brl-smoke.ARPA>
Date: 13 Oct 86 23:15:30 GMT
Sender: news@brl-smoke.ARPA

Subject: Unable to set vv address on subnet
Index:	sys/vaxif/if_vv.c 4.3BSD

Description:
	Ifconfig returns an error when you try to set the address on
	the proteon when using subneting.
Repeat-By:
	ifconfig vv0 128.63.4.3 netmask 255.255.255.0
Fix:
	The vv driver checks to see if the local net part of
	address corresponds to the hardware address of the interface
	installed in your system.  The subnet mask can not be set
	before the address because the mask has to be tied to a
	particular internet address.

	The fix is to make the vv driver mask off all but the lowest
	eight bits of the address before making the validity check.
	This is OK since the device can only deal with eight local
	address bits.  In vvioctl:

                /*
                 * Attempt to check agreement of protocol address
                 * and board address.
                 */
		switch (ifa->ifa_addr.sa_family) {
                case AF_INET:
			if ((in_lnaof(IA_SIN(ifa)->sin_addr) & 0xFF) !=
			    vv_softc[ifp->if_unit].vs_host)
				error = EADDRNOTAVAIL;
			break;
		}
		break;