1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > linux 接口 bridge vlan bonding KVM配置BOND BRIDGE VLAN

linux 接口 bridge vlan bonding KVM配置BOND BRIDGE VLAN

时间:2020-02-06 16:55:03

相关推荐

linux 接口 bridge vlan bonding KVM配置BOND BRIDGE VLAN

一.网卡绑定bond0

配置mode=0,平衡负载模式,需要配置与网卡相连的交换机采取聚合模式。

配置mode=1,主备模式,无需配置交换机

配置 mode=6,平衡负载模式,但是不必配置交换机。

#modprobe --first-time bonding

# modinfo bonding

# systemctl stop NetworkManager

# systemctl disable NetworkManager

# cd /etc/sysconfig/network-scripts/

# cat ifcfg-ens33

DEVICE=ens33

TYPE=Ethernet

BOOTPROTO=none

ONBOOT=yes

MASTER=bond0

SLAVE=yes

# cat ifcfg-ens37

DEVICE=ens37

TYPE=Ethernet

BOOTPROTO=none

ONBOOT=yes

MASTER=bond0

SLAVE=yes

# cat ifcfg-bond0

DEVICE=bond0

NAME=bond0

TYPE=Bond

BONDING_MASTER=yes

IPADDR=192.168.7.17

PREFIX=24

ONBOOT=yes

BOOTPROTO=none

BONDING_OPTS="mode=balance-rr miimon=100"

GATEWAY=192.168.7.1

DNS1=192.168.17.1

DNS2=192.168.17.3

# systemctl restart network

查看bond情况:

参考文档:

/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-using_channel_bonding

二.bond上桥接网卡:接上一节

# modprobe --first-time bridge

# modinfo bridge

# yum -y install bridge-utils

# cat ifcfg-bond0

DEVICE=bond0

ONBOOT=yes

BONDING_OPTS="mode=balance-rr miimon=100"

BRIDGE=brbond0

# cat ifcfg-brbond0

DEVICE=brbond0

TYPE=Bridge

BOOTPROTO=none

ONBOOT=yes

IPADDR=192.168.7.17

PREFIX=24

GATEWAY=192.168.7.1

DNS1=192.168.17.1

DNS2=192.168.17.3

参考文档:

/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-network_bridging_using_the_command_line_interface

三.配置VLAN

交换机上的端口必须设置成trunk模式

# modprobe --first-time 8021q

# modinfo 8021q

方法:

重启网卡:systemctl restart network

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。