
sles:
#
vi
/etc/sysconfig/network/ifcfg-bond0
插入如下内容
bootproto='static'
ipaddr='10.34.81.21'
netmask='255.255.255.0'
startmode='onboot'
bonding_master='yes'
bonding_module_opts='mode=1
miimon=200
use_carrier=1'
bonding_slave0='eth1'
bonding_slave1='eth2'
检查#
/etc/sysconfig/network/
下有没有eth1、eth2的mac地址配置,若有,则删除
启动双网卡绑定#
rcnetwork
restart
其中:bonding_module_opts='mode=1
为主备
0为负荷分担
redhat:
创建一个ifcfg-bond0
#
vi
/etc/sysconfig/network-scripts/ifcfg-bond0
device=bond0
bonding_opts="mode=1
miimon=500"
bootproto=none
onboot=yes
broadcast=192.168.0.255
ipaddr=192.168.0.180
netmask=255.255.255.0
network=192.168.0.0
userctl=no
其中:bonding_opts="mode=1
为主备
0为负荷分担
修改/etc/sysconfig/ifcfg-ethx
这里说的ethx指要加入绑定网卡的名称,本例中是eth0、eth1。
#
vi
/etc/sysconfig/ifcfg-eth0
device=eth0
bootproto=none
onboot=yes
master=bond0
slave=yes
userctl=no
#
vi
/etc/sysconfig/ifcfg-eth1
device=eth1bootproto=none
onboot=yes
master=bond0
slave=yes
userctl=no
配置/etc/modprobe.conf,添加alias
bond0
bonding
#
vi
/etc/modprobe.conf
alias
eth0
pcnet32
alias
eth1
pcnet32
alias
scsi_hostadapter
mptbase
alias
scsi_hostadapter1
mptspi
alias
bond0
bonding
重启网络服务
#service
network
restart
在使用桥接之前,先在真机的'更改适配器设置中'禁用vmnet1和vmnet8在VMware中定义一个
桥接器
设置这个
Linux虚拟机
使用前一个步骤定义的桥接器--进入桥接器选择界面.
设置这个Linux虚拟机使用前一个步骤定义的桥接器--选择网络桥接器
5
设置这个Linux虚拟机的网卡--或者通过这里自动获取IP
6
与第5不重复,可跳过
设置这个Linux虚拟机的网卡--进入网卡设置路径
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)