Create NIC Channel Bonding in RedHat/CentOS/Fedora
2013-10-21 16:47
405 查看
Create NIC Channel Bonding in RedHat/CentOS/Fedora
ByNarad Shrestha Under:
IT Networking On: July 25, 2012
来自于:http://www.tecmint.com/create-nic-channel-bonding-in-redhat-centos-fedora/
Quiz 3: Take "Test Yourself" Online Exam and Get Famous
Channel Bonding enables two or more network interfaces to act as one, simultaneously increasing the bandwidth and providing redundancy. This is a great way of achieving redundancy to a server. If one physical
NIC is down or unplugged, it will automatically move resource to other
NIC card. Channel bonding will work with the help of bonding driver in kernel. This post guides you through how to create NIC / Channel Bonding in
RedHat,
CentOS and Fedora Linux.
<img class="size-medium wp-image-637" src="http://www.tecmint.com/wp-content/uploads/2012/07/Channel-Bonding-in-Linux-300x210.jpg" alt="Create Channel Bonding in Linux" width="300" height="210" />
Create Channel Bonding in Linux
How to Create NIC Channel Bonding in
[b]RedHat,
CentOS and Fedora[/b]
Step 1: Creating Bonding Channel
As a root, create a new file name bonding.conf in the/etc/modprobe.d/ directory. Name can be anything you like as long as it ends with a
.conf extension. Insert the following line in this new file.
alias bond0 bonding
For each configured channel bonding interface, there must be a corresponding entry in your new
/etc/modprobe.d/bonding.conf file.
Step 2: Creating Channle Bonding Interface
To create a channel bonding interface, create a file in the /etc/sysconfig/network-scripts/ directory calledifcfg-bond0. The following is a sample channel bonding configuration file. (Note : IP Address may differ in your environment.)
# vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0 IPADDR=192.168.1.8 NETMASK=255.255.255.0 ONBOOT=yes BOOTPROTO=none USERCTL=no
Step 3: Configuring Channel Bonding Interface
After the channel bonding interface is created, the network interfaces to be bound together must be configured by adding theMASTER and SLAVE directives to their configuration files. The configuration files for each of the channel-bonded interfaces can be nearly identical. For example, if two Ethernet interfaces are being channel bonded, both
eth0 and eth1 may look like the following example. Edit physical interface card details as under.
For eth0
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none
For eth1
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth1 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none
The above directives are self explanatory for many system admin, however, let me explain to newbie.
DEVICE: Indicates what is the device name
USERCTL: Indicates that can user control this device(here its no)
ONBOOT: Indicates that at the boot time do this device should be up?
MASTER: Is this device has master? Then what it is(here its bond0)
SLAVE: Is this device acting as slave?
BOOTPROTO: What about getting IP Address from DHCP? It’s set to none which indicate it’s a static IP)
Step 4: Restarting Network Service
Restart the network service and see the output of ifconfig.# service network restart
[root@tecmint network-scripts]# ifconfig bond0 Link encap:Ethernet HWaddr 00:0C:21:60:30:C4 inet addr:192.168.1.8 Bcast:172.16.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe69:31c4/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:19676 errors:0 dropped:0 overruns:0 frame:0 TX packets:342 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1623240 (1.5 MiB) TX bytes:42250 (41.2 KiB) eth0 Link encap:Ethernet HWaddr 00:0C:21:60:30:C4 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:10057 errors:0 dropped:0 overruns:0 frame:0 TX packets:171 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:832257 (812.7 KiB) TX bytes:22751 (22.2 KiB) Interrupt:19 Base address:0x2000 eth1 Link encap:Ethernet HWaddr 00:0C:21:60:30:C4 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:9620 errors:0 dropped:0 overruns:0 frame:0 TX packets:173 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:791043 (772.5 KiB) TX bytes:20207 (19.7 KiB) Interrupt:19 Base address:0x2080 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:104 (104.0 b) TX bytes:104 (104.0 b)
相关文章推荐
- NIC bonding on Redhat/CentOS 6
- Configure NIC(Network Interface Card) bonding in CentOS 7 / RHEL 7
- (OK) rdesktop - How to Use Remote Desktop (rdesktop) in Redhat/Fedora/CentOS
- Installation of NVIDIA Drivers in RHEL/CentOS and Fedora
- CONFIG COMMANDS in REDHAT ( and FEDORA )
- Linux系统中ubuntu,redhat,debain,centos,fedora,suse 区别
- 安装linux系统之后,开机时没有Windows系统选项的解决办法(Ubuntu,Deepin,Centos,Redhat,Fedora)
- How to install snmpwalk snmpget on CentOS 6.4 6.3 5.9 Redhat RHEL Fedora
- RedHat / CentOS:如何在线更改当前网口 Slave的状态(bonding mode)
- Fedora 12,13,14,15,16/centOS/redhat EL 使用第三方yum 源
- RedHat Linux系列(Fedora,CentOS,Redhat enterprise)中一些有用的工具
- How to Reset Forgotten Root Password in RHEL/CentOS and Fedora
- Linux学习总结(十一)—— Linux常用命令:版本信息查看(RedHat、CentOS、Debian、Ubuntu、Fedora、Oracle)
- Install apache in linux(ubuntu or redhat/centos)
- Install APC (Alternative PHP Cache) in RHEL/CentOS 6/5 & Fedora 20-12
- Centos fedora redhat安装kscope-1.6.2报错解决方法
- Linux (Redhat / Fedora / CentOS) 更改 hostname 的方式
- centos/redhat/fedora ftp配置和使用——vsftp
- [CentOS]CentOS/RedHat/Fedora的Proxy设定(yum,wget,,rpm)
- [转载]Install Opera 12.16 Web Browser in CentOS/RHEL and Fedora