LMCCONFIG(8) MidnightBSD System Manager’s Manual LMCCONFIG(8)

NAME

lmcconfig — configuration program for SBE (formerly LMC) wide-area network interface cards

SYNOPSIS

lmcconfig interface [−abBcCdDeEfhLmMpPrsStTuwxXyYzZ?]
lmcconfig
interface −1 [−aABceEfFgiIlLpPstTuUxX]
lmcconfig
interface −3 [−aABcefFlLsSv]

DESCRIPTION

The lmcconfig utility is the configuration program for the lmc(4) wide-area network device driver. It sets control values, such as T3 framing format, and it displays status, such as that of integrated modems, that are beyond the scope of ifconfig(8).

The lmcconfig utility displays the interface status when no parameters are specified; see example below. For this case only, if no interface is specified, it defaults to ‘‘lmc0’’.

Only the super-user may modify the configuration of a network interface.

The following options are available:

interface

This is the name of the interface; the default is ‘‘lmc0’’. If netgraph(4) is present and the interface name ends with a colon then Netgraph control messages are used, otherwise the ifnet(9) kernel interface and socket ioctl(2) system calls are used.

−1

All parameters after this apply to the T1E1 card.

−3

All parameters after this apply to the T3 card.

Commands for all cards
The following parameters apply to more then one card type.

−a number

Set Transmitter clock source to number.

1 TxClk from modem T1E1, HSSI default
2 Internal source T1E1, HSSI
3 RxClk from modem T1E1, HSSIc loop timed
4 External connector T1E1, HSSIc

An HSSI card normally takes its Tx clock from the modem connector (it is a DTE) but can use the PCI bus clock (typically 33 MHz) for loopback and null modem testing; values 3 and 4 are only applicable to a few rare CompactPCI/HSSI cards.

A T1E1 card uses an on-board synthesized oscillator if the value is 1 or 2; it loop times (uses the clock recovered by the receiver as the transmitter clock) if the value is 3; and it uses a clock from a header connector on the card if the value is 4.

TxClk source is not applicable to other card types.

−b

Read BIOS ROM. Print the first 256 locations. The BIOS ROM is not used and not present on some cards.

−B

Write BIOS ROM. Write the first 256 locations with an address pattern.

−c

Use HDLC’s 16-bit CRC polynomial: X^16+X^12+X^5+1 (default).

−C

Use HDLC’s 32-bit CRC polynomial: X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X+1

−d

Clear the driver-level debug flag. Non-critical log messages are suppressed.

−D

Set the driver-level debug flag. The driver generates more log messages. The driver also generates more log messages if the interface-level debug flag is set by ifconfig(8).

−e

Set DTE (Data Terminal Equipment) mode (default). An SSI card transmitter uses the Tx clock signal from the modem connector and receives the Data Carrier Detect pin (DCD). DTE/DCE is not applicable to other card types except a few rare CompactPCI/HSSI cards.

−E

Set DCE (Data Communication Equipment) mode. An SSI card transmitter uses an on-board synthesized oscillator and drives the Data Carrier Detect pin (DCD).

−f number

Set the frequency of the built-in synthesized oscillator to number bits/second. The nearest frequency that the synthesizer can generate will be used. Only SSI cards and a few rare CompactPCI/HSSI cards have synthesizers.

−F

Set SPPP line protocol to Frame-Relay. Only works for FreeBSD 5.4 and later.

−h

Print help (usage message).

−i

Set interface name (e.g. ‘‘lmc0’’).

−L number

Set loopback mode to number.

1 none default
2 payload outward thru framer T1E1. T3
3 line outward thru line if T1E1, T3, HSSIc
4 other inward thru line if T1E1, T3
5 inward inward thru framer T1E1, T3
6 dual inward and outward T1E1, T3
16 tulip inward thru Tulip chip all cards
17 pins inward thru drvrs/rcvrs SSI
18 LA/LL assert LA/LL modem pin HSSI, SSI
19 LB/RL assert LB/RL modem pin HSSI, SSI

−m

Read Tulip MII registers. Print the 32 16-bit registers in the Media Independent Interface.

−M addr data

Write Tulip MII register. Write data into register addr.

−p

Read Tulip PCI configuration registers. Print the first 16 32-bit registers in the PCI configuration space.

−P addr data

Write Tulip PCI configuration register. Write data into register addr.

−s

Read Tulip SROM. Print the 64 16-bit locations. The PCI subsystem vendor and device IDs are kept here.

