Date: Sun, 13 Oct 2002 01:26:31 +0000 (GMT) From: Daniel Flickinger <attila@hun.org> To: Mike Silbersack <silby@silby.com> Cc: Harti Brandt <brandt@fokus.gmd.de> Subject: Re: xl networking not working any more! Message-ID: <20021013012631.7mdY12025@hun.org> In-Reply-To: <20021012012738.Y81035-200000@patrocles.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Sent: Sat, 12 Oct 2002 01:29:22 -0500 (CDT) bu Mike Silberback + Attila, could you apply the enclosed patch to a recent version of if_xl.c + and see what it reports on your system? You're one of two people who have + reported breakage due to version 1.107, and we're trying to track down why + that's happening. (Make sure to keep your working version of if_xl.c + around in case this doesn't help matters at all!) The system, a Tyan 2642 1.2G SMP with 512M and dual 10,000 RPM IBM SCSIs is current as of 0000 GMT 11 Oct. The dual channel aic7899 and dual xl interfaces are onboard. I applied your patches, rebuilt the kernel, and rebooted at 1400 GMT (0800 MDT) No problems almost 12 hours later and the loop times to my outbound switch from SGU to SLC are roughly the same. Without a network analyzer, I don't know if any good was accomplished, but it does not appear there is any harm, which is always a good start! The problem with xl was not that it did not function, but that 'natd' failed to set the default route (or make it stick). Being practical (or expedient), and harassed on too many other fronts, I put the network functions in one place. I need dhcpd to set the printer and the gateway, etc. ... and count on the firewall to prevent it from being global ... the statement: "route add default ${lcl_default_gateway}" should not be necessary as 'gateway' is also defined. therefore in rc.local: case ${lcl_network_enable} in [Yy][Ee][Ss]) (${lcl_natd_program} -n ${lcl_natd_interface}) \ && echo ' natd started' -> route add default ${lcl_default_gateway} sysctl net.inet.ip.forwarding=1 sysctl net.inet.ip.sourceroute=1 sysctl net.inet.ip.accept_sourceroute=1 ${lcl_dhcpd_program} ${lcl_dhcpd_flags} && \\ (echo -n "dhcpd started: " >> /var/log/rchk.log ;\ date >> /var/log/rchk.log) (${lcl_ntpd_program} ${lcl_ntpd_flags}) \ && echo ' ntpd started' ;; esac you will note that I explicitly state 'route add default' since 'gateway' or 'natd' did not --or did not make it stick. The second problem was that when the above set the default, it would not stick for long ... so I added a cron routine once a minute: #!/bin/bash # # check that default route is set to LinkSys j1=`date` j2=`echo -n $j1 | awk '{ printf "set: %s, %02s %s %s %s UCT", $1, $3, $2, $6, $4 }'` sleep 10 v0="linksys.hun" v1=`netstat -r | grep default | awk '{ print $2 }'` if [ "X$v1" != "X$v0" ]; then route add default linksys >/dev/null 2>&1 echo $j2 >> /var/log/rchk.log postfix flush >/dev/null 2>&1 fi and the logs showed that the default route was being removed at 0,11,22,33,44,55 minutes which happens to correspond to the */11 setting for /usr/libexec/save-entropy ... */11 * * * * operator /usr/libexec/save-entropy which had insufficient privileges as operator, filling my mailbox with failure notices ... From operator@hun.org Sat Oct 12 16:15:04 2002 Subject: Cron <operator@hun> /usr/libexec/save-entropy ifconfig: not found which means 'operator' is working on less than a full deck... Again, the path of least resistance was to clear the mailbox by disabling save-entropy. Investigating it today, save-entropy required a change to the PATH statement at the top of save-entropy.sh to: /bin:/sbin:/usr/bin:/usr/sbin to find 'ifconfig' --and the message changes to: ifconfig: ioctl (SIOCDIFADDR): permission denied which means 'operator' privilege is insufficient ... setting 'save-entropy' to run as root shuts down the xl default routing at 0/11/22/33/44/55 --not acceptable! The bottom line is that 'save-entropy' should not be calling 'ifconfig'. For 20+ years (literally) I have placed the ifconfig statements at the head of /etc/rc.conf. The new rc.? files read both the /etc/default/rc.conf and /etc/rc.conf at the top of each. This explains why the default routing would not stick as each complete ifconfig call resets the default, and why the setting of the default route in /etc/rc.local, since it is last, cleaned up after all the other calls --until 'save-entropy'. Obviously, if 'save-entropy' calls a complete 'ifconfig' every 11 minutes, the default is lost. Therefore, I moved the 'ifconfig' statements ahead of the 'natd' call in rc.local. Nothing in the rc.network initialization appears to require the interface to be alive. A little RTFS shows the rc file changes, but I am comfortable with controlling the specific network initialization and postfix, apache, Junkbuster, ftpd, etc. from a single file --at least it does not change! As to the patches to the if_xl files, what can I do to further test these for you? I will pull a new slice at 14 Oct 1200 GMT, and will re-patch them in (unless you commit them in the meantime). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021013012631.7mdY12025>