EVE模拟交换机三层EC和Linux服务器端口绑定(bond team)对接

1、实验拓扑

由于老版本IOL不支持三层EC,所有需要最新版本的IOL ,LINUX使用的是Centos 7

EVE模拟交换机三层EC和Linux服务器端口绑定(bond team)对接_第1张图片

实验拓扑

EVE模拟交换机三层EC和Linux服务器端口绑定(bond team)对接_第2张图片

2、交换机端配置

1、etherchannel 配置
interface Port-channel1
 no switchport
 ip address 1.1.1.1 255.255.255.0
end

interface rang Ethernet0/0-1
 no switchport
 no ip address
 channel-group 1 mode on
end
查看EC状态
SW1#show etherchannel summary 
Flags:  D - down        P - bundled in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      N - not in use, no aggregation
        f - failed to allocate aggregator

        M - not in use, minimum links not met
        m - not in use, port not aggregated due to minimum links not met
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port

        A - formed by Auto LAG


Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(RU)          -        Et0/0(P)    Et0/1(P)    
2、lacp模式配置
interface Port-channel1
 no switchport
 ip address 1.1.1.1 255.255.255.0

interface rang Ethernet0/0-1
 no switchport
 no ip address
 channel-protocol lacp
 channel-group 1 mode passive         因为服务器端位active这个最好配置为passive

2、linux服务器端配置

1、创建Bond绑定
(1)关闭防火墙
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
(2)关闭selinux
getenforce  查看selinux状态
setenforce 0
修改文件/etc/sysconfig/selinux
selinx=diabled
(3)Bonding配置
修改/etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
BONDING_OPTS= “miimon=100 mode=0”     #这里用的是模式0
IPADDR=1.1.1.2
PREFIX=24

修改/etc/sysconfig/network-scripts/ifcfg-eth0  #添加eth0到bond0中
DEVICE=eth0
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no

修改/etc/sysconfig/network-scripts/ifcfg-eth1 #添加eth1到bond1中
DEVICE=eth1
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no

重启网络服务
systemctl restart network
查看bond0状态:cat/proc/net/bonding/bond0
显示如下表示正常

EVE模拟交换机三层EC和Linux服务器端口绑定(bond team)对接_第3张图片

2、创建team 绑定(lacp模式)
nmcli con add type team con-name team0 ifname team0 config '{"runner": {"name": "lacp"}}' ipv4.method manual ipv4.addresses 1.1.1.2/24
nmcli con add type team-slave con-name team0-slave0 ifname eth0 master team0
nmcli con add type team-slave con-name team0-slave1 ifname eth1 master team0
nmcli con up team0   启用team0配置
nmcli con up team0-slave-eth0  启用eth0配置
nmcli con up team0-slave-eth1  启用eth1配置

查看team状态
EVE模拟交换机三层EC和Linux服务器端口绑定(bond team)对接_第4张图片

3、测试

相互可以Ping通说明实验成功

你可能感兴趣的:(Linux,Cisco,RS实验)