Linux Networking/Frame Relay

Frame Relay
The Frame Relay device names are `dlci00', `dlci01' etc for the DLCI encapsulation devices and `sdla0', `sdla1' etc for the FRAD(s). Frame Relay is a new networking technology that is designed to suit data communications traffic that is of a `bursty' or intermittent nature. You connect to a Frame Relay network using a Frame Relay Access Device (FRAD). The Linux Frame Relay supports IP over Frame Relay as described in RFC-1490.

Kernel Compile Options:

Network device support ---> <*> Frame relay DLCI support (EXPERIMENTAL) (24)  Max open DLCI (8)  Max DLCI per device <*>  SDLA (Sangoma S502/S508) support

Mike McLagan, mike.mclagan@linux.org, developed the Frame Relay support and configuration tools. Currently the only FRAD supported are the Sangoma Technologies S502A, S502E and S508.

To configure the FRAD and DLCI devices after you have rebuilt your kernel you will need the Frame Relay configuration tools. These are available from ftp.invlogic.com. Compiling and installing the tools is straightforward, but the lack of a top level Makefile makes it a fairly manual process: user% tar xvfz .../frad-0.15.tgz user% cd frad-0.15 user% for i in common dlci frad; make -C $i clean; make -C $i; done root# mkdir /etc/frad root# install -m 644 -o root -g root bin/*.sfm /etc/frad root# install -m 700 -o root -g root frad/fradcfg /sbin rppt# install -m 700 -o root -g root dlci/dlcicfg /sbin

Note that the previous commands use sh syntax, if you use a csh flavour instead (like tcsh), the for loop will look different. After installing the tools you need to create an /etc/frad/router.conf file. You can use this template, which is a modified version of one of the example files:


 * 1) /etc/frad/router.conf
 * 2) This is a template configuration for frame relay.
 * 3) All tags are included. The default values are based on the code
 * 4) supplied with the DOS drivers for the Sangoma S502A card.
 * 5) A '#' anywhere in a line constitutes a comment
 * 6) Blanks are ignored (you can indent with tabs too)
 * 7) Unknown [] entries and unknown keys are ignored
 * 1) Unknown [] entries and unknown keys are ignored

[Devices] Count=1                # number of devices to configure Dev_1=sdla0            # the name of a device
 * 1) Dev_2=sdla1           # the name of a device

Access=CPE Clock=Internal KBaud=64 Flags=TX
 * 1) Specified here, these are applied to all devices and can be overridden for
 * 2) each individual board.
 * 1) MTU=1500              # Maximum transmit IFrame length, default is 4096
 * 2) T391=10               # T391 value    5 - 30, default is 10
 * 3) T392=15               # T392 value    5 - 30, default is 15
 * 4) N391=6                # N391 value    1 - 255, default is 6
 * 5) N392=3                # N392 value    1 - 10, default is 3
 * 6) N393=4                # N393 value    1 - 10, default is 4
 * 1) N393=4                # N393 value    1 - 10, default is 4


 * 1) Specified here, these set the defaults for all boards
 * 2) CIRfwd=16             # CIR forward   1 - 64
 * 3) Bc_fwd=16             # Bc forward    1 - 512
 * 4) Be_fwd=0              # Be forward    0 - 511
 * 5) CIRbak=16             # CIR backward  1 - 64
 * 6) Bc_bak=16             # Bc backward   1 - 512
 * 7) Be_bak=0              # Be backward   0 - 511


 * 1) Device specific configuration
 * 1) Device specific configuration
 * 1) Device specific configuration

