centos 兩張網卡合併




華奕資訊

設定硬體網卡eth0
# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

設定硬體網卡eth1
# vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

設定虛擬網卡bond0

# vi /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
ONBOOT=yes
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
BOOTPROTO=none

# /etc/modprobe.conf
alias bond0 bonding
options bond0 miimon=100 mode=1

#service network restart

 

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.