From: SamuelCheng Subject: Re: [Xen-users] Domain0 cannot connect to the net while domainU can.How to make the domain0 go to the internet. Date: Tue, 28 Jul 2009 18:56:34 +0800 Message-ID: References: <20090727124005.GQ24960@edu.joroinen.fi> <20090728093045.GC24960@edu.joroinen.fi> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0057302575==" Return-path: In-Reply-To: <20090728093045.GC24960@edu.joroinen.fi> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: =?ISO-8859-1?Q?Pasi_K=E4rkk=E4inen?= Cc: Xen-Developers List-Id: xen-devel@lists.xenproject.org --===============0057302575== Content-Type: multipart/alternative; boundary=000e0cd2e45885e2a6046fc1ecf3 --000e0cd2e45885e2a6046fc1ecf3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable OK,I add CC this time.Sorry for the mistake made last time.I don't make any changes actually.But I remember when this situation began.It was at the tim= e I create a virtual machine by "virt-install" command,after I rebooted the system the next day,the domain0 cannot go to google.So now I was wandering whether this method of creating causes the network problem.And this is the third time this problem happen. I remember last time I came across the same problem,but I didn't pay any attention to it.After I reinstall my OS,the problem is fixed. The reason why I sent an email to the list is that I want to make this problem out in my summer holiday.If it is a bug,I want to make the developers known. Thank you very much for your reply and also thank you for this short passag= e about how the net in virtual machine works,it really teaches me a lot.At last, thank you again for your sharing of time on my problem. Is it really a bug or not?How can this possible?I bet the solution lies on the changing from eth0 to peth0 with a real MAC,But I don't know where to change or modify.Hope for your further help. Rgds. Samuel. 2009/7/28 Pasi K=E4rkk=E4inen > On Tue, Jul 28, 2009 at 10:06:37AM +0800, SamuelCheng wrote: > > *Yes,But,When I use another kernel to start my Linux(the kernel is not > > modified by xen,that is to say,xend does not start),I can make my domai= n0 > go > > to google and search.I was confused why my mac is FE:FF:FF:FF:FF:FF.At > the > > very beginning,everything was fine in my CentOS,and the mac is > > 00:1b:fc:17:da:7a(I think).* > > > > Please don't drop the CC to xen-users list. > > when xend is started, with the default configuration (in > /etc/xen/xend-config.sxp), > it'll execute /etc/xen/scripts/network-bridge to re-configure your > networking. > > It'll rename the physical eth0 interface to peth0, change it's MAC addres= s > to FE:FF:FF:FF:FF:FF, and then create a virtual ethernet interface called > eth0, configure it with the real MAC address, and bridge both of those > interfaces to xenbr0 bridge. > > This way the virtual eth0 interface should have a real MAC, and it can be > used for dom0 management, and at the same time allow other VMs/domUs to > share the physical ethernet interface by using xenbr0 bridge. > > I don't know why that doesn't work for you.. Have you changed/tweaked you= r > network settings somehow? > > When you start the machine with normal (non -xen) kernel, xend does not > start and network reconfiguration won't happen. > > -- Pasi > > > *Ok.here is the information of my OS: > > I have 2 OSs: > > one is Fedora 10 and the other is CentOS 5.3(updated from 5.2). > > here is some kernel information:* > > > > title CentOS (2.6.18-128.2.1.el5xen) > > root (hd0,2) > > kernel /boot/xen.gz-2.6.18-128.2.1.el5 > > module /boot/vmlinuz-2.6.18-128.2.1.el5xen ro root=3DLABEL=3D/1 rhg= b > quiet > > module /boot/initrd-2.6.18-128.2.1.el5xen.img > > title CentOS (2.6.18-128.2.1.el5) > > root (hd0,2) > > kernel /boot/vmlinuz-2.6.18-128.2.1.el5 ro root=3DLABEL=3D/1 rhgb q= uiet > > initrd /boot/initrd-2.6.18-128.2.1.el5.img > > title CentOS (2.6.18-128.1.16.el5xen) > > root (hd0,2) > > kernel /boot/xen.gz-2.6.18-128.1.16.el5 > > module /boot/vmlinuz-2.6.18-128.1.16.el5xen ro root=3DLABEL=3D/1 rh= gb > quiet > > module /boot/initrd-2.6.18-128.1.16.el5xen.img > > title CentOS (2.6.18-128.1.16.el5) > > root (hd0,2) > > kernel /boot/vmlinuz-2.6.18-128.1.16.el5 ro root=3DLABEL=3D/1 rhgb = quiet > > initrd /boot/initrd-2.6.18-128.1.16.el5.img > > title CentOS (2.6.18-128.el5xen) > > root (hd0,2) > > kernel /boot/xen.gz-2.6.18-128.el5 > > module /boot/vmlinuz-2.6.18-128.el5xen ro root=3DLABEL=3D/1 rhgb qu= iet > > module /boot/initrd-2.6.18-128.el5xen.img > > title CentOS-base (2.6.18-128.el5) > > root (hd0,2) > > kernel /boot/vmlinuz-2.6.18-128.el5 ro root=3DLABEL=3D/1 rhgb quiet > > initrd /boot/initrd-2.6.18-128.el5.img > > title Fedora (2.6.27.21-170.2.56.fc10.i686) > > root (hd0,5) > > kernel /vmlinuz-2.6.27.21-170.2.56.fc10.i686 ro > > root=3DUUID=3D50e45426-575f-4112-bfa2-54d8741b5ae5 rhgb quiet > > initrd /initrd-2.6.27.21-170.2.56.fc10.i686.img > > > > > > > > > > > > 2009/7/27 Pasi K=E4rkk=E4inen > > > > > On Thu, Jul 23, 2009 at 05:34:36PM +0800, SamuelCheng wrote: > > > > I attach the error I got in the attachment. > > > > The return of the following command: > > > > ifconfig -a > > > > route -n > > > > brctl show > > > > > > > > Here is the content,also you can see the attachment, a little long,= so > be > > > > patient, some information may be not of any use,but I don't know so= I > > > copied > > > > all here,Thank you in advance very one,Good day. > > > > : > > > > [root@localhost ~]# ifconfig -a > > > > eth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > > > inet addr:192.168.0.104 Bcast:192.168.0.255 > > > Mask:255.255.255.0 > > > > > > > > > > Your problem is the MAC address of eth0: it shouldn't be > FE:FF:FF:FF:FF:FF. > > > > > > eth0 is the virtual interface used for dom0 management, and it's > bridged to > > > xenbr0, which is bridged to peth0 (physical eth0 interface). > > > > > > eth0 should have the original/real MAC address of the peth0. > > > > > > -- Pasi > > > > > > > > > > [root@localhost ~]# route -n > > > > Kernel IP routing table > > > > Destination Gateway Genmask Flags Metric Ref > Use > > > > Iface > > > > 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 > 0 > > > eth0 > > > > 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 > 0 > > > > virbr0 > > > > 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 > 0 > > > eth0 > > > > 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 > 0 > > > eth0 > > > > > > > > [root@localhost ~]# brctl show > > > > bridge name bridge id STP enabled interfaces > > > > virbr0 8000.000000000000 yes > > > > xenbr0 8000.feffffffffff no peth0 > > > > vif0.0 > > > > > > > > > > > > > > > > > > > -- > > God more,self less. > --=20 God more,self less. --000e0cd2e45885e2a6046fc1ecf3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable OK,I add CC this time.Sorry for the mistake made last time.
I don't= make any changes actually.But I remember when this situation began.It was = at the time I create a virtual machine by "virt-install" command,= after I rebooted the system the next day,the domain0 cannot go to google.So= now I was wandering whether this method of creating causes the network pro= blem.And this is the third time this problem happen.
I remember last time I came across the same problem,but I didn't p= ay any attention to it.After I reinstall my OS,the problem is fixed.
<= div>The reason why =A0I sent an email to the list is that I want to make th= is problem out in my summer holiday.If it is a bug,I want to make the devel= opers known.
Thank you very much for your reply and also thank you for this short p= assage about how the net in virtual machine works,it really teaches me a lo= t.At last, thank you again for your sharing of time on my problem.
Is it really a bug or not?How can this possible?I bet the solution lie= s on the changing from eth0 to peth0 with a real MAC,But I don't know w= here to change or modify.Hope for your further help.
Rgds.
Samuel.

