Here is my setup.
- Host Machine-[Ubuntu 16.04][185.82.xx.xx]
- Container1 [10.0.8.9]
- Container2 [10.0.8.100]
- Container3 [10.0.8.101]
Container4
[10.0.8.102]
All are working great.
Now, I purchased another dedicated IP
for my server. I have required information for my new IP [ip_address
, gateway
and netmask
]
I want to assign my new dedicated IP to Container 4
. I tried to set the required information in Centos' related networking files, but it did not work. Container has no access to internet right now.
This is the /etc/sysconfig/network-scripts/ifcfg-eth0
file:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=185.82.x.x
NETMASK=255.255.255.0
HOSTNAME=LXC_NAME
NM_CONTROLLED=yes
TYPE=Ethernet
DHCP_HOSTNAME=`hostname`
And this is the /etc/sysconfig/network
file:
NETWORKING=yes
HOSTNAME=LXC_NAME
GATEWAY=185.82.x.1
What can I do to make this work?
Thanks