FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-15-2010, 07:03 PM
"David Dyer-Bennet"
 
Default Finding DHCP IP of guest system

If I can log in to the guest through the console, I can of course find out
what IP DHCP has assigned it. If I configure a static IP I can of course
connect to the system there (if it runs services, the firewall allows it,
all the usual caveats).

Does there happen to be any way to determine from dom0 what IPs are
participating in the network and which guests they belong to? (I'm
configuring everything as bridged; basically I want to use virtualization
to pretend I have a bunch of independent systems visible to the outside.)

(I suppose just what the IPs are is enough; the number is small enough I
could probe them until I found the system I wanted. Obviously this is for
use when I'm having trouble getting in through the console but have some
reason to think the rest of the system is alive.)
--
David Dyer-Bennet, dd-b@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2010, 07:08 PM
Rudi Ahlers
 
Default Finding DHCP IP of guest system

On Thu, Jul 15, 2010 at 9:03 PM, David Dyer-Bennet <dd-b@dd-b.net> wrote:
> If I can log in to the guest through the console, I can of course find out
> what IP DHCP has assigned it. *If I configure a static IP I can of course
> connect to the system there (if it runs services, the firewall allows it,
> all the usual caveats).
>
> Does there happen to be any way to determine from dom0 what IPs are
> participating in the network and which guests they belong to? *(I'm
> configuring everything as bridged; basically I want to use virtualization
> to pretend I have a bunch of independent systems visible to the outside.)
>
> (I suppose just what the IPs are is enough; the number is small enough I
> could probe them until I found the system I wanted. *Obviously this is for
> use when I'm having trouble getting in through the console but have some
> reason to think the rest of the system is alive.)
> --
> David Dyer-Bennet, dd-b@dd-b.net; http://dd-b.net/
> Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
> Photos: http://dd-b.net/photography/gallery/
> Dragaera: http://dragaera.info
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


grep DHCP /var/log/messages

or

grep DHCPACK /var/log/messages

--
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2010, 08:06 PM
"David Dyer-Bennet"
 
Default Finding DHCP IP of guest system

On Thu, July 15, 2010 14:08, Rudi Ahlers wrote:
> On Thu, Jul 15, 2010 at 9:03 PM, David Dyer-Bennet <dd-b@dd-b.net> wrote:
>> If I can log in to the guest through the console, I can of course find
>> out
>> what IP DHCP has assigned it. *If I configure a static IP I can of
>> course
>> connect to the system there (if it runs services, the firewall allows
>> it,
>> all the usual caveats).
>>
>> Does there happen to be any way to determine from dom0 what IPs are
>> participating in the network and which guests they belong to? *(I'm
>> configuring everything as bridged; basically I want to use
>> virtualization
>> to pretend I have a bunch of independent systems visible to the
>> outside.)
>>
>> (I suppose just what the IPs are is enough; the number is small enough I
>> could probe them until I found the system I wanted. *Obviously this is
>> for
>> use when I'm having trouble getting in through the console but have some
>> reason to think the rest of the system is alive.)

> grep DHCP /var/log/messages
>
> or
>
> grep DHCPACK /var/log/messages

My dom0 /var/log/messages doesn't have anything on assignments to guests.
bs004 (ID 9), for example, currently has 192.168.1.143, but there's
nothing about that IP in dom0 /var/log/messages.

Are you maybe running a dhcp server locally for local networking, rather
than bridging your guest systems out to the general dhcp server?
--
David Dyer-Bennet, dd-b@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2010, 06:56 AM
Rudi Ahlers
 
Default Finding DHCP IP of guest system

