Since my system uses all (4) COMM ports and Linux doesn't like to share interrupts (IRQs), you have to tell Linux how to use your specific hardware setup. In addition to configuring Linux to understand your hardware setup, you need to optimize it for maximum performance (serial ports, etc).
NOTE: Until I added these changes, both GPM (tty mouse program) and Xwindows (Xfree86, MetroX, etc) would not load correctly let alone be useful.
--------------------------
NOTE: Starting with later 2.1.x and 2.2.x kernels, you do NOT have to set up the follow parameters to get 115,200 on serial ports. If you call the ports via Minicom, PPP, etc at 115,200, it will just work!!
BUT, by setting these files up, any application that asks for 38,400 will actually get 115,200.
For 2.2.x and 2.0.x kernels
/etc/rc.d/rc.serial file:
-- #!/bin/sh SETSERIAL="/bin/setserial -b" echo "Configuring COM1 for 115200" ${SETSERIAL} /dev/ttyS0 spd_vhi #echo "RE-configuring COM3 and COM4 to use proper IRQs" #${SETSERIAL} /dev/ttyS2 uart 16450 port 0x3E8 irq 3 #${SETSERIAL} /dev/ttyS3 uart 16550A port 0x2E8 irq 5 ${SETSERIAL} -bg /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3 echo "rc.serial done." --<end>--
Make it executable
chmod 700 /etc/rc.d/rc.serial
Redhat:
Do a search for "rc.serial" in the /etc/rc.d/rc.sysinit file. If it isn't there, add it at the bottom.
/etc/rc.d/rc.sysinit -- # Initialize the serial subsystem /etc/rc.d/rc.serial --
Since I use an older Logitech C7 mouse, Linux doesn't come on-line with it the first time. Edit this to suit your hardware configs.
Fix this by doing:
Redhat: Edit /etc/rc.d/init.d/gpm
replace this:
daemon gpm -t $MOUSETYPE
with this:
daemon gpm -b 9600 -r 50 -t $MOUSETYPE
Slackware: Edit /etc/rc.d/rc.local
replace this:
gpm -t logi
with
gpm -b 9600 -r 50 -t $logi
Vendor Specific: Most 3Com Ethernet ISA and PCI NICs have a ---------------- DOS based utility that allows you to enable/disable Plug and Play, manually configure IO ports, IRQs, and specify both the IRQ utilization and priority.
Personally.. I always recommend to DISABLE Plug and Play and manually configure the cards as depicted in Section 4. Anyway, I also recommend the following:
Serial-attached analog/isdn modem users:
- Set your Ethernet cards to support a modem IRQ utiliztion for 19200 or faster
- Set your NIC optimization for SERVER
Ethernet Router/cable-modem users:
- Set your Ethernet cards to for NO modem
- Set your NIC optimization for SERVER
---- Brief Overview:
- The Modem speed section tells the Ethernet card NOT to hog the IRQ lines too much. Though most PC serial ports have 16550 or better chipsets, if the serial port is ignored for too long, data will be lost.
- The Optimization field tells the NIC how to utilize things like IRQ duration, DMA bus retention, etc. The Server setting will optimize the NIC for fastest performance at the detriment of CPU utilization. This is the BEST setting for Linux boxes that are doing IP Masq, routing, etc.
Both Slackware and Redhat, out of the box, do NOT optimize the TCP/IP window size. This can make a BIG difference with performance. For more information, check out URLs in Section 5:
RFC 1106 - High Latency WAN links - Section 4.1
RFC 793 - Transmission Control Protocol
NOTE to DHCP users:
Redhat:
NOTE: Users that have NOT installed the initscripts-3.67-1.i386.rpm patch RPM, the correct line numbers will be 119 and 134. Personally, I recommend that you just install the RPM NOW!
Edit "/etc/sysconfig/network-scripts/ifup" and around lines 134, 136, 141, 149, and 158, find the lines:
line 134 for Redhat 5 or line 157 for Mandrake 7: "route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE}" to: "route add -net ${NETWORK} netmask ${NETMASK} window 16384 ${DEVICE}" Next.. line 136 for Redhat 5 or line 157 for Mandrake 7: "route add -host ${IPADDR} ${DEVICE}" to: "route add -host ${IPADDR} window 16384 ${DEVICE}" Next... line 141 for Redhat 5 or line 162 for Mandrake 7: "route add default gw ${GATEWAY} metric 1 ${DEVICE}" to: "route add default gw ${GATEWAY} window 16384 metric 1 ${DEVICE}" Next.. line 149 for Redhat 5 or line 170 for Mandrake 7: "route add default gw ${GATEWAY} ${DEVICE}" to: "route add default gw ${GATEWAY} window 16384 ${DEVICE}" Next... line 158 in Redhat 5 or line 173 in Mandrake 7 "route add default gw $gw ${DEVICE}" to: "route add default gw $gw window 16384 ${DEVICE}"
Slackware:
Edit /etc/rc.d/rc.inet1" and around lines 47 and 49, find the following text (note: your setup might look a little different so make any changes that are needed for your setup)
"/sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0" and "if [ ! "$GATEWAY" = "" ]; then /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1 fi"
and replace them with the following:
"/sbin/route add -net ${NETWORK} netmask ${NETMASK} window 16384 eth0" and "if [ ! "$GATEWAY" = "" ]; then /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 window 16384 metric 1 fi"
After everything is set and you either run these commands manually or reboot, a "netstat -rn" should look something like:
-- Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 100.200.0.0 0.0.0.0 255.255.255.0 U 1500 16384 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 3584 0 0 lo 0.0.0.0 100.200.0.1 0.0.0.0 UG 1500 16384 0 eth0 --
Also, in a pinch, if you need an example of how to address a NIC, say eth1 in Redhat-speak, here is how you do it:
/etc/sysconfig/network-scripts/ifcfg-eth1 -- DEVICE=eth1 IPADDR=192.168.0.1 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT=yes BOOTPROTO=none --