<h2>The BBN-Gurwitz TCP/IP Unix for the VAX</h2>

<h3>Introduction</h3>

In the second half of 1980 the decision was reached to move Arpanet from NCP to TCP/IP exclusively as per 1 January 1983, "Flag Day". During the transition years 1981 and 1982 the two protocols woul co-exist. See IENXX for the envisaged time table.

It required that TCP/IP software be produced for the about 30 different types of host operating system in use on the Arpanet at that time. The majority of the Arpanet hosts were DEC PDP-11's and PDP-10's and it was clear that by 1983 many sites would have moved to the VAX and Unix for their future needs (the Arpanet was exclusive to government and education, two strong markets for both DEC and Unix).

DARPA went on to fund the creation of a TCP/IP enabled VAX Unix, which was created between December 1980 and April 1982. This implementation was probably the first full scope implementation of the "modern" TCP/IPv4 specification (i.e. RFC791-793).

<h3>Source</h3>

Six snapshots have survived of the BBN-Gurwitz source code, five of which cover the period January 1981 to November 1982. The BSD source repository contains a version from 1985.

The version in the Tree is based on the beta-distribution from November 1981 combined with the November 1982 TCP/IP update. The Archive contains all surviving snapshots.

<h3>Emulation</h3>

There is currently no online emulation for this version of Unix.

<h3>History</h3>

<h4>DARPA funds 4BSD development</h4>

At the end of 1979 a group of Berkely grad students around prof. Fabry had produced 3BSD, which added demand paged virtual memory to Unix/32V. Based on this achievement, in April 1980 DARPA decided to fund Bob Fabry to produce an enhanced version tailored to DARPA's needs, such as job control, better performance and networking support. With this funding Fabry creates CSRG.

4BSD was delivered in November 1980 but performance still lagged VMS. After a round of tuning 4.1BSD was released in June 1981. This was to be followed by 4.2BSD with a more performant file system and support for TCP/IP based networking, all in time for Flag Day.

<h4>DARPA contracts with BBN for the TCP/IP implementation</h4>

Also in November 1980, DARPA contracts with BBN to write the TCP/IP stack for 4.2BSD. This seems a logical choice, as BBN had all the expertise on TCP/IP and interoperability and the specifications were still undergoing change, e.g. ICMP had not been specified yet when the contract was granted. It may also have seemed prudent to spread the workload.

BBN assigned Rob Gurwitz as the chief designer of the new TCP/IP stack. Early in 1980 BBN had already ported the NCP Unix code to 32V and moved it to 3BSD later in the year. The system was then upgraded to 4BSD and Rob started work on an all new network stack. He describes his design and plans in in December 1980.

At a very abstract level his design is similar to that of NCP Unix, but adapted to TCP and optimized for the much larger address space of the VAX:
  *  Network buffers are expanded from 64 bytes to 128 bytes and are now drawn from the virtual memory paging pool, not the disk buffer pool; the header is enlarged to cater for linked messages and prepending headers.
  *  The connection state machine is moved from a co-operating kernel and user process to a single kernel process, improving performance and simplifying management of connection state data.
  *  The state machine is in part driven by a "work queue", reminiscent of the messages passed to/from the earlier NCP daemon.
  *  As in NCP Unix the impact on the stock kernel is minimized, enabling largely parallel development of both functionalities; this resulted in a very similar user level API -- this may also have been driven by a wish to facilitate the porting of existing network software.

Rob writes in IEN168: <i>The large address space of the VAX makes  this  organization practical  and  allows  the  avoidance of expedients like the NCP split  kernel/user  process  implementation,   that   have   been necessary  in  previous UNIX networking software on machines with limited address space, like the PDP

Interestingly, Haverty's await() and capac() are considered for inclusion in 4.2BSD; Rob writes: <i>It is  expected  that  the  await/capacity  mechanism,  currently available  for  Version  6  systems, will be added to the VM/UNIX kernel in the near future. These non-blocking I/O  modifications will be supported by the network software, relieving the blocking restriction.</i>

In the CSRG archives four snapshots of the development of this code base have survived. Below is a description of those four snapshots. Probably there was more code sharing between BBN and CSRG, but that has not survived to the present day.

<h4>Development process</h4>

Only a few weeks after the initial design paper, towards the end of January 1981, a first implementation is ready and a first snapshot of the TCP/IP stack is sent to CSRG. This first code is not quite complete (e.g. interface addresses are hardcoded) and of course needs further testing. It has no code yet for ICMP: that is not broken out from GGP yet and its specification will only be completed in April 1981. By May 1981 the code would seem to be in early beta shape, but development stalls as there is apparently a gap in funding from DARPA.

In August 1981 a second snapshot is sent to CSRG. {check: is this now based on 4.1BSD?}.

In November 1981 a third snapshot is produced and this time it is a beta of a full distribution tape. Next to the kernel code, it also contains a full suite of user level programs, network management programs and man pages. The code now supports ICMP, but there is no code for UDP yet.

Then in January 1982 a fourth snapshot is sent, with an update of the kernel code. This is the first snapshot that supports both TCP and UDP and is nearly production ready.

<h4>Controversy and independent release</h4>

It had been the intent that CSRG would take the BBN code more or less as-is and integrate it in the 4.2BSD source tree. In fact, this is not materialized. Despite being DARPA funded, CSRG seems to have felt that support for TCP/IP and Arpanet was too narrow a scope and wanted code that would support multiple network protocols in parallel. Perhaps influenced by the 4BSD experience, CSRG also had a strong focus on performance over local area networks; this had been a secondary consideration for BBN.

In order to achieve this CSRG massively refactored the BBN code, and created new API's, both at the network interface and the user level. The kernel network process was replaced by a system of software interrupts. This effectively forked the code.

With Flag Day approaching and lots of end user testing and porting still to be done, the Arpanet community was in need of practical solution and in April 1982 BBN and DARPA decide to release the BBN implementation as an independent product, available to all 4BSD licensees for a handling fee of $300. It is taken up by some 30 {?} sites, which is a high proportion of the VAX/Unix Arpanet user base at that time.

CSRG releases a preliminary version of its code as 4.1a BSD in May 1982 {?} and follows-up with 4.1c BSD in December 1982, as Flag Day looms. The final version of 4.2BSD is released in September 1983.


<h3>Legacy</h3>

<h3>Further reading</h3>