Does LXC gateway need to be set?

Bedlore

New Member
Dec 15, 2014
27
0
1
I'm preparing to migrate a standalone machine from 3.4 to 4.2 and have some basic network questions. Previously I've only had to provide an IP for things to work. But now I notice that the GUI for LXC CTs contain a Gateway and Bridge option. The migration document example sets both; eg.
pct set 101 -net0 name=eth0,bridge=vmbr0,ip=192.168.15.144/24,gw=192.168.15.1

So for me moving forward, do I need to now set these values also?
 
Thanks Dietmar

What about VPS for a local IP range? For example on this host I run some local VPS using 10.10.10.x range, the host has vmbr1 set to inet addr:10.10.10.1 Bcast:10.10.10.63 Mask:255.255.255.192. So I assume a VPS should then be set like following?

pct set 101 -net0 name=eth0,bridge=vmbr1,ip=10.10.10.5/24,gw=10.10.10.1
 
The netmask looks wrong to me - try the following instead:

pct set 101 -net0 name=eth0,bridge=vmbr1,ip=10.10.10.5/26,gw=10.10.10.1