VKernel progress update - 10 Jan 2006
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Thu Jan 11 11:05:30 PST 2007
Matthew Dillon wrote:
-I auto:10.0.0.1:10.0.0.2
-I auto:10.0.0.1:10.0.0.2:24
-I auto:bridge0
-I tap0:bridge0
auto - automatically find a free TAP interface and use it
10.0.0.1 - specify TAP interface IP
10.0.0.2 - specify VKE interface IP
24 - specify CIDR bits for TAP/BKE (e.g. would be 10.0.0.0/24)
if not specified a /30 would be used.
bridgeN - instead of specifying IPs, just tie the TAP interface
into the specified bridge.
(we have to make sure that disconnecting the TAP also
disconnects it from the bridge)
just as additional input an excerpt from the qemu man page (sorry, quite a bit):
Network options:
-net nic[,vlan=n][,macaddr=addr][,model=type]
Create a new Network Interface Card and connect it to VLAN n (n = 0
is the default). The NIC is currently an NE2000 on the PC target.
Optionally, the MAC address can be changed. If no -net option is
specified, a single NIC is created. Qemu can emulate several dif-
ferent models of network card. Valid values for type are
"ne2k_pci", "ne2k_isa", "rtl8139", "smc91c111" and "lance". Not
all devices are supported on all targets.
-net user[,vlan=n][,hostname=name]
Use the user mode network stack which requires no administrator
priviledge to run. hostname=name can be used to specify the client
hostname reported by the builtin DHCP server.
-net tap[,vlan=n][,fd=h][,ifname=name][,script=file]
Connect the host TAP network interface name to VLAN n and use the
network script file to configure it. The default network script is
/etc/qemu-ifup. If name is not provided, the OS automatically pro-
vides one. fd=h can be used to specify the handle of an already
opened host TAP interface. Example:
qemu linux.img -net nic -net tap
More complicated example (two NICs, each one connected to a TAP
device)
qemu linux.img -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
-net nic,vlan=1 -net tap,vlan=1,ifname=tap1
-net socket[,vlan=n][,fd=h][,listen=[host]:port][,connect=host:port]
Connect the VLAN n to a remote VLAN in another QEMU virtual machine
using a TCP socket connection. If listen is specified, QEMU waits
for incoming connections on port (host is optional). connect is
used to connect to another QEMU instance using the listen option.
fd=h specifies an already opened TCP socket.
Example:
# launch a first QEMU instance
qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
-net socket,listen=:1234
# connect the VLAN 0 of this instance to the VLAN 0
# of the first instance
qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
-net socket,connect=127.0.0.1:1234
-net socket[,vlan=n][,fd=h][,mcast=maddr:port]
Create a VLAN n shared with another QEMU virtual machines using a
UDP multicast socket, effectively making a bus for every QEMU with
same multicast address maddr and port. NOTES:
1. Several QEMU can be running on different hosts and share same
bus (assuming correct multicast setup for these hosts).
2. mcast support is compatible with User Mode Linux (argument
ethN=mcast), see <http://user-mode-linux.sf.net>.
3.<Use fd=h to specify an already opened UDP multicast socket.>
Example:
# launch one QEMU instance
qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
-net socket,mcast=230.0.0.1:1234
# launch another QEMU instance on same "bus"
qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
-net socket,mcast=230.0.0.1:1234
# launch yet another QEMU instance on same "bus"
qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \
-net socket,mcast=230.0.0.1:1234
Example (User Mode Linux compat.):
# launch QEMU instance (note mcast address selected
# is UML's default)
qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
-net socket,mcast=239.192.168.1:1102
# launch UML
/path/to/linux ubd0=/path/to/root_fs eth0=mcast
-net none
Indicate that no network devices should be configured. It is used
to override the default configuration (-net nic -net user) which is
activated if no -net options are provided.
I think they don't mean IEEE 802.1Q VLANs though, just an internal bridge within qemu or so.
cheers
simon
--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low â¬â¬â¬ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
More information about the Kernel
mailing list