[Netkit.users] Tap in different domain

Massimo Rimondini rimondin a dia.uniroma3.it
Lun 5 Nov 2007 21:30:55 CET


Dear Paolo,

should you find difficulties in achieving your goal, here are some hints
which you may hopefully find useful.

Creating a tap interface consists of the following steps:
1) Define an interface on your host:
$NETKIT_HOME/bin/tunctl -u user_name -t tap_name
2) Assign an IP address to that interface:
ifconfig tap_name A.B.C.D netmask W.X.Y.Z up
3) Start a virtual hub connected to the tap interface:
$NETKIT_HOME/bin/uml_switch -hub -tap tap_name -unix
$HOME/.netkit/hubs/some_name.cnct
4) Start a virtual machine connected to that virtual hub. The easiest way to
do this is to adapt the command which you get by typing "vstart vm --eth0=A
--print". You will find some option like
"eth0=daemon,,,/home/you/.netkit/hubs/vhub_you_A.cnct", where you ought to
replace vhub_you_A.cnct with the previously chosen some_name.cnct.
5) Configure the network interface inside the virtual machine to be on the
same subnet as tap_name.

In order to revert things you simply have to get rid of the tap device:
1) ifconfig tap_name down
2) $NETKIT_HOME/bin/tunctl -d tap_name

The above configuration can be arbitrarily flavoured, for example, by
enabling NAT so as to let virtual machines communicate with an external
network without sending around weird IP addresses.
The exact configuration steps performed by Netkit when requested to set up a
tap interface are documented in the man page of vstart in the section
"Important notes about using ``tap'' collision domains" and can be found in
the script $NETKIT_HOME/bin/manage_tuntap.

Regards,
Massimo. 

> -----Original Message-----
> From: netkit.users-bounces a list.dia.uniroma3.it 
> [mailto:netkit.users-bounces a list.dia.uniroma3.it] On Behalf 
> Of Paolo Gambale
> Sent: Wednesday, October 31, 2007 12:44 PM
> To: netkit.users a list.dia.uniroma3.it
> Subject: [Netkit.users] Tap in different domain
> 
> Thanks,
> I will try to do in that way.
> Anyway I'm still interest in add the possibility to connect 
> different virtual machine on different "tap" collision domain.
> I'm actually working on the script_utils of NetKit trying to 
> change it in a way that will enable us to have different tap 
> collision domain attach to different bridge following the 
> implementation reported in this paper : 
> http://www.virtualbox.org/wiki/Advanced_Networking_Linux
> 
> Best Regards,
> Paolo
> 
> --
> --------------------------------------------------------------
> Paolo Gambale		            e-mail: gambale a tid.es
> TELEFONICA I+D			    Network Core & Protocols
> C/Emilio Vargas 6; 28043 Madrid; Spain
> -------------------------------------------------------------
> 
> _______________________________________________
> Netkit.users mailing list
> Netkit.users a list.dia.uniroma3.it
> http://list.dia.uniroma3.it/mailman/listinfo/netkit.users
> 




Maggiori informazioni sulla lista Netkit.users