单网卡配置

以配置eth0为例

vim /etc/network/interfaces    //增加如下内容    auto eth0    allow-hotplug eth0    iface eth0 inet static        address 192.168.1.100        netmask 255.255.255.0        pre-up ip addr flush dev $IFACE

重启网络服务
/etc/init.d/networking restart
查看ip是否失效
ifconfig

bond配置

凝思80零碎bonding性能ifenslave版本须要2.9及以上
dpkg -l | grep ifenslave //查看 ifenslave
配置bonding模块开机加载
echo "bonding" >> /etc/modules
update-initramfs -u //更新内核

配置bonding模块

vim /etc/modprobe.d/bonding.confoptions bonding mode=1 max_bonds=2 miimon=100 downdelay=200 updelay=200 primary=eth0

批改配置文件,以bond0应用eth0和eth2网口为例

vim /etc/network/interfaces    //增加如下内容    auto bond0    allow-hotplug bond0    iface bond0 inet static        address 192.168.1.100        netmask 255.255.255.0        pre-up ip addr flush dev $IFACE        up ifenslave bond0 eth0 eth2        down ifenslave -d bond0 eth0 eth2

重启网络服务
/etc/init.d/networking restart
查看ip是否失效
ifconfig