Centos上的双网卡绑定
2016-03-31 12:51
423 查看
1.登录系统切换目录:
# cd /etc/sysconfig/network-scripts/
2.添加绑定网卡bond#的配置
# vim ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=59.151.2.134
NETMASK=255.255.255.240
GATEWAY=59.151.2.129
# vim ifcfg-bond1
DEVICE=bond1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.16.10.134
NETMASK=255.255.255.0
3.修改原来的网卡配置文件内容为:
# cat ifcfg-em*
DEVICE=em1
ONBOOT=yes
BOOTPROTO=none
DEVICE=em2
ONBOOT=yes
BOOTPROTO=none
DEVICE=em3
ONBOOT=yes
BOOTPROTO=none
DEVICE=em4
ONBOOT=yes
BOOTPROTO=none
4.在dist.conf文件中添加
# vim/etc/modprobe.d/dist.conf
alias bond0bonding
options bond0miimon=100 mode=6
alias bond1bonding
options bond1miimon=100 mode=6
alias net-pf-10off
alias ipv6 off
5.在/etc/rc.local中添加
ifenslave bond0em1 em2
ifenslave bond1em3 em4
# cd /etc/sysconfig/network-scripts/
2.添加绑定网卡bond#的配置
# vim ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=59.151.2.134
NETMASK=255.255.255.240
GATEWAY=59.151.2.129
# vim ifcfg-bond1
DEVICE=bond1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.16.10.134
NETMASK=255.255.255.0
3.修改原来的网卡配置文件内容为:
# cat ifcfg-em*
DEVICE=em1
ONBOOT=yes
BOOTPROTO=none
DEVICE=em2
ONBOOT=yes
BOOTPROTO=none
DEVICE=em3
ONBOOT=yes
BOOTPROTO=none
DEVICE=em4
ONBOOT=yes
BOOTPROTO=none
4.在dist.conf文件中添加
# vim/etc/modprobe.d/dist.conf
alias bond0bonding
options bond0miimon=100 mode=6
alias bond1bonding
options bond1miimon=100 mode=6
alias net-pf-10off
alias ipv6 off
5.在/etc/rc.local中添加
ifenslave bond0em1 em2
ifenslave bond1em3 em4
相关文章推荐
- CentOS 7.4双网卡绑定实现高可用
- linux netstat 统计连接数
- Linux命令教程
- linux及安全第六周总结——20135227黄晓妍
- centos6.6下安装Gcc4.8.1
- linux下ioctl()函数使用的详细说明
- centos 正确 安装 jdk
- CentOS 7 修改网卡名称为eth0
- CentOS 7 修改网卡名称为eth0
- Centos添加Windows/Centos双系统启动
- 《Linux内核--分析Linux内核创建一个新进程的过程 》 20135311傅冬菁
- linux,windows,mac最强Android模拟器
- 《Linux内核设计与实现》第三章读书笔记
- linux手动安装sbt过程
- 《Linux内核设计与实现》第十八章读书笔记
- linux 查看文件夹个数
- linux 安装库 编译提示-lcrypto 无法链接,缺少 crypto 库
- 全面解析Linux 内核 3.10.x - initramfs 启动流程
- 20135202闫佳歆--week6 分析Linux内核创建一个新进程的过程——实验及总结
- linux远程下载文件 的两种方法之 ftp命令和scp命令