Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Xen networking question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
COiN3D
Guru
Guru


Joined: 02 Aug 2004
Posts: 543
Location: Munich, Germany

PostPosted: Tue Apr 22, 2008 9:51 am    Post subject: [Solved]Xen networking question Reply with quote

Hello there,

I've just installed a fresh copy of Gentoo amd64 2007.0 with Xen and bootet it correctly. For my installation, I took a look at the Gentoo-Wiki XEN Howto, as well at the official Gentoo-XEN Howto. However, there is one thing which I'm not sure about if its working fine: the networking device.

In Gentoo Wiki, there is a line which tells me that I should deactivate net.eth0 completely:

Code:
To configure the network, make your changes in /etc/conf.d/net but DO NOT add net.eth0 to runlevel default. /etc/init.d/xend will start and configure your network at boot time. (While testing the initial kernel build on a machine on a remote net connection it may be useful to leave net.eth0 enabled and NOT autostart xend)

Newer Gentoo automaticly loads net.eth0 even if it is disabled in the default runlevel. You can disable this behaviour by changing RC_PLUG_SERVICES variable in /etc/conf.d/rc:
File: /etc/conf.d/rc

RC_PLUG_SERVICES="!net.*"


I did that although nothing about deactivating the net.eth0 init script is said in the official Howto! The problem was that after rebooting the new XEN Kernel, xend didn't start up my net.eth0 or "managed" it like it is told me in the Gentoo Wiki. I then added net.eth0 again to runlevel default and rebooted the machine, and then my machine had at least networking - but now I'm not sure if thats wrong!

So my question is: Is it possible that the gentoo wiki is telling me bullshit and that deactivating net.eth0 from bootup isn't necessary any longer? And if NOT, what's the correct cycle?

Best wishes...
_________________
e17 documentation | Be free and use Jabber as your IM! | Combine IRC and IM


Last edited by COiN3D on Fri Apr 25, 2008 5:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
COiN3D
Guru
Guru


Joined: 02 Aug 2004
Posts: 543
Location: Munich, Germany

PostPosted: Tue Apr 22, 2008 5:24 pm    Post subject: Reply with quote

No one with xen? :(
_________________
e17 documentation | Be free and use Jabber as your IM! | Combine IRC and IM
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Wed Apr 23, 2008 10:12 am    Post subject: Reply with quote

The behavior and interactions of xend, gentoo network scripts and udev has changed oh so many times, it's frustrating. Xen 3.2 changed the default bridge name and it's really messy, I haven't any time to figure out how it works (or not :).

My advise (and experience since the xen 2.x days till now): don't use xend's magic for your network !!!!!

So what you need for a basic bridged xen are:

  • a bridge for all your domUs
  • a physical interface plugged into that bridge


Really simple no? :)

Step you have to do:

  • create a bridge in /etc/conf.d/net like this:
    Code:
    config_xenbr0=( "192.168.100.1/24" )
    and put your eth0 in the bridge by
    Code:
    bridge_xenbr0="eth0"

  • /etc/xen/xend-config.sxp comment the line
    Code:
    (network-script network-bridge)
    so it becomes
    Code:
    #(network-script network-bridge)
    and add
    Code:
    (vif-script vif-bridge bridge=xenbr0)

  • in /etc/init.d do
    Code:
    ln -s net.lo net.xenbr0

  • add net.xenbr0 in your default runlevel by
    Code:
    rc-update add net.xenbr0 default

  • in every config of DomU you need this:
    Code:
    vif = [ 'mac=00:16:3e:00:00:01, bridge=xenbr0' ]
    (please change mac for every DomU)


With is network setup you have everything in hand and your network won't break after any upgrade (this is a must for remote machines). The only difference is that your eth0 does not have an ip address anymore.
_________________
http://wojia.be
Back to top
View user's profile Send private message
COiN3D
Guru
Guru


Joined: 02 Aug 2004
Posts: 543
Location: Munich, Germany

PostPosted: Fri Apr 25, 2008 5:50 pm    Post subject: Reply with quote

Okay, thank you very much. I'll try it your way.
_________________
e17 documentation | Be free and use Jabber as your IM! | Combine IRC and IM
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum