RHEL6配置双网卡bonding及桥接

 

 

首页服务器应用

背景:

阅读新闻

RHEL6配置双网卡bonding及桥接

[日期:2012-06-30]   来源:Linux社区  作者:tonychiu   [字体:]  

实验环境:VMware Workstation8

RHEL6.2

双网卡(虚机做bonding实验只支持mode=1热备模式)

# cd /etc/sysconfig/network-scripts/
 
# cat ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:E4:DC:43"   (建议不指定MAC地址)
#NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=none
MASTER=bond1
SLAVE=yes
USERCTL=no
 
# cat ifcfg-eth1
DEVICE="eth1"
HWADDR="00:0C:29:E4:DC:4D"    (建议不指定MAC地址)
#NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=none
MASTER=bond1
SLAVE=yes
USERCTL=no
 
# cat ifcfg-bond1
DEVICE=bond1
#TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
#IPADDR=192.168.10.88
#NETMASK=255.255.255.0
#GATEWAY=192.168.10.2
USERCTL=no
BRIDGE=br0
BONDING_OPTS="miimon=100 mode=1" 
#由于RHEL6与以前不一样,所以指定模式参数放在此bonding文件中
 
# cat ifcfg-br0
DEVICE="br0"
#HWADDR="00:0C:29:E4:DC:43"
#NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE=Bridge
BOOTPROTO=static
#MASTER=bond1
#SLAVE=yes
#USERCTL=no
IPADDR=192.168.10.88
NETMASK=255.255.255.0
GATEWAY=192.168.10.2
 
# cat /etc/modprobe.d/modprobe.conf
alias netdev-bond1 bonding
 
重启系统查看
# ifconfig
bond1     Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          inet6 addr: fe80::20c:29ff:fee4:dc43/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:1947 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2774 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:185500 (181.1 KiB)  TX bytes:279330 (272.7 KiB)
 
br0       Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          inet addr:192.168.10.88  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fee4:dc43/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:925 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2708 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:78625 (76.7 KiB)  TX bytes:274754 (268.3 KiB)
 
eth0      Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:1039 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2775 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:100299 (97.9 KiB)  TX bytes:280072 (273.5 KiB)
 
eth1      Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:909 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:85267 (83.2 KiB)  TX bytes:0 (0.0 b)
 
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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

linux

Hive部署

iptables配置SSH

相关资讯       RHEL6 

   

本文评论   查看全部评论 (0)


评论声明

尊重网上道德,遵守中华人民共和国的各项有关法律法规

承担一切因您的行为而直接或间接导致的民事或刑事法律责任

本站管理人员有权保留或删除其管辖留言中的任意内容

本站有权在网站内转载或引用您的评论

参与本评论即表明您已经阅读并接受上述条款

 

 

 

最新资讯

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2e6c6fa3687fbcec26f04adc9eef9278.html