|
Ethernet and Wireless to ISDN Router with NAT
|
|
|
This router was built to combine a Ethernet LAN with the now discontinued IBM Wireless LAN Entry product, both feeding a ISDN link. Full access is provided between all stations on both the Ethernet and the Wireless LANs as well as to and from the ISDN link.
Although the IBM product is only 500KB, most users are unlikely to see performance problems
|
|
|
|
except when transferring very large files to and from
local Ethernet devices. When accessing the remote site, the ISDN link is even slower so the wireless speed is not noticed.
|
Connection to the host site is via a 128KB ISDN link into Windows NT 4.0 Remote Access Services. In addition to the Ethernet and Wireless interfaces, the local router also performs Network Address Translation (IP masquerading) so that all traffic from any device on either the Ethernet or Wireless LANs appears to the host as a single device connected to the RAS
As a measure of reliability and performance, using the wireless interface we were able to transfer and install the entire Internet Explorer 4.0 package on a laptop. We have used the wireless interface at a range of about 20 meters in typical office building enclosed spaces, and out to about 35 meters in a residential setting.
The IBM Wireless LAN posed several problems in integrating it into the router. First, the product is discontinued so further support is not available. Second, it is a PCMCIA product so a suitable PCMCIA interface had to be located and implemented. Last, but not least, this PCMCIA/Wireless LAN had to be integrated into the Ethernet/ISDN router interface.
- The IBM product includes drivers for Netware (ODI), Lan Manager (NDIS), LANTastic and others, and a driver for Windows 95/98 is available from this site. However, there is no packet driver or support for Windows NT, etc. Because there were ODI driver for both the Ethernet and Wireless adapters, we decided to use the ODI/ODIPKT approach for BOTH interfaces.
- The IBM Wireless LAN Entry product supports a Maximum Transmission Unit (MTU) size of 614 bytes or smaller so provision must be made for this in the router configuration and in buffering to allow for transfers between the Ethernet and the wireless LAN.
- The PCMCIA interface was provided by a now discontinued PCMCIA reader from Databook, the model TMB-250. This is a two slot PCMCIA reader with DOS drivers provided so it was possible to implement this as well.
- The host machine used was a minitower chassis with a 386sx-40 CPU and 4MB of memory, the least that could be installed. A single 1.44MB floppy provides the load medium and an old VGA card provides the console when needed -- the router normally runs without a keyboard or monitor.
Drivers for the PCMCIA interface must be loaded in CONFIG.SYS to enable the reader. Once the PCMCIA is up, the ODI/ODIPKT interfaces can be loaded followed by IPRoute. Using the ODI interface also meant loading LSL.COM and its associated NET.CFG file. The ODI driver for the Wireless card also requires NESL.COM which is included in the Wireless adapter package. In order for everything to fit, and to make room for the PCMCIA interface, it was necessary to use EMM386.
The Databook TMB-250 reader has a fixed IO address (0x240), IRQ (11) and memory space (0xD000-0xDFFF) requirement that had to be accommodated. In addition, an IO space "window" (0x330-0x35F in this case) must be assigned to the PCMCIA reader. IO port addresses will be allocated from this "window" to cards that are plugged in. The IBM Wireless LAN Entry PCMCIA is dynamically assigned an IRQ, IO port and address space by the PCMCIA software so considerable testing was done to determine where the PCMCIA Wireless LAN card would end up. Once this was determined, the Ethernet card could be configured and NET.CFG was completed.
CONFIG.SYS
DEVICE=A:\HIMEM.SYS
DOS=HIGH,umb
DEVICE=A:\EMM386.EXE FRAME=E000 X=C800-CFFF X=D000-DFFF RAM
DEVICEHIGH=A:\CARDTALK\TMB250.SYS /io:240
DEVICEHIGH=A:\CARDTALK\CTALKCS.EXE
DEVICEHIGH=A:\CARDTALK\CARDTALK.SYS /A /IOW=330-35F
/MEMW=D000-DFFF
- TMB250.SYS is the PCMCIA card driver with its fixed IO space at 0x240
- CTALKCS.EXE is the Databook Socket Services
- CARDTALK.SYS is the Databook Card Services driver with its fixed address space of 0xD000-0xDFFF. The IO space "window" assigned in this case is 0x330-0x350 and parts of this will be allocated to PCMCIA cards as needed.
- In addition, the PCMCIA software will assign an IRQ to cards as needed.
The NET.CFG file that will be used by LSL.COM assigns resources for the various network interfaces.
NET.CFG
; 2/25/98 19:20
; NET.CFG for ODI interface to the Ethernet
; and Wireless Cards
Link support
Buffers 6 1600
; Card # 0
; ETHER-16 card.
Link driver ME-16ODI
PORT 320 ; assigned after the wireless
INT 5 ; LAN interface was located
FRAME ETHERNET_II
; Card # 1
; IBM wireless "Card" (PCMCIA)
Link Driver IBMWIODI
PORT 340 ; trial and error
INT 10 ; trial and error
MEM D4000 ; trial and error
WNETID USERS ; Wireless LAN network ID
CELL LEADER ; someone has to lead
FREQUENCY SEQUENCE 1 ; one of three possible
PCMCIA ; use Card/Socket Services
ADHOC
FRAME ETHERNET_II ; force this frame type
; ; otherwise IPRoute won't work
In addition to the IO and Interrupt assignments, the configuration has to define various other parameters for the IBM Wireless LAN Entry card:
- WNETID assigns the name used within the wireless LAN cell and must be the same for all of the other units that will communicate in this wireless cell
- CELL LEADER tells this card to control the frequency hopping sequence for this wireless cell
- FREQUENCY SEQUENCE tells the card which of three sequences to be used and must be the same for all the cards that communicate in this wireless cell
- PCMCIA tells the card to use PCMCIA Card and Socket Services to obtain resources
- ADHOC tells the card that there is no IBM Wireless LAN Entry Point Wireless/Ethernet MAC Bridge (8227) installed in this wireless cell
- FRAME tells the card which of the possible Ethernet framing techniques to use. IPRoute only supports packets of a particular type so this must be set to "standard" Ethernet.
As noted, the setting for the wireless interface were determined by trial and error. Once these values are set then the Ethernet card IRQ and IO address could be configured. Also as indicated, more buffer space was allocated than normally due to the fact that the wireless LAN is significantly slower than the Ethernet.
Next, the AUTOEXEC.BAT will load all of the components for the system. As noted, the ODI/ODIPKT driver combination was used, so LSL.COM must be loaded. The IBM Wireless LAN Entry also requires the NESL.COM component. Both LSL.COM and NESL.COM are included on the driver diskette for the IBM product.
AUTOEXEC.BAT
lsl.com
nesl.com ; required by the wireless ODI interface
: Ethernet Card ODI Driver
ME-16ODI.COM
: IBM ODI driver
IBMWIODI.COM
: ODI Packet driver -
: Ethernet Card is board 0 int 96 (0x60)
: Wireless Card is board 1 int 97 (0x61)
odipkt.com 0 96
odipkt.com 1 97
^ ^^
| \_ Software interrupt for IPRoute
\_ Card Number
: now start the router with the wireless control file
ipr wireless.ipr
The ODIPKT driver must be loaded twice, once for each card to be assigned. The sequence is the same as that in the NET.CFG file, in this case "Card 0" is the Ethernet and "Card 1" is the IBM Wireless LAN.
Finally, the configuration file for IPRoute must reflect the desired routing information. This file assigns the Ethernet and Wireless LANs to two separate networks although they could also simply be subnetted. In this case, this was done as the roaming devices also appear in another wireless LAN at another physical location. Devices on the Ethernet are able to communicate with devices on the wireless LAN and vice versa. Devices on both LANs are able to use the ISDN link for remote access also.
The serial interface in this file is configured for an external Motorola BitSURFR Pro ISDN Adapter connected on a high speed serial card based on the 16550 UART chip. This card, a Model TC-200-S6-1 from Byte Runner Technologies, allows interface speeds up to 460,800 BPS and has sufficient buffering to keep up with the ISDN link. The card has jumpers to double or quadruple the interface speed, so in this case setting the interface to 115200 BPS actually results in a 230400 BPS output to the ISDN adapter.
We found that the BitSURFR could not be reset and redialled reliably when set at 230 kBPS so this configuration forces the BitSURFR to reset to factory defaults, and resets the external interface to 115,200, before attempting a redial. This portion of the configuration file should be deleted for a modem interface.
WIRELESS.IPR
; 10:06 AM 2/26/98
;
; IPR script for example configuration with PPP using
; a static (fixed) IP address and no incoming services.
;
; This script assumes the modem is configured for 8 bit
; data, no parity, 1 stop bit, RTS/CTS flow control, and
; DTR and CD operate normally.
; Start a command interpreter on the console
command
ftpd
; Telnet Daemon - This goes in the top part of the
; script (startup section)
telnetd do_tel
user username password *:21
; Log everything to the console.
set log file con
;
; Configure en0 interface with IP address 192.168.1.254
; Note that /24 specifies the network prefix width, i.e.
; the number of ones in the netmask. /24 corresponds to
; 255.255.255.0
packet en0 0x60 192.168.1.254/24
; -------------------------------------------------------
; add for the en1 adapter - different network
; the en1 interface only supports mtu of 614 byte packets
; increased queue length due to speed differences between
; the Ethernet and the Wireless
packet en1 0x61 192.168.4.254/24 mtu 614
; -------------------------------------------------------
; Configure the modem port on COM 1 and make it the
; default route (IPRoute doesn't like the value 115200
; here so use 57600 to start) The interface card
; doubles the speed so 57600 is really 115200 at the
; BitSURFR
async sl0 0x3f8 4 57600 do_sl0
delay .25
; anything other than the local IP to the sl0 interface
route * sl0 perm
; Broadcast RIP routes on the ethernet
rip en0
; ------------------------------------------------------
; RIP for en1
rip en1
; ------------------------------------------------------
; Logs to local SysLog
; set log udp 192.168.1.1
exit
;
; Script for filter and NAT configuration on sl0,
; with demand dial out, etc.
;
do_sl0:
; Turn on debug stuff.
set trace on
set log raw on
;
; Set up NAT
;
; allows telnet/ftp to router using non-standard ports
nat sl0 tcp 192.168.1.254:21 www.xxx.yyy.zzz:2021
nat sl0 tcp 192.168.1.254:23 www.xxx.yyy.zzz:2023
; pass the ping back to the router so we can
; ping it from the upline side
nat sl0 icmp 192.168.1.254 www.xxx.yyy.zzz
; pass everything else to a local host 192.168.1.1
nat sl0 * 192.168.1.1 www.xxx.yyy.zzz
nat * * www.xxx.yyy.zzz
; general reset for unknown packets
set nat send-reset on
;
; Configure modem control and set up for
; dial on demand.
;
set interface rts flow
hangup:
; Hangup will cause DTR to drop, which should set the
; BitSURFR to basic speed. First, set the interface
; speed back to something slower (doubled in the card)
; or the BitSURFR will usually not respond --- this
; sets the effective interface speed to 115200. This
; sequence is is a peculiarity of the BitSURFR and
; is probably not required with a modem
set interface sl0 speed 57600
delay .25
; Then reset the interface
set interface dtr off
delay .25
set interface dtr on
delay .25
; Then send a general reset
send sl0 "atz0\r"
wait 1 "OK"
; This setting causes the router to wait for a packet
; before dialing. Comment these out for immediate
; dialing
on packet dialout
wait 0
; Dial the phone, wait for a connection, and run PPP.
; This assumes the remote end will request PAP or CHAP
; authentication. Hang up if no packets are received
; for 20 minutes - use a keepalive on the clients.
;
; Config for the Motorola BitSURFR
dialout:
; Before dialing, tell the BitSURFR to run at
; 230400 BPS
send sl0 "at@p2=230400\r"
wait 1 "OK"
; Then change the to 115200 (doubled by sl0 card)
; and the whole lashup SHOULD be running at 230K
set interface sl0 speed 115200
delay .25
; Then set interface to reset to basic values when
; DTR goes low (&D3)
send sl0 "AT&F&C1&D3%A2=95%A4=0@B0=2\r"
wait 1 "OK"
; And dial it
send sl0 "ATDnnn-nnn1 & nnn-nnn2\r"
on timeout hangup
; this is ISDN so we don't have to wait long for a
; connection. For modems this wait should be longer
wait 15 "CONNECT"
; Read the rest of the CONNECT message into symbol
; "speed".
on cd lineup
read 5 "\r" $speed
lineup: on cdloss hangup
on timeout hangup
log "Connected at $speed"
set ppp login rasusername raspassword
set ppp trace on
; 15 minute timeout. Use a keepalive application
; to keep this connection up if needed. Allowing it
; to timeout may help it recover if something fails
ppp 900 www.xxx.yyy.zzz/24
goto hangup
; This will run for each incoming telnet connection.
do_tel:
on cdloss drop_tel
wait 1
on timeout drop_tel
send "\r\nlogin: "
set echo on
read 60 "\r\n" NAME
send "\r\nPassword:"
set echo off
read 60 "\r\n" PASS
authenticate NAME PASS *:21
log "$NAME logged in from $IPADDR:$PORT"
send "\r\n\n"
command
drop_tel:
exit
This router configuration has been in operation since October 1997 and has provided reliable throughput for devices on either or both the Ethernet and/or wireless LAN interfaces and to and from the remote via the 128kB ISDN link.
The IBM Wirelesss Lan Entry card is available from several surplus dealers, including Kent Byron, from whom we obtained ours.
The Databook PCMCIA Adapter occasionally shows up in the surplus and auction markets, but other units such as the SCM Microsystems "Swapbox", should work as well.
|