On 2017/04/11 3:08 PM, Andreas Laut wrote:
Hi Gabriel,
you can set a gateway in the lxc config with lxc.network.ipv4.gateway =
172.16.24.1
The other way would be to set a option in dnsmasq to announce
172.16.24.1 as gateway.
okay, so I managed to add an option 3 to the dnsmasq config and my
containers now have a default gateway of 172.16.24.1
however, from the container, I am unable to ping the gateway, nor the
host server on 172.16.24.2 and from the host server, I can't ping the
container either.
my container got the ip 172.16.24.18 (assigned by dnsmasq)
I'm not sure what could be the cause..?
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2004q4/000006.html
Hope that helps,
regards
Andreas Laut
System-Administrator
--
Spark 5 GmbH
Rheinstr. 97
64295 Darmstadt
Germany
--
Fon: +49-6151-8508-021
Fax: +49-6151-8508-111
Mail: [email protected]
Web: http://www.spark5.de
--
Geschäftsführer: Héctor Martinez, Henning Munte und Marko Reinbacher
Amtsgericht Darmstadt, HRB 7809
Am 11.04.2017 um 14:54 schrieb Gabriel Marais:
Hi Guys
I am trying to setup my container bridge in such a way that it makes
part of my LAN.
On my host, I have no IP Address assigned on the physical interface.
Created a bridge, br1priv, and assigned a static IP Address
172.16.24.2/26 to that bridge. My gateway is 172.16.24.1
During LXD init, I specified my br1priv as the bridge to be used for
containers, and DHCP range 172.16.24.2 - 172.16.24.62
The container is getting an IP from dnsmasq in the correct range, but
the default gateway seems to be 172.16.24.2 (the host server ip) and
not 172.16.24.1
How do I get the default gateway to be 172.16.24.1 in this case, or is
there another way to make this setup better?
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users
--
Regards
Gabriel Marais
Office: +27 861 466 546 x 7001
Mobile: +27 83 663 2222
Mail: [email protected]
Unit 11, Ground Floor, Berkley Office Park
Cnr Bauhinia & Witch Hazel Str,
Highveld, Centurion, South-Africa
0157
PO Box 15846, Lyttelton, South Africa, 0140
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users