Notes for setting up an LRP router for use in wireless wan's ###Creating the floppy disk### to create the floppy disk you need several tools.. mtools: tools to copy files onto and off of floppy disks. fdutils: includes superformat, tool for large format floppies syslinux: linux floppydisk bootloader Insert a blank floppy and use superformat to format the floppy as such: superformat /dev/fd0 sect=21 cyl=80 -V --biggest-last that will do the large format and verify it Install the bootloader with the following command line: syslinux -s /dev/fd0 edit your syslinux.cfg. it should look kinda like this: display syslinux.dpy timeout 0 default linux append=load_ramdisk=1 initrd=root.lrp initrd_archive=minix ramdisk_size=4096 root=/dev/ram0 boot=/dev/fd0u1680,msdos LRP=modules,etc,log,gated,snmp Next copy over your files using mcopy. ###Setting up the modified root### create a tgz archive called 'extras.lrp'. this should include all your modules, your tftp client and your pnp client. it should look something like.. lib/modules/smc-ultra.o lib/modules/8390.o lib/modules/arlan.o lib/modules/ne.o lib/modules/serial.o usr/bin/tftp sbin/isapnp etc/isapnp.conf etc/init.d/isapnp etc/rc2.d/S15isapnp Make sure all your modules are cross-compiled for the proper version of the kernel. add extras to LRP= under the 'append' section of syslinux.conf. ###Faking serial console### The changes made to LRP to enable serial consoles to work were the following: edit /etc/securetty to include ttyS0 edit /etc/inittab to spawn a getty (9600,8,N,1) on ttyS0 edit /etc/init.d/init.serial (or something) to 'setserial' correctly edit /lib/makedev.cfg and /lib/devinfo to link console to ttyS0 mknod /linuxrc.tty to reflect the COM1 device (copy from ttyS0) ###Configuring modules### uncomment serial, uncomment 8390. Then put 'ne io=0x260 irq=5' followed by a line with 'smc-ultra'. After this you will set up the arlan card with the proper registration mode and spreading code. Enter 'arlan registrationMode=0 spreadingCode=3 debug=0' This will have the machine come up, set up serial, then find either the ne2000 or the SMC nic card as eth0, and finnaly set up the arlan interface as eth1 (should be arlan0 at some point). ###network settings### edit the network settings (IP, fw, etc..). Configure your default GATEWAY, Set up your IF0(eth0) interface as your ethernet interface. Set up IF1(eth1) as your arlan interface. Add a value REMHOST1, with the remote address of the far-end router. Under the section 'Static Network Routes' add a line: 'route add -host $REMHOST1 gw $IPADDR1'. For some reason IPFW rules in this file prevent forwarding of packets, a strange default setting for a router. comment this line out. After editing this file I suppose you'll wanna customize the hostname too. After you've made all your edits backup 'etc'. ###More Notes### ramdisk should be increased from 4096, to perhaps 6144 or 8192. pinion is at 69% capacity, this could increase with the addition of snmp and gated. physical ram should also be increased to a minimum of 16 megs. ###Faking Large Disk### Add the nfs module to the modules that get installed at runtime. mount some remote directory and install the other packages (i.e. gated, snmp). unmount and continue as normal. Another possibility is to TFTP over the package then uncompress it. ###Online Upgrade### Here is the initial theory for upgrading a router remotely, including an increased disk size. IMPORTANT: make a backup of your existing image before attempting this upgrade! First create the disk with the upgraded software (and larger format, as required). Use a development box to properly configure this upgraded disk. The key items to get functional are the serial console ports (most anything else can be configured from here) and ethernet interface (so that any missing files can be loaded over the network). It is critical that this floppy works as expected, as failure would leave the router unbootable. * If the upgrade is a different density: Use tftp to copy a 'superformat' binary onto the router. use this superformat binary to re-format the floppy disk to the proper density: superformat /dev/fd0 sect=21 cyl=80 -V --biggest-last ==>problem: ramdisk too small? <== Next use dd to pull the disk image from your upgraded disk and copy it into your tftpboot directory... dd if=/dev/fd0 of=/tftpboot/upgrade.img Then use tftp on your router to copy this image onto your floppy.. tftp tftphost tftp> get upgrade.img /dev/fd0 This should pull the image from your tftp server and install it onto your floppy disk. once this completes, reboot your router. if all goes well it should come up properly. if not, get out a ladder climb up to your attic and put in your backup disk. start from scratch. ###Proxy Arp Configuration#### see: http://tanglefoot.lunatech.com/software/doc/HOWTO/mini/Proxy-ARP-Subnet.gz Example Network Configuration (assuming assigned block of 1.2.3.0/27) #ADSL# <-1.2.3.1/27 | -----------------------EverettsHouse 1.2.3.0/27(v28) | #WAN0# 1.2.3.2/27 (10.56.57.53/30) : #WAN1# 1.2.3.17/28 (10.56.57.54/30) | ------------------------RedwoodEstates 1.2.3.16/28 WAN0: # ethernet interface /sbin/ifconfig eth0 1.2.3.2 netmask 255.255.255.224 /sbin/route add -net 1.2.3.0 netmask 255.255.255.224 eth0 # arlan interface /sbin/ifconfig arlan0 10.56.57.53 netmask 255.255.255.252 /sbin/route add -net 10.56.57.52 netmask 255.255.255.252 arlan0 # proxy arp and routes /sbin/route add default gw 1.2.3.1 /sbin/arp -i eth0 -Ds 1.2.3.16 eth0 netmask 255.255.255.240 pub /sbin/route add -net 1.2.3.16 netmask 255.255.255.240 gw 10.56.57.54 WAN1: # ethernet interface /sbin/ifconfig eth0 1.2.3.17 netmask 255.255.255.240 /sbin/route add -net 1.2.3.16 netmask 255.255.255.240 eth0 # arlan interface /sbin/ifconfig arlan0 10.56.57.54 netmask 255.255.255.252 /sbin/route add -net 10.56.57.52 netmask 255.255.255.252 arlan0 # proxy arp and routes /sbin/route add default gw 10.56.57.53