Version 1.0.0, revision 0.90, 21 Feb 2008
Copyright © 2006, 2007, 2008 CESNET, z.s.p.o.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. The license can be found at GNU web page.
Table of Contents
List of Figures
List of Tables
Table of Contents
This handbook describes NIC Card itself, its installation, configuration and different ways how to use it.
You can check latest news about NIC Card or NetCOPE at our web site: http://www.liberouter.org/.
The NIC Card is a basic network device for packet reception and transmission based on COMBO6X technology. It is able to receive and transmit packets on various speeds (1Gbps, 100Mbps and 10Mbps). Additionally this card supports precise timestamps, that can be very useful for instance for measuring of latencies in your network topology. This information can be later used for improving your topology or network device faults detection.
This NIC Card has been developed on NetCOPE platform as its simplest application. The NetCOPE platform supports rapid development of network application on FPGA accelerated cards by providing low-level abstraction layer for each card. This layer encapsulates network, system bus controllers or DMA transfers and thus speeds up application development. One of the main targets of NetCOPE on each card is to achieve maximal data throughput between user acceleration core on FPGA and software applications. In case of the NIC Card, data are transferred directly from Input blocks to user software applications without any modifications in user application core on FPGA.
network interface card with 4 1Gbps ports, lower speeds can be set via phyterctl tool
2 modes of transmissions to software supported:
packet based transmission for standard NIC mode
precise timestamps (precision up to 32ns), PTM card needs to be connected to COMBO card to ensure correct function of timestamps
NetCOPE platform provides these interfaces to software:
Standard network interface - NIC over NetCOPE acts in system as ordinary network interface. Received packets are passed from driver to operating system kernel and further through TCP stack to target application. Alternatively PCAP library, part of operating system, can be used to access packets in raw format avoiding passage through TCP stack (typical for monitoring applications as Tcpdump, Wireshark, Snort etc.). Advantage of this interface is its universality and possibility of using existing applications. Disadvantage is low throughput caused by passage through operating system kernel which requires disassembling packets into segments without exploiting advantages of aggregation.
Application specific interface - NetCOPE card provides general interface for block transfers to applications. Communication takes place directly between driver and userspace application without passage through TCP stack. Format of passed data is not restricted by operating system kernel and therefore this interface can benefit from using aggregated packets with control information, timestamps etc. appended. Except packet data various data (depending on accelerator purpose) such as netflow records, information extracted form packet headers, etc. can be transferred. NIC over NetCOPE uses this interface to transfer aggregated packets. In addition PCAP library adjusted to work within this interface, communicating directly to driver, avoiding passage through operating system kernel, has been created and is provided. Similar approach use companies as Endace, Napatech, etc.. Main advantage of this approach is high throughput using aggregation of smaller packets reducing DMA transfers overhead.
NIC package is available via WWW download page: http://www.liberouter.org/clients
To verify that the downloaded files are genuine and complete SHA1 digests are available. Download both the CHECKSUM.SHA1 file and the package file to the same directory. Run the sha1sum(1) command to verify the package file e.g. nic-2.0.0.tgz:
$ cat CHECKSUM.SHA1 | grep nic-2.0.0.tgz | sha1sum -c
If there are any errors in the package file integrity, they will be reported.
/firmware - COMBO6X card firmware (*.mcs files)
/base - source code for software tools and drivers
/mk - build system (makefiles)
/sys_sw/drivers - kernel drivers
/sys_sw/hwtools - necessary hardware tools for COMBO6X card
/sys_sw/lib* - libraries necessary for other tools
/sys_sw/projects/nic_netcope - configuration files and scripts for using NIC
/sys_sw/swtools/csxtool - tool for handle COMBO6X XML files
/doc - NIC project documentation - NIC Handbook
README - short manual how to build, install and use NIC Card
RELNOTES - differences against previous release
Table of Contents
Compilation and installation process is covered by the build system
located in the base/mk directory.
To build package you will need following tools (programs, libraries):
gmake 3.80 or later
autoconf 2.59 or later
automake 1.4 or later
gcc 3.0 or later
pciutils (lspci) 2.2.2 or later
lsof 4.72 or later
All scripts are running in /bin/sh shell interpreter so all scripts were created with aim to portability. But on all testing machine the /bin/sh program was actually Bash (/bin/bash). Therefore we recommend using Bash as a default shell.
To build kernel drivers needed by NIC package you will need
fully configured Linux 2.4 or 2.6 kernel source tree. More installation
and compilation details about kernel drivers are available in the README
file inside base/sys_sw/drivers/linux
directory.
The NIC Card has been designed to work on any PC-AT compatible computer running GNU/Linux or other "Unix-like" operating system. It has been tested only on computers that use the x86 family of processors. The hardware requirements necessary to run NIC Card are:
Intel Pentium or equivalent x86 based PC
COMBO6X - 64-bit/66 MHz PCI bus
The "sandwich" consisting of COMBO6X card and an interface card COMBO-4SFPRO fits into one PCI slot.
Following table express our experience with COMBO6X card compatibility to some motherboards.
Table 2.1. COMBO6X Motherboard Compatibility
| MB type | COMBO6X |
|---|---|
| Intel SE7501CW2 | compatible |
| Intel SE7520BD2D | compatible |
| Intel S5000VSA | compatible |
| Intel S5000PAL0 | compatible |
| Intel SE7525GP2 | incompatible |
| Intel SE7221BK1-E | incompatible |
Following table displays list of compatible GBICs, which we have tested. We haven't found any non-compatible GBIC yet, all GBIC satisfying SFP/XFP MSA specification should work.
Table 2.2. Tested GBICs
| Metallic 1Gbps (1000base-T) for COMBO-4SFPRO cards | Optical 1Gbps (1000BASE-LX and 1000BASE-SX) for COMBO-4SFPRO |
|---|---|
| Finisar FCLF-8521-3 | Agilent HFBR 57M5AP (850nm) |
| Linksys MGBT1 | Dell FTRJ-8519-7D (850nm) |
| Methode Electronics SP7041 | MSFP-FO-0850-M8511-111 (850nm) |
| Finisar FTRJ1321P1BTL (1310nm) |
This package can be used with the COMBO6X mother card and COMBO-4SFPRO add-on card with four SFP cages for GE interfaces.
You can find more information about COMBO6X cards at http://www.liberouter.org/hardware.php.
Table 2.3. Supported Firmware
| Mother Card | Add-on Card | Firmware | Features |
|---|---|---|---|
| COMBO6X | COMBO-4SFPRO | 03_04 | 4x Network interface for 1000/100/10Mbps with MTU control (=1526 Bytes) |
| Precise timestamps |
After plugging COMBO6X card into your PCI slot, you should test connection between the card and your PC. We use lspci(8) utility for this purpose. lspci(8) is a utility for displaying information about all PCI buses in the system and all devices connected to them. For correct recognition of the COMBO6X card you need update PCI ID Database used by lspci(8) or download pciutils-2.2.2 (program collection containing lspci(8) or later. If the lspci(8) output contains the following line your COMBO6X card is connected properly.
$lspci-d18ec:03:01.0 Ethernet controller: Cesnet, z.s.p.o. COMBO6X (rev 01)
Numbers at the beginning of the line can be different.
pkgtool(1) helps to build, install and uninstall the NIC distribution package.
$tar-xzvfnic-XX.YY.ZZ.tgz$cdnic-XX.YY.ZZ/base$./pkgtool--build
Replace XX.YY.ZZ with the chosen package version number such as 2.0.0.
If this is the first Liberouter package you have ever installed, you can
define installation directory with the --prefix=path
option. But remember that this installation path MUST not exists (e.g.
/usr/local is invalid
installation path on most systems because this directory exists). This
restriction is due to new installation framework which enables easy package
uninstall or package switching. More information about these features can be
found in the liberouterpkg
section.
The --prefix option takes effect only during building
package. If no prefix is set then
/usr/local/liberouter path is used.
$./pkgtool--build--prefix=/usr/local/nic
If you have previously installed some Liberouter package (flowmon, nic, nific, ids with liberouterpkg mechanism), the installation path is detected automatically as path used for the first installed package.
Remember that installation path given as --prefix parameter
will contain next subdirectories for binaries, libraries, man pages, etc.
These directories can be affected by future uninstalling or package
switching so it could be used as installation directory only for
Liberouter packages.
The tools and kernel drivers will be installed to the installation
directory (by default /usr/local/liberouter)).
#./pkgtool--install
If you are going to use udev mechanism to creating device files, you can
use pkgtool with --udev option. This option cause copying
file with COMBO6X card rules (combo6.udev.rules) to
the /etc/udev/rules directory.
#./pkgtool--install --udev
--udev option takes effect only with
--install option.
There are necessary following post-install steps:
Export Liberouter environment variables generated by pkgtool. These variables were printed as last output of pkgtool --install command and they are environment variables are in the following form
VARIABLE=value
Please, use these lines as a parameter for export command like in following example:
# ./pkgtool --install
...
[pkgtool output]
...
### Liberouter environment variables:
CS_XML_INDEX_PATH=/usr/local/liberouter/mcs/index
$ export CS_XML_INDEX_PATH=/usr/local/liberouter/mcs/index
For permanent export of this variable add same line
(export command) into the
/etc/profile configuration file.
export CS_XML_INDEX_PATH=/usr/local/liberouter/mcs/index
Liberouter environment variables are prepared only if they are needed. So if pkgtool doesn't print any "Liberouter environment variables:" you doesn't need export any variable.
Set PATH variable to point to installed NIC
tools directory (${PREFIX}/bin)
$ export PATH=/usr/local/liberouter/bin:$PATH
For permanent PATH change add following line into the
/etc/profile configuration file
export PATH=/usr/local/liberouter/bin:$PATH
Configure dynamic linker run time bindings by setting
/etc/ld.so.conf to point to the NIC
library directory (${PREFIX}/lib).
Add /usr/local/liberouter/lib
(by default) entry to the /etc/ld.so.conf file.
# echo "/usr/local/liberouter/lib" >> /etc/ld.so.conf
# ldconfig
Set /etc/man.config file to point to the
NIC man pages (${PREFIX}/man).
Add line
MANPATH /usr/local/liberouter/man
entry to the /etc/man.config file (name of this
file can little differ on different Linux distribution).
If you want to load NIC kernel modules when the PC starts up,
add following lines to the /etc/modules
file.
For COMBO6X card when using szedata interface:
combo6core
combo6x
szedata
szedatax_c6pcr szedatax_c6pcr blocks=4096 block_size=4096
For COMBO6X card when using standard network interface:
combo6core
combo6x
combo6x-c6pcreth
After this, you don't need to run niclkm(1) script any more.
In some distribution (e.g. Red Hat Enterprise Linux 4) you
have to use file /etc/rc.modules in place of
/etc/modules file. This file contains commands
to load kernel modules at boot time - it is actually script so it
must be an executable file:
# chmod +x /etc/rc.modules
so such file will look like this for COMBO6X card when using szedata interface:
#!/bin/sh
/sbin/modprobe combo6core
/sbin/modprobe combo6x
/sbin/modprobe szedata
/sbin/modprobe szedatax_c6pcr blocks=4096 block_size=4096
or like this for COMBO6X card when using standard network interface:
#!/bin/sh
/sbin/modprobe combo6core
/sbin/modprobe combo6x
/sbin/modprobe combo6x-c6pcreth
The NIC Card driver needs device files in the
/dev/combosix/ and
/dev/szedata/ directory. To
create them, run the combo6devices and szedatadevices
scripts in the
packages directory base/sys_sw/drivers/linux.
These devices are removed after reboot, so you need to run this script after each reboot.
# ./combo6devices
# ./szedatadevices
To run NIC as a non-privileged user set r/w permissions on
/dev/combosix/0 and
/dev/szedata/0 devices.
You have to change the permissions of the device files so that the non-privileged user that will execute the NIC tools has read-write access. For example, you can create a new group, say combo-rw, add that user to this group and change the file group ownership and permissions as follows:
# chgrp combo-rw /dev/combosix/0 /dev/szedata/0
# chmod 664 /dev/combosix/0 /dev/szedata/0
Using recent 2.6 kernels it might be wanted to use the sysfs/udev mechanisms to create device files. For more details about udev see http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
Example udev rules are placed in the package in
sys_sw/drivers/linux/combo6.udev.rules file. If
you didn't use option --udev during package
installation, copy this file to
/etc/udev/rules.d directory
and modify it (change group or permissions). Following line will
create COMBO6X device files required by the NIC Card:
KERNEL=="combosix[0-9]*", NAME="combosix/%n", GROUP="combo-rw", MODE="0664"
KERNEL=="szedata[0-9]*", NAME="szedata/%n", GROUP="combo-rw", MODE="0664"
Depending on your version of udevd you must adjust syntax of your udev rule file. Older versions of udevd require '=' character to match KERNEL key e.g. KERNEL="combosix[0-9]*". The newer one require '==' characters to match KERNEL key e.g. KERNEL=="combosix[0-9]*".
Please copy (and rewrite any previous version)
liberouterpkg script, located in the package base
directory into your standard binary directory (e.g.
/usr/local/bin/). This enables
using liberouterpkg script as standard system tool
$ liberouterpkg
Path where the liberouterpkg script is placed must be different from used package installation path. More information about liberouterpkg can be found in the liberouterpkg section.
All NIC tools come with its manual pages so for information about any tool (included configuration files) you can see these man pages by man(1) program, e.g.
$ man nic
$ man nic.conf
The nic-2.0.0 is the Liberouter package using liberouterpkg tool enabling package switching and fully package uninstalling. If you have installed any previous Liberouter package without liberouterpkg, please remove it completely (including all libraries and drivers) to ensure proper behavior of the installed package.
More information about these features can be found in the liberouterpkg section.
If you are installing new version of previously installed package (e.g. you have installed nic-2.0.0 and now you are installing nic-2.0.1 package) you will be asked by pkgtool(1) to decide if you wish to keep your own (but may be obsolete) configuration files or to overwrite them with our default (but up-to-date) configuration files.
liberouterpkg script is new tool covering new
Liberouter package installation framework which enables safe and easy
package uninstalling or simple package switching (and using different
project packages on the same PC). To display all available functions of
the liberouterpkg script use --help
option
$ liberouterpkg --help
liberouterpkg uses
/etc/liberouter/packages.list configuration file that
stores information about installed packages.
liberouterpkg can be used to display list of all installed Liberouter packages
# liberouterpkg --list
# Installed packages:
nic-2.0.0
or to display currently active package (only one package can be active at the same time)
# liberouterpkg
nic-2.0.0
liberouterpkg tool is able to safely uninstall any
previously installed Liberouter package (covered by new Liberouter
package installation framework with liberouterpkg) by
--uninstall=<PKG_ID> option where
<PKG_ID> is a package identification string
(that can be displayed by --list option)
# liberouterpkg --uninstall=nic-2.0.0
If you are using a nic package (nic-x.y.z package is active)
you are unable to use tools from e.g. flowmon package. Using
liberouterpkg script you can switch to any installed
package and change this way currently active package. For switching
packages use --switch=<PKG_ID> option where
<PKG_ID> is a package identification string
of a package that will be activated. List of available packages can be
displayed by --list option)
# liberouterpkg --switch=flowmon-1.3.0
Table of Contents
NIC Card configuration is based on nic.conf
(5) configuration file
located in the /etc/liberouter/
directory. This file stores e.g. network interfaces names and other network
interfaces properties. nic.conf is connected to the
NIC Card's starting scripts by the . (dot) shell command,
so it is, actually, set of variable definitions and these variables are then
used in our scripts. You can freely modify this file and redefine default
values of the NIC settings. Such changes take effect after running the
niclkm(1) and nic(1) scripts described in the next
chapter.
The possible variables and their meanings are described in following sections.
COMBO6_DEVICEFIRMWARE_PATHFIRMWARE_ID
FIRMWARE_PTM_RELPATH
BINDIR
These variables are only used when aggregation is enabled by setting AGREGATOR="YES".
AGREGATORSZEDATA_BLOCK_SIZESZEDATA_BLOCKSPTM_TIMESTAMPSThese variables are ignored when aggregation is enabled by setting AGREGATOR="YES".
You need to specify four network interfaces (N=[0-3]).
C6ETHN_NAMEbooting finished successfully c6eth03: Ethernet address ff:ff:ff:ff:ff:ff
C6ETHN_IPC6ETHN_MASKTable of Contents
Most of this chapter describes a single NIC Card design start - the NIC Card will not be automatically started again after rebooting PC. If you wish to start NIC Card anytime you will reboot the PC, please see the section called “init.d script”.
After building and installing package including post-install steps, all
NIC Card tools are available as any other system tool. There are two main
scripts to start NIC. Both scripts use the
/etc/liberouter/nic.conf configuration file.
For loading/removing NIC Card kernel modules the
niclkm(1) script is
used. This script must be executed with root privileges. There are two main
options for this script. Option -l is used for loading
NIC Card kernel modules. Modules are loaded appropriately to the selected mode
(no aggregation, aggregation, ptm timestamps) in the
nic.conf.
Option -r is used to remove any modules previously loaded.
Script supports only combo6x card. Detection of the card is
performed by the lspci(8) utility.
Combosix device "/dev/combosix/0" doesn't exist.
Please create all necessary devices.
Just give udev(8)
few seconds to do its job.
When all kernel modules are loaded, csid (1) is able to detect type of plugged cards and provide more detailed information. You should get following output on PC with installed combo6x mother card and sfpro add-on card:
$ csid
combo6x sfpro xc2vp20
nic(1) is the main start up script for NIC design. Script boots
firmware files (according to FIRMWARE_PATH variable from the
/etc/liberouter/nic.conf) and configures combo card
interfaces. To simply set up NIC, run nic script without
any parameters:
$ nic
To shut down combo card interfaces and detach drivers (actually stop NIC),
run the nic script with -s option:
$ nic -s
----------------------------------------------------- Attaching driver ----------------------------------------------------- csboot: unable to attach driver: Cannot allocate memory /usr/local/liberouter/bin/nic: Failed to attach driver!This error is caused by memory fragmentation and the solution is to reboot the machine.
More information about using nic script can be displayed
by -h option.
Booted firmware can be checked by csid (1):
$ csid -s
Board : combo6x
Addon : sfpro
Chip : xc2vp20
LAN ports: 4
Firmware : ok
SW : 0x41c10200
HW : 0x00030000
Text : NIC_NetCOPE
PCI brver: c610.05.09 (2007/11/09 14:30) NetCOPE Bridge
PCI PPC : [nic Nov 9 2007 21:02:59] 0xdeadbaff -booted- -running-
To use NIC Card in a mode with standard network interfaces, which are
configurable by e.g. ifconfig, you need to edit
nic.conf configuration file. This file is described in
Chapter 3, Configuration of the NIC Card.
Make sure aggregation is not enabled, so that
there is no AGREGATOR="YES" in the
configuration file. You may for example comment out that line or set
AGREGATOR="NO"
Create/Edit configuration for all four network interfaces.
After saving your settings, run these commands:
#niclkm -l$nic
# must be run by root.
After the execution of those scripts NIC Card is started and ready to use. There are four new network interfaces in the system. Numbers in the interface names are set according to number of card plugged in the PC (the first digit) and according to number of interface (second digit).
You can check that NIC Card is set up correctly by setting desired IP
address to NIC interfaces (via nic.conf or
ifconfig) and then ping
(8) it from PC connected
to some NIC's port. NIC should answer to echo request by echo reply.
To provide high throughput interface to access data from hardware, SZEDATA interface has been created in form of kernel modules szedata and szedatax_c6pcr. SZEDATA stands for straight zero-copy data interface API. More described in introduction section.
Use of NIC Card with SZEDATA interface is called Aggregation Mode.
To use NIC Card in aggregation mode you need to edit
nic.conf configuration file. This file is described in
Chapter 3, Configuration of the NIC Card.
Enable aggregation by setting AGREGATOR="YES".
Set memory size available to the szedata driver. Setting
SZEDATA_BLOCKS="65536" and SZEDATA_BLOCK_SIZE="4096"
should fit most cases.
If you have a PTM installed on your system, you may also set
PTM_TIMESTAMPS="YES" to use PTM card for packets timestamping.
After saving your settings, run these commands:
#niclkm -l$nic
# must be run by root.
After the execution of those scripts NIC Card is started and ready to use.
There are eight new szedata interfaces in
/dev/szedata/.
In this section is described format of data passed to software through szedata interface in NIC over NetCOPE card.
One block typically contains more data segments of variable length. Segment describes hardware data (hardware header) and content of one packet.
Length of whole segment is aligned to 8 bytes, although real length of data can be smaller - this empty gap must be skipped by application.
Table 4.1. Data format
| Offset (bytes) | Size (bytes) | Description |
|---|---|---|
| 0 | 2 | Segment size in bytes |
| 2 | 2 | Size of hardware data |
| 4 | Size of hardware data | Hardware header |
| ALIGN(4 + Size of hardware data, 8) | Segment size in bytes minus offset | Segment data (packet content), beginning aligned to 8 bytes |
7 6 5 4 3 2 1 0 00 a2 a1 a0 00 03 00 3c 07 06 05 04 03 02 01 00 0f 0e 0d 0c 0b 0a 09 08 17 16 15 14 13 12 11 10 1f 1e 1d 1c 1b 1a 19 18 27 26 25 24 23 22 21 20 2f 2e 2d 2c 2b 2a 29 28 37 36 35 34 33 32 31 30 00 00 00 00 3b 3a 39 38
More detailed format of hardware header in NIC over NetCOPE card:
Table 4.2. Hardware header format
| Offset (bytes) | Size (bytes) | Description | Values and meaning |
|---|---|---|---|
| 0 | 1 | Interface number | 0x1 - interface number 0, 0x2 - interface number 1, 0x4 - interface number 2, else - interface number 3 |
| 1 | 3 | Reserved | |
| 4 | 8 | PTM hardware timestamp |
For demonstration of work with szedata interface in NIC over NetCOPE card, szeread application has been created.
This application counts all received packets and can write packet information and content either in human readable or in PCAP format.
Please, see documented source code.
Well known libpcap library has been modified to support szedata interface as regular NIC. It allows to use widely used applications such as tcpdump, wireshark, nprobe or fprobe with benefits of Liberouter NIC Card or create new applications using PCAP API.
Detailed howto and examples can be found at tcpdump webpages (www.tcpdump.org)
To use libpcap-sze library, NIC Card must be run in Aggregation Mode, please see the section called “Aggregation Mode and Timestamps”.
Modified libpcap-sze sources are located in package in nic-2.0.0/base/sys_sw/ports/libpcap-sze-0.9.8 directory. To compile libpcap with SZEDATA interface support follow these steps:
Configure libpcap with specific parameters:
./configure --with-szedata=/absolute/path/to/linux/drivers --enable-ipv6 e.g. ./configure --with-szedata=/home/foo/src/nic-2.0.0/base/sys_sw/drivers/linux/ --enable-ipv6
Compile library (only static library is compiled as default):
make
Compile dynamic library by script mkshared.sh (optional):
./mkshared.sh
To check that libraries compiled well follow these steps:
libpcap.a
ar -t libpcap.a
Output should look like this:
pcap-sze.o
libpcap.so
nm libpcap.so | grep sze
Output should look like this:
00000000000142a0 T sze_datalink_op 0000000000014590 T sze_interface 00000000000145d0 T sze_mkpath 0000000000014680 T sze_open_live 00000000000142c0 T sze_platform_close 00000000000142b0 T sze_platform_finddevs 0000000000014330 T sze_read 00000000000142e0 T sze_setfilter 0000000000014260 T sze_stats
For dynamic version (libpcap.so) add -L/path/to/libpcap-sze/ to LDFLAGS variable.
For static version (libpcap.a) add -L/path/to/libpcap-sze/ -lpcap to compiler parameters.
Check if application we want to use is compiled with dynamic version of libpcap library:
ldd $(which tcpdump)
linux-vdso.so.1 => (0x00007fff837fe000) libpcap.so.0 => /usr/lib64/libpcap.so.0 (0x00002ada27630000) libc.so.6 => /lib64/libc.so.6 (0x00002ada2785d000) /lib64/ld-linux-x86-64.so.2 (0x00002ada27413000)
Set LD_LIBRARY_PATH or LD_PRELOAD variables:
export LD_LIBRARY_PATH=/path/to/libpcap/directory/
or
export LD_PRELOAD=/path/to/libpcap.so
Run application with szedata interface as parameter szeX (X is number of card).
tcpdump -i sze0
Optionally particular port of NIC Card can be specified with szeX:N or szeX.N parameter (N is number of port - NIC interface).
tcpdump -i sze0:2
Startup scripts are used to start some service (or some script) at the
machine's boot time. Our sample startup script is used to automatically
start up the NIC (loads kernel modules, boots firmware and set up network
interfaces) anytime your PC is starting up. Sample script is stored in the
package directory structure in the
base/sys_sw/projects/nic_netcope/doc
directory as a nic.rc file. It is prepared for use in
the SysV init system (tested on the Red Hat Linux distribution). Script is
commented so you can get a lot of information directly from the script.
Provided sample startup script uses the nic.conf file.
To run startup script at the boot time, follow these steps
Copy sample script to the
/etc/rc.d/init.d/ directory and
rename it to the nic.
Run chkconfig(8 ) and add nic as new service:
# chkconfig --add nic
To verify, everything is right, you can try to find nic in the list of services:
$ chkconfig --list | grep nic
Reboot your system.
To stop NIC Card (shut down interfaces, detach drivers and unload kernel
modules) go to the /etc/rc.d/init.d/
directory and use following command:
# ./nic stop
This command causes stopping NIC but the service will be started again
during the next reboot. To switch off the NIC service, in the current
runlevel, use chkconfig(8) with off option
after service name (nic in our case):
# chkconfig nic off
Last possibility is to remove NIC service from chkconfig management:
# chkconfig --del nic
For correct functionality changing the speed requires two steps. First the transceiver speed must be changed using the tool phyterctl(1). Next the IBUF component speed needs to be updated corresponding to the transceiver speed using the tool ibufctl(1).
phyterctl(1) is a tool used to display and change configuration of 4 interfaces available on COMBO-4SFPRO add-on cards. The tool displays information about link status, resolved speed or duplex mode on link. phyterctl(1) is also able to change the advertised speed and duplex mode and provides r/w access to internal registers of the physical layer IC.
ibufctl(1) is used to display and change configuration of IBUF components in COMBO6X designs.
Example of changing the speed on interface 0 to 100Mbps.
$phyterctl -c speed 100 -i0 ... set transceiver speed to 100Mbps on interface 0$ibufctl -s100 -i0 ... set IBUF speed to 100Mbps on interface 0
Example of phyterctl(1) listing with GBIC EEPROM information:
$ phyterctl -c gbic
Settings for card 0 (device /dev/combosix/0):
------------------------------ Interface 0 ---
Transceiver FINISAR CORP.
Model FCMJ-8521-3
Phyter vendor MARVELL
Phyter model 88E1111 Gigabit PHY
Speed 1000 Mb/s
Mode Full-duplex
Link status Up
------------------------------ Interface 1 ---
Transceiver FINISAR CORP.
Model FCMJ-8521-3
Phyter vendor MARVELL
Phyter model 88E1111 Gigabit PHY
Speed 1000 Mb/s
Mode Full-duplex
Link status Up
------------------------------ Interface 2 ---
Transceiver FINISAR CORP.
Model FCMJ-8521-3
Phyter vendor MARVELL
Phyter model 88E1111 Gigabit PHY
Link status Down
------------------------------ Interface 3 ---
Transceiver FINISAR CORP.
Model FCMJ-8521-3
Phyter vendor MARVELL
Phyter model 88E1111 Gigabit PHY
Speed 1000 Mb/s
Mode Full-duplex
Link status Up
More information can be found in the phyterctl(1) and ibufctl(1) man pages or in the README files placed in the base/sys_sw/hwtools/phyter/ and base/sys_sw/hwtools/ibufctl/ directories.
COMBO card doesn't support autonegotiation and autoswitching between 10Mbps/100Mbps/1000Mbps. You need to use phyterctl(1) and ibufctl(1) tools.
Crossbar component provides option that every PORT (RX part) and INPUT can be assigned to zero or more PORTS (TX part) or OUTPUTS. Vice versa, every PORT (TX part) and OUTPUT must have assigned exactly one of PORTS (RX part) or INPUTS.
crossbarctl(1) is a command line tool used to display current configuration and to connect ports, outputs and inputs.
$ crossbarctl -l p0 <== obuf0 p1 <== obuf1 p2 <== obuf2 p3 <== obuf3 -------- ibuf0 <== p0 ibuf1 <== p1 ibuf2 <== p2 ibuf3 <== p3
Example of connecting OUTPUT2 with INPUT3.
$ crossbarctl -s obuf2 -t ibuf3
Example of connecting PORT1 with INPUT3.
$ crossbarctl -s p1 -t ibuf2
More information can be found in the crossbarctl(1) man page.
Information about created devices /dev/combosix/* and /dev/szedata/* are held after creation in /proc directory.
General information about /dev/combosix/* devices are stored in /proc/driver/combo6 directory. Information about /dev/combosix/X devices are stored in /proc/driver/cardX subdirectories, where X stands for device number.
Driver version:
$ cat /proc/driver/combo6/version Combo6 Driver Version 0.3.57. Compiled on Feb 14 2008 09:11:04 for kernel 2.6.9-11.EL.
Additional information:
$ cat /proc/driver/combo6/card0/id
Board : combo6x
Addon : sfpro
Chip : xc2vp20
LAN ports: 4
Firmware : none
SW : 0x00000000
HW : 0x00000000
Text : unknown
PCI brver: c610.05.0a (2007/11/22 19:55) NetCOPE Bridge
PCI PPC : [] 0x0 -not loaded- -inactive-
Device [combo6x] c6pcreth
(0xabcdef02-0xabcdef02) {}: inactive
Device [combo6x] c6pcreth
(0x4f1c0000-0x4f1c0000) {NIFIC_1Gbps}: inactive
Device [combo6x] c6pcreth
(0x4f1c0000-0x4f1c0000) {Nific4_1Gb_COMBO6X}: inactive
Device [combo6x] c6pcreth
(0x4f1c0101-0x4f1c01ff) {Liberouter (4-NIC filtration)}: inactive
Device [combo6x] c6pcreth
(0x4f1c0100-0x4f1c01ff) {NIFIC_NetCOPE}: inactive
Device [combo6x] netcope-pcreth
(0x41c10200-0x41c102ff) {NIC_NetCOPE}: inactive
Device [combo6x] netflow-ph1-pcr
(0xf1010001-0xf10102ff) {NETFLOW_1Gbps_Probe}: inactive
Device [combo6x] scampi-ph2-pcr
(0x5ca20001-0x5ca20001) {SCAMPI 10Gbps Monitoring adapter}:
inactive
Device [combo6x] scampi-ids1-pcr
(0x1d510001-0x1d510001) {IDS_1Gbps_Traffic_Scanner}: inactive
Device [combo6x] scampi-ids2-pcr
(0x1d510200-0x1d510200) {IDS_1Gbps_Traffic_Scanner}:
inactive
General information about /dev/szedata/* devices are stored in /proc/driver/szedata directory. Information about /dev/szedata/X devices are stored in /proc/driver/szedata/deviceX subdirectories, where X stands for device number.
Version:
$ cat /proc/driver/szedata/version SZEData Driver Version 0.3.57. Compiled on Feb 14 2008 09:11:14 for kernel 2.6.9-11.EL.
Statistics:
cat /proc/driver/szedata/device0/stats General: Alloc blocks: 65536 /* number of allocated blocks */ Alloc bsize: 4096 /* allocated block size */ Alloc mmap: 268435456 /* allocated memory - product of two numbers above */ Alloc failed: 0 /* failed allocations */ Alloc over: 0 Active apps: 00000001 /* number of active applications using szedata interface */ Running apps: 00000001 /* number of running applications using szedata interface */ Application #0: /* INFORMATION about running applications */ Subs. interfaces: 0000000f /* subscribed interfaces mask - 0000000f means interfaces 0,1,2,3 */ Waiting packets: 0 Waiting peak pkts: 1 Poll threshold: 1 Total locks: 497 Total unlocks: 497 Application #1: Subs. interfaces: 00000000 Waiting packets: 0 Waiting peak pkts: 0 Poll threshold: 0 Total locks: 0 Total unlocks: 0 Application #2: Subs. interfaces: 00000000 Waiting packets: 0 Waiting peak pkts: 0 Poll threshold: 0 Total locks: 0 Total unlocks: 0 Application #3: Subs. interfaces: 00000000 Waiting packets: 0 Waiting peak pkts: 0 Poll threshold: 0 Total locks: 0 Total unlocks: 0
There are currently no known HW or SW limitations, in case that any will show up, they should be listed here.
Suggestions, bug reports and contributions of code are always valued. Please do not hesitate to report any problems you may find. If you encounter any suspicious behavior of your NIC Card please contact us.
Before submitting a problem, be sure you are running the latest NIC Card package version. Please send the following information to us:
Description of the buggy behavior, including operating system type, kernel version and anything else that causes the bug to appear.
The exact and complete text of any error messages printed or logged.
Exactly what you typed or did to demonstrate the problem.
A suggested fix, or even a patch, if you have one.
This will help us track the problem and resolve it. Bug reports with attached fixes are of course even more welcome.
Check our web pages for information about other projects, e.g. FlowMon (flexible flow monitoring system) or intrusion detection system.
We would like to acknowledge and thank to developers who contributed on the NIC Card project. This is the list of those developers in alphabetical order.
Table of Contents
[CoHW] Description of COMBO cards, http://www.liberouter.org/hardware.php .