Lab 4-1: Synchronous Serial Connection Setup

This lab (as shown in Figure 4-1) facilitates two Sangoma synchronous serial S514/ET1 PCI adapter cards, connected via an RJ-45 crossover cable for point-to-point configuration between a Linux (callisto) and FreeBSD (castor) gateway. This lab deals with Layer 1 and Layer 2 issues; later labs in following chapters add scenarios on top of the data link layer. For the pin layout of the RJ-45 crossover cable as well as the installation of the NIC drivers, consult the Sangoma website.

Figure 4-1. Synchronous Serial Point-to-Point Lab Topology


The NICs used for this lab include a CSU/DSU capable of fractional or clear-channel T1/E1 modes of operation. They can provide clocking or accept external clocking from the network. One side must be configured as a clock master (internal clocking), and the other as a clock slave (line clocking). An erroneous configuration might or might not lead to clock slips and errors over time. In the following lab, the cards are operating as fractional E1, and callisto is providing clocking.

The setup, initialization, and monitoring of these adapter cards is carried out via Sangoma's Wanpipe software, essentially consisting of the wancfg, wanrouter, and wanpipemon tools.

First let us look at Cisco HDLC as a link-layer peer-to-peer protocol (Example 4-2). Logging information goes to /var/log/messages and /var/log/wanrouter. Frame Relay, X.25, and PPP setups pretty much look the same. Example 4-2 presents the result of the NIC setup and concludes with a representation of the NIC configuration as generated by the Sangoma setup tools. The shaded text emphasizes the point-to-point character of the interface.

Example 4-2. Synchronous-Serial WAN Interface Configuration Featuring CHDLC

[root@callisto:~#] ifconfig ?a


wp1chdlc  Link encap:Point-to-Point Protocol

          inet addr:  P-t-P:  Mask:

          UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:10 Memory:d0bb6000-d0bb7fff


[root@castor:~#] ifconfig ?A


wpachdlc0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1500

        inet --> netmask 0xfffffffc


[root@castor:~#] cat /etc/wanpipe/wanpipe1.conf


# WANPIPE1 Configuration File



# Date: Mon Mar 17 12:33:09 CET 2003


# Note: This file was generated automatically

#       by /usr/sbin/wancfg program.


#       If you want to edit this file, it is

#       recommended that you use wancfg program

#       to do so.


# Sangoma Technologies Inc.



wanpipe1 = WAN_CHDLC, Comment


wpachdlc0 = wanpipe1, , WANPIPE, Comment


CARD_TYPE       = S51X

S514CPU         = A


PCISLOT         = 9

PCIBUS          = 0

MEDIA           = E1

LCODE           = HDB3

FRAME           = NCRC4


ACTIVE_CH       = 10

Firmware        = /etc/wanpipe/firmware/cdual514.sfm

CommPort        = PRI

Receive_Only    = NO

Connection      = Permanent

LineCoding      = NRZ

LineIdle        = FLAG

Interface       = V35

Clocking        = External

BaudRate        = 1540000

MTU             = 1500

UDPPORT         = 9000

TTL             = 255



MULTICAST               = NO

IGNORE_DCD              = NO

IGNORE_CTS              = NO






SLARP_TIMER             = 0