All of lore.kernel.org
 help / color / mirror / Atom feed
* How to connect to the Internet in pv DomU
@ 2010-09-28  6:53 Bei Guan
  2010-09-29  4:21 ` Bei Guan
  0 siblings, 1 reply; 3+ messages in thread
From: Bei Guan @ 2010-09-28  6:53 UTC (permalink / raw)
  To: xen devel


[-- Attachment #1.1: Type: text/plain, Size: 3906 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 4393 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to connect to the Internet in pv DomU
  2010-09-28  6:53 How to connect to the Internet in pv DomU Bei Guan
@ 2010-09-29  4:21 ` Bei Guan
  2010-09-29 16:07   ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 3+ messages in thread
From: Bei Guan @ 2010-09-29  4:21 UTC (permalink / raw)
  To: xen devel


[-- Attachment #1.1: Type: text/plain, Size: 4999 bytes --]

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@gmail.com>

> 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
>
>
>
>
>
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 5513 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: How to connect to the Internet in pv DomU
  2010-09-29  4:21 ` Bei Guan
@ 2010-09-29 16:07   ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2010-09-29 16:07 UTC (permalink / raw)
  To: Bei Guan; +Cc: xen devel

 On 09/28/2010 09:21 PM, Bei Guan wrote:
> 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?

IP addresses are something that machines - virtual or physical - set for
themselves.  It might be statically configured, or it might be from a
dhcp server, but either way the domain itself needs to do the setting.

I guess in principle dom0 could stick the ip address into xenstore and
the domU could fetch it from there, but AFAIK there's no mechanism to do
that.

    J

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-29 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28  6:53 How to connect to the Internet in pv DomU Bei Guan
2010-09-29  4:21 ` Bei Guan
2010-09-29 16:07   ` Jeremy Fitzhardinge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.