[Q & A] Bootup too quick, switch port isn't up...
Sean Chittenden
sean at chittenden.org
Fri Nov 5 02:56:56 PST 2004
[ This email is mainly line noise at this point, but, it's probably
better ]
[ to have it in the archives since I didn't find anything when I was
looking ]
[ earlier. While about to push send, shmaz on irc came up the the
answer. ]
[ Many thanks. -sc ]
Alright, I joked about this last time, but I'm actually having problems
related to amd64 booting too quick (slower damn it! slower!) All
joking aside, someone at the data center today suggested I install
Linux as a solution to FreeBSD booting too fast on amd64...
As many are aware (and hopefully more don't have to deal with this if
they don't have Cisco hardware), Cisco takes a year and a day to bring
up a port. Back in the day, this didn't used to be a problem, but with
faster hardware and startup times, it's become one. I have bootp
machines, and even full blown servers that are getting to multi-user
mode faster than a Cisco switch is able to bring the line up. So, when
the OS gets to multi-user mode, all kinds of things fail and in
strange/obtuse ways (hostname, reverse DNS, NFS, etc). I'm sure I'm
not the only one who's had/having this problem. Since this doesn't
seem to effect folks on older hardware that isn't as snappy, I'll ask
here even though this question is more suited to net@ than amd64 at .
Can ifconfig be taught to block (with an extra option) so that it
doesn't return until the interface in question has been brought up to
its desired speed/duplex? As things stand, I can fire off an `ifconfig
em0 10.0.0.1 netmask 0xFFFFFF00 media 100baseTX mediaopt full-duplex`
and have it return in a second. It takes the switch another 20-30
seconds to actually come up, at which point I get a nice message
(that's about to be hidden behind a verbose flag) that tells me, "em0:
Link is up 100 Mbps Full Duplex"... after I've been sitting at the
login prompt and am staring at various failure messages.
Doing this in serial isn't ideal on servers that have many interfaces,
but, it seems cleaner to me to have each invocation of ifconfig(8)
block instead of having some new command (ex: `ifmediachk em0 em1 em2
em3`) that blocks until the interfaces specified come up to their
desired level. *shrug*
The best workaround that I've been able to come up with is to
reintroduce the SCSI delay and set it to 30 sec... but I don't think
that'll save me since the line status is reset when I issue an ifconfig
statement and the SCSI delay is issued well before the interfaces are
brought up.
As I've said, I'm sure I'm not the only one who's run into this. Any
suggestions from those that have dealt with this already? -sc
### Answer ###
For Cisco switches, use the 'fastport' and '' options, though the
fastport option seems to make the biggest difference. Two links for
those interested:
http://www.cisco.com/en/US/products/hw/switches/ps663/
products_configuration_guide_chapter09186a00800d83f4.html#1019873
http://www.cisco.com/en/US/products/hw/switches/ps663/
products_configuration_guide_chapter09186a00800d83f4.html#1019960
Again, sorry for the noise. Hope someone reading this in the archives
finds it useful. I wonder if this'll become an FAQ or not. -sc
--
Sean Chittenden
More information about the freebsd-amd64
mailing list