ok. Using Bering to make a remote bridge. A very, very, mini howto.

You need a bering system, with bridging already working, and with the
tun.o kernel module loaded. Make sure /dev/net/tun exists, if it
doesn't, add

mkdir /dev/net
mknod /dev/net/tun c 10 200

to the end of /var/lib/lrpkg/root.dev.mk , and backup initrd.lrp.

(Jacques/Eric, would be nice to get that into Bering by default)

get the vtund executable (from http://vtun.sourceforge.net/ ) onto your
box.  Unfortunately, I don't have a package that'll do this (well, I do,
but it's compiled against glibc-2.2.5, so probably isn't much help to
most people).

make a bridge device in /etc/network/interfaces, add the real interfaces
you want to bridge, and the tap0 interface:

iface br0 inet static
        address 192.168.1.0
        masklen 32
        bridge_ports eth0 tap0

note that you *don't* want an "auto br0" line in there - this thing
won't work unless it's started after vtund has created tap0, so you
don't want the system bringing up the bridge at boot time.

create vtund.conf, you'll need something like:
--
options {
  port 5000;            # Listen on this port.

  # Path to various programs
  ppp           /usr/sbin/brctl;            
  ifconfig      /sbin/ip;
  route         /sbin/ifup;
  firewall      /sbin/ifdown;
}

# Default session options 
default {
  compress no;          # Compression is off by default
  speed 0;              # By default maximum speed, NO shaping
  type  ether;          # Ethernet tunnel
  proto tcp;            # UDP protocol
  stat  yes;            # Log connection statistic 
  keepalive yes;        # Keep connection alive
  multi yes;
  device tap0;          # Device tap0 
}

bridge {
  pass  dfg47df;         # Password
  up {  
         route "br0";
    };
  down {
         firewall "br0";
  };

--

You'll need a similar vtund.conf on either machine.  There are a few
things to note here.  The weird route/firewall thing is like a macro
expansion, what's really going on is an "ifup br0" and "ifdown br0".  I
couldn't get it to work reliable with UDP, but TCP works a charm,
obviously you can add crypto/compression options as you see fit (I tend
to run it over IPSEC tunnels, so I generally have all those options
disabled).

Start one machine as a server with

/usr/sbin/vtund -s

and the other as a client with

/usr/sbin/vtund -p bridge <ip of server>

Watch your kernel logs - if it's working, you'll get the usual bridge
STP messages happening, and 30 seconds later, you'll be bridging.  The
output of ps is useful, it tells you what the status of a tunnel is:

 1488         root       2284   S   vtund[c]: bridge ether tap0 

indicates a working tunnel.  "brctl show" will also give useful info:

bridge          8000.0040f466370a       yes             eth0
                                                        tap0

And that should about do it.  Any questions/omissions, please sing out.

This writeup'd GPL'd, etc.  Jacques/Eric, if you wish to put this
somewhere in the Bering docs, please do so. 

Cheers
Si


On Tue, Mar 11, 2003 at 02:28:37AM +0100, Jose Luis Abuelo Sebio said:
>  
>  Hi guys:
>  
>   Here is the situation, I have two computers running
>  with a bering distribution and working as bridges to
>  set up  a virtual lan. They are fisically connected
>  by
>  a cable and they work perfectly.
>  
>   The question is that I want to know how to set them
>  up if the computers working as bridges, and which
>  connect the workstations of the vlan, were located
>  in
>  different places like Europe and America. I was told
>  in one of this lists that I should use a tunnel and
>  that there is a tool called "vtun" that I could use.
>  
>   The problem is that I don't know how to set up the
>  computers to work as bridges and to create a tunnel
>  between them at the same time. They already work as
>  bridges but could some of you tell me how to do to
>  create a tunnel between them? Should I use the
>  "vtun"
>  tool for the bering distribution or you think that
>  there is something better?
>  
>    Thank for your time, and I hope there is some of
>  you
>  that can help me with this. I will really apreciate
>  it.
>  If you do not know the answer to this but you have
>  any
>  documentation about it I will apreciate it if you
>  can
>  send it to me.
>  
>  Luis
>  
>  P.S. If this is not the correct mailing-list, sorry,
>  but can you remail me to the correct one, thanks
>  
> 
> 
> ___________________________________________________
> Yahoo! Messenger - Nueva versi?n GRATIS
> Super Webcam, voz, caritas animadas, y m?s...
> http://messenger.yahoo.es
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> 
> _______________________________________________
> leaf-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/leaf-devel


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to