码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS6.5双网卡绑定

时间:2015-08-03 22:58:52      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:centos6.5双网卡绑定

[root@localhost]# cd /etc/sysconfig/network-scripts/

[root@localhost network-scripts~]#  ll

-rw-r--r--. 1 root root   149 Aug  3 16:36 ifcfg-bond0

-rw-r--r--. 1 root root    97 Aug  3 16:38 ifcfg-eth0

-rw-r--r--. 1 root root    98 Aug  3 16:38 ifcfg-eth1

-rw-r--r--. 1 root root   182 Aug  3 11:14 ifcfg-eth2

-rw-r--r--. 1 root root   254 Oct 10  2013 ifcfg-lo

[root@localhost network-scripts]# cp ifcfg-eth0 ifcfg-bond0

[root@localhost network-scripts]# vim ifcfg-bond0 

GATEWAY=192.168.x.x

DNS1=114.114.114.114

DEVICE=bond0

BOOTPROTO=none

NETMASK=255.255.255.0

TYPE=Ethernet

IPADDR=192.168.x.x

ONBOOT=yes

USERCTL=no

[root@localhost network-scripts]# vim ifcfg-eth0

EVICE=eth0

ONBOOT=no

TYPE=Ethernet

MASTER=bond0

BOOTPROTO=none

USERCTL=no

SLAVE=yes

IPV6INIT=no

~

[root@localhost network-scripts]# vim ifcfg-eth1

EVICE=eth1

ONBOOT=no

TYPE=Ethernet

MASTER=bond0

BOOTPROTO=none

USERCTL=no

SLAVE=yes

IPV6INIT=no

[root@localhost]# cd /etc/modprobe.d/

[root@localhost modprobe.d]#vi dist.conf

alias bond0 bonding

options bodn0 mode=0 miimon=100

[root@localhost]# vi /etc/rc.d/rc.local

ifenslave bond0 eth0 eth1


关闭服务networkmanager


[root@localhost modprobe.d]# ifconfig

bond0     Link encap:Ethernet  HWaddr F8:0F:41:F8:EC:70  

          inet addr:192.168.x.x  Bcast:192.168.x.x  Mask:255.255.255.0

          inet6 addr: fe80::fa0f:41ff:fef8:ec70/64 Scope:Link

          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1

          RX packets:16170 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2271 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:1552817 (1.4 MiB)  TX bytes:198708 (194.0 KiB)


eth0      Link encap:Ethernet  HWaddr F8:0F:41:F8:EC:70  

          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1

          RX packets:2476 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1134 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:214254 (209.2 KiB)  TX bytes:99272 (96.9 KiB)

          Memory:dfc20000-dfc40000 


eth1      Link encap:Ethernet  HWaddr F8:0F:41:F8:EC:70  

          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1

          RX packets:13694 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1137 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1338563 (1.2 MiB)  TX bytes:99436 (97.1 KiB)

          Memory:dfc00000-dfc20000 

交换机上配置

[Switch]link-aggregation group 1 mode manual 

[Switch]interface GigabitEthernet 1/0/1

[Switch-GigabitEthernet1/0/1] port link-aggregation group 1

[Switch-GigabitEthernet1/0/1] interface GigabitEthernet 1/0/48

[Switch-GigabitEthernet1/0/2] port link-aggregation group 1

[Switch-GigabitEthernet1/0/2] interface GigabitEthernet 1/0/47

[Switch-GigabitEthernet1/0/3] port link-aggregation group 1


测试结果

技术分享





本文出自 “yu344109534” 博客,请务必保留此出处http://2338670.blog.51cto.com/2328670/1681353

CentOS6.5双网卡绑定

标签:centos6.5双网卡绑定

原文地址:http://2338670.blog.51cto.com/2328670/1681353

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!