swsw Code
Brought to you by:
acreo,
viktornordell
===== General =====
SWSW ("Software Switch") is highly configurable Ethernet switch running
in userspace. The switch support for several recent Ethernet amendments
such as Provider Bridges (802.1AH) and Provider Backbone Bridges (802.1AH).
It is perfect when you need to have an extendible and controllable switch,
for example when there is a need to control a switch from a control plane.
It can also be extended to support new and experimental protocol, including
protocols above Ethernet. (Some IP support already exists).
===== Installing =====
See INSTALL.
===== Running =====
To run SWSW you need first to define a config to use. The config consists
of an XML file, which includes the following elements:
mactable:
There you define MAC destination values for frame, different entries
exists for the different types of frames (c-tag, s-tag, etc.). This
is not needed in Ethernet learning is enabled.
vlantable:
In the VLAN-table you define which port should be a part of a LAN.
Yet again we have different types, for example cvlan for Q-tagged.
Each port that is part of for example an Q LAN will need to have an
entry here.
interface:
Here you do actions on frames entering the interface (direction="in")
or leaving interface (direction="out"). First you can match on the
type of frame, such as cframe. Then you may do a match, for example
matching the VID value of the frame. Lastly you can to actions, for
example adding (pushing) a tag to the frame, or removing a tag (pop).
In the config dir in the source file, or in the swsw config folder
(etc/swsw) contains several example configurations.
To run SWSW with the default config location (etc/swsw/swsw.conf) simply
start swsw as root (e.g. sudo swsw) and it will start.
===== Runtime configuration =====
SWSW also supports adding and removing configuration while it's running.
This is done by sending the XML config to the config port (default:4321)
with a header.
To add config to a running swsw deamon, use the swsw-conf command. If
only a config is given to the command (swsw-conf conf.xml) then the config
will be added to swsw running locally. You may also tell it to connect
to another swsw instance (by changing IP/port) and also tell it to delete
a config (by using the -d flag).
===== Help / Bug / Issues =====
Please report bug etc. to either of the following:
Viktor Nordell viktor.nordell@acreo.se
Roland Elverljung roland.elverljung@acreo.se
Pontus Sköldström pontus.skoldstrom@acreo.se