Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux 網卡綁定配置指南:提升吞吐量與熱備份模式設定

編輯:關於 Linux

網卡綁定將多張物理網卡聚合為一張邏輯網卡,可提升頻寬或提供熱備份。本文以 CentOS 為例,說明 bonding 模組載入與網路腳本配置全過程。

核心概念

  • 需 bonding 核心模組支援。
  • 模式不同決定功能:balance-alb 提升吞吐量,active-backup 熱備份。

配置步驟

1. 載入模組

vi /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=balance-alb miimon=100 use_carrier=0

2. 設定主介面 bond0

vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.110.2
NETWORK=192.168.110.0
NETMASK=255.255.255.0
GATEWAY=192.168.110.1

3. 設定從介面 (以 eth1 為例)

vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

4. 重啟網路服務

service network restart

完成後可用 cat /proc/net/bonding/bond0 驗證綁定狀態。

Copyright © Windows教程網 All Rights Reserved