
私は、別のデータセンターにあるリモート ホストに Debian Buster を新規インストールする作業を行っています。
標準の/etc/network/interfacesをコピーして元の場所に戻し、再起動するスクリプトを用意しました。でネットワーク構成の変更時に問題が発生した場合に備えて、コマンドを入力します。
/etc/network/interfaces にブリッジ br0 エントリを追加し、ifup br0 を呼び出すと、ブリッジ インターフェイスは次のように表示されます。
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xxx.62.204 netmask 255.255.255.0 broadcast xx.xxx.62.255
inet6 xxxx::7a2b:cbff:fe71:b0b0 prefixlen 64 scopeid 0x20<link>
ether 78:xx:xx:xx:b0:b0 txqueuelen 1000 (Ethernet)
RX packets 1722 bytes 80621 (78.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5 bytes 426 (426.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xxx.62.204 netmask 255.255.255.0 broadcast xx.xxx.62.255
ether 78:xx:xx:xx:b0:b0 txqueuelen 1000 (Ethernet)
RX packets 27871902 bytes 1784816339 (1.6 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10682 bytes 1326822 (1.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Lokale Schleife)
RX packets 26 bytes 3455 (3.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 26 bytes 3455 (3.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
次の /etc/network/interfaces エントリを追加します:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eno1
iface eno1 inet static
address xx.xxx.62.204
netmask 255.255.255.0
network xx.xxx.62.0
broadcast xx.xxx.62.255
gateway xx.xxx.62.254
iface eno1 inet6 static
address xxxx:198:ff0d:e800::/40
pre-up echo 0 > /proc/sys/net/ipv6/conf/eno1/accept_dad
post-up ip -6 route add default via xxxx:198:ff00::1
up ip -6 addr add xxxx:198:ff0d:e800::1/40 dev $IFACE
down ip -6 addr del xxxx:198:ff0d:e800::1/40 dev $IFACE
auto br0
iface br0 inet static
address xx.xxx.62.204
netmask 255.255.255.0
gateway xx.xxx.62.254
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
しかし、数秒後には ssh 接続がフリーズし、ping パケットが到着しなくなり、緊急スクリプトが修復/再起動するまで待たなければなりません。
全体的な試みは、ホスト上の kvm 仮想マシンにブリッジ インターフェイスを提供し、別の IP4 アドレスを介して外部にアクセスできるようにすることです。
追加されたブリッジエントリは、このサーバーフォールトの投稿