[CentOS] Finding DHCP IP of guest system

Fri Jul 16 15:40:25 UTC 2010
Les Mikesell <lesmikesell at gmail.com>

On 7/16/2010 10:11 AM, Akemi Yagi wrote:
> On Thu, Jul 15, 2010 at 12:03 PM, David Dyer-Bennet<dd-b at 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 at gmail.com