부팅 시 링크가 없는 본드 인터페이스

부팅 시 링크가 없는 본드 인터페이스

서버를 재부팅한 후 bond0슬레이브 이더넷( ) 중 하나에 링크가 없어 시작되지 않았으므로 다음을 eth2사용하여 수동으로 설정해야 했습니다.

ip link set dev eth2 up

서버에는 LAN(KVM용 브리지 포함)에 대한 하나의 결합과 다른 서버에 대한 drbd에 대한 또 다른 결합이 있습니다.

    kvm + lan                       drbd
 ##############################################
 +------------------------+
 |           br0          |
 +------------------------+
 +---------------+ +------+   +---------------+
 |     bond0     | | vnet |   |     bond1     |
 +---------------+ +------+   +---------------+
 +------+ +------+            +------+ +------+
 | eth0 | | eth2 |            | eth1 | | eth3 |
 +------+ +------+            +------+ +------+

두 서버 모두 Debian Wheezy를 실행합니다 /etc/network/interfaces. 이는 다음과 같습니다.

# The loopback network interface
auto lo
iface lo inet loopback

# to the switch
auto bond0
iface bond0 inet manual
  slaves eth0 eth2
  bond-mode 802.3ad
  bond-miimon 100
  bond-downdelay 200
  bond-updelay 200

# bridge for KVM
auto br0
iface br0 inet static
  address 192.168.0.92
  netmask 255.255.255.0
  network 192.168.0.0
  broadcast 192.168.0.255
  gateway 192.168.0.101
  bridge_ports bond0
  bridge_stp off
  bridge_fd 0
  bridge_maxwait 0

# bond for drbd
auto bond1
iface bond1 inet static
  address 10.200.200.2
  netmask 255.255.255.0
  network 10.200.200.0
  broadcast 10.200.200.255
  slaves eth1 eth3
  bond-mode balance-rr
  bond-miimon 100
  bond-downdelay 200
  bond-updelay 200

다른 서버는 올바르게 부팅되었으며 둘 사이의 유일한 차이점은 선언이 아닌 것 interfaces입니다 .staticmanualbond0

iface bond0 inet static

이런 일이 다시 발생하지 않도록 하려면 어떻게 해야 합니까?

인터페이스에 추가하는 것이 ip link set좋은 생각인가요?

auto bond0
iface bond0 inet manual
    pre-up ip link set eth0 up
    pre-up ip link set eth2 up
    (...)

static와 의 차이점은 무엇인가요 manual? 아니면 인터페이스 파일에 대한 전체 문서를 어디서 찾을 수 있나요? ( man interfaces본드, 브리지, 무선.. 옵션에 대해서는 설명하지 않음)

답변1

간단히 다음을 추가하세요.

auto eth0
iface eth0 inet manual
    up ip link set eth0 up
    down ip link set eth0 down

auto eth1
iface eth1 inet manual
    up ip link set eth1 up
    down ip link set eth1 down

auto eth2
iface eth2 inet manual
    up ip link set eth2 up
    down ip link set eth2 down

auto eth3
iface eth3 inet manual
    up ip link set eth3 up
    down ip link set eth3 down

static와 차이점은 manual정적은 매개변수(예: 주소, 넷마스크, 슬레이브 등)로 구성되고 수동은 명령 순서(pre-up, up, down, post-down)로 정의된다는 점입니다.

관련 정보