Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th September 2009, 08:32
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Debian Lenny Xen Network Bridge Problems

I'm having problems setting up networking for Xen 3.2 in Debian 5.0 (Lenny). At startup, it says:
Code:
ADDRCONF(NETDEV_UP): peth0: link is not ready
device peth0 entered promiscuous mode
ignoring unknown interface eth0_br=eth0br
suspend: event channel 27
# brctl show
Code:
bridge name     bridge id                     stp enabled     interface
eth0_br          8000.macaddress   no                 peth0
I added an /etc/mactab file, I changed /etc/xen/xend-config.sxp, I created a network-custom file in /etc/xen/scripts, and I modified /etc/network/interfaces. Everything else has been left unchanged.

/etc/mactab:
Code:
# Eth0
eth0 xx:xx:xx:xx:xx:xx
/etc/xen/xend-config.sxp
Code:
# -*- sh -*-

#
# Xend configuration file.
#

#(xend-http-server no)
#(xend-unix-server no)
#(xend-tcp-xmlrpc-server no)
#(xend-unix-xmlrpc-server yes)
#(xend-relocation-server no)

##
# To bridge network traffic, like this:
#
# dom0: ----------------- bridge -> real eth0 -> the network
#                            |
# domU: fake eth0 -> vifN.0 -+
#
# use
#
# (network-script network-bridge)
 (network-script network-custom)

# Your default ethernet device is used as the outgoing interface, by default. 
# To use a different one (e.g. eth1) use
#
# (network-script 'network-bridge netdev=eth1')
#
# The bridge is named xenbr0, by default.  To rename the bridge, use
#
# (network-script 'network-bridge bridge=<name>')
#
# It is possible to use the network-bridge script in more complicated
# scenarios, such as having two outgoing interfaces, with two bridges, and
# two fake interfaces per guest domain.  To do things like this, write
# yourself a wrapper script, and call network-bridge from it, as appropriate.
#
# (network-script network-dummy)

(vif-script vif-bridge)


## Use the following if network traffic is routed, as an alternative to the
# settings for bridged networking given above.
#(network-script network-route)
#(vif-script     vif-route)


## Use the following if network traffic is routed with NAT, as an alternative
# to the settings for bridged networking given above.
#(network-script network-nat)
#(vif-script     vif-nat)


# Dom0 will balloon out when needed to free memory for domU.
# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
# If dom0-min-mem=0, dom0 will never balloon out.
(dom0-min-mem 196)

# In SMP system, dom0 will use dom0-cpus # of CPUS
# If dom0-cpus = 0, dom0 will take all cpus available
(dom0-cpus 0)

# Whether to enable core-dumps when domains crash.
#(enable-dump no)

# The tool used for initiating virtual TPM migration
#(external-migration-tool '')

# The interface for VNC servers to listen on. Defaults
# to 127.0.0.1  To restore old 'listen everywhere' behaviour
# set this to 0.0.0.0
#(vnc-listen '127.0.0.1')

# The default password for VNC console on HVM domain.
# Empty string is no authentication.
(vncpasswd '')

# The VNC server can be told to negotiate a TLS session
# to encryption all traffic, and provide x509 cert to
# clients enalbing them to verify server identity. The
# GTK-VNC widget, virt-viewer, virt-manager and VeNCrypt
# all support the VNC extension for TLS used in QEMU. The
# TightVNC/RealVNC/UltraVNC clients do not.
#
# To enable this create x509 certificates / keys in the
# directory /etc/xen/vnc
#
#  ca-cert.pem       - The CA certificate
#  server-cert.pem   - The Server certificate signed by the CA
#  server-key.pem    - The server private key
#
# and then uncomment this next line
# (vnc-tls 1)

# The certificate dir can be pointed elsewhere..
#
# (vnc-x509-cert-dir /etc/xen/vnc)

# The server can be told to request & validate an x509
# certificate from the client. Only clients with a cert
# signed by the trusted CA will be able to connect. This
# is more secure the password auth alone. Passwd auth can
# used at the same time if desired. To enable client cert
# checking uncomment this:
#
# (vnc-x509-verify 1)

# The default keymap to use for the VM's virtual keyboard
# when not specififed in VM's configuration
#(keymap 'en-us')

# Script to run when the label of a resource has changed.
#(resource-label-change-script '')
/etc/xen/scripts/network-custom:
Code:
#!/bin/sh

NETBR="/etc/xen/scripts/network-bridge"

$NETBR start bridge="eth0_br" vifnum=0 netdev="eth0"

exit 0
/etc/network/interfaces:
Code:
# 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
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
	address xx.x.x.xxx
	netmask 255.255.255.0
	network xx.x.x.x
	broadcast xx.x.x.xxx
	gateway xx.x.x.x
	# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers xx.x.x.xx

