CentOS6.5雙網卡綁定相關教程

來源:互聯網
上載者:User

CentOS6.5雙網卡綁定相關教程

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

[root@localhostnetwork-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@localhostnetwork-scripts]#cpifcfg-eth0ifcfg-bond0

[root@localhostnetwork-scripts]#vimifcfg-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@localhostnetwork-scripts]#vimifcfg-eth0

EVICE=eth0

ONBOOT=no

TYPE=Ethernet

MASTER=bond0

BOOTPROTO=none

USERCTL=no

SLAVE=yes

IPV6INIT=no

~

[root@localhostnetwork-scripts]#vimifcfg-eth1

EVICE=eth1

ONBOOT=no

TYPE=Ethernet

MASTER=bond0

BOOTPROTO=none

USERCTL=no

SLAVE=yes

IPV6INIT=no

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

[root@localhostmodprobe.d]#vidist.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 HWaddrF8:0F:41:F8:EC:70

inet addr:192.168.x.xBcast:192.168.x.xMask: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 HWaddrF8: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 HWaddrF8: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


測試結果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.