Atm bridging


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.

Linux implementation

Kernel module

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 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, nas1,... Mandatory -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 netmask up

Advanced use

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 : modprobe bonding ifconfig bond0 netmask 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.


 Posted by at 14:53

  7 Responses to “Atm bridging”

  1. ————————————————————————————
    How to get an IP with a dhcpclient on a ATM interface with a encapsulation 2684/routed/VC/MUX

    Hy (& sorry for my english),

    i need for my Job to use a dsl modem configured with rfc2684 ROUTED (VC/MUX) 8/36 but with DHCP (it’s THE challenge)

    The modem synchonisation ist OK and work fine with the Kernel driver Ueagleatm (it’s a Sagem 800 or E4) and the IP passerell etc… but coded in hard with the ATM demon (i presume) But i don’t find a “routine” for DHCP issue…. ?

    I work on since 4 years with any solution and naturly on a linux :) with a fresh kernel 2.6.33 (gentoo) ?

    Sir, do you have an idea, i’m lost (and EndUser by the way…)

    Best regards.


  2. If you have a clean rfc2684 interface on your Linux, you should be able to run dhclient on it.

    As it seems not to be the case, the modem or the modem driver may be responsible of this. I’ve never deal with this model and I can’t help you without more details.

    Best regards,

  3. I’m about to set up a Quad Port Solos PCI adsl modem from Traverse Tech. I found an ISP that does ADSL bonding. Is compiling ifenslave and using it per your example the best way to bond four nas slaves or is using sysfs the better way now? I am using the 2.6.32 kernel. The documentation on bonding is scant and scattered.

  4. I would give a try to sysfs which provides a clean way to configure every aspect of the bonding.
    Have you looked at the bonding.txt file in kernel documentation ?

  5. Yes, I did glance at bonding.txt which is where I first saw mention of sysfs for the first time. At the time my googling for interface bonding came up with ifenslave. I finally found it in the documentation folder but noticed bonding.txt. This is where the questions in my mind started. I will definitely try sysfs.

    Thanks for responding so quickly!

  6. I have a question:
    when i try to create a interface, such as nas1, I use command:
    BeijingAuto2 ~ # br2684ctl -b -c 34 -e 0 -a 55.41——————–pvc:55.41
    br2684ctl[10351]: Interface “nas34″ created sucessfully
    br2684ctl[10351]: Communicating over ATM 0.55.41, encapsulation: LLC
    br2684ctl[10351]: Fatal: failed to connect on socket; Invalid argument

    can you give me some advices about it. and how can I resolve this issue.
    Thank you

  7. It may be linked with the VP being 55. It is not supported by all card (0 is sometime the only VP supported).

    Can you run the command in strace to see what happen. You should see failure at connect call.

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>