Re: P.S. Re: Debian 9 in a VM with Proxmox 5 system
I have dropped debian-devel@lists.debian.org.
I have added debian-user@lists.debian.org.
In previous emails, Maximilian complaned that Debian 9 had no 'route'
command. Having been advised to use 'ip route', he has offered this
snippet from this interfaces file for discussion.
On Mon, Jul 10, 2017 at 02:53:23PM +0200, Maximilian Althaus wrote:
> This is the config for (/etc/network/interfaces)
>
> auto lo
> iface lo inet loopback
>
> auto ens18
> allow-hotplug ens18
> iface ens18 inet static
> addressIP.V4.ADDR.ESS
> netmask 255.255.255.255
> broadcastIP.V4.ADDR.ESS
> post-up route addROOTER.IPV4.ADDR.ESSdev ens18
> post-up route add default gwROOTER.IPV4.ADDR.ESS
> pre-down route delROOTER.IPV4.ADDR.ESSdev ens18
> pre-down route del default gwROOTER.IPV4.ADDR.ESS
Maximilian, why are you using 'route' in those post-up and pre-down
directives?
If you're going to use post-up and pre-down, then they need to be more
like (untested) the following, using 'ip route':
post-up ip route add A.B.C.D dev ens18
post-up ip route add default via A.B.C.D
pre-down ip route del default via A.B.C.D
pre-down ip route del A.B.C.D dev ens18
More importantly, why are you using post-up and pre-down directives to
add default routing? Is there a reason why your netmask is
255.255.255.255?
Assuming that you're on a /24 subnet (meaning, the netmask is
255.255.255.0), then try something like this, instead:
auto ens18
iface ens18 inet static
address IP.V4.ADDR.ESS
netmask 255.255.255.0
gateway ROOTER.IPV4.ADDR.ESS
--
Luca Filipozzi
Reply to: