没有合适的资源?快使用搜索试试~ 我知道了~
常用操作系统双网卡绑定方法常用操作系统双网卡绑定方法常用操作系统双网卡绑定方法常用操作系统双网卡绑定方法常用操作系统双网卡绑定方法
资源推荐
资源详情
资源评论
常用操作系统双网卡绑定方法
目 录
一 、RHEL 5.7 LINUX 下网卡绑定 设置 ............................................................. 1
二 、RHEL6 LINUX 下网卡绑定 设置 ................................................................. 3
三 、SUSE 10 下网卡绑定 设置 ....................................................................... 11
四 、SUSE 11 下网卡绑定 设置 ....................................................................... 16
五 、Windows 下网卡绑定 设置 ..................................................................... 22
一 、RHEL 5.7 LINUX 下网卡绑定 设置
[root@Linux5 ~]# more /etc/sysconfig/network-scripts/ifcfg-bond0
# Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet
DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.96.19.207
NETMASK=255.255.255.0
GATEWAY=10.96.19.1
TYPE=Ethernet
[root@Linux5 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0
# Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=none
HWADDR=34:40:B5:BD:24:18
ONBOOT=yes
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
[root@Linux5 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth1
# Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet
DEVICE=eth1
BOOTPROTO=none
HWADDR=34:40:B5:BD:24:1A
ONBOOT=yes
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
[root@Linux5 ~]# more /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 2008)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 6
Permanent HW addr: 34:40:b5:bd:24:18
Slave Interface: eth1
MII Status: down
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 6
Permanent HW addr: 34:40:b5:bd:24:1a
[root@Linux5 ~]# more /etc/modprobe.conf
alias eth0 bnx2
alias eth1 bnx2
alias eth2 bnx2
alias eth3 bnx2
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias scsi_hostadapter2 usb-storage
alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
alias usb0 usbnet
alias usb1 usbnet
alias bond0 bonding
options bond0 miimon=100 mode=1 primary=eth0
关于路由的配置,做如下说明,
1)使用 route 命令添加的路由,机器重启或者网卡重启后路由就失效了,方法:
//添加到主机的路由
# route add –host 192.168.168.110 dev eth0
# route add –host 192.168.168.119 gw 192.168.168.1
//添加到网络的路由
# route add –net IP 网段 netmask MASK eth0
# route add –net IP 网段 netmask MASK gw IP
# route add –net IP 网段 /24 eth1
//添加默认网关
# route add default gw IP
//删除路由
# route del –host 192.168.168.110 dev eth0
2) 在 linux 下设置永久路由的方法(选其一即可)
a. 将命令写入开机脚本/etc/rc.local
b. route add -net 192.168.3.0/24 dev eth0
route add -net 192.168.2.0/24 gw 192.168.3.254
c. /etc/sysconfig/static-router :
any net x.x.x.x/24 gw y.y.y.y
二 、RHEL6 LINUX 下网卡绑定 设置
To configure the bond0 device with the network interface eth0 and eth1, perform the
following steps:
1. Create a new file as root named bonding.conf in the /etc/modprobe.d/ directory.
Insert the following line in this new file:
alias bond0 bonding
2. Create the channel bonding interface file ifcfg-bond0 in
the/etc/sysconfig/network-scripts/ directory:
# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.50.111
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="mode=1 miimon=100"
Note:
Configure the bonding parameters in the file /etc/sysconfig/network-scripts/ifcfg-bond0, as
above, BONDING_OPTS="mode=0 miimon=100".
The behavior of the bonded interfaces depends upon the mode. The mode 0 is the default value,
which causes bonding to set all slaves of an active-backup bond to the same MAC address at
enslavement time. For more information about the bonding modes, refer to The bonding modes
supported in Red Hat Enterprise Linux.
3. Configure the ethernet interface in the file
/etc/sysconfig/network-scripts/ifcfg-eth0. Both eth0 and eth1 should look like the
following example:
DEVICE=eth<N>
BOOTPROTO=none
HWADDR=54:52:00:26:90:fc
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
4. Restart the network service:
# service network restart
Note:
It may be necessary to disable NetworkManager if you find that bonding is not working
properly. To do this, you would run the following:
# service NetworkManager stop
# chkconfig NetworkManager off
# service Network restart
5. In order to check the bonding status, check the following file:
# cat /proc/net/bonding/bond0
Multiple bonded device
Configuring multiple bonding channels is similar to configuring a single bonding channel.
Setup the ifcfg-bond<N> and ifcfg-eth<X> files as if there were only one bonding
channel. You can specify different BONDING_OPTS for different bonding channels so that
they can have different modes and other settings. Refer to the section 4.2.2. Channel
Bonding Interfaces in the Red Hat Enterprise Linux 6 Deployment Guide for more
information.
To configure the bond0 device with the ethernet interface eth0 and eth1, and configure
the bond1 device with the Ethernet interface eth2 and eth3, perform the following steps:
1. Create configuration file /etc/modprobe.d/bonding.conf with the following lines:
alias bond0 bonding
alias bond1 bonding
2. Create the channel bonding interface files ifcfg-bond0 and ifcfg-bond1, in the
/etc/sysconfig/network-scripts/ directory:
# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.50.111
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="mode=1 miimon=100"
# cat /etc/sysconfig/network-scripts/ifcfg-bond1
DEVICE=bond1
IPADDR=192.168.30.111
剩余34页未读,继续阅读
资源评论
oO米迦勒Oo
- 粉丝: 1
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功