LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Xen network problem (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/xen-network-problem-4175441083/)

r3d.w0rm 12-12-2012 02:44 AM

Xen network problem
 
Hello ,

i install xen 4.0.1 on debian 6.0.5 amd64 .

after install iadd a bridge network to /etc/network/interfaces :
Code:

iface pan0 inet dhcp
        bridge_ports eth0

then i setup domu by virt-install , i run this cmd :
Code:

virt-install --cdrom /media/cdrom/ --ram 512 --disk /vm/vm01.img,size=5 --hvm --name vm01 --network bridge=pan0 --disk /dev/scd0,device=cdrom
but guest vm cannot connect to network :( , i try ip static and dhcp config for guest vm eth .

brctl show :
Code:

bridge name        bridge id                STP enabled        interfaces
pan0                8000.00269e9b572a        no                eth0
                                                        vif2.1

ifconfig :
Code:

eth0      Link encap:Ethernet  HWaddr 00:26:9e:9b:57:2a 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::226:9eff:fe9b:572a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9988 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11581 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6528526 (6.2 MiB)  TX bytes:1833917 (1.7 MiB)
          Interrupt:234 Base address:0xe000

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:13634 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13634 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13931163 (13.2 MiB)  TX bytes:13931163 (13.2 MiB)

pan0      Link encap:Ethernet  HWaddr 00:26:9e:9b:57:2a 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::226:9eff:fe9b:572a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5389 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6192 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3098633 (2.9 MiB)  TX bytes:1154620 (1.1 MiB)

tap2.0    Link encap:Ethernet  HWaddr 12:c4:10:c9:33:be 
          inet6 addr: fe80::10c4:10ff:fec9:33be/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28 errors:0 dropped:0 overruns:0 frame:0
          TX packets:305 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:4476 (4.3 KiB)  TX bytes:15451 (15.0 KiB)

vif2.0    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff 
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:265 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:448 (448.0 B)  TX bytes:6511 (6.3 KiB)

vif2.1    Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff 
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:21 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 B)  TX bytes:4966 (4.8 KiB)

what is the problem ?!

Thanks in advance .

smallpond 12-13-2012 06:00 PM

eth0 has a valid IPv4 and IPv6 address, but vif2.1 only has IPv6. Is that what you want?

r3d.w0rm 12-14-2012 02:07 AM

no , i want only IPv4

KenJackson 12-22-2012 06:36 PM

I see that your ethernet device eth0 and your bridge pan0 both have an IPv4 address assigned. In my setup, my bridge has an address and eth0 does not.

And as smallpond pointed out, your tap devices don't have IPv4 addresses. Mine all have unique addresses. But those unique addresses were assigned from within each guest. (BTW, what does ifconfig show from within the guest?)

Your solution is probably to not assign an IP address to eth0. On Fedora that means /etc/sysconfig/network-scripts/ifcfg-eth0 must have "BRIDGE=pan0", but must NOT contain IPADDR=<ip>, GATEWAY=<ip> or NETMASK=<mask>. I don't know what the Debian equivalent is.

I don't use Xen or virt-install, but I use a bridge in my KVM setup, so the principles should be the same.


All times are GMT -5. The time now is 05:04 AM.