I was trying to create a container CT, when I gave static IP while creating CT, I am not getting internet.
whereas I am getting internet when I configure it directly in interfaces(Linux)
Please check my configuration
cat /etc/network/interfaces
````````````````````````````
auto lo
iface lo inet loopback
iface lo inet6 loopback
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto eth0
iface eth0 inet static
address [IP]
netmask 255.255.255.0
# --- BEGIN PVE ---
post-up ip route add [GW IP] dev eth0
post-up ip route add default via [GW IP] dev eth0
pre-down ip route del default via [GW IP] dev eth0
pre-down ip route del [GW IP] dev eth0
# --- END PVE ---
ip route
`````````
default via [GW IP] dev eth0
[NW] dev eth0 proto kernel scope link src [IP]
[GW IP] dev eth0 scope link
whereas I am getting internet when I configure it directly in interfaces(Linux)
Please check my configuration
cat /etc/network/interfaces
````````````````````````````
auto lo
iface lo inet loopback
iface lo inet6 loopback
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto eth0
iface eth0 inet static
address [IP]
netmask 255.255.255.0
# --- BEGIN PVE ---
post-up ip route add [GW IP] dev eth0
post-up ip route add default via [GW IP] dev eth0
pre-down ip route del default via [GW IP] dev eth0
pre-down ip route del [GW IP] dev eth0
# --- END PVE ---
ip route
`````````
default via [GW IP] dev eth0
[NW] dev eth0 proto kernel scope link src [IP]
[GW IP] dev eth0 scope link