0

KVM を使用していくつかの VM を実行したい専用サーバーがあります。

専用 IP を使用して外部から VM にアクセスできるように、ブリッジ ネットワークをセットアップしようとしています。

この記事を使用してこれを実行しようとしましたが、br0 を立ち上げると、ssh 経由でサーバーへの接続が失われます (その他のこともすべて)。

ここに私の /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
allow-hotplug eth0
iface eth0 inet static
        address 66.147.230.23
        netmask 255.255.255.0
        network 66.147.230.0
        broadcast 66.147.230.255
        gateway 66.147.230.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 208.67.222.222 208.67.220.220
        dns-search samgwydir.com

# bridge
auto br0
iface br0 inet static
#       address 216.120.250.44
#       netmask 255.255.255.0
#       network 216.120.250.0
#       broadcast 216.120.250.255
#       gateway 216.120.250.1
        address 192.168.1.1
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        gateway 192.168.1.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

br0 が専用 IP を使用し、代わりにローカル IP を使用しようとした失敗したセットアップをコメントアウトしました。

4

1 に答える 1

1

を構成しないでください。ブリッジ デバイス (IP を使用)とeth0同様です。eth0192.168.1.1

auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet manual

# bridge
auto br0
iface br0 inet static
        address 192.168.1.1
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        gateway 192.168.1.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

br0ホストをマルチホームにしたい場合は、複数の IP アドレスを に割り当てることができる場合があります

于 2013-01-08T12:54:34.147 に答える