Suse Linux系统的网卡冗余bonding新方法

更新时间:2023-06-06 22:41:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Suse Linux系统的网卡冗余bonding新方法

以下介绍的Suse Linux系统对网卡的绑定方式,是Suse厂家提供的一种官方方法。特点的简便、适用,在运行过程中不易导致IP地址的丢失。在今后的开局过程中推荐使用该方法来对网口进行绑定。

对网卡绑定的步骤如下:

1,上传ifcfg-bond0到

/etc/sysconfig/network

卡时,优先使用模式的配置文件

。ifcfg-bond0文件名是Suse启动网

2,YaST->网络设备->网卡。把需要绑定的网卡进行设定操作,完成设定操作后在/etc/sysconfig/network里就可以看到相关的ifcfg-eth-id-【mac】文件。如:ifcfg-eth-id-00:1e:0b:be:95:98

3,查看网卡配置信息的目录:wxmrc14:/etc/sysconfig/network # ls

. if-up.d ifcfg-lo scripts

.. ifcfg-bond0 ifcfg.template update-log

config ifcfg-eth-bus-pci-0000:0b:00.0 ifcfgeth0 update-log.debug dhcp ifcfg-eth-id-00:1e:0b:be:95:98 ifroute-lo wireless

if-down.d ifcfg-eth-id-00:1e:0b:be:95:9a providers

4,两块网卡的启动模式修改为:none,目的是网卡启动时不使用DHCP模式。

wxmrc14:/etc/sysconfig/network # vi ifcfg-eth-id-00\:1e\:0b\:be\:95\:98

BOOTPROTO='dhcp'

MTU=''

REMOTE_IPADDR=''

STARTMODE='onboot'

UNIQUE='Ddhb.sWQdX4kVaYC'

_nm_name='bus-pci-0000:05:00.0'

5,再在/etc/init.d/network的start段的后面加上网关(SP03的补丁系统大约在462行): route add default gw **.*.*.*(网关IP)

6,重启,使网卡配置生效。执行命令:

/etc/init.d/network restart

意: 注

这种模式bond的网卡,只有bond网卡上具备IP地址,而成员网卡上是没有IP地址的(我们一般使用的bond.sh脚本生成的bond网卡和成员网卡都具有相同的IP和MAC)

wxmsc2:~ # ifconfig

bond0 Link encap:Ethernet HWaddr 00:1C:C4:97:F6:EE

inet addr:192.168.132.139 Bcast:192.168.132.159 Mask:255.255.255.224 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link

UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1

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

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

collisions:0 txqueuelen:0

RX bytes:1307158118 (1246.6 Mb) TX bytes:976959137 (931.7 Mb)

bond0:0 Link encap:Ethernet HWaddr 00:1C:C4:97:F6:EE

inet addr:192.168.132.152 Bcast:192.168.132.128 Mask:255.255.255.224 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1

eth0 Link encap:Ethernet HWaddr 00:1C:C4:97:F6:EE

inet6 addr: fe80::21c:c4ff:fe97:f6ee/64 Scope:Link

UP BROADCAST NOTRAILERS RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:11535817 errors:0 dropped:0 overruns:0 frame:0 TX packets:7301780 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000

RX bytes:1298141436 (1238.0 Mb) TX bytes:976958899 (931.7 Mb) Interrupt:20 Memory:fa000000-fa011100

eth1 Link encap:Ethernet HWaddr 00:1C:C4:97:F6:EE

inet6 addr: fe80::21c:c4ff:fe97:f6ee/64 Scope:Link

UP BROADCAST RUNNING NOARP SLAVE MULTICAST MTU:1500 Metric:1 RX packets:110741 errors:0 dropped:0 overruns:0 frame:0

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

collisions:0 txqueuelen:1000

RX bytes:9016682 (8.5 Mb) TX bytes:238 (238.0 b)

Interrupt:21 Memory:f8000000-f8011100

eth2 Link encap:Ethernet HWaddr 00:18:71:EB:28:1E

inet addr:10.10.132.32 Bcast:10.10.132.255 Mask:255.255.255.0 inet6 addr: fe80::218:71ff:feeb:281e/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

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

TX packets:2544519 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000

RX bytes:223815010 (213.4 Mb) TX bytes:223816685 (213.4 Mb) Base address:0x6000 Memory:fdfe0000-fe000000

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:3736 errors:0 dropped:0 overruns:0 frame:0 TX packets:3736 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0

RX bytes:546947 (534.1 Kb) TX bytes:546947 (534.1 Kb)

本文来源:https://www.bwwdw.com/article/1fj1.html

Top