[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Xen Networking



Hi!

This is my first contact with xen, and I think it's great. I'm just
having some networking problems. Let me explain how is my server
situation.

I have a server that act as a gateway with two network interfaces.

eth0 is the interface used in the local network (ip: 172.16.10.1, 255.255.255.0)
eth1 is the interface connected to the internet modem (dhcp)

I have a vpn interface as well (ip: 172.16.10.1, 255.255.0.0)
configured with tinc.

I share the internet connection with the local network using nat...
(route -n && iptables) output below...

Everything works great with this configuration.
I've read a lot of docs about xen networking, but didn't manage to get
it working.

What I want to do is to give the VM the IP 172.16.10.50, 255.255.255.0
gw 172.16.10.1, just like any other machine in the local network.

First things first. I've managed to install a windows xp with xen. I
did it without any network configuration, i.e, no vif option at
win.cfg file.

OK. Now I have an installed windows, but no networking.
It makes sense to me the usage of a bridge with eth0.

What do you suggest?


Here are the things I've tried:
 - vif = [ 'type=ioemu, ip=172.16.10.50' ]
 - vif = [ 'bridge=xenbr0' ]
 - vif = [ 'type=ioemu, bridge=xenbr0' ]

I've tried those with different configurations in /etc/network/interfaces

using:
auto eth0
iface eth0 inet static
  address 172.16.10.1
  netmask 255.255.255.0

auto xenbr0
iface xenbr0 inet static
 address 172.16.10.50
 netmask 255.255.255.0
 bridge_ports eth0


also didn't work. When I configure the interfaces like this and run
/etc/init.d/networking restart, the eth0 looses it IP address, and
nothing works anymore...

I'm using Ubuntu 12.04 server... xen version 4.1.2 and
3.2.0-30-generic kernel...

Thanks a lot for any help with that!
Vinicius


8<--------------------------------------------
$ route -n
Destino         Roteador        MáscaraGen.    Opções Métrica Ref   Uso Iface
0.0.0.0         192.168.254.254 0.0.0.0         UG    100    0        0 eth1
172.16.0.0      0.0.0.0         255.255.0.0     U     0      0        0 vpn
172.16.10.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.254.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1

$ iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  172.16.10.0/24       anywhere

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.