Last edited by wmrwl; 25th September 2009 at 08:41.
Reply With Quote
Sponsored Links
  #2  
Old 28th September 2009, 12:53
matey matey is offline
Member
 
Join Date: Feb 2009
Posts: 93
Thanks: 13
Thanked 3 Times in 3 Posts
Default

the problem with xen network configuration is usually in the config file you build to boot up a xen machine.
for instance if your dom-u's (guest machine's)name is foo then you have a file called foo.cfg under /etc/xen/ (sometimes just foo)
like this;

kernel = "/boot/vmlinuz-2.6-xenU"
memory = 128
name = "foo"
vif = [ 'bridge=xenbr0' ]
root = "/dev/sda1 ro"
disk = [ 'phy:/dev/xen1/foo,sda1,w', 'phy:/dev/xen1/foo_swap,sda2,w' ]


that is where you setup the virtual nic and ip addresses.
then when the xen machine boots it will read its own /etc/network/interfaces file as well but do an ifconfig on your host machine to see if you do have xenbr0 available.
Reply With Quote
  #3  
Old 28th September 2009, 23:51
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I haven't included any of the DomU config files in /etc/xen/ yet. I am simply trying to reboot Dom0. The network stops working whenever I change /etc/xen/xend-config.sxp and reboot the machine.
________
SUZUKI RM85
________
Toyota noah history

Last edited by wmrwl; 22nd April 2011 at 01:33.
Reply With Quote
  #4  
Old 29th September 2009, 12:57
matey matey is offline
Member
 
Join Date: Feb 2009
Posts: 93
Thanks: 13
Thanked 3 Times in 3 Posts
Default

oh sorry I misunderstood.
the xend-config file in 1 of our systems looks like this;

these are all the lines which get read;(in this system, check yours)

(xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')

(network-script network-bridge)

(vif-script vif-bridge)

(dom0-min-mem 256)

(dom0-cpus 0)


/etc/xen/scripts/network-bridge
and
/etc/xen/scripts/vif-bridge


oops never mind I see...
I have a feeling the network-custom has a mismatched item (in the name or something)?
our network-custom is like this;

#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0
"$dir/network-bridge" "$@" vifnum=1 netdev=dummy0

what is your ifconfig -a result?
I mean do the names of your NICs match any that is mentioned in network-custm file?
also can you run vif-bridge manually using one of these switches:

# Usage:
# vif-bridge (add|remove|online|offline)

sorry for mix up

Last edited by matey; 29th September 2009 at 13:16.
Reply With Quote
  #5  
Old 30th September 2009, 00:52
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

OK I changed my network-custom file to:

Code:
#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth1
When I rebooted the machine the networking worked!

But I don't see xenbr0 when I do ifconfig -a:

Code:
# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:11:43:ed:bf:bc
          inet addr:10.1.0.203  Bcast:10.1.0.255  Mask:255.255.255.0
          inet6 addr: fe80::211:43ff:feed:bfbc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:888 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:88058 (85.9 KiB)  TX bytes:123762 (120.8 KiB)

eth1      Link encap:Ethernet  HWaddr 00:11:43:ed:bf:bd
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

peth0     Link encap:Ethernet  HWaddr 00:11:43:ed:bf:bc
          inet6 addr: fe80::211:43ff:feed:bfbc/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:1153 errors:0 dropped:0 overruns:0 frame:0
          TX packets:896 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:107462 (104.9 KiB)  TX bytes:124398 (121.4 KiB)

peth1     Link encap:Ethernet  HWaddr 00:11:43:ed:bf:bd
          inet6 addr: fe80::211:43ff:feed:bfbd/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:4783 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:286980 (280.2 KiB)  TX bytes:468 (468.0 B)

veth0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

veth1     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

veth2     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


veth3     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


vif0.0    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vif0.1    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vif0.2    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vif0.3    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
When I run # vif-bridge, I get -bash: vif-bridge: command not found

Last edited by wmrwl; 30th September 2009 at 00:54.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[debian 5 + ispconfig 3] Unable to send mail tanakskool HOWTO-Related Questions 6 4th November 2009 18:20
Problems on creating Debian (Lenny) mirror tritsako HOWTO-Related Questions 3 24th June 2009 06:12
Network (bridge?) issue after following: Xen Cluster Management With Ganeti On Debian nux HOWTO-Related Questions 2 27th March 2008 17:14
Bind Failed christoph2k HOWTO-Related Questions 4 28th April 2007 00:57
Perfect Xen 3.0 setup for Debian gurneyzap HOWTO-Related Questions 4 26th March 2006 11:30


All times are GMT +2. The time now is 02:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.