Setting Up SLiRP For Load Balancing: Compiling: Once you download SLiRP and unpack it over on your shell account, you can begin the process of compilnig SLiRP for Load Balancing. This really isn't very difficult, you can refer to the SLiRP docs that come with the source code or just follow these simple instructions: - Run ./configure from within the source directory. It will create the file 'config.h'. - Enter this file with your favorite editor and find these two lines: #define MAX_INTERFACES 1 #define MAX_PPP_INTERFACES 1 and change the value of '1' to how many devices you will be using. (I have two modems/lines so it is 2). We can't use PPP so it is up to what you do is up to you. - Now just 'make' and everything should compile nicely. Setup Copy SLiRP out to your home directory (or wherever you want it) and type the command: chmod +x slirp Now we are ready to setup the resource files needed by SLiRP. I have found that the info in the SLiRP documents work well so I am just going to elaborate on that info. First you need to create a general file called '.slirprc'. This file has information that is relevant to 'general' slirp issues (ie not connection specific). For example: Port redirections (see docs). The only command specific to Load Balancing needed in this file is 'socket'. This is my .slirprc file: __________________________________________________________________________ socket mru 552 mtu 552 __________________________________________________________________________ Next you need a .slirprc-x file for each connection you will be making to SLiRP. I have two: .slirprc-0 (1st connection) and .slirprc-1 (2nd). They both look like this: __________________________________________________________________________ baudrate 115200 to_write_max 2048 __________________________________________________________________________ NOTE: These values reflect that I am using two 28.8k/33.6k modems. You might want to set these values lower for slower modems. Testing The Setup Basically that is everthing needed on the 'server' side of the setup. Verify your setup with this: 1. Start slirp (slirp or ./slirp) - You should get some info on the status of SLiRP. If you are dumped to a command line then something is wrong. 2. Put slirp into the background with five '1''s (one every second). 3. You WILL be on a command line. 4. Try starting the second connection to slirp with: 'slirp -l 1' (That is slirp -l (as in LIMA) 1 (number 1)) 5. You should get something saying that SLiRP is 'Attached as Unit 1'. 6. If that works then you are set. Now kill slirp with five '0's. Final Notes: I have this additional 'server' side script that I use in conjunction with the Windows 95 scripting tools. When Windows 95 brings up your connections, it uses the SAME script for each connection. This doesn't work with slirp because based on if it is your first or second connection, you have to type two different things. So to totally automate the connection process I have this script (you'll understand the significance of it after messing with writing a dial-up Win95 script). #!/bin/bash if [ $(ps | grep -c "slirp -l 0" -gt 1 ]; then slirp -l 1 else slirp -l 0 fi I called the file 'dual'. (So the final command in my Win95 dial-up script is 'dual'. The script judges to see if a connection is already active and takes the appropriate measures). _________________________________________________________________ The views and opinions expressed in this page are strictly those of its author. The contents of this page have not been reviewed or approved by the University of St. Thomas. Authors assume responsibility and liability for the content of their documents. Send comments/feedback to csclub@csclub.stthomas.edu and matt@csclub.stthomas.edu