[lxc-users] Get the ip address of the host that hosts a container

Narcis Garcia informatica at actiu.net
Tue Jun 30 07:12:08 UTC 2015


You can explore if container's IP has been assigned by DHCPd:

cat /var/lib/dhcp/dhclient.leases
cat /var/lib/dhcp3/dhclient.leases


El 29/06/15 a les 22:43, Luis M. Ibarra ha escrit:
> You can't. The host and the container are in different network
> namespaces. You can get only the default gw of your container which is
> the endpoint of your pipe if you're using veth.
> 
> Regards,
> 
> On Jun 29, 2015 6:40 AM, "Thouraya TH" <thouraya87 at gmail.com
> <mailto:thouraya87 at gmail.com>> wrote:
> 
>     Hi all
> 
>     Please, is there a command to getthe ip address of the host that
>     hosts a container ?
> 
>     i'd like to use this command inside the container.
> 
>     Thanks a lot.
>     Best Regards.
> 
>     _______________________________________________
>     lxc-users mailing list
>     lxc-users at lists.linuxcontainers.org
>     <mailto:lxc-users at lists.linuxcontainers.org>
>     http://lists.linuxcontainers.org/listinfo/lxc-users
> 
> 
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
> 


More information about the lxc-users mailing list