linux双网卡bond及交换机配置-创新互联

cat /etc/modprobe.d/bonding.conf 

创新互联是少有的成都网站建设、做网站、营销型企业网站、微信小程序、手机APP,开发、制作、设计、买链接、推广优化一站式服务网络公司,于2013年开始,坚持透明化,价格低,无套路经营理念。让网页惊喜每一位访客多年来深受用户好评

alias bond0 bonding

#options bond0 miimon=100 mode=1

启用bond模块

modprobe bonding

lsmod | grep bond

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

DEVICE=bond0

#HWADDR=4C:E9:E4:9C:62:6A

#TYPE=Ethernet

#UUID=f10986c7-9528-4658-a124-2e3bf84d700a

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=static

IPADDR=192.29.10.128

NETMASK=255.255.255.0

GATEWAY=192.29.10.254

BONDING_OPTS="mode=0 miimon=100”

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

DEVICE=eth0

#HWADDR=4C:E9:E4:9C:62:6A

TYPE=Ethernet

UUID=f10986c7-9528-4658-a124-2e3bf84d700a

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

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

DEVICE=eth2

#HWADDR=4C:E9:E4:9C:62:6B

TYPE=Ethernet

UUID=e79ac0df-a822-4b9b-94eb-af0c94416508

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

cat /proc/net/bonding/bond0 

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: load balancing (round-robin)

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth0

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 4c:e9:e4:9c:62:6a

Slave queue ID: 0

Slave Interface: eth2

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 4c:e9:e4:9c:62:6b

Slave queue ID: 0

交换机端口聚合

dis cur int Eth-Trunk 33

#

interface Eth-Trunk33

description Di8-22kou

port default vlan 301

#

dis eth-trunk 33

Eth-Trunk33's state information is:

Working Mode: Normal        Hash Arithmetic: profile default

Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 32

Operating Status: up        Number of Up Ports in Trunk: 2

--------------------------------------------------------------------------------

PortName                      Status      Weight

GE1/8/0/22                    Up          1          

GE2/8/0/22                    Up          1 

华为交换机端口聚合另一种配置

>dis cur int Eth-Trunk 85

#

interface Eth-Trunk85

description connect to 192.29.12.11

port link-type trunk

port trunk pvid vlan 312

undo port trunk allow-pass vlan 1

port trunk allow-pass vlan 312

mode lacp-dynamic

#

问题处理

ifup eth0提示该网卡不存在

在 /etc/udev/rules.d/70-persistent-net.rules删除多余网卡条目后重启

ifconfig无bond0显示

停用NetworkManager服务恢复正常

service NetworkManager stop

chkconfig NetworkManager off

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


标题名称:linux双网卡bond及交换机配置-创新互联
网页地址:http://cdiso.cn/article/djdjic.html

其他资讯