What is it ?
ATM bridging (RFC2684) is mainly use in the scope of xDSL connections. It provides a convenient way to extend ethernet facility over ATM. The RFC 2684
“describes two encapsulations methods for carrying network interconnect traffic over AAL type 5 over ATM”. In clear, this explains how to encapsulate standard network traffic (such as ethernet) in ATM to carry them over long distance. For that we use AAL type 5, which is the data transfer protocol layer of ATM.
Marcell Gal is the main author of the linux implementation. The homepage of the linux implementation
contains link to patch for different kernel.
But, a usable version of this code is included in the recent 2.4 kernel (since 2.4.19 in fact). Thus the only thing needed to use it is to put at least CONFIG_ATM_BR2684=m in your kernel configuration.
If you experiment problems, you can try to use this version of the driver
. It is an experimental version based on modifications from Alex Zeffertt and your servitor.
Of course, you need to have a driver for your ATM card. But, you can also use atmtcp to do some tests. More informations about the use of atm cards and atmtcp can be found in the Linux ATM Howto
User space utility
The utility can be found here
The last version at the writing of this article seems to be brctl-010226.c
. To compile it you need at least libatm (from ATM0.78 or later) available from http://linux-atm.sourceforge.net/
. I’ve done a slightly modified version which have atm qos support : br2684ctl
The compilation itself is done by :
cc -o br2684ctl brctl-010226.c -latm
Setting up an interface
From user space, setting up a bridge connection is quite simple. First, you link an ATM VC with an interface and then you configure this interface.
The syntax of the command is the following :
br2684ctl [-c n -e 0|1 -b 0|1 -s buf_size -a [itf].vpi.vci ]+
-a [itf].vpi.vci : ATM PVC number, VPI and VCI. Mandatory
-c n : BR2684 interface number such as nas0,
-e 0|1 : Encapsulation method. 0=LLC, 1=VC mux.
default is 0, LLC
-b 0|1 : Running background. 1=background,
0=foreground. Default is 0
-s buf_size : send buffer size. Default is 8192.
Thus an interface can be created by
br2684ctl -b -e 0 -c 0 -a 0.35
This create an interface named nas0 which is link to ATM interface 0, VP 0 and VC 35. LLC encapsulation is used due to the -e switch. The bridge utility run in background thanks to the -b switch. You have to set the number of the interface using the -c switch.
The setting of this interface is done by the well known ifconfig :
ifconfig nas0 192.168.0.1 netmask 255.255.255.0 up
Use nas interface with standard bridging
You can use standard bridging capability of the linux kernel to bind together different interfaces, including nas interfaces. Let see an example, we will bridge eth0 and nas0. There’s no need ta have an adress on the interfaces nas0 and eth0. You just need to bring them up with ifconfig INTF up.
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 nas0
ifconfig br0 up
Use nas interfaces with bonding
As nas interface encapsulate ethernet in ATM, you can use bonding to aggregate nas interfaces.
First, you just have to set up your nas interfaces with br2684ctl. Then, you can set up a bonding interface using them :
ifconfig bond0 220.127.116.11 netmask 255.255.255.252
ifconfig nas1 up
ifconfig nas2 up
ifenslave bond0 nas1
ifenslave bond0 nas2
And you’re done, the bond0 interface is ready to serve.
The problem is that you must have the control of both ends of the ATM network to be able to use the aggregated link. So, it’s useless if your ISP does not help you and even more useless if you’ve got two ISPs.
Atm QOS usage with RFC2684 bridging
If you use the modified version of the utility with QOS support. You can set up the ATM shapping on the interface using stanard expression of the atm qos parameter :
br2684ctl -b -c 35 -e 0 -q ubr,aal5:max_pcr=2Mbps,min_pcr=320kbps,max_sdu=1524 -a 0.35
Be aware, that you must specify the qos parameter before giving the -a For more details about qos parameter, see the man page for qos.