Open-FCoE WikiMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

Fcgw

From Open-FCoE Wiki

[edit] Introduction

This document explains how to set up and run the fcgw program with the tachynet driver to be a gateway between an FCoE initiator and a Fibre Channel fabric.

[edit] Procedure

1. Set up a machine running any recent Linux distribution, preferably with kernel 2.6.18 or later, but not new than 2.6.22. In 2.6.23, some sk_buff fields were changed which will require tachynet driver modifications.

2. Obtain an FC card from Atto Technology, any of the 2 Gb or 4 Gb Celerity PCI-X or PCI-Express product line will work. See http://attotech.com/hostadapter.html

3. Install the tachynet driver from sourceforge:

       # cd /tmp
       # http://downloads.sourceforge.net/tachynet/tachynet-0.33.tgz?modtime=1198252623&big_mirror=0
       # curl $url > tachynet-0.33.tgz
       # tar xf tachynet-0.33.tgz
       # cd tachynet-0.33
       # make install

4. Load the driver

       # modprobe tachynet

5. The tachynet driver creates pseudo-Ethernet interfaces with names like efc0 thru efc3, one for each Atto port. When T11-format FCoE frames are sent out of these interfaces, the driver decapsulates and sends out the raw FC frame. When a raw FC frame is received by the driver, it encapsulates it in FCoE and presents that to the upper network layer.

6. There are two ways to set up a gateway. Either the fcgw program can be used, which connects the efcX port to an ethX port, or a Linux bridge can be set up between the efcX port and ethX ports. Using the bridge has not been done very much, but should theoretically work. If you want to try this, skip to step 14.

7. Obtain the git tools if you don't already have them. They are at http://www.kernel.org/pub/software/scm/git/

8. Get fcgw from open-fcoe.org. It isn't necessary to be root for this.

$ mkdir fcoe # or any place to put the source $ cd fcoe

       $ git clone git://open-fcoe.org/archive/open-fcoe-devtools.git

9. Build fcgw.

There is an INSTALL document in the top-level directory, and you can follow that, but be sure to say: make FCGW=y' install It builds all of the user-level tools, but if you just want fcgw, you can do this:

       $ cd open-fcoe/usr/common/libsa
       $ make
       $ cd ../libfc
       $ make
       $ cd ../libtps
       $ make
       $ cd ../../ofc/tools/common/src
       $ make
       $ cd ../../fcgw/src
       $ make
       $ cd ../../fcgw/src
       $ cd ../../../../../build-i386-linux-debug/ofc/tools/fcgw/src
       $ su
       # cp fcgw /usr/local/bin/fcgw

11. Configure the interfaces up. Optionally, you may want to increase the MTU on the Ethernet side.

       # ifconfig efcY up
       # ifconfig ethX mtu 2400
       # ifconfig ethX up

12. Start fcgw. Note, if your ethernet side uses the old pre-T11 FCoE encapsulation, set the environment variable shown:

       # export FCOE_OLD_ethX=1        # for old protocol only
       # fcgw -i ethX -f efcY -n &

13. Optionally, fcgw can use FCIP to transit over TCP-IP between two gateways. For example, if the FCoE ethernet interface is on machine gw1 and the Atto FC interface is on gw2, you can do this by running:

       gw2 # fcgw -l :3333 -f efcY -n
       gw1 # fcgw -i ethX -g gw2:3333

This tells fcgw on gw2 to listen on port 3333 for FCIP connections and relay the frames to efcY. Then fcgw on gw1 is started and relays frames from the ethernet port ethX to gw2 port 3333. Any reasonable port number can be used, and it can be defaulted to the standard FCIP port 3225 by omitting it (use -l 0 and -g gw2).

That's it.

14. How to use a software bridge as a gateway:

       Note this only works with the standard T11 Encapsulation, unless you
       grab version 0.31 of the tachynet driver.

15. Create the bridge. Optionally, you may want to increase the MTU on the Ethernet side.

       # brctl addbr gw
       # brctl addif efcY
       # brctl addif ethX
       # ifconfig ethX mtu 2400        # optional
       # ifconfig ethX up promisc
       # ifconfig efcY up promisc

Retrieved from "http://www.open-fcoe.org/openfc/wiki/index.php/Fcgw"

This page has been accessed 1,938 times. This page was last modified 00:05, 12 September 2008.


Find

Browse
Main Page
Community portal
Current events
Recent changes
Random page
Help
Donations
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list
Statistics
Bug reports
More...