ziogra
11th March 2009, 13:22
Hi,
I have a question for you, maybe can you help me.
I have a xen box (debian lenny) with 2 NICs. I'd like to use
eth0 (bridging) for VMs on the LAN
eth1 ( ? ) for a VM with a static public ip (I have only 1 public IP)
The only way I get it working is configuring the real eth1 and the VM's eth0 with the same public IP.
Is there an IP conflict danger? How can I configure xen in a better way to get the same result? (eg: eth1 route or nat ?)
Here's my config:
mynet script to create 2 separate bridges:
(I call it from xend-config.sxp)
#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=eth0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=eth1
/etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo eth0 eth1
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
allow-hotplug eth1
iface eth0 inet static
address 192.168.34.252
netmask 255.255.255.0
gateway 192.168.34.250
broadcast 192.168.34.255
# PUBLIC STATIC IP ADDRESS
iface eth1 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
broadcast xxx.xxx.xxx.xxx
Thank you in advance!
Stefano
I have a question for you, maybe can you help me.
I have a xen box (debian lenny) with 2 NICs. I'd like to use
eth0 (bridging) for VMs on the LAN
eth1 ( ? ) for a VM with a static public ip (I have only 1 public IP)
The only way I get it working is configuring the real eth1 and the VM's eth0 with the same public IP.
Is there an IP conflict danger? How can I configure xen in a better way to get the same result? (eg: eth1 route or nat ?)
Here's my config:
mynet script to create 2 separate bridges:
(I call it from xend-config.sxp)
#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=eth0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=eth1
/etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo eth0 eth1
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
allow-hotplug eth1
iface eth0 inet static
address 192.168.34.252
netmask 255.255.255.0
gateway 192.168.34.250
broadcast 192.168.34.255
# PUBLIC STATIC IP ADDRESS
iface eth1 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
broadcast xxx.xxx.xxx.xxx
Thank you in advance!
Stefano