Bringing up network interface without IP configured in Debian, for XEN dom0

12,254

Oh dear... I think you're trying to use the Xen bridging stuff, which is just dire. Set network-script network-dummy in xend-config.sxp, then go with this config:

iface lo
iface lo inet loopback

# Local network, cable labeled M3
auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.184
    netmask 255.255.255.0
    gateway 192.168.1.1

# cable labeled M1
iface eth1 inet manual
    hwaddress ether 00:19:5B:33:86:D5

# cable labeled M2
iface eth2 inet manual
    hwaddress ether 00:19:5B:33:86:D3

auto br-eth1
iface br-eth1 inet manual
  bridge_ports eth1

auto br-eth2
iface br-eth2 inet manual
  bridge_ports eth2

What you then do is tell the domUs to use either the br-eth1 or br-eth2 bridge (as appropriate). Given that you've got cable labelling happening, I'd change the bridge names to something more useful, like perhaps m1 and m2.

Share:
12,254
Karolis T.
Author by

Karolis T.

Live long and prosper.

Updated on September 17, 2022

Comments

  • Karolis T.
    Karolis T. over 1 year

    I have 3 NICs that I want to be seen by my domU, even though they're not configured in dom0.

    Here's my sample lines from interfaces file

    auto lo
    iface lo inet loopback
    
    # Local network, cable labeled M3
    auto eth0
    allow-hotplug eth0
    iface eth0 inet static
            address 192.168.1.184
            netmask 255.255.255.0
            gateway 192.168.1.1
    
    # cable labeled M1
    auto eth1
    allow-hotplug eth1
    iface eth1 inet manual
            hwaddress ether 00:19:5B:33:86:D5
            up ifconfig eth1 up
    
    # cable labeled M2
    auto eth2
    allow-hotplug eth2
    iface eth2 inet manual
            hwaddress ether 00:19:5B:33:86:D3
            up ifconfig eth2 up
    

    I'm trying to use multiple bridge configuration with xend, but it complains about the "Link not in running state" and interface being down, although I can see them in ifconfigs' output.

    What are my options to make those NICs visible in domU without configuring them in dom0?

    • womble
      womble almost 15 years
      Show us your entire /e/n/interfaces file. I have a strong suspicion you're doing something really unwise, because the same layout works fine for me on my dom0s.
    • Karolis T.
      Karolis T. almost 15 years
      Updated as per your request
  • Antoine Benkemoun
    Antoine Benkemoun almost 15 years
    I agree. As a rule of thumb, avoid using Xen networking scripts. It's not so complex to do things yourself and leads to much better results.
  • Karolis T.
    Karolis T. almost 15 years
    Thanks a lot, the idea of manually bridging interfaces didn't even occur to me. What is wrong with XEN native bridging scripts?
  • womble
    womble almost 15 years
    They're excessively complicated, and don't follow standard conventions for bridging configuration, which makes it harder to manage and maintain.
  • Jeff Snider
    Jeff Snider over 14 years
    I can't vote this up enough. The Xen bridge setup scripts are just dreadful.