−S number

Write Tulip SROM. Initializes the Tulip SROM to card type number.

3 HSSI
4 T3
5 SSI
6 T1E1
7 HSSIc
8 SDSL
0 auto-set from MII PHYID

If number is zero, then the card type is computed from the gate array microcode version field in the MII PHYID register. CAUTION: if the SROM is incorrect, the card will be unusable! This command is so dangerous that lmcconfig must be edited and recompiled to enable it.

−t

Read Tulip CSRs. Print the 16 32-bit control and status registers.

−T addr data

Write Tulip CSR. Write data into CSR number addr. Note that addr is a CSR number (0-15) not a byte offset into CSR space.

−u

Reset event counters to zero. The driver counts events like packets in and out, errors, discards, etc. The time when the counters are reset is remembered.

−U

Reset gate array. Not needed during normal operation; just for testing.

−v

Set verbose mode: print more stuff.

−V

Print the card configuration — see the EXAMPLES section.

−w

Load gate array from on-board ROM. Not needed during normal operation; just for testing.

−W filename

Load gate array microcode from filename.

−x

Select RAWIP mode — bypass line protocol code.

−X

Select line protocol code rather than RAWIP mode.

−y

Disable SPPP keep-alive packets,

−Y

Enable SPPP keep-alive packets.

−z

Set SPPP line protocol to Cisco-HDLC.

−Z

Set SPPP line protocol to PPP.

−?

Print help (usage message).

Commands for T1E1 cards
The following parameters apply to the T1E1 card type:

−a y|a|b

Stop sending alarm signal.

y Yellow Alarm varies with framing
a Red Alarm unframed all ones; aka AIS
b Blue Alarm unframed all ones

Red alarm, also known as AIS (Alarm Indication Signal), and Blue alarm are identical in T1.

−A y|a|b

Start sending alarm signal (see table above).

−B number

Send a Bit Oriented Protocol (BOP) message with code number. BOP codes are six bits.

−c number

Set cable length to number meters (default: 10 meters). This is used to set receiver sensitivity and transmitter line build-out.

−d

Print the status of the on-board DSU/CSU — see the EXAMPLES section.

−e number

Set the framing format to number:

9 T1-SF/AMI
27 T1-ESF/B8ZS (default)
0 E1-FAS
8 E1-FAS+CRC
16 E1-FAS+CAS
24 E1-FAS+CRC+CAS
32 E1-NO-framing

−E number

Enable 64Kb time slots (TSs) for the T1E1 card. The number argument is a 32-bit hex number (default 0xFFFFFFFF). The LSB is TS0 and the MSB is TS31. TS0 and TS25-31 are ignored in T1 mode. TS0 and TS16 are determined by the framing format in E1 mode.

−f

Read framer registers. Print the 512 8-bit registers in the framer chip.

−F addr data

Write framer register. Write data into register addr.

−g number

Set receiver gain range to number:

0x24 Short 0 to 20 dB of equalized gain
0x2C Medium 0 to 30 dB of equalized gain
0x34 Long 0 to 40 dB of equalized gain
0x3F Extend 0 to 64 dB of equalized gain (wide open)
0xFF Auto auto-set based on cable length (default)

This sets the level at which Loss-Of-Signal is declared.

−i

Send a CSU loopback deactivate inband command (T1-SF only).

−I

Send a CSU loopback activate inband command (T1-SF only).

−l

Send a line loopback deactivate BOP message (T1-ESF only).

−L

Send a line loopback activate BOP message (T1-ESF only).

−p

Send a payload loopback deactivate BOP message (T1-ESF only).

−P

Send a payload loopback activate BOP message (T1-ESF only).

−s

Print the status of the on-board DSU/CSU — see the EXAMPLES section.

−t

Stop sending test pattern.

−T number

Start sending test pattern number:

0 unframed X^11+X^9+1
1 unframed X^15+X^14+1
2 unframed X^20+X^17+1
3 unframed X^23+X^18+1
4 unframed X^11+X^9+1 with 7ZS
5 unframed X^15+X^14+1 with 7ZS
6 unframed X^20+X^17+1 with 14ZS (QRSS)
7 unframed X^23+X^18+1 with 14ZS
8 framed X^11+X^9+1
9 framed X^15+X^14+1
10 framed X^20+X^17+1
11 framed X^23+X^18+1
12 framed X^11+X^9+1 with 7ZS
13 framed X^15+X^14+1 with 7ZS
14 framed X^20+X^17+1 with 14ZS (QRSS)
15 framed X^23+X^18+1 with 14ZS

