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

Re: [Xen-users] Route networking xen 4



Carol wrote:

I'm facing some issues on route networking.



(network-script network-route)

The Xen network-scripts are deprecated in favour of host OS supplied config options which are now generally more powerful, flexible, and reliable.


#cat /etc/xen/xenroute.cfg

bootloader = '/usr/lib/xen-default/bin/pygrub'
vcpus       = '1'
memory      = '526'
root        = '/dev/xvda2 ro'
disk        = [
                  'file:/xen/domains/xenroute/disk.img,xvda2,w',
                  'file:/xen/domains/xenroute/swap.img,xvda1,w',
              ]
name        = 'xenroute'
vif         = [ 'ip=10.0.0.1,mac=00:16:3E:1C:4C:D3' ]
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

I personally add "bridge=..." to VIF specifications - but then I'm normally working on systems with multiple bridges.

dom0# cat /etc/network/interfaces

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
   address   192.168.0.4
   netmask   255.255.255.0
   network   192.168.0.0
   broadcast 192.168.0.255
   gateway   192.168.0.1

Network and broadcast are normally not required - the system will work them out. It's no problem to specify them, but it does add scope for errors.

I would define the bridge here :
auto br0
iface br0 inet static
  address 10.0.0.254
  netmask 255.255.255.0
  bridge_ports none

This creates a bridge called br0 with no physical interfaces attached - this is correct, it's only used for the DomUs to communicate. You can use any name you like - on my systems they tend to be things like brext, brint, and so on - which makes it easier to keep track of what connects to what.

You then need to configure the NAt and any filters between eth0 and br0. To Dom0, br0 is "just another network interface" in most respects. Without enabling forwarding and NAT, Dom0 and DomU will be able to communicate, but DomU will not have external access.


xenroute:~# cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
 address 10.0.0.1
 gateway 192.168.0.1 # 10.0.0.254
 netmask 255.255.2552.255

The netmask here is invalid (even ignoring the typo), it should probably be 255.255.255.0. Also gateway should be just one value - 10.0.0.254. 192.168.0.1 is not valid on the subnet, and is not directly accessible anyway.

To set up my network I followed this tutorial : http://wiki.kartbuilding.net/index.php/Xen_Networking#Two-way_Routed_Network_2

That's ancient - last updated over 5 years ago - things have moved on since. That is the big problem following "random" articles off the net.
--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

_______________________________________________
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®.