bond team链路聚合

bond链路聚合
bond0虚拟接口的配置:

1)systemctl start NetworkManager NetworkManager必须是开启的才能使用命令nmcli
2)nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.101/24 添加网络接口服务bond0 虚拟接口为bonf0 接口服务类型为bond 模式为主备模式 ip地址为172.25.254.101 网关为24

nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0添加真实网卡eth0 真实网卡名为eth0 类型为 为bond虚拟网卡工作 网卡主人为 bond0

nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0 添加真实网卡eth1 真实网卡名为eth1 类型为 为bond虚拟网卡工作 网卡主人为 bond0

nmcli connection show 查看添加的网络接口服务
cat /proc/net/bonding/bond0 可以查看bond0虚拟接口的详细信息
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
测试:1)watch -n 1 cat /proc/net/bonding/bond0 监控虚拟接口信息文件,观测接口变化
ping 172.25.254.250 观测通信是一直稳定
2)ifconfig eth0 down 将eth0网卡暂停服务,可以看到网卡eth1顶替工作 一主一备模式工作
ifconfig eth0 up 两块网卡都可以是up状态,只是使用时只能使用一块网卡
在这里插入图片描述
在这里插入图片描述
team链路聚合
team0网络接口的配置:
1)systemctl start NetworkManager
2)nmcli connection add con-name team0 ifname team0 type team config ‘{“runer”:{“name”:”activebackup”}}’ip4 172.25.254.101/24
nmcli connection add con-name eth0 ifname eth0 type team-slave master team0 添加网卡eth0 真实网卡为eth0

nmcli connection add con-name eth1 ifname eth1 type team-slave master team0

在这里插入图片描述
测试:在这里插入图片描述
在这里插入图片描述
桥接
桥接思想:
添加网桥br0,br0 与eth0同时存在,需要把ip加在br0上,eth0不用加ip ,将二者桥接实现网络连通,如果真实网卡也有ip也是不可以的

brctl show  ##查看网桥状态
brctl addbr br0  ##添加网桥
brctl addif br0 eth0  ##桥接网卡
brctl delif br0 eth0  ##删除桥接

命令方式开启桥接
在这里插入图片描述
在这里插入图片描述
brctl addif br0 eth0 桥接真实物理网卡 具有临时性
永久性配置eth0网卡配置文件
在这里插入图片描述
在这里插入图片描述
恢复无桥接状态
在这里插入图片描述
局域网连接排错
1.查看网线:是否插好
2.查看网卡状态:是否为up
3.查看ip是否处于同一网段
4.查看桥接 :桥接是否对应

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值