[sdla0] Type=Sangoma           # Type of the device to configure, currently only # SANGOMA is recognized Board=S502E Port=360               # Port for this particular card Mem=C8                 # Address of memory window, A0-EE, depending on card IRQ=5                  # IRQ number, do not supply for S502A DLCIs=1                # Number of DLCI's attached to this device DLCI_1=16              # DLCI #1's number, 16 - 991
 * 1) The first device is a Sangoma S502E
 * 1) The first device is a Sangoma S502E
 * 1) These keys are specific to the 'Sangoma' type
 * 2) The type of Sangoma board - S502A, S502E, S508
 * 1) The type of Sangoma board - S502A, S502E, S508
 * 1) The type of Sangoma board - S502A, S502E, S508
 * 1) The name of the test firmware for the Sangoma board
 * 2) Testware=/usr/src/frad-0.10/bin/sdla_tst.502
 * 3) The name of the FR firmware
 * 4) Firmware=/usr/src/frad-0.10/bin/frm_rel.502
 * 1) The name of the FR firmware
 * 2) Firmware=/usr/src/frad-0.10/bin/frm_rel.502
 * 1) DLCI_2=17
 * 2) DLCI_3=18
 * 3) DLCI_4=19
 * 4) DLCI_5=20
 * 5) Specified here, these apply to this device only,
 * 6) and override defaults from above
 * 7) Access=CPE            # CPE or NODE, default is CPE
 * 8) Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
 * 9) Clock=Internal        # External or Internal, default is Internal
 * 10) Baud=128              # Specified baud rate of attached CSU/DSU
 * 11) MTU=2048              # Maximum transmit IFrame length, default is 4096
 * 12) T391=10               # T391 value    5 - 30, default is 10
 * 13) T392=15               # T392 value    5 - 30, default is 15
 * 14) N391=6                # N391 value    1 - 255, default is 6
 * 15) N392=3                # N392 value    1 - 10, default is 3
 * 16) N393=4                # N393 value    1 - 10, default is 4
 * 1) N392=3                # N392 value    1 - 10, default is 3
 * 2) N393=4                # N393 value    1 - 10, default is 4


 * 1) The second device is some other card
 * 2) [sdla1]
 * 3) Type=FancyCard        # Type of the device to configure.
 * 4) Board=                # Type of Sangoma board
 * 5) Key=Value             # values specific to this type of device
 * 1) Board=                # Type of Sangoma board
 * 2) Key=Value             # values specific to this type of device

CIRfwd=64              # CIR forward   1 - 64
 * 1) DLCI Default configuration parameters
 * 2) These may be overridden in the DLCI specific configurations
 * 1) These may be overridden in the DLCI specific configurations
 * 1) Bc_fwd=16             # Bc forward    1 - 512
 * 2) Be_fwd=0              # Be forward    0 - 511
 * 3) CIRbak=16             # CIR backward  1 - 64
 * 4) Bc_bak=16             # Bc backward   1 - 512
 * 5) Be_bak=0              # Be backward   0 - 511


 * 1) DLCI Configuration
 * 2) These are all optional. The naming convention is
 * 3) [DLCI_D _]
 * 1) [DLCI_D _]

[DLCI_D1_16]
 * 1) IP=
 * 2) Net=
 * 3) Mask=
 * 4) Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
 * 5) DLCIFlags=TXIgnore,RXIgnore,BufferFrames
 * 6) CIRfwd=64
 * 7) Bc_fwd=512
 * 8) Be_fwd=0
 * 9) CIRbak=64
 * 10) Bc_bak=512
 * 11) Be_bak=0

[DLCI_D2_16]
 * 1) IP=
 * 2) Net=
 * 3) Mask=
 * 4) Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
 * 5) DLCIFlags=TXIgnore,RXIgnore,BufferFrames
 * 6) CIRfwd=16
 * 7) Bc_fwd=16
 * 8) Be_fwd=0
 * 9) CIRbak=16
 * 10) Bc_bak=16
 * 11) Be_bak=0

When you've built your /etc/frad/router.conf file the only step remaining is to configure the actual devices themselves. This is only a little trickier than a normal network device configuration, you need to remember to bring up the FRAD device before the DLCI encapsulation devices. These commands are best hosted in a shell script, due to their number:

#!/bin/sh # Configure the frad hardware and the DLCI parameters /sbin/fradcfg /etc/frad/router.conf || exit 1 /sbin/dlcicfg file /etc/frad/router.conf #            # Bring up the FRAD device ifconfig sdla0 up            # # Configure the DLCI encapsulation interfaces and routing ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up            route add -net 192.168.10.0 netmask 255.255.255.0 dlci00 #            ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up             route add -net 192.168.11.0 netmask 255.255.255.0 dlci00 #            route add default dev dlci00 #