|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Problem: hidding all NICs from dom0, how to create a vir
Jonathan Vogt wrote:
Hi all
Hi Jonathon,
So I'm sort of stuck here. My question is, can I create a virtual NIC for
dom0 aswell (like vif1.0 in the domUs)?
Yes
If so how?
Try uml-utilities. Can't say if it's better/worse than anything else
but works for me.
I use bridged networking and let host#1 serve as the firewall/router,
and keep dom0 as isolated as possible; dom0 uses a tap and all the hosts
use the eth's Here's a sample xend startup script (it's very rudimentary).
"my-network-bridge"
#!/bin/bash
$LAN = '10.20.30'
# uml-utities let's me create a virtual device
/usr/bin/tunctl -t tap0
# start 3 bridges and 4 devices
/etc/xen/scripts/network-bridge start bridge=LAN netdev=eth0 vifnum=0
/etc/xen/scripts/network-bridge start bridge=DMZ netdev=eth1 vifnum=1
/etc/xen/scripts/network-bridge start bridge=WAN netdev=eth2 vifnum=2
/etc/xen/scripts/network-bridge start bridge=LAN netdev=tap0 vifnum=3
# none of the ethX devices have addresses
# give one to "tap0" and bring it up
/sbin/ip address add $LAN.254/24 dev tap0
/sbin/ip link set dev tap0 up
# give dom0 a way out, i.e a "default gateway"
/sbin/ip route add default via $LAN.1 dev tap0
# aaaargh! just in case
ethtool -K tap0 tx off
----------------------------------------------
After xend starts this is what this dom0 looks like:
[mike@lan254 xen]$ ip address list | grep 'inet '
inet 127.0.0.1/8 scope host lo
inet 10.20.30.254/24 scope global tap0
[mike@lan254 xen]$ ip route list
10.20.30.0/24 dev tap0 proto kernel scope link src 10.20.30.254
default via 10.20.30.1 dev tap0
[mike@lan254 xen]$ brctl show
bridge name bridge id STP enabled interfaces
DMZ 8000.feffffffffff no peth1
vif0.1
vif1.1
vif2.0
vif3.0
LAN 8000.feffffffffff no peth0
ptap0
vif0.0
vif0.3
vif1.0
WAN 8000.feffffffffff no peth2
vif0.2
vif1.2
Hope that makes sense.
Good luck,
Mike Wright
Is this possible with the dummy device? Or does the dummy device only drop
packages?
Cheers
Jonathan
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|