Blaisorblade <> wrote:
On venerd́ 15 giugno 2007, Richard Andrews wrote:
> --- Christopher Marshall wrote:
> > The simplest way to do that (have a host act like a router between
> > guests) would be to use ethertap devices. Each guest would talk to to
> > the host through a different tap device and the guests would each use
> > eth0 on their side.
> What about PPPoE? Same star topology restriction though. Is it possible to
> allow the guests to communicate TAP-to-TAP (guest-to-guest)? If this was
> possible then PPPoE could establish particular pipes.
> If IP via the host is used as the fabric, then you might want to consider
> running GRE or IPSec tunnels guest-to-guest which would give you the
> ability to set up pretty much any point-to-point topology. The devices
> would be tun devices instead of ppp so they would carry IP packets instead
> of PPP packets.

Well, I must admit I do not remember the details. However, given that SSH
provides a virtual terminal, i.e. a tty, I remember a tip by Alessandro
Rubini about using ppp over ssh. I don't remember the details, and well,
that's really an hack for demostration purposes. But I wanted to throw in
this suggestion anyway.
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade

This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
User-mode-linux-user mailing list
You use the linux ethernet bridging to create tap-to-tap ethernet networking.

From the host, use the brctl command to add two or more tap devices to an ethernet bridge device on the host.

As with tunctl, you can call the bridge device anything you want.  Let's say you call it br0.

brctl addbr br0
 ifconfig tap0 up
 brctl addif br0 tap1
 ifconfig tap1 up
 brctl addif br0 tap2
ifconfig br0 up

At this point, tap1, tap2, and br0 will all be glued together into one ethernet hub.  Packets sent by the host or either guest can be seen by the other two.  You could use pppoe at this point to establish ppp connections.

You can keep the host  completely out of it if you like (except for using the bridging driver on the host) and have one of the guests be a pppoe server for other guests to attach to.

If you want to use ssh and pppd (by bringing up TAP to host networking first), you can also do that.  The key is the pty argument to pppd.  Instead of giving ppp a /dev/tty device, you can give it any command (such as an ssh command) that establishes two way communication through the pty argument to the other pppd (like pty "ssh -l user host pppd notty".  It's a little more complicated than that.

If the ethernet bridge doesn't work for you let me know and I can post a script I use to to ssh+pppd VPNs.

Chris Marshall.