On Thu, Jul 15, 2010 at 10:06 PM, David Dyer-Bennet <dd-b@dd-b.net> wrote:
>
> My dom0 /var/log/messages doesn't have anything on assignments to guests.
> bs004 (ID 9), for example, currently has 192.168.1.143, but there's
> nothing about that IP in dom0 /var/log/messages.
>
> Are you maybe running a dhcp server locally for local networking, rather
> than bridging your guest systems out to the general dhcp server?
> --
> David Dyer-Bennet, dd-b@dd-b.net; http://dd-b.net/
> Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
> Photos: http://dd-b.net/photography/gallery/
> Dragaera: http://dragaera.info
>
> _______________________________________________


I don't run DHCP on dom0 (are you using XEN?) for this very reason. I
don't want DHCP broadcasts all over the network, and don't want the
domU's to accept DHCP requests from other hosts.

DHCP *normally* logs to /var/log/messages, unless you configured it otherwise.

try "grep dhcp /var/log/messages"

OR "tail -f /var/log/messages" and then "service network restart" on a
domU to see if it shows anything on dom0. Can the domU's get their IP
from another server? Try en eliminate this altogether.


--
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2010, 02:39 PM
"David Dyer-Bennet"
 
Default Finding DHCP IP of guest system

On Fri, July 16, 2010 01:56, Rudi Ahlers wrote:
> On Thu, Jul 15, 2010 at 10:06 PM, David Dyer-Bennet <dd-b@dd-b.net> wrote:
>>
>> My dom0 /var/log/messages doesn't have anything on assignments to
>> guests.
>> bs004 (ID 9), for example, currently has 192.168.1.143, but there's
>> nothing about that IP in dom0 /var/log/messages.
>>
>> Are you maybe running a dhcp server locally for local networking, rather
>> than bridging your guest systems out to the general dhcp server?
>
> I don't run DHCP on dom0 (are you using XEN?) for this very reason. I
> don't want DHCP broadcasts all over the network, and don't want the
> domU's to accept DHCP requests from other hosts.

Yes, Xen. I'm not so far as I know running DHCP, but it might be
configured by default.

> DHCP *normally* logs to /var/log/messages, unless you configured it
> otherwise.

Haven't touched anything of that nature (and the install is only hours
old, I still remember what I did :-) ).

> try "grep dhcp /var/log/messages"
>
> OR "tail -f /var/log/messages" and then "service network restart" on a
> domU to see if it shows anything on dom0. Can the domU's get their IP
> from another server? Try en eliminate this altogether.

The domU got it's ip from the corporate DHCP server, which is what I
intended (that's why I'm running bridged, I'm using virtual servers to
separate functions while conserving physical boxes, so I want them to
present as separate systems to users on the network).

Can't retest right now, as I'm back to just a newly installed Dom0 for
what I hope will be the actual production install.

--
David Dyer-Bennet, dd-b@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2010, 03:11 PM
Akemi Yagi
 
Default Finding DHCP IP of guest system

On Thu, Jul 15, 2010 at 12:03 PM, David Dyer-Bennet <dd-b@dd-b.net> wrote:
> If I can log in to the guest through the console, I can of course find out
> what IP DHCP has assigned it. *If I configure a static IP I can of course
> connect to the system there (if it runs services, the firewall allows it,
> all the usual caveats).
>
> Does there happen to be any way to determine from dom0 what IPs are
> participating in the network and which guests they belong to? *(I'm
> configuring everything as bridged; basically I want to use virtualization
> to pretend I have a bunch of independent systems visible to the outside.)

Soon after I started using kvm and created guests with bridged
network, I asked the same question as yours. I have not been able to
find a clear answer to date. If I'm not mistaken, there is no easy
solution as you suspected. The host has no knowledge of the guests'
IPs because an outside DHCP server (in my case at home, it is a
router/cable modem) provides the IP addresses. So, I've been using the
"console" method.

Akemi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2010, 03:40 PM
Les Mikesell
 
Default Finding DHCP IP of guest system

