PCroute - an IP routing program from the IBM PC Vance Morrison morrison@accuvax.nwu.edu Traditionally IP routers have been fairly high performance, expensive machines. Typically they run about $5000-$10,000 a unit. Until now a IP router for under $5000 was just about impossible to get. Recent developments in PC hardware, however, has made it possible to convert a PC to an IP router for a TOTAL of $800 a unit. This price is less that the cost of many ethernet boards and thus it now makes sense to always use dedicated router to perform IP gatewaying functions. --------------------------------------------------------------------- What is PCroute? PCroute is software written for an PC/XT (or AT) or clone that will allow it to act as a IP router. At present the following interfaces are supported. Ethernet - (WD8003E card) (recommeded no more than 4 interfaces) Starlan - (WD8003S card) (up to 6 interfaces) Localtalk - (Apple localtalk card for the PC) (1 interface max) SLIP - (COM1..COM4) (recommeded no more than 2 interfaces) One of the most common configuration for the router is as an ethernet-ethernet router, but this is not the only configuration possible. The software supports up to 6 interfaces of varying types, so many many configurations are possible. Exact details on what is possible is explained in the installation/compilation manual In addition to the XT, the only other hardware needed are the networking cards, which at present run about $225 a piece (for ethernet). Since you can buy an XT (10Mhz, without an monitor) for $350, the total cost for the hardware is $800 --------------------------------------------------------------------- What do I need to install PCroute? 1) An XT computer (does not need monitor) with a floppy 2) The proper interface cards Ethernet : WD8003E Ethercard Plus Starlan : WD8003S,WD8003SH Starcard,Starlink Plus Localtalk: Apple localtalk PC card SLIP : COM[1-4] ports NOTE: the WD8003E 8-bit ISA NIC is part of the NE2000-class (like the NS DP8390, Realtek 8019, or Realtek 8029). --------------------------------------------------------------------- How Fast is PC route? Some may argue that a PC simply is not fast enough to be a good IP router. For slow networks (Localtalk SLIP) this is not really an issue. For Ethernet it is a real concern. Luckily, in the case of Ethernet (and starlan), the Western Digital cards do a lot of the work. All the input packet queuing is done by the card, freeing the PC to do the routing task. By programming in assembler and optimizing for peak efficiency (the main loop has NO procedure calls), the PC is up to the task. Actual tests indicate that that following formula is a worst case estimate of the throughput of PCroute on a 4.77Mhz XT (based on actual measurments). packet_delay = .51 + .00406 * len msec Where 'len' is the length of the packet in bytes. Thus PCroute has a fixed per packet overhead of .51 msec and takes .00406 msec/byte to transfer the packet from one network to the other. Thus for the largest packet size (1514) we get throughput of packet_delay = .51 + .00406 * 1514 = 6.65 ms throughput = len*8/packet_delay = 1.8 Mbit/sec For the smallest packet size (64) we get a throughput of packet_delay = .51 + .00406 * 64 = .77 ms throughput = len*8/packet_delay = .66 Mbit/sec If you are going to by the XT needed, please buy a clone (without a monitor) with a 10Mhz CPU speed (cost < $350). This will almost double the throughput measured above. If you need more speed you can go with an AT clone and a even faster CPU speed. Here are some actual measurements of packet speeds for some common machines. per packet per byte Packet rate Throughput delay delay (64bytes) (1500 bytes) ----------------------------------------------------------------------------- 4.77 Mhz XT | .51 msec .00406 msec 1300 /sec 1.8 Mbits/sec 10 Mhz XT | .237 msec .00254 msec 2500 /sec 3.0 Mbits/sec 6 Mhz AT | .169 msec .00228 msec 3200 /sec 3.3 Mbits/sec 12 Mhz AT (est)| .100 msec .00220 msec 4150 /sec 3.5 Mbits/sec 16 Mhz AT | .050 msec .00190 msec 5800 /sec 4.1 Mbits/sec As you can see, at the high end, the PCrouter can sustain a thoughput of close to half the BANDWIDTH of a ethernet (remember 5Mbits of sustained load is a HEAVY load for an ethernet). Also remember that this is packets routed THOUGH the router. Thus even if 4/10 of the ethernet bandwidth is being used (that is your ethernet is HEAVILY loaded) and ALL that traffic is going though the router, PCroute can still keep up. Note also that the throughput measurements are based on packet delay. This tends to underestimate the thoughput of the router since it ignores the fact that there are in fact three processes in the router that are doing work concerently. Thus the router can actually handle slightly more traffic than what the above figure would indicate. In addition the Ethernet boards have an on-board 6.5K packet input buffer. Thus packets that come at the PCrouter too fast for it to process will be queued. This queueing happens on board and can keep up with the maximum 10Mbit/sec bit rate. Thus the router will start dropping packets only after this 6.5K buffer is exhausted. Note that since SUN NFS likes to send 8K blocks in fast spurts this will sometimes cause the router to drop packets (since this is larger than the input queue buffer size). If you are running NFS through the router, I suggest that you set the NFS block size down to 4K for file systems that are mounted though the router (look for 'rsize' and 'wsize' in man fstab). We use NFS quite heavily here at NU and as long as rwize and wsize are set to 4K we have no problem. --------------------------------------------------------------------- What about SLIP speeds? PCroute also supports up to 2 serial lines in addition to the other interfaces. These lines can operate at all the common baud rates up to 19.2K. In PCroute with a faster processor (10Mhz XT or an AT clone) can handle 38.4K or even 57.6K. All of this using the standard 8250 serial ports. Note because PC serial ports interupt the processor on EVERY character SLIP consumes a fair amount of the CPU. On a 4.77MHZ XT the interupts for two SLIP ports running at 19.2K Baud consume about 1/2 the available CPU time. (actually measurements show that two slip lines running full tilt at 19.2K consume slightly less than 1/2 the CPU). Thus packet delays will double. Obviously the situation gets better as CPU speed increases. On a 12Mhz AT interupts consume less than 1/10 of the CPU. --------------------------------------------------------------------- What is localtalk support? PCroute supports IP inside of localtalk (appletalk). This allows you to send IP packets though localtalk nets. Since localtalk can be sent over twisted pair (phonenet) large distances (5000 ft with a star controler), this method has many of the advantages of SLIP and is a higher speed solution. In addition any MACs on the localtalk network that have MacTCP can access the IP network. Note, however that PCroute does NOT support encapuslating appletalk in IP (thus Ushar and CAP will not work), and does NOT support dynamic IP address assignement. --------------------------------------------------------------------- What PC route supports? PCroute was designed to be a fully functional IP router. In particular it supports 1) IP routing with Subsets (however the subnet mask must begin with 255.255) 2) Static routing with up to 250 routes. 3) responds to ICMP echo (ping) 4) Sends ICMP TTL, Redirect, Unreachable when appropriate 5) Fragmentation where necessary 6) RIP dynamic routing protocol 7) Up to 6 interfaces of varying types 8) Error logging using BSD syslog 9) Optional proxy ARP 10) Bootp forwarding Note that although the software supports up to 6 interfaces, the total throughput of the router is fixed by the speed of the processor. For fast boards (ethernet) this gets excessive after 4 interfaces are installed. --------------------------------------------------------------------- What PC route DOESN'T support? 1) Ethernet cards besides WD8003E. It is possible to write the driver code for other cards, but I personally have no desire to do so. --------------------------------------------------------------------- Wish List These are things that I would like to add to PCroute, but it looks like I will not have the time. 1) SNMP support. Everybody wants SNMP support. Well there is nothing that says PCroute can't have it. I have written the code with this support in mind. In addition, some people at CMU have already written the hard part of SNMP and all that would be necessary is to graft that code onto the various databases inside PCroute. I think this would take about 1-2 months of half time progamming effort. 2) Any other interface that someone might what (T1 or X.25 for example). PCroute has been designed to make this addition relatively simple. --------------------------------------------------------------------- Hints 1) We found that the 10Mhz XT clones that Jamco and others sell work very well. One nice feature about these units is their BIOS. By setting the dip switches in the PC, you can tell it that there is no Monitor. This also tells the BIOS not to check for a keyboard either. Thus you don't need to buy either the keyboard or the monitor. Other XT BIOS ALWAYS check for the keyboard, and thus you have to plug it in even though you never use it. --------------------------------------------------------------------- Reliability The reliability of PCroute has been EXCELLENT. We have been using these routers for months now in ten places with absolutely no failures. If you wish to PING one for yourself here are some PC routers on our campus 129.105.49.13 129.105.1.1 129.105.7.1 --------------------------------------------------------------------- Comments and Bug reports I am interested in finding out what you think of PCroute and how well it performs for you. I am also interested in hearing about any problems you have or bugs in the documentation. You should send your comments to Vance Morrison Note that since I am not paid to support this software, I can not guarantee that I can respond to your problem, but I will try. Vance Morrison Northwestern University