Generic HDLC layer is included in the official Linux kernel.
Ethernet framing using HDLC or FR PVC is compatible with 802.1Q VLAN and 802.1D Ethernet bridging.
A list of supported cards is here.
Linux kernel support by version is here.
Short info about using the drivers and sethdlc utility is here.
An experimental Inverse ARP daemon program is here. You may need it if your Frame-Relay IP provider requires you to use InARP.
A small utility for testing synchronous serial cards is here.
Currently, low-level drivers for the following devices use the generic HDLC layer:
Linux 2.6
Linux 2.4
All listed cards are supported except wanXL. If you have a PC300RSV or PC300X21 card you can choose between a driver written by Cyclades Corp or one written by me.
If you wish to use C101, N2 and/or PCI200SYN card(s), and/or PC300RSV/X21 with my driver, consult the following list and patch your kernel to use 1.14a or later version of the generic HDLC layer. If you have other card(s) please check the documentation provided by the manufacturer or the driver's author.
Linux 2.2
Later Linux 2.2 kernels contain hardware drivers for C101, N2 and wanXL cards. This is really old code no longer actively maintained by me.
Sethdlc utility for Linux 2.2 can be found here.
If you have a wanXL card, you will need a firmware file (available from SBE Inc). After the wanxl.o driver module is loaded, verify that one hdlc0 device (per card) has been created, and then load the firmware using:
sethdlc hdlc0 run /path/to/sbew400.pdmIt should create hdlcX devices for the remaining ports (in case of 2- or 4-port card).
Click here to see file directory containing files related to generic HDLC.
Apply the patches if required, configure your kernel and build the driver modules. Load the modules using either insmod/modprobe programs or through /etc/modules.conf (or /etc/modprobe.conf) file. At least hdlc module and the hardware driver for your card should be loaded. Once the driver is loaded, verify that the network device(s) are created (issue "ifconfig -a" or "ip link" command and look for devices named hdlc0, hdlc1 etc.)
Get, unpack and compile the sethdlc utility. Remember to get a correct version for your kernel. If your kernel source is not in /usr/src/linux, please change the kernel include path in Makefile or use -I option to gcc. If you get "Generic HDLC layer version mismatch" error while compiling sethdlc then either your compiler is using wrong kernel headers (probably from some glibc-kernheaders package) or you haven't patched your kernel tree correctly.
As the drivers don't probe for ISA cards, you have to specify IRQ setting, RAM window address and (in case of RISCom/N2) hardware I/O port number used by the card. Use something like:
insmod n2 hw=io,irq,ram,ports[:io,irq,...]example:
insmod n2 hw=0x300,10,0xD0000,01("01" means that both ports 0 and 1 should be enabled - there is no way to detect the number of ports on RISCom/N2 card)
In case of C101 you need:
insmod c101 hw=irq,ram[:irq,ram...]example:
insmod c101 hw=9,0xDC000
If you have a driver built into the kernel, pass the equivalent "n2.hw=io,irq,ram,ports:..." or "c101.hw=irq,ram:..." parameter while booting your kernel.
With Linux kernel 2.2 and 2.4 you need double quotes - use something like:
insmod n2 '"hw=io,irq,ram,ports[:io,irq,...]"'or, if the driver is built into the kernel, pass an equivalent "n2=io,irq,ram:..." (no "hw.") or similar parameter while booting.
Having verified that hdlcX network devices are created, you may now set the physical interface parameters and the requested protocol. Use sethdlc to set physical interface, clock rate, HDLC mode used, and add any required PVCs if using Frame Relay. Usually you need something like:
sethdlc hdlc0 v35 clock int rate 128000 sethdlc hdlc0 cisco interval 10 timeout 25 ifconfig hdlc0 localIP pointopoint remoteIP
sethdlc hdlc0 rs232 clock ext sethdlc hdlc0 hdlc-eth ifconfig hdlc0 localIP netmask ... broadcast ...
sethdlc hdlc0 clock ext sethdlc hdlc0 fr lmi ansi sethdlc hdlc0 create 99 # creates PVC with DLCI = 99 ifconfig hdlc0 up ifconfig pvc0 localIP pointopoint remoteIPIn Frame Relay mode, "ifconfig" master hdlc device "up" (without assigning any IP address to it) before using any pvc devices.
The following command displays current settings of a given device:
sethdlc hdlc0or
sethdlc pvc0
Copyright © 2000-2007 Krzysztof Halasa