−u number

Set transmit pulse shape to number:

0 T1 DSX 0 to 40 meters
2 T1 DSX 40 to 80 meters
4 T1 DSX 80 to 120 meters
6 T1 DSX 120 to 160 meters
8 T1 DSX 160 to 200 meters
10 E1 75-ohm coax pair
12 E1 120-ohm twisted pairs
14 T1 CSU 200 to 2000 meters; set LBO
255 auto-set based on cable length and framing format (default)

−U number

Set transmit line build-out to number:

0 0 dB FCC option A
16 7.5 dB FCC option B
32 15 dB FCC option C
48 22.5 dB final span
255 auto-set based on cable length (default)

This is only applicable if the pulse shape is T1-CSU.

−v

Set verbose mode: print more stuff.

−x

Disable transmitter outputs.

−X

Enable transmitter outputs.

Commands for T3 cards
The following parameters apply to the T3 card type:

−a y|a|b|i

Stop sending alarm signal.

y Yellow Alarm X-bits set to 0
a Red Alarm framed 1010... aka AIS
b Blue Alarm unframed all-ones
i Idle signal framed 11001100...

−A y|a|b|i

Start sending alarm signal (see table above).

−B number

Send a BOP (Bit Oriented Protocol) message with code number. BOP codes are six bits.

−c number

Set cable length to number meters (default: 10 meters). This is used to set receiver sensitivity and transmitter line build-out.

−d

Print the status of the on-board T3 DSU — see the EXAMPLES section.

−e number

Set the framing format to number:

100 T3-C-bit parity
101 T3-M13 format

−f

Read framer registers. Print the 22 8-bit registers in the framer chip.

−F addr data

Write framer register. Write data into register addr.

−l

Send a line loopback deactivate BOP message.

−L

Send a line loopback activate BOP message.

−s

Print the status of the on-board T3 DSU — see the EXAMPLES section.

−S number

Set payload scrambler polynominal to number:

1 payload scrambler disabled
2 X^43+1: DigitalLink and Kentrox
3 X^20+X^17+1 w/28ZS: Larscom

Payload scrambler polynomials are not standardized.

−v

Set verbose mode: print more stuff.

−V number

Set transmit frequency offset to number. Some T3 cards can offset the transmitter frequency from 44.736 MHz. Number is in the range (0..4095); 2048 is zero offset; step size is about 3 Hz. A number is written to a Digital-Analog Converter (DAC) which connects to a Voltage Controlled Crystal Oscillator (VCXO).

Event Counters
The device driver counts many interesting events such as packets in and out, errors and discards. The table below lists the event counters and describes what they count.

ibytes

Bytes received in packets with good ending status.

obytes

Bytes transmitted.

ipackets

Packets received with good ending status.

opackets

Packets transmitted.

ierrors

Packets received with bad ending status.

oerrors

Packets transmitted with bad ending status.

idiscards

Packets received but discarded because the input queue was full or the interface was down.

odiscards

Packets presented for transmission but discarded because the output queue was full or the interface was down.

txdma

Packets presented for transmission but queued and retried later because no DMA descriptors were available. This can happen during normal operation and is not an indication of trouble.

fifo-overrun

Packets that started to arrive, but were aborted because the card was unable to DMA data to memory fast enough to prevent the receiver fifo from overflowing.

fifo-underrun

Packets that started to transmit but were aborted because the card was unable to DMA data from the memory fast enough to prevent the transmitter fifo from underflowing. When this happens, the transmitter threshold is increased, so that more bytes are required to be in the fifo before the transmitter is started.

missed

Packets that are missed because the receiver is stopped.

overruns

Packets that are missed because the receiver had no DMA descriptors available.

fdl_pkts

Packets received on the T1 Facility Data Link.

crc-errs

Cyclic Redundancy Checksum errors detected by the CRC-6 in T1 Extended SuperFrames (ESF) or the CRC-4 in E1 frames.

lcv-errs

Line Coding Violation errors: Alternate Mark Inversion (AMI) errors for T1-SF, Bipolar 8-Zero Substitution (B8ZS) errors for T1-ESF, or High Density Bipolar with 3-Zero Substitution (HDB3) errors for E1 or Bipolar 3-Zero Substitution (B3ZS) errors for T3.

frm-errs

