home *** CD-ROM | disk | FTP | other *** search
-
-
- INSTALLATION of PCROUTE
-
- Installation of PCroute consists of essentially four parts.
-
- 1) Compiling the software
- 2) Setting up the hardware.
- 3) Configuring the software.
- 4) Testing.
-
- This section tells you the 'theory' behind the installation
- process. Files of the form *.EXA are example installations of
- precompiled PCrouters provided with this release.
-
-
- 1) COMPILING THE SOFTWARE
-
- PCroute can have as many as 6 network interfaces attached
- to it, however, for efficiency reasons, the number and type of
- interface must be COMPILED into the code. For convenience, PCroute
- is distributed with compiled version of the following
-
- Ethernet (WD8013E) - Ethernet (WD8013E) called wd13wd13.exe
- Ethernet (WD8003E) - Ethernet (WD8003E) called wd03wd03.exe
- Ethernet (PKT DRV) - Ethernet (PKT DRV) called pktpkt.exe
- Ethernet (PKT DRV) - SLIP (PKT DRV) called pktslip.exe
- Ethernet (WD8003E) - SLIP (WD8003E) called wd03slip.exe
-
- If any of these are the configuration you want, simply rename the
- proper one to 'pcroute.exe' and go on to step 2. Note that starlan
- cards will work in code compiled for the WD8003E card, but works
- better if a version of the code is specifically compiled for the
- WD8003S card.
-
- If you need to recompile, you will need TURBO assembler 1.0.
- MASM does NOT work, for reasons I have not looked into. If you want,
- you can try porting it but since Turbo assembler cost only $69, it
- is probably not worth porting.
-
- Before you compile and link the code, you must first declare
- how many and what types of interfaces the router will have. You do
- this by modifying the DECLARE.INC file. No other files need to be
- changed! For most configurations, it is just a mater of uncommenting
- the right declarations. The general case, however, requires some
- understanding of DECLARE.INC. For a full discussion on this, see
- the document COMPILE.DOC.
-
- After you have modified DECLARE.INC simply compile and link
- the files as shown below.
-
- TASM /KS170 *.ASM
- LINK
-
- LINK invokes the LINK.BAT file, that contains (the rather long)
- turbo link command.
-
- --------------------------------------------------------------------------
- 2) HARDWARE SETUP
-
- Hardware setup simply involves getting the proper networking
- cards, jumpering them properly, and installing them in the PC
- to be used as a router. Note that PCroute only requires less
- than 128K of RAM itself, so 256K PCs are fine (more memory
- buys you NOTHING!).
-
- The type of cards, and the jumper settings for them are all
- determined by the declaration in DECLARE.INC. In addition each
- interface is given a number (starting with one) based upon its
- order in DECLARE.INC. This number will be used below when we
- configure IP addresses.
-
- WD8003 Cards (Starlan or ethernet)
-
- There are only two settings that have to be made on each
- of the WD8003 Cards. The first is configuring it for THICK/THIN
- ethernet, and the other is the I/O address of the card (interrupts
- are not used so the Interrupt number is irrelevant, as long as
- it does not conflict with other hardware).
-
- Refer to the DECLARE.INC file to determine the I/O addresses
- for the ethernet cards. In DECLARE.INC there will be a line
- WDE_DECLARE (for ethernet) or WD_DECLARE (for starlan) for each
- card. The second parameter on this line is the I/O address of
- the card. Set jumpers on the respective card to agree with this
- number. For precompiled routers the first WD8003 card has I/O
- address 280H, and the second (in the case of the ether-ether router)
- has I/O address 2A0H.
-
- Also make sure to make sure the card is configured for the
- correct type of ethernet. From the factory these cards are
- configured for THIN Ethernet (BNC connector), if you are not using
- THIN Ethernet (That is you are using the 15 Pin DSUB connector),
- you will need to change a bank of jumpers. Refer to the manual
- that came with the card on exactly how to do this.
-
- If you are using a 6Mhz AT (and only a 6Mhz AT), you should
- set one more jumper on the wd80003e. This jumper determines the
- number of wait states used when accessing the shared memory and
- for a 6Mhz AT the default is not optimal. Consult the Manual that
- came with the Ethercard for more details.
-
- SLIP AND PACKET DRIVER USERS: Since SLIP and Packet drivers
- both use interrupts, if these are used it is VERY important that
- the WD8003 cards are jumpered so that their IRQ does not
- conflict with the ones used by SLIP or the card used with the
- packet driver. You may set all the IRQ's of the WD8003 cards to
- the same IRQ, but this must be different from the IRQs used by
- any other hardware. Since COM2 uses IRQ 3 and many popular cards
- use IRQ 3 by default, some care is required to avoid a conflict.
- On an XT IRQ 2, 3, 4 are not used by standard hardware. In
- addition, if the PC does not have a hard drive CONTROLLER IRQ 5 is
- also available. COM1 uses IRQ 4 and COM2 uses IRQ3. Keep this in
- mind when choosing Interrupts for your cards.
-
- Packet Driver Hardware
-
- For those who are unfamiliar with Packet drivers, a packet driver
- is a software spec designed by FTP software et al that hides
- the hardware dependencies of networking cards. The idea is that
- you write your software to work with the packet driver, and then
- it will work with any networking card that is supported. Information
- on the packet driver spec as well as packet drivers for many common
- network cards is available from sun.soe.clarkson.edu (128.153.12.3).
-
- PCroute is able to run using the packet driver software interface.
- Note however that there is a heavy performance penalty to pay.
- PCroute will forward packets at only 1/3 the speed of a native
- interface. Still for may applications this is acceptable (certainly
- if one of the interfaces is SLIP).
-
- Packet drivers are accessed through a software interrupt. This
- interrupt number as well as hardware information is passed on the
- command line of the command that loads the packet driver. PCroute
- expects a different packet driver for each card using the packet
- driver. The software interrupt PCroute uses is on the PKT_DECLARE
- line in DECLARE.INC. Default interrupt numbers are 60H for the first
- packet driver and 61H for the second (if present).
-
- Thus the only thing PCroute cares about is the software interrupt
- number. All other hardware configuration is arbitrary as long as
- it does not conflict with anything else and that the packet driver
- and the hardware agree on it.
-
- Localtalk Card
-
- PCroute does not directly access the Localtalk card. Instead it
- goes though the driver that comes with the card (ATALK.EXE).
- For this reason PCroute can only support one localtalk interface.
- The card should be configured as specified in the manual that
- came with the software driver. The only concern is that there is
- no conflict (in I/O address or IRQ level and DMA channel) with any
- other cards. The driver (ATALK.EXE) also must be loaded BEFORE
- PCroute is run.
-
- Slip Cards
-
- The SLIP interfaces use a standard COM port for a network interface.
- The maximum number of SLIP interfaces is not limited directly by
- the PCroute software. Ultimately there are two factors that
- limit the number of interfaces. First, many cards can only be
- configured to be either COM1 or COM2. Clearly if you only have
- these cards, only two interfaces can be supported. Other cards
- allow COM3 and COM4, but do not allow you to choose IRQ lines
- other than 3 and 4. Since each SLIP line needs its own IRQ,
- these cards are also a problem. Finally, standard COM ports place
- a heavy interrupt load on the CPU at high baud rate. at 19.2K
- 50% of the CPU of a 5Mhz XT is used in handling interrupts. Thus
- a 10Mhz XT or better is recommended for supporting 2 serial lines
- and a 12MHz AT clone is recommended for 4 serial lines. If you
- are buying serial cards, I recommend buying ones with the 16550AF
- chips in them. These chips have FIFOs in them that will cut
- interrupt overhead by 10 times! With these cards a 5Mhz XT would
- have no problem handling 4 serial lines.
-
- Like the ethernet cards, the COM cards must be configured so that
- they agree with the declarations in DECLARE.INC. The precompiled
- version of PCroute is compiled to work with the COM1 PORT (I/O
- address 3F8H, IRQ = 4). Set the jumpers for each COM port
- appropriately. Note that each COM Port needs its own IRQ line.
- Thus make very certain that no other hardware you are installing
- conflicts. Standard PC hardware (disk, cpu), does not use
- IRQ 2,3 or 4, so these are prime candidates. IRQ 5 is also
- available if there is no hard drive controller in the PC.
-
- -------------------------------------------------------------------------
- 2) SOFTWARE SETUP
-
- A) Creating a PCROUTE.CFG file
-
- All the configuration data that PCroute needs is in a file
- called 'pcroute.cfg'. To ease programming of PCroute, this file
- is NOT an ascii file. Instead, it is a binary file, and there
- is an program called 'config' that edits/creates this file.
-
- Thus the procedure to configure PCroute is to run config in
- the directory that PCROUTE.EXE is in. Config then looks in
- PCROUTE.EXE and determines how many and what type of interface
- information is needed. It then prompts for this data. Among the
- data config will ask for is
-
- For every interface it will ask for
- IP address - self explanatory
- Subnet mask - MUST begin with 255.255
- Flags - Meaning below
-
- Every interface on IP network must have a unique IP address.
- In addition IP has two level hierarchy in its addressing. Of the
- 32 bits in a IP address, a certain number of bits is considered the
- 'network' part of the address and the others are the 'host' part.
- IT IS A REQUIREMENT that all hosts on the same network (ethernet)
- have the same network part. Originally, the network part was
- encoded into the IP address itself for example if the IP address has
- the form
-
- <0-127>.X.X.X Network part first 8 bits (Class A)
- <128-191>.X.X.X Network part first 16 bits (Class B)
- <192-223>.X.X.X Network part first 24 bits (Class C)
-
- It turned out that this encoding schemed was too limited, so a
- 'subnetting' mask was added. Every bit in the subnet mask that
- is a '1' implies that this bit in the IP address is part of the
- network part of the address. Note, however, that the subnet mask
- have several restrictions
-
- 1) Subnet masks can only cause bits that would have been
- interpreted as the host part to be interpreted as the network
- part. Thus a class A number MUST have a subnet mask of the
- form 255.X.X.X, a class B number 255.255.X.X and a class C
- number 255.255.255.X.
-
- 2) PCroute network masks must ALWAYS have the form 255.255.X.X
-
- 3) A subneted network MUST have a consistant subnet mask. For
- example, let us assume IF1 has IP address 129.105.1.2
- and network mask 255.255.255.0, then if IF2 has IP address
- 129.105.3.1, then it MUST also have the mask 255.255.255.0.
- This is because 129.105.1.2 and 129.105.3.1 have the same
- network part, 129.105 (as determined by the number's Class)
- thus they must have a consistant view of how that network
- is subnetted, and thus the same network mask.
-
- Flags - This is a HEX number that determines several configuration
- options for the interface. In a 'standard' networking
- environment FLAGS=0 is a good choice. If you don't know about
- networking, a 'safer' choice is FLAGS = 0BH.
-
- Bit 0 - Don't send routing (RIP) info out this interface.
- See RIP.DOC for more information about RIP and how to use it.
-
- Bit 1 - Don't listen to routing (RIP) info from this interface.
- See RIP.DOC for more information about RIP and how to use it.
-
- Bit 2 - Proxy Arp on this interface. Normally the router will
- only respond to ARP requests for itself. With this option
- turned on, it will reply for itself and any IP address such
- that that is in the same network as the interface, but NOT
- in the same subnet (For example if the interface was
- 129.105.3.2 and the network mask was 255.255.255.0 then
- it would respond to any ARP asking for an address that begins
- 129.105 but does not begin with 129.105.3). This is useful
- if you have hosts that do not know how to subnet.
-
- Bit 3 - Disable Directed Broadcasts
- Normally it is perfectly legitimate for and IP host to send
- a packet the broadcast address of another network. The
- router on the destination network then broadcasts the the packet
- on behalf of the sender. Unfortunately, if you have hosts
- running old IP code that handle broadcasts improperly, these
- hosts will hear the broadcast and forward it back to the
- router, who in turns rebroadcasts it. This is called a
- broadcast storm, and will quickly saturate the network. To
- avoid this problem, you can disable directed broadcasts.
-
- Bit 4 - Disable Sending ICMP redirects
- Normally when a PCrouter receives a packet it has to route
- out the same interface the packet came in, it sends a
- redirect message to the sender. Many hosts ignore these
- packets, so this bit allows you to turn this feature
- off and conserve network bandwidth.
-
- Bit 5 - Broadcast using old (0's) format
- Normally when PCroute sends out an IP broadcast (sending RIP
- for example), it uses the 1's format. That is it fills the
- host part of the address with the number which when views
- as a binary number is all 1's. Old hosts use a simmilar
- convention, except they fill with 0's instead of 1's. Turning
- this flag on makes PCroute use the old format. NOTE THAT
- YOU ARE STRONGLY ADVISED TO USE THE NEW FORMAT IF AT ALL
- POSSIBLE. The reason for this is a conflict can sometimes
- lead to broadcast loops which quickly saturate the network.
- Also if you use this option you should also use option Bit 3
- (turn off directed broadcast).
-
- Interface Metric - This is a HEX number that determines the RIP
- metric to be added to routes going through this interface.
- A large number means that this is an undesirable (slow)
- interface. I recommend the following
- Ethernet interfaces metric 1
- Starlan interfaces metric 2
- Localtalk interfaces metric 3 or 4
- Slip interfaces metric 4
-
- Next the CONFIG program will ask you for interface specific
- information. In particular
-
- FOR LOCALTALK:
-
- Zone names: CONFIG asks you for a list of zone names
- that contain all the other PCrouter (or Macs using
- NCSA telnet). THIS LIST MUST INCLUDE THE ZONE OF
- THE ROUTER ITSELF (you can either use its full name
- or use the abbreviation '*' (the current zone))
- When PCroute needs to find and IP address, it looks
- in all of the zones listed here to find it.
-
- FOR SLIP:
-
- Baud rate: Slip allows you to configure the baud rate
- of each of the SLIP lines. Baud rates up to 19200
- have been tried. 38400 should work but has not been
- tried. Even 57.6K is possible, but that is the limit
-
- Many people like to 'cheat' and use the same network number
- for the serial line as they do for one of the other networks
- connected to PCroute. This may work, but it NOT RECOMMENDED.
- It is very likely to confuse PCroute in one way or another.
- Serial lines should be treated EXACTLY as if they where an
- ethernet. In particular the serial line should be given its
- own network number. If you don't have official network
- numbers to spare, you can simply use unused class C numbers
- (for example use 223.254.254.1 for IP address of PCroute on
- the serial line). Then add a Static route of
- 223.254.254.0 -> 223.254.254.1 with metric = 0 and flags = 1.
- This tells PCroute not to propagate this 'hidden' network
- via RIP.
-
- Next the CONFIG program will ask you for the static routes. For
- each static route CONFIG will ask you for
-
- Network number
- Gateway to send it to
- RIP metric (1-16)
- Flags
-
- 1) The network number looks much like a IP address except that
- it has zeros for the host bits. PCroute does NOT except host
- routes. The network number 0.0.0.0 has a special meaning,
- it is the default route. This route will be used as a route
- of last resort. Note that as far as RIP is concerned the
- default route is just another route.
-
- 2) The gateway it the host to send the packet to. It must be
- a host directly attached to a network the router is directly
- attached to (that is 1 hop away).
-
- 3) The Metric should be the number of 'hops' the network is away
- from the router. Note that this number can be inflated for
- less preferred routes (ie though slow SLIP lines for example)
- Note that this number MUST be 1 or more for any normal route.
- (the route mentioned above in the SLIP section is not normal)
-
- 4) The flag bits have the following meaning
-
- Bit 0 - Silent. This route will not be propagated via
- RIP, it will only be used for packet routing.
-
- Bit 1 - Transient. Normally any static routes are permanent
- and cannot be removed by RIP. By setting this bit
- you allow the route to be changed by RIP (which
- means this route will be expired in 90 sec if a RIP
- update does not come along)
-
- Static routes should be used SPARINGLY. Use RIP if you can,
- and you will save yourself a lot of work when your network
- grows. I have found it useful to put Transient Default route
- in the table with a metric of 15. This allows that router
- to operate to between the time that it is booted up and the
- time it receives its first RIP update. Because the route is
- transient, it will be replaced or deleted shortly thereafter.
-
- Next the CONFIG program will ask you for the address to forward
- BOOTP packets to. This can be a directed broadcast (and directed
- broadcasts are not turned off on all routers connected to the
- destination net). If you have no diskless machines booting across
- the gateway, just leave this value 0.0.0.0.
-
- Next the CONFIG program asks you to specify where and what kind
- of error messages it should print. It asks you for a
-
- 1) A syslogd host
- 2) A facility mask
- 3) A priority (0-9)
-
- 1) The syslog host is a BSD UNIX 4.3 system that is running
- the syslog daemon. This daemon listens for error reports
- and sends them to a person or a file (as directed by
- /etc/syslog.conf). PCroute logs errors to syslogd as
- facility 'LOCAL0' Thus by putting the line (on 4.3 systems)
-
- local0.debug /usr/adm/router
-
- and restarting syslogd, the daemon will log all messages
- from a PCrouter to the file /usr/adm/router.
-
- 2) The facility mask allows you to filter out messages from
- certain parts of PCroute. This is really only of use for
- specific debugging, and to this mask should usually be 0.
-
- 3) Error messages from PCroute are given priorities anywhere
- from 0 (Critical) to 7 (debug). By setting the priority
- low, you can filter out messages. In addition by specifying
- priorities above 8, you make PCroute log a status message
- every minute. This is useful in the beginning to make sure
- PCroute is still alive. For production system, you should
- set this value to 7 (everything but debugging).
-
- B) Create a Floppy to boot from
-
- At this point we are ready to create a floppy that will be
- used by the PC that will actually be the router. To do so create
- a bootable floppy using the FORMAT with the /S option. Do this on
- a low density drive it the PCrouter has a low density drive.
-
- Next copy the PCROUTE.EXE and PCROUTE.CFG files. If you are
- running any localtalk interfaces, copy the ATALK.EXE driver too.
- If you are using packet drivers, then you should also copy the
- driver to the bootable floppy.
-
- Finally create a AUTOEXEC.BAT file that will execute PCROUTE
- when the machine boots. If you are running any localtalk interfaces,
- the AUTOEXEC.BAT file should load the ATALK.EXE driver before
- running PCroute. If packet drivers are used, there should be a
- line in the AUTOEXEC file for each card used. Each line will have
- the hardware parameters for the card used as well as the software
- interrupt that PCroute will use. See PACKET.EXA for an example.
-
- ------------------------------------------------------------------------------
- 3) RUNNING and TESTING
-
- We are now ready to go. The machine has been installed with the
- proper cards and a bootable floppy with the software on it has been
- created. Insert the floppy into the PCrouter and try booting it up.
-
- 1) Pinging the PCrouter. Try pinging the PCrouter from a local host
- on a directly connected network.
-
- 2) Check the log file on the syslogd host. It should say the the
- router is up (unless you filtered out the message). Note that
- if the logging host is not on the local network and you are
- relying on RIP to provide routing, this message may not make
- it since PCroute will not know how to route it until it gets
- its first RIP update. By placing a transient default route
- as described above, you can be sure to get all the messages
- from PCroute.
-
- 3) If the router seems dead, remove the floppy and go to a PC.
- Look at the file PCROUTE.LOG on the floppy. This file was
- created when PCroute booted up. In particular check to
- see that the Ethernet address are reasonable and that the file
- ends with the message 'PCroute closing log file'.
-
- 4) If the PCrouter replies to the Ping, try pinging it from distant
- hosts.
-
- 5) Also try looking at the routing tables of host that are running
- RIP (routed, gated). See if the routes that PCroute is announcing
- are being picked up.
-
- Congratulations!! you just installed PCroute. If you have any NFS
- file systems mounted through the router and you are using cards with
- small shared memory (WD8003E), you should edit the /etc/fstab
- (or equivalent) and set the rsize and wsize parameters to 4K so that NFS
- will not send more than 4K of data in a quick spirt. (see readme.doc)
-
- ------------------------------------------------------------------------
-
- REFERENCES
-
- For those who are unfamiliar with IP ARP, RIP etc here are
- some good references.
-
- IP Tutorial - Internetworking with TCP/IP by David Comer
- available at your local bookstore
-
- RIP - rip.doc. Available most places RFC's are available.
- In particular it is available by anonymous ftp from
- uxc.cso.uiuc.edu (128.174.5.50) in dir RFC
- nic.ddn.mil (10.0.0.51) in dir RFC
-
-
- RFC - These are the definitive references for internet standards.
- They are referenced by numbers, and there is a master
- index that is updated periodically. The are available
- from (among other places)
- uxc.cso.uiuc.edu (128.174.5.50) in dir RFC
- nic.ddn.mil (10.0.0.51) in dir RFC
- Of particular interest might be
-
- TCP/IP tutorial - RFC1180
- Internet Quest/Ans - RFC1177
-
- IP protocol - RFC791
- IP subnets - RFC950
- ARP protocol - RFC1011
- ICMP protocol - RFC792
- UDP protocol - RFC768
- BOOTP protocol - RFC951, 1048, 1084
-
-
-