Debian 9の永続的なデフォルトパス

Debian 9の永続的なデフォルトパス

私のDebian 9コンピュータには3つのインターフェースがあります。システム全体のデフォルトパスを永久に設定する必要があります。別の方法で/etc/network/interfacesファイルに追加してみましたが、正しいオプションが見つからないようです。私はインターフェースセクションとファイルの下部にダウンリンクを入れましたが、そのうち何も機能しないようです。正しい構文は何ですか?すべてのパスはens256から出てくる必要があり、すべてのローカルパスは別のインターフェイスから出るべきです。

    # The primary network interface
allow-hotplug ens192
iface ens192 inet static
  address 10.21.30.10
  netmask 255.255.255.0
  gateway 10.21.30.254
down route del default gw 10.21.30.254

allow-hotplug ens224
iface ens224 inet static
  address 10.21.10.10
  netmask 255.255.255.0
  gateway 10.21.10.254
down route del default gw 10.21.10.254

allow-hotplug ens256
iface ens256 inet static
  address 1.2.3.157
  netmask 255.255.255.248
  gateway 1.2.3.153
  dns-nameservers 4.2.2.2 8.8.8.8
up route add default gw 1.2.3.153

投稿設定をファイルの末尾に置くと。 "1.2.3.153 dev ens256追加のデフォルトを介したpost-up /bin/ipパス"これは機能します。インターネットにpingを送信できますが、apt-getを実行できないようです。これを実行すると、次のエラーが発生します。

Ign:1 http://security.debian.org/debian-security stretch/updates InRelease
Err:2 http://security.debian.org/debian-security stretch/updates Release
  Connection failed [IP: 199.232.32.204 80]
Ign:3 http://ftp.us.debian.org/debian stretch InRelease
Ign:4 http://ftp.us.debian.org/debian stretch-updates InRelease
Err:5 http://ftp.us.debian.org/debian stretch Release
  Connection failed [IP: 208.80.154.15 80]
Err:6 http://ftp.us.debian.org/debian stretch-updates Release
  Connection failed [IP: 64.50.233.100 80]
Reading package lists... Done
E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ftp.us.debian.org/debian stretch Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ftp.us.debian.org/debian stretch-updates Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

ベストアンサー1

ゲートウェイケーブルは1つだけあるべきだと思います。

おすすめ記事