神剑山庄资源网 Design By www.hcban.com
系统版本
[root@ ~]# cat /etc/redhat-release CentOS release 6.8 (Final) [root@ ~]# uname -r 2.6.32-642.6.1.el6.x86_64
网卡说明
eth0 192.168.1.8(服务器外网卡)
eth1
eth2
两块服务器网卡(内网)
关闭防火墙
[root@ ~]# /etc/init.d/iptables stop [root@ ~]# chkconfig iptables off
关闭selinux
[root@ ~]#setenforce 0 [root@ ~]#sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/‘ /etc/selinux/config
禁用NetworkManager
[root@ ~]# /etc/init.d/NetworkManager stop Stopping NetworkManager daemon: [ OK ] [root@ ~]# chkconfig NetworkManager off [root@ ~]# /etc/init.d/network restart
编辑eth1网卡
[root@ ~]# cd /etc/sysconfig/network-scripts/ [root@ network-scripts\]# cat >ifcfg-eth1 <<EOF DEVICE=eth1 ONBOOT=yes BOOTPROTO=none USERCTL=no MASTER=bind0 EOF
编辑eth2网卡
[root@ network-scripts]# cat >ifcfg-eth2 <<EOF DEVICE=eth2 ONBOOT=yes BOOTPROTO=none USERCTL=no MASTER=bind0 EOF
编辑bind0网卡
[root@ network-scripts]# cat >ifcfg-bind0 <<EOF DEVICE=bind0 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPADDR=10.0.0.8 NETMASK=255.255.255.0 GATEWAY=10.0.0.254 IPV6INIT=no USERCTL=no EOF
配置bond参数
[root@ network-scripts]# cat >/etc/modprobe.conf <<EOF alias bind0 bonding options bind0 miimon=100 mode=6 EOF
加入开机自启动(/etc/rc.local)
[root@ network-scripts]# cat /etc/rc.local <<EOF ifenslave bind0 eth1 eth2 EOF
重启网络服务
[root@LVS-2 network-scripts]# service network restart Shutting down interface eth0: [ OK ] Shutting down interface eth1: [ OK ] Shutting down interface eth2: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface bind0: WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. Determining if ip address 10.0.0.8 is already in use for device bind0..[ OK ] Bringing up interface eth0: Determining if ip address 192.168.1.8 is already in use for device eth0... [ OK ] Bringing up interface eth1: RTNETLINK answers: File exists [ OK ] Bringing up interface eth2: RTNETLINK answers: File exists [ OK ]
配置使绑定立即生效
[root@LVS-2 network-scripts]# ifenslave bind0 eth1 eth2
测试联通
[root@LVS-2 network-scripts]# ping 10.0.0.8 PING 10.0.0.8 (10.0.0.8) 56(84) bytes of data. 64 bytes from 10.0.0.8: icmp_seq=1 ttl=64 time=0.089 ms 64 bytes from 10.0.0.8: icmp_seq=2 ttl=64 time=0.046 ms ^C --- 10.0.0.8 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1921ms rtt min/avg/max/mdev = 0.046/0.067/0.089/0.023 ms
此时会发现系统多一个网卡
[root@LVS-2 network-scripts]# ifconfig bind0 bind0 Link encap:Ethernet HWaddr 00:0C:29:CC:9B:5 inet addr:10.0.0.8 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fecc:9b55/64 Scope:LinkUP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:151 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11826 (11.5 KiB) TX bytes:258 (258.0 b)
神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com
暂无Linux 系统双网卡绑定配置实现的评论...
更新日志
2024年11月15日
2024年11月15日
- 黄乙玲1988-无稳定的爱心肝乱糟糟[日本东芝1M版][WAV+CUE]
- 群星《我们的歌第六季 第3期》[320K/MP3][70.68MB]
- 群星《我们的歌第六季 第3期》[FLAC/分轨][369.48MB]
- 群星《燃!沙排少女 影视原声带》[320K/MP3][175.61MB]
- 乱斗海盗瞎6胜卡组推荐一览 深暗领域乱斗海盗瞎卡组分享
- 炉石传说乱斗6胜卡组分享一览 深暗领域乱斗6胜卡组代码推荐
- 炉石传说乱斗本周卡组合集 乱斗模式卡组最新推荐
- 佟妍.2015-七窍玲珑心【万马旦】【WAV+CUE】
- 叶振棠陈晓慧.1986-龙的心·俘虏你(2006复黑限量版)【永恒】【WAV+CUE】
- 陈慧琳.1998-爱我不爱(国)【福茂】【WAV+CUE】
- 咪咕快游豪礼放送,百元京东卡、海量欢乐豆就在咪咕咪粉节!
- 双11百吋大屏焕新“热”,海信AI画质电视成最大赢家
- 海信电视E8N Ultra:真正的百吋,不止是大!
- 曾庆瑜1990-曾庆瑜历年精选[派森][WAV+CUE]
- 叶玉卿1999-深情之选[飞图][WAV+CUE]