2009/7/28 Pasi K=E4rk= k=E4inen <pasik@iki.fi= >
On Tue, Jul 28, 2009 at 10:06:37AM +0800, SamuelCheng wrote:
> *Yes,But,When I use another kernel to start my Linux(the kernel is not=
> modified by xen,that is to say,xend does not start),= I can make my domain0 go
> to google and search.I was confused why my mac is FE:FF:FF:FF:FF:FF.At= the
> very beginning,everything was fine in my CentOS,and the mac is
> 00:1b:fc:17:da:7a(I think).*
>

Please don't drop the CC to xen-users list.

when xend is started, with the default configuration (in /etc/xen/xend-conf= ig.sxp),
it'll execute /etc/xen/scripts/network-bridge to re-configure your netw= orking.

It'll rename the physical eth0 interface to peth0, change it's MAC = address
to FE:FF:FF:FF:FF:FF, and then create a virtual ethernet interface called eth0, configure it with the real MAC address, and bridge both of those
interfaces to xenbr0 bridge.

This way the virtual eth0 interface should have a real MAC, and it can be used for dom0 management, and at the same time allow other VMs/domUs to
share the physical ethernet interface by using xenbr0 bridge.

I don't know why that doesn't work for you.. Have you changed/tweak= ed your
network settings somehow?

