I got it working some time afte my last post with this script:

==========================================
#!/bin/bash
chmod 0666 /dev/net/tun 
tunctl -t tap1 -u richard 
brctl addbr br0 ifconfig eth0 0.0.0.0 promisc 
route add default gw 10.0.80.1 
br0 brctl addif br0 eth0
ifconfig br0 10.0.80.56 netmask 255.255.255.0 broadcast 10.0.80.255 
brctl addif br0 tap1 
ifconfig tap1 up
#comment: you could use dhcp here #dhclient br0
===========================================

I'll read your script and compare to mine when I get time. At the end of the 
day I simply made the host interface tap1 and then gave my virtual machine 
the next ip address up in the chain, and 'hey presto', its all on my network.

However with my script one interesting side effect, all my linux machines have 
internet access, but the virtual machines, though on the samba network, have 
no internet access.  My ifconfig is here:

===========================================
br0       Link encap:Ethernet  HWaddr 00:13:77:01:14:CC  
          inet addr:10.0.80.56  Bcast:10.0.80.255  Mask:255.255.255.0
          inet6 addr: fe80::213:77ff:fe01:14cc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54496 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36649 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:73545923 (70.1 Mb)  TX bytes:3456383 (3.2 Mb)

eth0      Link encap:Ethernet  HWaddr 00:13:77:01:14:CC  
          inet6 addr: fe80::213:77ff:fe01:14cc/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:55414 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35893 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:74588138 (71.1 Mb)  TX bytes:3596149 (3.4 Mb)
          Interrupt:22 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:849 errors:0 dropped:0 overruns:0 frame:0
          TX packets:849 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:50324 (49.1 Kb)  TX bytes:50324 (49.1 Kb)

tap1      Link encap:Ethernet  HWaddr C2:4B:35:05:14:30  
          inet6 addr: fe80::c04b:35ff:fe05:1430/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:4688 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 
======================================

I've installed

 win98 (hopeless waste of time)
 win2000 (better)
winXP (fastest)

Had alot of trouble getting my old visual basic apps to run (in contrast to 
parallels), with ntvdm.exe errors, however at the end of the day with a 
win2000 SP3 machine I seem to have been successful and have been able to copy 
the image to another machine, recreate a new machine, and choose that image 
as the hard disk and all works well.

Any comments on my setup appreciated.

Richard


On Wednesday 06 June 2007 19:56, Peter Machell wrote:
> On 14/05/2007, at 8:31 AM, Richard Terry wrote:
> > Well horst, since you've obviously installed it can you write a
> > HOWTO for
> > lesser mortals to get the (non NAT) networking going between linux
> > and the
> > virtual machine.
> >
> > I've tried various instructions on how to set up tap/bridging etc
> > all to no
> > avail!!!!!!!!!!!!!!!!!
>
> Richard I have this working and it wasn't difficult.
>
> A couple of gotchas - you need some utilities:
> # apt-get install uml-utilities bridge-utils
>
> You need to write to /dev/net/tun :
> # chown pedro /dev/net/tun
>
> Add the virtual interface and bridge to /etc/network/interfaces:
>
> # cat /etc/network/interfaces
>
> auto tap0
> iface tap0 inet manual
>       up ifconfig $IFACE 0.0.0.0 up
>       down ifconfig $IFACE 0.0.0.0 down
>       tunctl_user pedro
>
> auto br0
> iface br0 inet dhcp
>       bridge_ports all tap0
>
> OK, in English. I have an eth0 that is a static IP with a router
> supplying DHCP as it's gateway.
> tap0 is the virtual interface and is set to no IP.
> br0 is the bridge and gets it's IP from DHCP (on the router).
>
> Host networking in virtualbox is simply supplied with the interface
> name: tap0
>
> The IP address is configured as usual in the guest Linux, using what
> it sees as eth0 and is on the same subnet as both the bridge and the
> real interface.
>
> Have I lost you yet? Working for me, loosely following the virtualbox
> user manual.
>
> As I thought, nothing but VMWare allows for snapshots on the fly.
> However, tonight I'm learning about LVM which will allow me to
> snapshot the whole partition on the fly very quickly, so I'll
> continue to use Xen and virtualbox and get some comparisons on speed.
>
> cheers,
> Peter.
> _______________________________________________
> Gpcg_talk mailing list
> [email protected]
> http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk
_______________________________________________
Gpcg_talk mailing list
[email protected]
http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk

Reply via email to