bond 雙網路卡(兩網路卡使用同一個地址)(Redhat5.5)

yhj20041128001發表於2011-08-31

新增隨機器啟動bond網路卡
cat /etc/modprobe.conf

alias eth0 8139cp
alias eth1 8139cp
alias eth2 8139cp
alias eth3 8139cp
alias bond0 bonding
alias bond1 bonding
options bonding max_bonds=2 mode=balance-rr miimon=100

cat /etc/sysconfig/network-scripts/icfg-bond0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPADDR=192.20.241.33
NETMASK=255.255.254.0
GATEWAY=192.20.240.1

cat /etc/sysconfig/network-scripts/icfg-bond1

DEVICE=bond1
ONBOOT=yes
USERCTL=no
IPADDR=10.192.168.33
NETWORK=10.192.168.255
NETMASK=255.255.254.0

cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:25:B3:01:ED:30
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
MASTER=bond0
SLAVE=yes

cat /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
BOOTPROTO=static
HWADDR=00:25:B3:01:ED:31
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
MASTER=bond1
SLAVE=yes

cat /etc/sysconfig/network-scripts/ifcfg-eth4
DEVICE=eth4
BOOTPROTO=static
HWADDR=3C:4A:92:DD:40:FC
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
MASTER=bond0
SLAVE=yes

cat /etc/sysconfig/network-scripts/ifcfg-eth5
DEVICE=eth5
BOOTPROTO=static
HWADDR=3C:4A:92:DD:40:FD
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
MASTER=bond1
SLAVE=yes

linux 文件的

cat /etc/sysconfig/network-scripts/icfg-bond3

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.112.255
NETMASK=255.255.255.0
IPADDR=192.168.122.225
USERCTL=no

cat /etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
bootproto=none
hwaddr=54:52:00:3B:2F:4C
onboot=yes
master=bond0
slave=yes
userctl=no
cat /etc/sysconfig/network-scripts/ifcfg-eth1
device=eth1
hwaddr=54:52:00:7E:93:58
bootproto=none
onboot=yes
master=bond0
slave=yes
userctl=no


service network restart

隨機啟動載入路由

vi /etc/rc.d/rc.local

route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.172.112.1

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23757700/viewspace-706298/,如需轉載,請註明出處,否則將追究法律責任。

相關文章