admin 管理员组

文章数量: 887021


2024年3月26日发(作者:矢量场的旋度是标量)

一、网卡绑定

1、修改配置文件

/etc/

alias bond0 bonding

alias bond1 bonding

/etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0

BOOTPROTO=static

ONBOOT=yes

USERCTL=no

IPADDR=192.168.56.101

BROADCAST=192.168.56.255

NETWORK=192.168.56.0

NETMASK=255.255.255.0

TYPE=Ethernet

BONDING_OPTS="mode=1 miimon=100"

/etc/sysconfig/network-scripts/ifcfg-bond1

DEVICE=bond1

BOOTPROTO=static

ONBOOT=yes

USERCTL=no

IPADDR=192.168.136.101

BROADCAST=192.168.136.255

NETWORK=192.168.136.0

NETMASK=255.255.255.0

TYPE=Ethernet

BONDING_OPTS="mode=1 miimon=100"

/etc/sysconfig/network-scripts/ifcfg-eth0

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth0

BOOTPROTO=none

ONBOOT=yes

USERCTL=no

HWADDR=00:0c:29:9e:87:44

MASTER=bond0

SLAVE=yes

/etc/sysconfig/network-scripts/ifcfg-eth1

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth1

BOOTPROTO=none

ONBOOT=yes

HWADDR=00:0c:29:9e:87:4e

MASTER=bond0

SLAVE=yes

/etc/sysconfig/network-scripts/ifcfg-eth2

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth2

BOOTPROTO=none

ONBOOT=yes

USERCTL=no

HWADDR=00:0c:29:9e:87:58

MASTER=bond1

SLAVE=yes

/etc/sysconfig/network-scripts/ifcfg-eth3

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth3

BOOTPROTO=none

ONBOOT=yes

HWADDR=00:0c:29:9e:87:62

USERCTL=no

MASTER=bond1

SLAVE=yes

命令:

ifensalve bond0 eth0 eth1

ifensalve bond1 eth2 eth3

service network restart

2、检查配置

cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: fault-tolerance (active-backup)

Primary Slave: None

Currently Active Slave: eth0

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth0

MII Status: up

Link Failure Count: 0

Permanent HW addr: 00:0c:29:9e:87:44

Slave queue ID: 0


本文标签: 矢量 旋度 网卡 配置文件 配置