WANPIPE Router Configuration ---------------------------- Wan Ver. 1.1.0 1. Introduction ------------ WANPIPE WAN routers are combination of intelligent adaptor card, FreeBSD drivers and configuration and startup applications. WANPIPE provides a wan protocol and a network interface to the FreeBSD kernel which the kernel uses to route packets to and from remote locations. Thus, actual routing is performed by the FreeBSD kernel. 2. Before Configuration -------------------- WANPIPE wanrouter configuration consists of three files: i) meta configuration file (wanrouter.rc) ii) device configuration files (wanpipe1.conf) iii) interface files (eg: wpa_chdlc, wpb_fr16) Before starting WANPIPE configuration, decide which protocol will be used, PPP, Frame Relay, Cisco HDLC etc. Note how many WANPIPE cards you have in your machine. For each PHYSICAL LINK there is a separate configuration file! (ex: for first wanpipe card, link 1: wanpipe1.conf for second wanpipe card, link 2: wanpipe2.conf ) Where each configuration file can be setup for an arbitrary protocol. Note some WANPIPE configurations have multiple physical lines coming into a single card (ex. CHDLC Primary and Secondary port). In this case, there would be two configuration files for such card !!! For example, Quad Port S514 PCI card can connect to maximum 4 physical lines running CISCO HDLC. In this case each physical line is treated as a separate wanrouter; thus, each will have its own configuration file (wanpipe1,2,3 and 4). The SETUP script has already placed a wanpipe1.conf file in the /etc directory for the protocol you of your choice. If you have more than one physical line coming into your machine over WANPIPE, or you changed your mind about the protocol you'll be running: all sample configuration files are located in /usr/local/wanrouter/samples directory. (ie. wanpipe1.cpri : CHDLC primary port wanpipe2.csec : CHDLC secondary port wanpipe1.fr : Frame Relay protocol wanpipe1.ppp : PPP protocol ) Thus, to setup more than one physical link, copy one or more of these files into your /etc directory and rename each file to wanpipe#.conf (where # is 1,2,3 ...). 3) WANPIPE Configuration --------------------- Step1: Go to directory /usr/local/wanrouter. Run from this directory : ./wancfg This script include enough description about each options. Here some description about these options. WANROUTER.RC Setup ------------------ First file that should be edited is /etc/wanrouter.rc. This file has been already placed in the /etc directory by the SETUP program. It contains the paths of the wanpipe configuration files, lock and log files. Furthermore, it contains device names which to load during wanrouter startup. ROUTER_BOOT=YES # Boot flag must be set to YES WANPIPE_CONF_DIR=/etc # Location of wanpipe config files ROUTER_LOG=/var/log/wanrouter # Location of log files ROUTER_LOCK=/var/lock/wanrouter #Location of lock file WAN_DEVICES="wanpipe1" # Device(s) to load on startup To load more than one device during 'wanrouter start' set WAN_DEVICES="wanpipe1 wanpipe2 ... wanpipeN' Note: that device name is also the name of the configuration file. WANPIPE#.CONF Setup ------------------- Before editing the wanpipe#.conf file make sure that wanrouter.rc is pointing to the right location: default /etc directory. For each physical link there should be a wanpipe#.conf file !! !!! IMPORTANT !!!! If you renamed a file from wanpipe1.conf to wanpipe2.conf make sure you also rename the device names in the file itself. Thus, if configuration file name is wanpipe3.conf, that that file must contain wanpipe3 as its device name, NOT wanpipe1 !!! Repeat the following for each wanpipe configuration file: Step1: Open a file /etc/wanpipe#.conf Step2: [device] area: Make sure that the wanpipe device name (ex: wanpipe1 is the same as the file name wanpipe1.conf ) Frame Relay: device# = WAN_FR, comment Chdlc: device# = WAN_CHDLC, comment PPP: device# = WAN_PPP, comment Step3: [interface] area: Make sure that the wanpipe device name (ex: wanpipe3 is the same as the file name wanpipe3.conf ) At this point an Interface name must be chosen. INTERFACE NAME: --------------- Recommended interface name nomenclature is: *** wp#_{protocol}{media_address} *** where: wp# - wpa, wpb, wpc ... {protocol} = fr, chdlc, ppp {medi_address} = * DLCI number for frame relay * Nothing for rest ex: wpa_fr16 : fr with dlci 16 on wanpipe1 ex: wpb_chdlc: chdlc on wanpipe2 ex: wpc_ppp : ppp on wanpipe3 !! Note: o More better was to use wp1_fr16 interface name running on wanpipe1, but as you know in FreeBSD not permitted to use number inside interface name. o Each network interface contains identification of the interface: a character string plus a unit number for the driver. In our case, for Frame Relay, this number is DLCI number and for CHDLC and PPP this number is always 0. Don't be confused, when you run `ifconfig -a` and you will see wpa_chdlc0 instead of wpa_chdlc, which defined in [interfaces] secction. These interface names are the same one. For Frame Raly, insterface name will not changed. Once the interface name is selected SETUP INTERFACE --------------- Frame Relay: wpa_fr16 = wanpipe1, 16, WANPIPE, comment Bind interface name wpa_fr16 to wanpipe1 device (first card), with DLCI num. of 16. CHDLC wpa_chdlc = wanpipe1, , WANPIPE, comment Bind interface wpa_chldc to wanpipe1 device (first card). PPP wpa_ppp = wanpipe1, , WANPIPE, comment Bind interface wpa_ppp to wanpipe1 device (first card). WANPIPE : indicates that all packets should be routed. Make sure that the device name is the same as the configuration file name (ex. wanpipe1.conf) RAW API MODE: ------------- NOTE: Frame Relay and CHDLC can run in RAW API mode, Frame Relay: wpb_fr20 = wanpipe2, 20,API, comment CHDLC: wpb_chdlc = wanpipe2, ,API, comment API: Indicates that all received packets should be sent up the user defined stack. Step4: [wanpipe#] area: (# = 1,2.. must be the same as above, and as the file name wanpipe#.conf) The fist 4 fields indicate to the driver whether the card is S514PCI or S508ISA. For S514PCI card set: S514CPU = A or B PCISLOT = # (# = 0 -autodetect a SINGLE board. 1,2,...) Please read the WANPIPE_USER_MANUAL of how to obtain pci slot numbers for multiple boards. Also, comment out IO_PORT and IRQ options !!! For S508 ISA card set: IO_PORT = 0x360 (Check to board jumpers) IRQ = 7 Note: These two values must be the same as in kernel configuration file!! Also, comment out S514CPU and PCISLOT options !! The rest of the options are self explanatory in the wanpipe#.conf file Step5: [wp#_{protocol}{media_addrss}] interface area: Frame relay: [wpa_fr16] CHDLC: [wpa_chdlc] PPP: [wpa_ppp] Interface options are self explanatory Step6: Save the newly configured file. INTERFACE FILE Setup -------------------- 1. Go the the /usr/local/wanrouter directory. 2. For configuration file, interface: Run the Configure script: './wanconf' to setup and interface file. 3. Choose option to add an interface file. 4. !!!! IMPORTANT !!! The name of the interface file MUST be the same as the interface name specified in wanpipe#.conf. ex: wpa_fr16, or wpa_chdlc 5. Ask your ISP for LOCAL and POINTOPOINT IP addresses. Check that you have an interface file in: /usr/local/wanrouter/interfaces directory. NOW REPEAT THE ABOVE STEPS FOR ALL OTHER DEVICES !!!! CONFIGURING DUAL PORT CHDLC: PIGGYBACKING ------------------------------------------- Chdlc is currently the only protocol which can make use of both physical ports, controlled by a single CPU, on both S508 and S514 card. Note, that two physical links will be attached to one card. This means that there will be two configuration files. The second port will use the resources of the first port: In case of S514 PCI card: Resources are S514CPU and PCISLOT In case of S508 ISA card: Resources are IO_PORT and IRQ !!! IMPORTANT !!! Thus for both wanpipe#.conf files depending which card its being used, the above options must be the same. In order to use a SECONDARY port along with the PRIMARY: 1. Copy the CHDLC primary port config file form /usr/local/wanrouter/samples to /etc directory and rename it to wanpipe#.conf. (ex. If only one card in the system call it wanpipe1.conf (first physical link) ) 2. Copy the CHDLC secondary port config file form /usr/local/wanrouter/samples to /etc directory and rename it to wanpipe#.conf. (ex. If only one card in the system call it wanpipe2.conf (second physical link) ) 3. Use the above procedure to configure both files. 4. Make sure that the for S514 PCI card: S514CPU and PCISLOT are the same !! for S508 ISA card: IO_PORT and IRQ are the same !! 5. The only difference between primary and secondary configuration files should be the: 1. device name 2. interface name 3. comm_port option Everything else should be the SAME !!!! < ----------------------- END ------------------------------- >