linux中网络的birdge,bonding,team
来源:互联网 发布:网络知识视频教程 编辑:程序博客网 时间:2024/04/27 19:47
NAT:虚拟机把数据先转发给真机,真机再通过网卡传输,速度较慢
在真机中添加网桥
目的:使在一个局域网中的主机能直接进行数据传输
1)vim ifcfg-enp0s25
DEVICE=enp0s25
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br0
2)vim ifcfg-br0
DEVICE=br0
ONBOOT=yes
BOOTPROTO=none
IPADDR=172.25.254.39
NETMASK=255.255.255.0
TYPE=Bridge
3)systemctl restart network
首先移除ifcfg-br0 ifcfg-enp0s25
然后重新建立ifcfg-br0 ifcfg-enp0s25
测试:设置好虚拟机的网络,真机ping虚拟机,如果可以ping通,则说明网络桥接好了
临时添加:
brctl addbr br0 ---添加网桥
ifconfig br0 172.25.254.39 netmask 255.255.255.0brctl addif br0 eth0 ---添加网桥连接
brctl show ---显示网桥
删除:
ifconfig br0 down
brctl delif br0 eth0
brctl delbr br0
二 BOND ---链路聚合,最多值支持2块网卡,将两块网卡绑定到一个通道,根据不同模式增加带宽或冗余性
做实验之前给虚拟机加两块网卡
(1)bond1---主动备份---容错,一次使用一个,一个坏了,另一个立即接替
添加:nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.100/24
nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0
nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0cat /proc/net/bonding/bond0 ---查看
\
ifconfig eth1 down
nmcli connection delete eth1
模拟一网卡故障,删除一网卡(注意看工作网卡名称)
(3)bond3---广播---容错
3、TEAM ---将多块网卡绑定成一个team 。最多支持8快网卡
做实验前删除所有网络设备
nmcli connection add con-name team0 type team ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.241/24
nmcli connection add con-name eth0 ifname eth0 type team-slave master team0
nmcli connection add con-name eth1 ifname eth1 type team-slave master team0
删除同上
- linux中网络的birdge,bonding,team
- linux中网络的Bridge,Bonding,Team
- Linux的bonding技术中负载均衡详述
- Linux中网卡绑定bonding以及网络成组teaming技术学习
- Linux Bonding
- Linux bonding
- Linux Bonding
- 链路层的网卡聚合-基于Linux bonding
- linux下的双网卡bonding配置
- 链路层的网卡聚合-基于Linux bonding
- [linux网络] 双网卡bonding实现冗余/负载均衡
- linux bonding 技术
- Gentoo Linux以太网Bonding
- linux bonding译文
- linux bonding 详解
- linux bonding一
- linux bonding二
- linux bonding三
- Writing Maintainable Automated Acceptance Tests
- 用变量保存多种类型的数据
- Linux shell编程
- 搜索—>深搜广搜拓补排序
- 优达机器学习:神经网络
- linux中网络的birdge,bonding,team
- [Kafka]
- pandas的read_csv()函数读取的文件路径找不到报错
- x86上包含__in64类型的结构体数组反汇编跟踪
- 是男人就下100层
- mongodb学习心得
- 项目异常:failed to get the required adt version number from the sdk
- PowerDesigner工作区样式设置
- python学习:循环语法