2 .\" Copyright (c) 2003-2006 David Boggs. (boggs@boggs.palo-alto.ca.us)
3 .\" All rights reserved. I wrote this man page from scratch.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" GNU General Public License:
30 .\" This program is free software; you can redistribute it and/or modify it
31 .\" under the terms of the GNU General Public License as published by the Free
32 .\" Software Foundation; either version 2 of the License, or (at your option)
33 .\" any later version.
35 .\" This program is distributed in the hope that it will be useful, but WITHOUT
36 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
37 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
40 .\" You should have received a copy of the GNU General Public License along with
41 .\" this program; if not, write to the Free Software Foundation, Inc., 59
42 .\" Temple Place - Suite 330, Boston, MA 02111-1307, USA.
49 .ie (\n(.y < 19) .nr ssfix 1
51 .\" Is the OS name FreeBSD?
52 .ie "\*[operating-system]"" .ds aa \*(oS
53 .el .ds aa \*[operating-system]
54 .substring aa (0+\n[ssfix] (6+\n[ssfix])
55 .ie "\*(aa"FreeBSD" .nr fbsd 1
57 .\" Is the OS name BSD (i.e. Linux)?
58 .ie "\*[operating-system]"" .ds aa \*(oS
59 .el .ds aa \*[operating-system]
60 .ie "\*(aa"BSD" .nr linux 1
66 .Nd configuration program for
70 wide-area network interface cards
76 .Op Fl abBcCdDeEfgGhiLmMpPsStTuUvVwxXyY?
80 .Op Fl aABcdeEfFgiIlLpPstTuUxX
90 utility is the configuration program for the
92 wide-area network device driver.
93 It sets control values, such as T3 framing format,
94 and it displays status, such as that of integrated modems,
95 which are beyond the scope of
100 utility displays the interface status when no parameters are specified;
104 For this case only, if no
106 is specified, it defaults to
107 .ie \n[linux] .Dq Li hdlc0 .
110 Only the super-user may modify the configuration of a network interface.
112 The following options are available:
113 .Bl -tag -width "interface"
115 This is the name of the interface; the default is
116 .ie \n[linux] .Dq Li hdlc0 .
121 is present and the interface name ends with a colon
122 then Netgraph control messages are used,
124 .if (\n[fbsd] : \n[nbsd] : \n[obsd] : \n[bsdi]) .Xr ifnet 9
125 .if \n[linux] netdevice
126 kernel interface and socket
127 .if (\n[fbsd] : \n[nbsd] : \n[obsd] : \n[bsdi]) .Xr ioctl 2
129 system calls are used.
132 All parameters after this apply to the T1E1 card.
134 All parameters after this apply to the T3 card.
137 .Ss Parameters for all cards
139 The following parameters apply to more then one card type.
140 .Bl -tag -width "-W addr data"
142 Set Transmitter clock source to
145 .Bl -column "1" "External connector" "T1E1, HSSIc" -compact
146 .It 1 Ta "TxClk from modem" Ta "T1E1, HSSI" Ta "(default)"
147 .It 2 Ta "Internal source" Ta "T1E1, HSSI"
148 .It 3 Ta "RxClk from modem" Ta "T1E1, HSSIc" Ta "(loop timed)"
149 .It 4 Ta "External connector" Ta "T1E1, HSSIc"
152 An HSSI card normally takes its Tx clock from the modem connector
153 (it is a DTE) but can use the PCI bus clock (typically 33 MHz)
154 for loopback and null modem testing; values 3 and 4 are only
155 applicable to a few rare CompactPCI/HSSI cards.
157 A T1E1 card uses an on-board synthesized oscillator
158 if the value is 1 or 2; it
160 (uses the clock recovered by the receiver as the transmitter clock)
161 if the value is 3; and it uses a clock from a header connector on
162 the card if the value is 4.
164 TxClk source is not applicable to other card types.
167 Print the first 256 locations.
168 The BIOS ROM is not used and not present on some cards.
171 Write the first 256 locations with an address pattern.
173 Use HDLC's 16-bit Cyclic Redundancy Checksum (CRC).
175 Use HDLC's 32-bit Cyclic Redundancy Checksum (CRC).
177 Clear the driver-level debug flag.
178 Non-critical log messages are suppressed.
180 Set the driver-level debug flag.
181 The driver generates more log messages.
182 The driver also generates more log messages if
183 the interface-level debug flag is set by
186 Set DTE (Data Terminal Equipment) mode (default).
187 An SSI card transmitter uses the Tx clock signal from the
188 modem connector and receives the Data Carrier Detect pin (DCD).
189 DTE/DCE is not applicable to other card types
190 except a few rare CompactPCI/HSSI cards.
192 Set DCE (Data Communication Equipment) mode.
193 An SSI card transmitter uses an on-board synthesized oscillator
194 and drives the Data Carrier Detect pin (DCD).
196 Set the frequency of the built-in synthesized oscillator to
199 The nearest frequency that the synthesizer can generate will be used.
200 Only SSI cards and a few rare CompactPCI/HSSI cards have synthesizers.
202 Load gate array microcode from on-board ROM; see also
205 Load gate array microcode from
210 Print help (usage message).
212 Set interface name (e.g.\&
218 .Bl -column "99" "payload" "inward thru drvrs/rcvrs" -compact
219 .It 1 Ta "none" Ta "default"
220 .It 2 Ta "payload" Ta "outward thru framer" Ta "T1E1. T3"
221 .It 3 Ta "line" Ta "outward thru line if" Ta "T1E1, T3"
222 .It 4 Ta "other" Ta "inward thru line if" Ta "T1E1, T3"
223 .It 5 Ta "inward" Ta "inward thru framer" Ta "T1E1, T3"
224 .It 6 Ta "dual" Ta "inward and outward" Ta "T1E1, T3"
225 .It 16 Ta "tulip" Ta "inward thru Tulip chip" Ta "all cards"
226 .It 17 Ta "pins" Ta "inward thru drvrs/rcvrs" Ta "SSI"
227 .It 18 Ta "LA/LL" Ta "assert LA/LL modem pin" Ta "HSSI, SSI"
228 .It 19 Ta "LB/RL" Ta "assert LB/RL modem pin" Ta "HSSI, SSI"
231 Read Tulip MII registers.
232 Print the 32 16-bit registers in the Media Independent Interface.
233 .It Fl M Ar addr Ar data
234 Write Tulip MII register.
240 Read Tulip PCI configuration registers.
241 Print the first 16 32-bit registers in the PCI configuration space.
242 .It Fl P Ar addr Ar data
243 Write Tulip PCI configuration register.
250 Print the 64 16-bit locations.
251 The PCI subsystem vendor and device IDs are kept here.
254 Initializes the Tulip SROM to card type
257 .Bl -column "9" -compact
264 .It 0 Ta "auto-set from uCode type"
269 is zero, then the card type is computed from the gate array
270 microcode version field in the MII PHYID register.
272 if the SROM is incorrect, the card will be unusable!
277 must be edited and recompiled to enable it.
280 Print the 16 32-bit Control and Status Registers.
281 .It Fl T Ar addr Ar data
289 is a CSR number (0-15) not a byte offset into CSR space.
291 Reset event counters to zero.
292 The driver counts events like packets in and out, errors, discards, etc.
293 The time when the counters are reset is remembered.
295 Reset gate array microcode.
297 Set verbose mode: print more stuff.
299 Print the card configuration; see the
303 Set the line control protocol to
305 Line control protocols are listed below along with the operating
306 systems that implement them and the stacks that include them.
308 .Bl -column "1" "FrameRelay" "fnobl" "dspgsn" -compact
309 .It x Ta Em Protocol Ta Em OpSys Ta Em Stack
310 .It 1 Ta "IPinHDLC" Ta "FNOBL" Ta "D--G-N"
311 .It 2 Ta "PPP" Ta "FNOBL" Ta "-SPGYN"
312 .It 3 Ta "CiscoHDLC" Ta "FNOBL" Ta "-SPGYN"
313 .It 4 Ta "FrameRelay" Ta "F--BL" Ta "-SPG-N"
314 .It 5 Ta "EthInHDLC" Ta "F---L" Ta "---G-N"
317 OpSys: FreeBSD NetBSD OpenBSD BSD/OS Linux.
318 Stack: Driver SPPP P2P GenHDLC sYncPPP Netgraph.
321 Set the line control protocol stack to
323 Line control protocol stacks are listed below along with the operating
324 systems that include them and the protocols that they implement.
326 .Bl -column "1" "FrameRelay" "fnobl" "ipcfe" -compact
327 .It X Ta Em Stack Ta Em OpSys Ta Em Protocol
328 .It 1 Ta "Driver" Ta "FNOBL" Ta "I----"
329 .It 2 Ta "SPPP" Ta "FNO--" Ta "-PCF-"
330 .It 3 Ta "P2P" Ta "---B-" Ta "-PCF-"
331 .It 4 Ta "GenHDLC" Ta "----L" Ta "IPCFE"
332 .It 5 Ta "SyncPPP" Ta "----L" Ta "-PC--"
333 .It 6 Ta "Netgraph" Ta "F----" Ta "IPCFE"
336 OpSys: FreeBSD NetBSD OpenBSD BSD/OS Linux.
337 Protocol: IPinHDLC PPP CiscoHDLC FrmRly EthInHDLC.
340 Disable SPPP/SyncPPP keep-alive packets,
342 Enable SPPP/SyncPPP keep-alive packets.
344 Print help (usage message).
347 .Ss Parameters for T1E1 cards
349 The following parameters apply to the T1E1 card type:
350 .Bl -tag -width "-W addr data"
351 .It Fl "a" Sm Cm y | a | b Sm
352 Stop sending alarm signal (see table below).
353 .It Fl "A" Sm Cm y | a | b Sm
354 Start sending alarm signal.
356 .Bl -column "y" "Yellow Alarm" -compact
357 .It y Ta "Yellow Alarm" Ta "varies with framing"
358 .It a Ta "Red Alarm" Ta "unframed all ones; aka AIS"
359 .It b Ta "Blue Alarm" Ta "unframed all ones"
362 Red alarm, also known as AIS (Alarm Indication Signal),
363 and Blue alarm are identical in T1.
365 Send a Bit Oriented Protocol (BOP) message with code
367 BOP codes are six bits.
371 meters (default: 10 meters).
372 This is used to set receiver sensitivity
373 and transmitter line build-out.
375 Print the status of the on-board T1 DSU/CSU; see the
379 Set the framing format to
382 .Bl -column "99" -compact
384 .It 27 Ta "T1-ESF/B8ZS (default)"
386 .It 8 Ta "E1-FAS+CRC"
387 .It 16 Ta "E1-FAS+CAS"
388 .It 24 Ta "E1-FAS+CRC+CAS"
389 .It 32 Ta "E1-NO-framing"
392 Enable 64Kb time slots (TSs) for the T1E1 card.
395 argument is a 32-bit hex number (default 0xFFFFFFFF).
396 The LSB is TS0 and the MSB is TS31.
397 TS0 and TS25-31 are ignored in T1 mode.
398 TS0 and TS16 are determined by the framing format in E1 mode.
400 Read framer registers.
401 Print the 512 8-bit registers in the framer chip.
402 .It Fl F Ar addr Ar data
403 Write framer register.
409 Set receiver gain range to
412 .Bl -column "0x00" "Medium" -compact
413 .It 0x24 Ta "Short" Ta "0 to 20 dB of equalized gain"
414 .It 0x2C Ta "Medium" Ta "0 to 30 dB of equalized gain"
415 .It 0x34 Ta "Long" Ta "0 to 40 dB of equalized gain"
416 .It 0x3F Ta "Extend" Ta "0 to 64 dB of equalized gain (wide open)"
417 .It 0xFF Ta "Auto" Ta "auto-set based on cable length (default)"
420 This sets the level at which
425 .Em CSU loopback deactivate
426 inband command (T1 only).
429 .Em CSU loopback activate
430 inband command (T1 only).
433 .Em line loopback deactivate
434 BOP message (T1-ESF only).
437 .Em line loopback activate
438 BOP message (T1-ESF only).
441 .Em payload loopback deactivate
442 BOP message (T1-ESF only).
445 .Em payload loopback activate
446 BOP message (T1-ESF only).
448 Print the status of the on-board DSU/CSU; see the
452 Stop sending test pattern (see table below).
454 Start sending test pattern
457 .Bl -column "99" -compact
458 .It 0 Ta "unframed X^11+X^9+1"
459 .It 1 Ta "unframed X^15+X^14+1"
460 .It 2 Ta "unframed X^20+X^17+1"
461 .It 3 Ta "unframed X^23+X^18+1"
462 .It 4 Ta "unframed X^11+X^9+1 with 7ZS"
463 .It 5 Ta "unframed X^15+X^14+1 with 7ZS"
464 .It 6 Ta "unframed X^20+X^17+1 with 14ZS (QRSS)"
465 .It 7 Ta "unframed X^23+X^18+1 with 14ZS"
466 .It 8 Ta " framed X^11+X^9+1"
467 .It 9 Ta " framed X^15+X^14+1"
468 .It 10 Ta " framed X^20+X^17+1"
469 .It 11 Ta " framed X^23+X^18+1"
470 .It 12 Ta " framed X^11+X^9+1 with 7ZS"
471 .It 13 Ta " framed X^15+X^14+1 with 7ZS"
472 .It 14 Ta " framed X^20+X^17+1 with 14ZS (QRSS)"
473 .It 15 Ta " framed X^23+X^18+1 with 14ZS"
476 Set transmit pulse shape to
479 .Bl -column "255" -compact
480 .It 0 Ta "T1 DSX 0 to 40 meters"
481 .It 2 Ta "T1 DSX 40 to 80 meters"
482 .It 4 Ta "T1 DSX 80 to 120 meters"
483 .It 6 Ta "T1 DSX 120 to 160 meters"
484 .It 8 Ta "T1 DSX 160 to 200 meters"
485 .It 10 Ta "E1 75-ohm coax pair"
486 .It 12 Ta "E1 120-ohm twisted pairs"
487 .It 14 Ta "T1 CSU 200 to 2000 meters; set LBO"
488 .It 255 Ta "auto-set based on cable length and framing format (default)"
491 Set transmit line build-out to
494 .Bl -column "255" "22.5 dB" -compact
495 .It 0 Ta "0 dB" Ta "FCC option A"
496 .It 16 Ta "7.5 dB" Ta "FCC option B"
497 .It 32 Ta "15 dB" Ta "FCC option C"
498 .It 48 Ta "22.5 dB" Ta "final span"
499 .It 255 Ta "auto-set based on cable length (default)"
502 This is only applicable if the pulse shape is T1-CSU.
504 Disable transmitter outputs.
506 Enable transmitter outputs.
509 .Ss Parameters for T3 cards
511 The following parameters apply to the T3 card type:
512 .Bl -tag -width "-W addr data"
513 .It Fl "a" Sm Cm y | a | b | i Sm
514 Stop sending alarm signal (see table below).
515 .It Fl "A" Sm Cm y | a | b | i Sm
516 Start sending alarm signal.
518 .Bl -column "y" "Yellow Alarm" -compact
519 .It y Ta "Yellow Alarm" Ta "X-bits set to 0"
520 .It a Ta "Red Alarm" Ta "framed 1010... aka AIS"
521 .It b Ta "Blue Alarm" Ta "unframed all-ones"
522 .It i Ta "Idle signal" Ta "framed 11001100..."
525 Send a Far End Alarm and Control (FEAC) message with code
527 FEAC codes are six bits.
531 meters (default: 10 meters).
532 This is used to set receiver sensitivity
533 and transmitter line build-out.
535 Print the status of the on-board T3 DSU; see the
539 Set the framing format to
542 .Bl -column "100" -compact
543 .It 100 Ta "T3-C-bit parity"
544 .It 101 Ta "T3-M13 format"
547 Read framer registers.
548 Print the 22 8-bit registers in the framer chip.
549 .It Fl F Ar addr Ar data
550 Write framer register.
557 .Em line loopback deactivate
561 .Em line loopback activate
564 Print the status of the on-board T3 DSU; see the
568 Set payload scrambler polynominal to
571 .Bl -column "9" -compact
572 .It 1 Ta "payload scrambler disabled"
573 .It 2 Ta "X^43+1: DigitalLink and Kentrox"
574 .It 3 Ta "X^20+X^17+1 w/28ZS: Larscom"
577 Payload scrambler polynomials are not standardized.
579 Set transmit frequency offset to
581 Some T3 cards can offset the transmitter frequency from 44.736 MHz.
583 is in the range (0..4095); 2048 is zero offset; step size is about 3 Hz.
586 is written to a Digital-Analog Converter (DAC) which connects
587 to a Voltage Controlled Crystal Oscillator (VCXO).
592 The device driver counts many interesting events such as
593 packets in and out, errors and discards.
594 The table below lists the event counters and describes what they count.
595 .Bl -tag -width "Tx fifo underruns"
597 Bytes received in packets with good ending status.
599 Bytes transmitted in packets with good ending status.
601 Packets received with good ending status.
603 Packets transmitted with good ending status.
605 Packets received with bad ending status.
607 Packets transmitted with bad ending status.
609 Packets received but discarded by software because
610 the input queue was full or the link was down.
612 Packets that were missed by hardware because
613 the receiver was enabled but had no DMA descriptors.
615 Packets presented for transmission but discarded by software because
616 the output queue was full or the link was down.
617 .It Va "Rx fifo overruns"
618 Packets that started to arrive, but were aborted because
619 the card was unable to DMA data to memory fast enough
620 to prevent the receiver fifo from overflowing.
621 This is reported in the ending status of DMA descriptors.
623 Rx Fifo overruns reported by the Tulip chip in the Status CSR.
624 The driver stops the receiver and restarts it to work around
625 a potential hardware hangup.
626 .It Va "Tx fifo underruns"
627 Packets that started to transmit but were aborted because
628 the card was unable to DMA data from memory fast enough
629 to prevent the transmitter fifo from underflowing.
630 This is reported in the ending status of DMA descriptors.
631 .It Va "Tx underruns"
632 Tx Fifo underruns reported by the Tulip chip in the Status CSR.
633 The driver increases the transmitter threshold,
634 requiring more bytes to be in the fifo before the transmitter is started.
636 Packets received on the T1 Facility Data Link.
638 Cyclic Redundancy Checksum errors detected by the CRC-6 in
639 T1 Extended SuperFrames (ESF) or the CRC-4 in E1 frames.
640 .It Va "Rx line code"
641 Line Coding Violation errors:
642 Alternate Mark Inversion (AMI) errors for T1-SF,
643 Bipolar 8-Zero Substitution (B8ZS) errors for T1-ESF, or
644 High Density Bipolar with 3-Zero Substitution (HDB3) errors for E1 or
645 Bipolar 3-Zero Substitution (B3ZS) errors for T3.
647 T1 or T3 bit errors in the frame alignment signal.
649 Far End Block Errors:
650 T1 or T3 bit errors detected by the device at the far end of the link.
652 T3 bit errors detected by the hop-by-hop parity mechanism.
654 T3 bit errors detected by the end-to-end parity mechanism.
656 T3 bit errors in the multi-frame alignment signal.
659 If driver debug mode is enabled, more event counters are displayed.
660 .Bl -tag -width "Tx fifo underruns"
662 Failure to allocate a replacement packet buffer
663 for an incoming packet.
664 The buffer allocation is retried later.
666 Failure to allocate a DMA descriptor
667 for an outgoing packet.
668 The descriptor allocation is retried later.
670 The watchdog routine conflicted with an IOCTL syscall.
672 A CPU tried to enter the interrupt handler
673 while another CPU was already inside.
674 The second CPU simply walks away.
676 Nameless events of interest to the device driver maintainer.
681 The hardware counts transmit clocks divided by 2048.
682 The software computes
687 The transmit clock is the bit rate of the circuit divided by two if the
688 circuit is idle and divided by four if the circuit is carrying a packet.
689 So an empty circuit reports a Tx speed equal to its bit rate,
690 and a full circuit reports a Tx speed equal to half its bit rate.
694 does not include circuit-level overhead bits
695 (such as T1 or T3 frame bits) but does include HDLC stuff bits.
696 An idle T1 circuit with a raw bit rate of 1544000 and a
697 bit-rate-minus-overhead of 1536000 will report a
699 of ((1536000 bitand 4095) plus or minus 4096).
700 Sometimes it will even get the correct answer of 1536000, and
701 if the link is fully loaded it will report about 768000 bits/sec.
703 It is not a perfect bit rate meter (the circuit must be idle),
704 but it is a useful circuit utilization meter if you know the
705 circuit bit rate and do some arithmetic.
706 Software recalculates Tx speed once a second;
707 the measurement period has some jitter.
714 .Dq Li lmcconfig lmc0
715 generates the following output:
716 .Bd -literal -offset indent
718 Card type: T1E1 (lmc1200)
721 Line Prot/Pkg: PPP/P2P
723 Tx Clk src: Modem Rx Clk (loop timed)
724 Format-Frame/Code: T1-ESF/B8ZS
725 TimeSlots [31-0]: 0x01FFFFFE
726 Cable length: 10 meters
727 Current time: Wed Jan 4 05:35:10 2006
728 Cntrs reset: Fri Dec 16 19:23:45 2005
738 .Dq Li lmcconfig lmc0 -1 -d
739 generates the following output:
740 .Bd -literal -offset indent
741 Format-Frame/Code: T1-ESF/B8ZS
742 TimeSlots [31-0]: 0x01FFFFFE
743 Tx Clk src: Modem Rx Clk (loop timed)
745 Tx pulse shape: T1-DSX: 0 to 40 meters
747 Line impedance: 100 ohms
748 Max line loss: 20.0 dB
749 Cur line loss: 0.0 dB
768 Change of Frm align: 0
769 Loss of Frame events: 0
770 SNMP Near-end performance data:
771 LCV=0 LOS=0 FE=0 CRC=0 AIS=0 SEF=0 OOF=0 RAI=0
772 ANSI Far-end performance reports:
773 SEQ=0 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
774 SEQ=1 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
775 SEQ=2 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
776 SEQ=3 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
781 Messages indicating the specified interface does not exist, or
782 the user is not privileged and tried to alter an interface's configuration.
788 .if \n[fbsd] .Xr netgraph 4 ,
792 .Pa http://www.sbei.com/
796 This is a total rewrite of the program
802 .An Andrew Stanley-Jones .
806 .An David Boggs Aq boggs@boggs.palo-alto.ca.us