タグ付きおよびネイティブVLANを使用したDebianボンド


0

4つのインターフェイス(eno1..4)が結合されたサーバーがあります。ここまでは順調ですね。

構成内のVLANで、ネットワークサービスを開始すると、エラーが返されます。

$ service networking status
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-09-04 11:04:11 -03; 7min ago
     Docs: man:interfaces(5)
  Process: 1989 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=0/SUCCESS)
  Process: 2180 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 2175 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 2180 (code=exited, status=1/FAILURE)

auto bond0.20 / 30をコメントしてネットワークを再起動しても、エラーは発生しませんでした。しかし、bond0 20をifupすると、エラーが発生します:

$ ifup bond0.20
RTNETLINK answers: File exists
ifup: failed to bring up bond0.20

ここに私のconfがあります:

# The loopback network interface
auto lo
iface lo inet loopback

# Bonding interfaces

allow-hotplug eno1
iface eno1 inet manual

allow-hotplug eno2
iface eno2 inet manual

allow-hotplug eno3
iface eno3 inet manual

allow-hotplug eno4
iface eno4 inet manual

# Main bonding interface
auto bond0
iface bond0 inet static
        address 10.10.0.1
        gateway 10.10.0.254
        netmask 255.255.255.0
        dns-nameservers 10.10.0.254
        dns-search mydomain.local
        bond-mode 802.3ad
        bond-miimon 100
        bond-downdelay 200
        bond-updelay 200
        bond-lacp-rate 1
        bond_xmit_hash_policy layer2+3
        bond-slaves eno1 eno2 eno3 eno4

auto bond0.20
iface bond0.20 inet static
        address 10.20.0.1
        gateway 10.20.0.254
        netmask 255.255.255.0

auto bond0.30
iface bond0.30 inet static
        address 10.30.0.1
        gateway 10.30.0.254
        netmask 255.255.255.0

編集

ブリッジを使用した新しいセットアップ:

auto eno1
iface eno1 inet manual

auto eno2
iface eno2 inet manual

auto bond0
iface bond0 inet manual
    slaves eno1 eno2
    bond-mode 802.3ad
    bond-miimon 100
    bond-downdelay 200
    bond-updelay 200
    bond-lacp-rate 1
    bond_xmit_hash_policy layer2+3

auto bond0.20
iface bond0.20 inet manual

auto br20
iface br20 inet static
    address  192.168.100.1
    netmask  255.255.255.0
    network  192.168.100.0
    bridge_ports bond0.20
    bridge_maxwait 5
    bridge_stp off
    bridge_fd 0

auto bond0.30
iface bond0.30 inet manual

auto br30
iface br30 inet static
    address  192.168.200.1
    netmask  255.255.255.0
    network  192.168.200.0
    bridge_ports bond0.30
    bridge_maxwait 5
    bridge_stp off
    bridge_fd 0

上昇しますが、エラーを返し、サービスネットワーキングステータスがクリーンでないことを示します。

$ service networking status
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-09-04 20:08:38 -03; 29s ago
     Docs: man:interfaces(5)
  Process: 923 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 902 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 923 (code=exited, status=1/FAILURE)

Sep 04 20:08:38 alpha ifup[923]: + [ meta = meta ]
Sep 04 20:08:38 alpha ifup[923]: + exit 0
Sep 04 20:08:38 alpha ifup[923]: run-parts: executing /etc/network/if-up.d/ip
Sep 04 20:08:38 alpha ifup[923]: run-parts: executing /etc/network/if-up.d/openssh-server
Sep 04 20:08:38 alpha ifup[923]: run-parts: executing /etc/network/if-up.d/postfix
Sep 04 20:08:38 alpha ifup[923]: run-parts: executing /etc/network/if-up.d/upstart
Sep 04 20:08:38 alpha systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 04 20:08:38 alpha systemd[1]: Failed to start Raise network interfaces.
Sep 04 20:08:38 alpha systemd[1]: networking.service: Unit entered failed state.
Sep 04 20:08:38 alpha systemd[1]: networking.service: Failed with result 'exit-code'.

ここでは問題を示していないため、systemdが実際に起こったことをログに記録している場所を見つける必要があります。おそらくいくつかの呼び出しを介してアクセスされますがjournald、私はsystemdユーザーではないため、これ以上アドバイスすることはできません。
djsmiley2k

問題は、bond0.20をアップしようとすると、すでに存在していると表示され、実際に存在するということです。KVMで必要になるため、ブリッジを追加するためにセットアップを少し変更しました。
0x3333

回答:


0

さて、私がやったことは:

autoVLANから削除し、次を追加しますbond0

 pre-up vconfig add bond0 20; vconfig add bond0 30

このようにして、bond0インターフェイスが起動する前にVLANが作成されます。

最終構成ファイル:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# Bonding interfaces

allow-hotplug eno1
iface eno1 inet manual

allow-hotplug eno2
iface eno2 inet manual

allow-hotplug eno3
iface eno3 inet manual

allow-hotplug eno4
iface eno4 inet manual

# Main bonding interface
auto bond0
iface bond0 inet static
        address 10.10.0.1
        gateway 10.10.0.254
        netmask 255.255.255.0
        dns-nameservers 10.10.0.254
        dns-search mydomain.local
        bond-mode 802.3ad
        bond-miimon 100
        bond-downdelay 200
        bond-updelay 200
        bond-lacp-rate 1
        bond_xmit_hash_policy layer2+3
        bond-slaves eno1 eno2 eno3 eno4
        pre-up vconfig add bond0 20; vconfig add bond0 30

iface bond0.20 inet static
        address 10.20.0.1
        gateway 10.20.0.254
        netmask 255.255.255.0

iface bond0.30 inet static
        address 10.30.0.1
        gateway 10.30.0.254
        netmask 255.255.255.0

これにより、bond + vlanの問題が解決しました。しかし、今は橋があり、もう機能しません。
0x3333

0

問題が見つかりました。

私の間違い、複数のgatewayエントリには、1つしかありません!

今では機能しています。

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.