When you start the machine with normal (non -xen) kernel, xend does not
start and network reconfiguration won't happen.

-- Pasi

> *Ok.here is the information of my OS:
> I have 2 OSs:
> one is Fedora 10 and the other is CentOS 5.3(updated from 5.2).
> here is some kernel information:*
>
> title CentOS (2.6.18-128.2.1.el5xen)
> =A0 =A0 root (hd0,2)
> =A0 =A0 kernel /boot/xen.gz-2.6.18-128.2.1.el5
> =A0 =A0 module /boot/vmlinuz-2.6.18-128.2.1.el5xen ro root=3DLABEL=3D/= 1 rhgb quiet
> =A0 =A0 module /boot/initrd-2.6.18-128.2.1.el5xen.img
> title CentOS (2.6.18-128.2.1.el5)
> =A0 =A0 root (hd0,2)
> =A0 =A0 kernel /boot/vmlinuz-2.6.18-128.2.1.el5 ro root=3DLABEL=3D/1 r= hgb quiet
> =A0 =A0 initrd /boot/initrd-2.6.18-128.2.1.el5.img
> title CentOS (2.6.18-128.1.16.el5xen)
> =A0 =A0 root (hd0,2)
> =A0 =A0 kernel /boot/xen.gz-2.6.18-128.1.16.el5
> =A0 =A0 module /boot/vmlinuz-2.6.18-128.1.16.el5xen ro root=3DLABEL=3D= /1 rhgb quiet
> =A0 =A0 module /boot/initrd-2.6.18-128.1.16.el5xen.img
> title CentOS (2.6.18-128.1.16.el5)
> =A0 =A0 root (hd0,2)
> =A0 =A0 kernel /boot/vmlinuz-2.6.18-128.1.16.el5 ro root=3DLABEL=3D/1 = rhgb quiet
> =A0 =A0 initrd /boot/initrd-2.6.18-128.1.16.el5.img
> title CentOS (2.6.18-128.el5xen)
> =A0 =A0 root (hd0,2)
> =A0 =A0 kernel /boot/xen.gz-2.6.18-128.el5
> =A0 =A0 module /boot/vmlinuz-2.6.18-128.el5xen ro root=3DLABEL=3D/1 rh= gb quiet
> =A0 =A0 module /boot/initrd-2.6.18-128.el5xen.img
> title CentOS-base (2.6.18-128.el5)
> =A0 =A0 root (hd0,2)
> =A0 =A0 kernel /boot/vmlinuz-2.6.18-128.el5 ro root=3DLABEL=3D/1 rhgb = quiet
> =A0 =A0 initrd /boot/initrd-2.6.18-128.el5.img
> title Fedora (2.6.27.21-170.2.56.fc10.i686)
> =A0 =A0 root (hd0,5)
> =A0 =A0 kernel /vmlinuz-2.6.27.21-170.2.56.fc10.i686 ro
> root=3DUUID=3D50e45426-575f-4112-bfa2-54d8741b5ae5 rhgb quiet
> =A0 =A0 initrd /initrd-2.6.27.21-170.2.56.fc10.i686.img
>
>
>
>
>
> 2009/7/27 Pasi K=E4rkk=E4inen <pasi= k@iki.fi>
>
> > On Thu, Jul 23, 2009 at 05:34:36PM +0800, SamuelCheng wrote:
> > > I attach the error I got in the attachment.
> > > The return of the following command:
> > > ifconfig -a
> > > route -n
> > > brctl show
> > >
> > > Here is the content,also you can see the attachment, a littl= e long,so be
> > > patient, some information may be not of any use,but I don= 9;t know so I
> > copied
> > > all here,Thank you in advance very one,Good day.
> > > :
> > > [root@localhost ~]# ifconfig -a
> > > eth0 =A0 =A0 =A0Link encap:Ethernet =A0HWaddr FE:FF:FF:FF:FF= :FF
> > > =A0 =A0 =A0 =A0 =A0 inet addr:192.168.0.104 =A0Bcast:192.168= .0.255
> > =A0Mask:255.255.255.0
> > >
> >
> > Your problem is the MAC address of eth0: it shouldn't be FE:F= F:FF:FF:FF:FF.
> >
> > eth0 is the virtual interface used for dom0 management, and it= 9;s bridged to
> > xenbr0, which is bridged to peth0 (physical eth0 interface).
> >
> > eth0 should have the original/real MAC address of the peth0.
> >
> > -- Pasi
> >
> >
> > > [root@localhost ~]# route -n
> > > Kernel IP routing table
> > > Destination =A0 =A0 Gateway =A0 =A0 =A0 =A0 Genmask =A0 =A0 = =A0 =A0 Flags Metric Ref =A0 =A0Use
> > > Iface
> > > 192.168.0.0 =A0 =A0 0.0.0.0 =A0 =A0 =A0 =A0 255.255.255.0 = =A0 U =A0 =A0 0 =A0 =A0 =A00 =A0 =A0 =A0 =A00
> > eth0
> > > 192.168.122.0 =A0 0.0.0.0 =A0 =A0 =A0 =A0 255.255.255.0 =A0 = U =A0 =A0 0 =A0 =A0 =A00 =A0 =A0 =A0 =A00
> > > virbr0
> > > 169.254.0.0 =A0 =A0 0.0.0.0 =A0 =A0 =A0 =A0 255.255.0.0 =A0 = =A0 U =A0 =A0 0 =A0 =A0 =A00 =A0 =A0 =A0 =A00
> > eth0
> > > 0.0.0.0 =A0 =A0 =A0 =A0 192.168.0.1 =A0 =A0 0.0.0.0 =A0 =A0 = =A0 =A0 UG =A0 =A00 =A0 =A0 =A00 =A0 =A0 =A0 =A00
> > eth0
> > >
> > > [root@localhost ~]# brctl show
> > > bridge name =A0 =A0 bridge id =A0 =A0 =A0 =A0 =A0 =A0 =A0 ST= P enabled =A0 =A0 interfaces
> > > virbr0 =A0 =A0 =A0 =A0 =A08000.000000000000 =A0 =A0 =A0 yes<= br> > > > xenbr0 =A0 =A0 =A0 =A0 =A08000.feffffffffff =A0 =A0 =A0 no = =A0 =A0 =A0 =A0 =A0 =A0 =A0peth0
> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 vif0.0
> > >
> >
> >
> >
>
>
> --
> God more,self less.



--
God more,se= lf less.
--000e0cd2e45885e2a6046fc1ecf3-- --===============0057302575== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0057302575==--