On 7/16/2010 10:11 AM, Akemi Yagi wrote:
> On Thu, Jul 15, 2010 at 12:03 PM, David Dyer-Bennet<dd-b@dd-b.net> wrote:
>> If I can log in to the guest through the console, I can of course find out
>> what IP DHCP has assigned it. If I configure a static IP I can of course
>> connect to the system there (if it runs services, the firewall allows it,
>> all the usual caveats).
>>
>> Does there happen to be any way to determine from dom0 what IPs are
>> participating in the network and which guests they belong to? (I'm
>> configuring everything as bridged; basically I want to use virtualization
>> to pretend I have a bunch of independent systems visible to the outside.)
>
> Soon after I started using kvm and created guests with bridged
> network, I asked the same question as yours. I have not been able to
> find a clear answer to date. If I'm not mistaken, there is no easy
> solution as you suspected. The host has no knowledge of the guests'
> IPs because an outside DHCP server (in my case at home, it is a
> router/cable modem) provides the IP addresses. So, I've been using the
> "console" method.

Your router/cablemodem most likely has a web interface where you can
find a log and a mapping of MAC addresses to the IP addresses it has
given out. You might even be able to configure it to syslog to your
centos box. You should also be able to see the DHCP traffic activity by
running tcpdump or wireshark on the bridged host physical interface as
the guest starts.

--
Les Mikesell
lesmikesell@gmail.com

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2010, 03:57 PM
Akemi Yagi
 
Default Finding DHCP IP of guest system

On Fri, Jul 16, 2010 at 8:40 AM, Les Mikesell <lesmikesell@gmail.com> wrote:
> On 7/16/2010 10:11 AM, Akemi Yagi wrote:

>> Soon after I started using kvm and created guests with bridged
>> network, I asked the same question as yours. I have not been able to
>> find a clear answer to date. *If I'm not mistaken, there is no easy
>> solution as you suspected. The host has no knowledge of the guests'
>> IPs because an outside DHCP server (in my case at home, it is a
>> router/cable modem) provides the IP addresses. So, I've been using the
>> "console" method.
>
> Your router/cablemodem most likely has a web interface where you can
> find a log and a mapping of MAC addresses to the IP addresses it has
> given out. *You might even be able to configure it to syslog to your
> centos box. *You should also be able to see the DHCP traffic activity by
> running tcpdump or wireshark on the bridged host physical interface as
> the guest starts.

Sure, I can retrieve the info from my cable modem. I also tried
wireshark. I then decided looking at the console was much "quicker"
for me. But if I'm in a situation where the guests are constantly
created and there is a need for semi-automatic retrieval of guest's
IPs, I would spend some time for that.

Akemi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2010, 04:05 PM
Karanbir Singh
 
Default Finding DHCP IP of guest system

On 07/16/2010 04:57 PM, Akemi Yagi wrote:
> Sure, I can retrieve the info from my cable modem. I also tried
> wireshark. I then decided looking at the console was much "quicker"
> for me. But if I'm in a situation where the guests are constantly
> created and there is a need for semi-automatic retrieval of guest's
> IPs, I would spend some time for that.

This isnt hard at all, just setup your dhcp server to update dns and
parse the bind dbdumps whenever you care to find out whats live at this
time.

- KB
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-17-2010, 12:17 AM
Kahlil Hodgson
 
Default Finding DHCP IP of guest system

On 07/17/2010 12:39 AM, David Dyer-Bennet wrote:
> The domU got it's ip from the corporate DHCP server, which is what I
> intended (that's why I'm running bridged, I'm using virtual servers to
> separate functions while conserving physical boxes, so I want them to
> present as separate systems to users on the network).

An alternative, if you have some control over the DHCP server, might be
to enforce a mapping of MAC addresses to IPs. You can pretty much set
you guest MAC addresses to whatever you want so long as they don't
conflict with anything else. In libvirt land you do that with something like

<interface type='bridge'>
<mac address='00:16:36:1e:dd:f3'/>
<source bridge='br0'/>
</interface>

Kal
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 04:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org