Using a default xen3.0.1 setup for dom0(rhel4 distro) and domUs (gentoo, rhel4, centos4.2 distros, ttylinux) with the domUs all having dhcp turned on, is there an easy way to tell from within the dom0 what ip addresses were assigned to the domUs after bootup? Toby Ford USi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Feb-10 05:10 UTC
Re: [Xen-users] Seeing the IP addresses of domUs from dom0
On 2/10/06, Ford, Toby <Toby.Ford@usi.net> wrote:> > > Using a default xen3.0.1 setup for dom0(rhel4 distro) and domUs (gentoo, > rhel4, centos4.2 distros, ttylinux) with the domUs all having dhcp > turned on, is there an easy way to tell from within the dom0 what ip > addresses were assigned to the domUs after bootup? >Sure, just specify the MAC id for each domU inside your config files. Then for each MAC id specify an ip address in your dhcp config file. This way you know which domU will have what ip. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ford, Toby
2006-Feb-10 14:12 UTC
RE: [Xen-users] Seeing the IP addresses of domUs from dom0
>On 2/10/06, Ford, Toby <Toby.Ford@usi.net> wrote: >>Using a default xen3.0.1 setup for dom0(rhel4 distro) and domUs(gentoo,>>rhel4, centos4.2 distros, ttylinux) with the domUs all having dhcp >>turned on, is there an easy way to tell from within the dom0 what ip >>addresses were assigned to the domUs after bootup? > >Sure, just specify the MAC id for each domU inside your config files.Then >for each MAC id specify an ip address in your dhcp config file. This way >you know which domU will have what ip. That makes complete sense, if I controlled the dhcp. Unfortunately, in this case I don''t control the dhcp server configuration. I was looking for a way to determine the ip of a domU from the command line of the dom0. I found that with ''xm list --long <domid>'' I could see some of the information that dhcp sets like gateway and netmask in the section seen below, but the ip is always literally ''1.2.3.4''. Seems like a bug in xm. (domain ..... (image (linux (kernel /boot/vmlinuz-2.6.12.6-xenU) (ramdisk /boot/initrd-2.6.12.6-xenU) (ip :1.2.3.4:10.25.7.1:255.255.255.0:vm1:eth0:dhcp) (root ''/dev/sda1 ro'') (args 4) ) ) Toby _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Feb-10 14:33 UTC
Re: [Xen-users] Seeing the IP addresses of domUs from dom0
On 2/10/06, Ralf Schmitt <ibm.tivoli@arcor.de> wrote:> > with a MAC address entry in the domU configuration file it would > also be possible to find the IP address in the arp table with the > command: > > arp -n > > on dom0 if you don''t want to add each domU to the dhcp configuration. > > You should also have a look at the tool "arpwatch". It sends you a mail > if a new address appears. > > http://rpmseek.com/rpm-pl/arpwatch.html?hl=de&cx=857:A:80 > > Maybe this works only in a routed xen network ... >This doesn''t work on my routed setup arp -n Address HWtype HWaddress Flags Mask Iface 192.168.1.3 ether 00:09:5B:E6:3E:79 C eth0 192.168.1.1 ether 00:A0:C5:9B:AE:1D C eth0 192.168.1.240 * * MP eth0 The ip 192.168.1.240 is of a domU and the HWaddress has a * in it. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Feb-10 15:36 UTC
Re: [Xen-users] Seeing the IP addresses of domUs from dom0
I use the vif-route script and from the looks of your ifconfig it seems you are using the bridged network. Along with this i am using the xen-kernel for both dom0 and domU on the testing box. On 2/10/06, Ralf Schmitt <ibm.tivoli@arcor.de> wrote:> > > strange ... here is what I can see on my Notebook: > > [root@tivoli VM]# arp -n > Address HWtype HWaddress Flags Mask > Iface > 172.20.0.2 ether 00:16:3E:6F:97:1B C > xenbr0 > > > > > There is only one VM on it (172.20.0.2) and I can''t see > the interfaces of dom0, because this system is connected > to the internet with a PCMCIA UMTS card (ppp) and the > onboard network interface is not activated. > > [root@tivoli ~]# ifconfig > 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:132 errors:0 dropped:0 overruns:0 frame:0 > TX packets:132 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:40104 (39.1 KiB) TX bytes:40104 (39.1 KiB) > > ppp0 Link encap:Point-to-Point Protocol > inet addr:10.129.193.159 P-t-P:10.64.64.64 > Mask:255.255.255.255 > UP POINTOPOINT RUNNING NOARP MULTICAST MTU:400 Metric:1 > RX packets:14416 errors:2578 dropped:0 overruns:0 frame:0 > TX packets:14259 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:3 > RX bytes:5371717 (5.1 MiB) TX bytes:947051 (924.8 KiB) > > vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:30 errors:0 dropped:0 overruns:0 frame:0 > TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:1788 (1.7 KiB) TX bytes:916 (916.0 b) > > xenbr0 Link encap:Ethernet HWaddr 36:8B:F9:95:5C:E8 > inet addr:172.20.0.1 Bcast:172.20.255.255 > Mask:255.255.255.255 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:27 errors:0 dropped:0 overruns:0 frame:0 > TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:1284 (1.2 KiB) TX bytes:916 (916.0 b) > > > The ppp interface has no MAC address ... so this is OK > > I use NAT on it and I don''t have access to the server in my > company at the moment ... maybe I was wrong ... I will have > a look at it tomorrow. > > > My "xm list --long" is in the attached file. It was to long to > add it to the mail. > > > I have also added the kernel configuration files of dom0 and > domU. > > > Regards > > Ralf > > > Anand Gupta wrote: > > On 2/10/06, Ralf Schmitt <ibm.tivoli@arcor.de> wrote: > > with a MAC address entry in the domU configuration file it > > would > > also be possible to find the IP address in the arp table with > > the > > command: > > > > arp -n > > > > on dom0 if you don''t want to add each domU to the dhcp > > configuration. > > > > You should also have a look at the tool "arpwatch". It sends > > you a mail > > if a new address appears. > > > > http://rpmseek.com/rpm-pl/arpwatch.html?hl=de&cx=857:A:80 > > > > Maybe this works only in a routed xen network ... > > > > This doesn''t work on my routed setup > > > > arp -n > > Address HWtype HWaddress Flags Mask > > Iface > > 192.168.1.3 ether 00:09:5B:E6:3E:79 C > > eth0 > > 192.168.1.1 ether 00:A0:C5:9B:AE:1D C > > eth0 > > 192.168.1.240 * * MP > > eth0 > > > > The ip 192.168.1.240 is of a domU and the HWaddress has a * in it. > > > > > > -- > > regards, > > > > Anand Gupta > > >-- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ralf Schmitt
2006-Feb-10 16:28 UTC
Re: [Xen-users] Seeing the IP addresses of domUs from dom0
strange ... here is what I can see on my Notebook: [root@tivoli VM]# arp -n Address HWtype HWaddress Flags Mask Iface 172.20.0.2 ether 00:16:3E:6F:97:1B C xenbr0 There is only one VM on it (172.20.0.2) and I can''t see the interfaces of dom0, because this system is connected to the internet with a PCMCIA UMTS card (ppp) and the onboard network interface is not activated. [root@tivoli ~]# ifconfig 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:132 errors:0 dropped:0 overruns:0 frame:0 TX packets:132 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:40104 (39.1 KiB) TX bytes:40104 (39.1 KiB) ppp0 Link encap:Point-to-Point Protocol inet addr:10.129.193.159 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:400 Metric:1 RX packets:14416 errors:2578 dropped:0 overruns:0 frame:0 TX packets:14259 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:5371717 (5.1 MiB) TX bytes:947051 (924.8 KiB) vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:30 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1788 (1.7 KiB) TX bytes:916 (916.0 b) xenbr0 Link encap:Ethernet HWaddr 36:8B:F9:95:5C:E8 inet addr:172.20.0.1 Bcast:172.20.255.255 Mask:255.255.255.255 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:27 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1284 (1.2 KiB) TX bytes:916 (916.0 b) The ppp interface has no MAC address ... so this is OK I use NAT on it and I don''t have access to the server in my company at the moment ... maybe I was wrong ... I will have a look at it tomorrow. My "xm list --long" is in the attached file. It was to long to add it to the mail. I have also added the kernel configuration files of dom0 and domU. Regards Ralf Anand Gupta wrote:> On 2/10/06, Ralf Schmitt <ibm.tivoli@arcor.de> wrote: > with a MAC address entry in the domU configuration file it > would > also be possible to find the IP address in the arp table with > the > command: > > arp -n > > on dom0 if you don''t want to add each domU to the dhcp > configuration. > > You should also have a look at the tool "arpwatch". It sends > you a mail > if a new address appears. > > http://rpmseek.com/rpm-pl/arpwatch.html?hl=de&cx=857:A:80 > > Maybe this works only in a routed xen network ... > > This doesn''t work on my routed setup > > arp -n > Address HWtype HWaddress Flags Mask > Iface > 192.168.1.3 ether 00:09:5B:E6:3E:79 C > eth0 > 192.168.1.1 ether 00:A0:C5:9B:AE:1D C > eth0 > 192.168.1.240 * * MP > eth0 > > The ip 192.168.1.240 is of a domU and the HWaddress has a * in it. > > > -- > regards, > > Anand Gupta_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bráulio Gergull
2006-Feb-10 17:20 UTC
RE: [Xen-users] Seeing the IP addresses of domUs from dom0
On Feb 10, 2006 12:12 PM, "Ford, Toby" <Toby.Ford@usi.net> wrote:> I was looking for a way to determine the ip of a domU from the command > line of the dom0. I found that with ''xm list --long <domid>'' I could > see > some of the information that dhcp sets like gateway and netmask in the > section seen below, but the ip is always literally ''1.2.3.4''. Seems > like > a bug in xm.Maybe "arp -na" can help you. rgrds, Braulio Gergull _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ford, Toby
2006-Feb-10 22:34 UTC
RE: [Xen-users] Seeing the IP addresses of domUs from dom0
Running ''arp -an'' on my dom0 only shows me the MAC address of the one connected physical interface I have. I tried specifying ''-i'' and get ... arp: in 1 entries no match found. Toby -----Original Message----- From: Bráulio Gergull [mailto:gergull@getnet.com.br] Sent: Friday, February 10, 2006 12:21 PM To: Ford, Toby Cc: Anand Gupta; xen-users@lists.xensource.com Subject: RE: [Xen-users] Seeing the IP addresses of domUs from dom0 On Feb 10, 2006 12:12 PM, "Ford, Toby" <Toby.Ford@usi.net> wrote:> I was looking for a way to determine the ip of a domU from the command > line of the dom0. I found that with ''xm list --long <domid>'' I could > see > some of the information that dhcp sets like gateway and netmask in the > section seen below, but the ip is always literally ''1.2.3.4''. Seems > like > a bug in xm.Maybe "arp -na" can help you. rgrds, Braulio Gergull _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Feb-11 08:39 UTC
Re: [Xen-users] Seeing the IP addresses of domUs from dom0
On 2/11/06, Ford, Toby <Toby.Ford@usi.net> wrote:> > > Running ''arp -an'' on my dom0 only shows me the MAC address of the one > connected physical interface I have. I tried specifying ''-i'' and get ... > > arp: in 1 entries no match found. >Out of the box my route setup wasn''t working with xen, i had to hack the vif-route script to get it working. It was basically an arp entry which helped. Thanks to the guys on the list. It could be because of my hack the arp isn''t showing the MAC address for the domU''s. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bráulio "W. Gergull
2006-Feb-13 12:51 UTC
RE: [Xen-users] Seeing the IP addresses of domUs from dom0
Hi Toby, Em Sex, 2006-02-10 às 17:34 -0500, Ford, Toby escreveu:> Running ''arp -an'' on my dom0 only shows me the MAC address of the one connected physical interface I have. I tried specifying ''-i'' and get ... > > arp: in 1 entries no match found.You can force arp discovery by pinging the broadcast, just before issuing the arp command: ping -b -c 5 255.255.255.255 arp -na That should do the trick. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Feb-13 15:16 UTC
Re: [Xen-users] Seeing the IP addresses of domUs from dom0
On 2/13/06, Bráulio W. Gergull <gergull@getnet.com.br> wrote:> > Hi Toby, > > Em Sex, 2006-02-10 às 17:34 -0500, Ford, Toby escreveu: > > Running ''arp -an'' on my dom0 only shows me the MAC address of the one > connected physical interface I have. I tried specifying ''-i'' and get ... > > > > arp: in 1 entries no match found. > > You can force arp discovery by pinging the broadcast, just before > issuing the arp command: > > ping -b -c 5 255.255.255.255 > > arp -na > > That should do the trick. >Doesn''t work for me ? (192.168.1.1) at 00:A0:C5:9B:AE:1D [ether] on eth0 ? (192.168.1.3) at 00:09:5B:E6:3E:79 [ether] on eth0 ? (192.168.1.240) at * PERM PUP on eth0 .240 being domU. Maybe its the arp command i use in my custom vif-route script. arp -s 192.168.1.240 00:08:a1:50:fa:19 pub 00:08:a1:50:fa:19 is the mac of eth0 on dom0. Any clues ? -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users