ITPub博客

首页 > Linux操作系统 > Linux操作系统 > bond 双网卡(两网卡使用同一个地址)(Redhat5.5)

bond 双网卡(两网卡使用同一个地址)(Redhat5.5)

原创 Linux操作系统 作者:yhj20041128001 时间:2011-08-31 00:24:03 0 删除 编辑

添加随机器启动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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-09-17

  • 博文量
    163
  • 访问量
    356925