T1 or T3 bit errors in the frame alignment signal.

febe-errs

Far End Block Errors: T1 or T3 bit errors detected by the device at the far end of the link.

par-errs

T3 bit errors detected by the hop-by-hop parity mechanism.

cpar-errs

T3 bit errors detected by the end-to-end parity mechanism.

mfrm-errs

T3 bit errors in the multi-frame alignment signal.

Transmit Speed
The hardware counts transmit clocks divided by 2048. The software computes ‘‘Tx speed’’ from this (see EXAMPLES below). The transmit clock is the bit rate of the circuit divided by two if the circuit is idle and divided by four if the circuit is carrying a packet. So an idle circuit reports a Tx speed equal to its bit rate, and a busy circuit reports a Tx speed equal to half its bit rate.

This ‘‘bit rate’’ does not include circuit-level overhead bits (such as T1 or T3 frame bits) but does include HDLC stuff bits. An idle T1 circuit with a raw bit rate of 1544000 and a bit-rate-minus-overhead of 1536000 will report a ‘‘Tx speed’’ of ((1536000 bitand 4095) plus or minus 4096). Sometimes it will even get the correct answer of 1536000, and if the link is fully loaded it will report about 768000 bits/sec.

It is not a perfect bit rate meter (the circuit must be idle), but it is a useful circuit utilization meter if you know the circuit bit rate and do some arithmetic. Software recalculates Tx speed once a second; the measurement period has some jitter.

EXAMPLES

When ‘‘lmc0’’ is a T1E1 card, ‘‘lmcconfig lmc0’’ generates the following output:

Card name: lmc0

Card type:

SBE/LMC T1E1 card

Link status:

Up

Tx Speed:

1548288

Line Prot/Pkg:

Frame-Relay/SPPP

SPPP Keep-alives:

OFF

CRC length:

16 bits

Loopback:

None

Tx Clk src:

Internal source

Format-Frame/Code:

T1-ESF/B8ZS

TimeSlot [31-0]:

0x01FFFFFE

Cable length:

10 meters

Tx pulse shape:

auto-set to T1-DSX: 0 to 40 meters

Rx gain max:

auto-set to 20.0 dB

Current time:

Thu Sep 29 21:48:51 2005

Cntrs reset:

Thu Sep 29 16:21:05 2005

RX bytes: 15053836
RX packets: 23271
TX bytes: 1732169
TX packets: 20526
Rx fdl pkts: 5443

When ‘‘lmc0’’ is a T1E1 card, ‘‘lmcconfig lmc0 -1 -d’’ generates the following output:

Format-Frame/Code:

T1-ESF/B8ZS

TimeSlot [31-0]:

0x01FFFFFE

Tx Clk src:

Internal source

Tx Speed:

1548288

Tx pulse shape:

T1-DSX: 0 to 40 meters

Tx outputs:

Enabled

Line impedance:

100 ohms

Max line loss:

20.0 dB

Cur line loss:

3.1 dB

Invert data:

No

Line loop:

No

Payload loop:

No

Framer loop:

No

Analog loop:

No

Tx AIS:

No

Rx AIS:

No

Tx BOP RAI:

No

Rx BOP RAI:

No

Rx LOS analog:

No

Rx LOS digital:

No

Rx LOF:

No

Tx QRS:

No

Rx QRS:

No

LCV errors:

0

CRC errors:

0

Frame errors:

0

Sev Err Frms:

0

Change of Frm align:

0

Loss of Frame events:

0

Last Tx BOP msg:

0x00 (Yellow Alarm (far end LOF))

Last Rx BOP msg:

0x00 (Yellow Alarm (far end LOF))

SNMP Near-end performance data:
LCV=0 LOS=0 FE=0 CRC=0 AIS=0 SEF=0 OOF=0 RAI=0
ANSI Far-end performance reports:
SEQ=1 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
SEQ=0 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
SEQ=3 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
SEQ=2 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0

DIAGNOSTICS

Messages indicating the specified interface does not exist, or the user is not privileged and tried to alter an interface’s configuration.

SEE ALSO

ioctl(2), lmc(4), netgraph(4), ifconfig(8), ifnet(9)

http://www.sbei.com/

HISTORY

This is a total rewrite of the program lmcctl by Andrew Stanley-Jones.

AUTHORS

David Boggs 〈boggs@boggs.palo-alto.ca.us〉

MidnightBSD 0.3 October 3, 2005 MidnightBSD 0.3