WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: How to connect to the Internet in pv DomU

To: xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: How to connect to the Internet in pv DomU
From: Bei Guan <gbtju85@xxxxxxxxx>
Date: Wed, 29 Sep 2010 12:21:16 +0800
Delivery-date: Tue, 28 Sep 2010 21:22:14 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=LCFZntXVbS6NEli+GR91Ya16egu5U4ncScjV8mIObRs=; b=GGfhe+cefzq7SqjMjdWNJSdbRoDhBtcK65Zlm1aUXrnjYUQAMWdu6yJnkTq++8tr08 rZVUBhm7wuYM9ozSzg69p9LX+xG2WoHo0PENmsN5XtDdm3j8FXVUS3SyinkQM0rxduNH VT69yK3Hq8J5jtAMj/eF+zDWoW7sp0zKNv1hE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=QtjZaiouHiMifvPSDQf7Oh0Fx252wcjyZwLKO1oYYplE/0JFvDAGX8AzyMgpOZ1S3f XjhrWGC0yn6yHAeCBiQh1CTRBfoniBOjw/Cc4BwnuC9sMeRt64DUY7EUd0E7kYXDOnnk QI1HrlDgy9K5nVUa5ugVXBisczfo/bdIOMIos=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTinL21i8sdFVvdfoRJnZY10=r_GuWGd9gTyC_hZD@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTinL21i8sdFVvdfoRJnZY10=r_GuWGd9gTyC_hZD@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I got it.
I just set the  vif=['bridge=virbr0']  in the DomU configure file. And then, I can ping the dom0 successfully from DomU. I also can access to the internet from DomU. On my computer it is bridge=virbr0, but I think you also can try bridge=xenbr0 on your computer.

However, I have another question.

I cannot not assign the DomU ip address in its configure file. For example, vif=['ip=192.168.122.20, bridge=virbr0'] does not work and my DomU‘s IP is assigned through the dhcp, that is 192.168.122.192. (My virbr0's IP is 192.168.122.1)
So how can I assign IP to the DomU?

Mini-OS can also boot as a pv DomU.  But how can i know its IP info if I set vif in its configure file?

Thank you!

Gavin






2010/9/28 Bei Guan <gbtju85@xxxxxxxxx>
Hi,

I using pv ubuntu as DomU and my xen is 4.0.0.  I can boot the DomU successfully, but I can not access to internet in DomU. Event I ping the Dom0 and it show "Network is unreachable". So how can I access to internet in the pv domU and how can I ping the dom0 successfully? Some information is as following.


DomU configure file
============
kernel = "/boot/vmlinuz-2.6.18.8-xen"
memory = "256"
name = "ubuntu.9-04"
vif = ['']
dhcp = "dhcp"
disk = ['file:/root/Xen/img/ubuntu-32/ubuntu.9-04.x86.img,sda1,w']
root = "/dev/sda1 ro"


Execute the command "ifconfig" in DomU.
============
root@ubuntu:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:16:3e:56:f7:68 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10991 (10.9 KB)  TX bytes:1368 (1.3 KB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          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)


Execute the command "ifconfig" in Dom0. (My DomU id is 8. )
============
[root@medmgmt-183 test1]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:24:E8:39:FA:54 
          inet addr:192.192.192.183  Bcast:192.192.192.255  Mask:255.255.255.0
          inet6 addr: fe80::224:e8ff:fe39:fa54/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:241196 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24951 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36847837 (35.1 MiB)  TX bytes:3294724 (3.1 MiB)

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

peth0     Link encap:Ethernet  HWaddr 00:24:E8:39:FA:54 
          inet addr:192.168.1.129  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::224:e8ff:fe39:fa54/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:254748 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26527 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:41250765 (39.3 MiB)  TX bytes:3426922 (3.2 MiB)
          Memory:fe6e0000-fe700000

vif8.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF 
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:22 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00 
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:5379 (5.2 KiB)



Execute the command "ping 192.168.1.129" in DomU. (My Dom0's IP is 192.168.1.129. )
============
root@ubuntu:~# ping 192.168.1.20
connect: Network is unreachable



Anyone can help me? Thank you very much!

Gavin









_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>