undoethtrunk1
1. 怎么看光猫带不带链路聚合
1、 前期准备
二层交换机两台,pc随意,二层交换机之间连接n条链路(n≤8)
2、配置设备
第一步,首先配置一台交换机,创建eth-trunk接口
【】interface eth-trunk 1
第二步,让n条物理链路成为eth-trunk接口的子接口
【】interface eo/o/o
【】eth-trunk 1
其他接口同上
第三步,将eth-trunk接口设置为trunk类型,并让他允许通过我们需要的valn
【】interface eth-trunk 1
【】port link-type trunk
【】port trunk allow-pass vlan all
第四步,与这个本地设备的成员接口直连的对端接口也同上述步骤配置eth-trunk接口
第五步,检查网络联通性
3 、 检测网络联通
网络联通则一条简单的二层交换机聚合链路就创建好了,链路聚合接口的最大带宽可以达到各
成员接口带宽之和。
CE三层交换机链路聚合
三层交换机相当于在二层交换机上加了三层转发,三层交换机也有路由功能,只不过它不是每
个包算一次,它只是第一个包路由,后续都是二层直接转发,所以比路由器快。
第一步,前期准备
实际项目中网络成分复杂,这里单独出来两台相互连接的ce三层交换机就行,在两台交换机各
创建环回测试接口。
第二步,配置
首先,配置CE1,在【】视图下创建一个eth-trunk 接口,开启三层端口并设置IP地址
【】 interface eth-trunk
【】undo portswitch (注意这里必须手动打开三层)
【】ip add 10.1.1.1 24
其次,将成员接口划分到eth-trunk接口下,这里跟二层交换机一样,但是需要打开接口
【】interface g0/0/0
【】undo shutdown
【】eth-trunk 1
【】interface g0/0/1
【】undo shutdown
【】eth-trunk 1
【】interface loopback 0(这个是环回测试接口)
【】IP add 192.168.1.10 32(环回测试接口ip子网掩码必定是32)
>save(CE设备必须保存之前的配置,不然无法生效)
接下来配置CE2设备,步骤同上,配置结束后可以先进行两台交换机聚合链路是否联通,如果联
通,则在CE1和CE2添加静态路由条目,如
CE1下配
【】ip route-static 目的ip 源ip
同理配置CE2
【】ip route-static 目的ip 源ip
最后,检测我们配置的网络,这样聚合链路就创建成功了
总结:
2. 华为静态链路聚合配置
华为链路聚合分为两种:
● 手动负载均衡模式:在这种模式下,Eth-Trunk的建立、成员接口的加入都是手工配置的,没有协议
的参与。在该模式下所有活动链路都参与数据转发,平均分坦流量。如果某条活动链路出现故障,链
路聚合组自动在剩余的活动链路上平均分配流量。
● LACP模式:在LACP模式中,链路两端的设备相互发送LACP报文,协商聚合参数。协商完成后,两台
设备确定活动接口和非活动接口。LACP模式需要的动创建一个Eth-Trunk口,并添加成员。LACP模式
也叫M:N模式,M代表活动成员链路。N代表非活动链路,用于冗余备份。LACP与手动负载均衡的区别在
于,在LACP模式中,有一些链路充当备份链路,如果有一条活动链路发生故障,该链路传输的数据被
切换到一条优先级最高的备用链路上,这条备用链路转变为活动状态。而在手动负载均衡模式中,所
有的成员都处于转发状态。
3. 华为和思科怎么做链路捆绑
华为要将捆绑模式调整lacp的,配置如下:
*******切记!一定要调,否则会产生环路********
华为交换机
#interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2
to 4094
mode lacp-static //修改链路聚合模式
max active-linknumber 2 //设置最大活动链接数为2
bp enable
//开启BPDU
//**一定先配置好eth-trunk,在将接口放入eth-trunk
#lacp priority 100
#interface GigabitEthernet0/0/1
eth-trunk 1
undo ntdp enable
undo ndp enable
(在配置端口前,一定要将端口原有配置清空,全部undo掉,否则无法应用eth-trunk命令。如果之前端口配置过trunk口,可以使用undo port link-type清除trunk状态)
#interface GigabitEthernet0/0/2
eth-trunk 1
undo ntdp enable
undo ndp enable
思科交换机
interface port-channel1
switchport trunk
encapsulation dot1q
switchport mode trunk
interface g0/25
switchport trunk
encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
interface g0/27
switchport trunk
encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
4. 华为链路聚合配置命令
方法/步骤
首先进入系统视图
system-view
创建eth-trunk接口
interface Eth-Trunk 1
然后在Eth-Trunk逻辑口上执行undo portswitch命令,把聚合链路从二层转换到三层
undo portswitch
华为交换机三层链路聚合配置
一般是不能再逻辑接口上配置ip地址的,可以直接通过起svi,然后在svi上配置地址,将eth-trunk接口配置成trun,将相应的VLAN允许通过,很好的解决了需求。
将三层接口加入到eth-trunk中
interface GigabitEthernet 0/0/1
eth-trunk 1
华为交换机三层链路聚合配置
检查配置结果
display interface eth-trunk 1
华为交换机三层链路聚合配置
7
另一个交换机同上一样的配置步骤
5. 华为交换机命令,IT伙伴们,帮忙解释下下面命令的啊
Eth-Trunk接口是一种可以动态创建的接口,该类型接口可以绑定若干物理的以太网接口作为一个逻辑接口使用。加入到Eth-Trunk接口的以太网接口称为成员接口,用户只需对Eth-Trunk接口进行配置,对这些配置最终会映射到成员接口上。Eth-Trunk接口有路由模式和交换模式之分。路由模式的Eth-Trunk接口与路由模式的以太网接口类似,可以配置IP地址,运行各种路由协议、MPLS VPN等多种业务;交换模式的Eth-Trunk接口与交换模式以太网接口类似,可以加入VLAN,运行STP等协议。
Eth-Trunk接口应用特点有拓展接口带宽,增加链路可靠性以及流量的负载分担。
Universal Media Gateway 通用媒体网关
6. 华为交换机常见链路聚合操作整理 第十三天
1、将成员接口批量加入聚合组。
在Eth-Trunk1中批量加入10个成员接口。
脚本:
system-view
interface eth-trunk 1
trunkport gigabitethernet 1/0/10 to 1/0/20
2、将指定成员接口从聚合组中删除,有两种方式。
(1)在Eth-Trunk接口视图下使用命令undo trunkport进行删除。
例如:
system-view
interface eth-trunk 1
undo trunkport gigabitethernet 1/0/10
(2)在成员接口视图下执行命令undo eth-trunk进行删除。
例如:
system-view
interface gigabitethernet 1/0/10
undo eth-trunk
3、删除聚合组
首先需要将所有的成员从聚合组中删除。
在系统视图下使用命令undo interface eth-trunk trunk-id.
例如:
system-view
undo interface eth-trunk 2
4、查看Eth-trunk接口的配置信息。
display eth-trunk #查看所有Eth-trunk接口配置信息。
display eth-trunk 10 #查看eth-trunk 10接口的配置信息。
5、查看Eth-trunk的成员接口信息。
display trunkmembership eth-trunk 1 #查看ID为1的Eth-trunk的成员接口信息。
6、查看设备支持的链路聚合组数目和成员接口数目。
display trunk configuration
7. 华为交换机清除聚合链路与添加端口VLAN
将指定成员接口从聚合组中删除
删除成员接口有如下两种方式,请根据需要选择其一即可。
在Eth-Trunk接口视图下执行命令undo trunkport interface-type { interface-number1 [ to interface-number2 ] } &<1-8>。
<HUAWEI> system-view / sys
[HUAWEI] display Eth-trunk 1 \查看该链路聚合情况
[HUAWEI] interface Eth-trunk 1 \进入Eth-trunk 1
[HUAWEI-Eth-Trunk1] undo trunkport gigabitethernet 0/0/1 \清除端口
在成员接口视图下执行命令undo Eth-trunk。
<HUAWEI> system-view / sys
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo Eth-trunk
删除聚合组
将所有的成员接口从聚合组中删除,然后在系统视图下执行命令undo interface eth-trunk trunk-id。
<HUAWEI> system-view
[HUAWEI] undo interface Eth-trunk 10
<Huawei>system-view /sys \进入系统视图
[Huawei]vlan 10
[Huawei]display vlan \查看现有vlan
[Huawei]interface g0/0/1 \进入网口0/0/1视图
[Huawei-GigabitEthernet0/0/1]port link-type access \配置网口模式为access
[Huawei-GigabitEthernet0/0/1]port default vlan 10 \配置网口Vlan为10
[Huawei-GigabitEthernet0/0/1]display this \查看配置
[Huawei-GigabitEthernet0/0/1]q
[Huawei]port-group 1 \创建端口组1
[Huawei-port-group-1]group-member g0/0/2 to g0/0/5 \把网口0/0/2-0/0/5加入端口组1
[Huawei-port-group-1]port link-type access \配置端口组1的所有网口模式为access
[Huawei-GigabitEthernet0/0/2]port link-type access \自动生成,无需输入
[Huawei-GigabitEthernet0/0/3]port link-type access \自动生成,无需输入
[Huawei-GigabitEthernet0/0/4]port link-type access \自动生成,无需输入
[Huawei-GigabitEthernet0/0/5]port link-type access \自动生成,无需输入
[Huawei-port-group-1]port default vlan 20 \配置端口组1所有网口的Vlan为20
[Huawei-GigabitEthernet0/0/2]port default vlan 20 \自动生成,无需输入
[Huawei-GigabitEthernet0/0/3]port default vlan 20 \自动生成,无需输入
[Huawei-GigabitEthernet0/0/4]port default vlan 20 \自动生成,无需输入
[Huawei-GigabitEthernet0/0/5]port default vlan 20 \自动生成,无需输入
[Huawei-port-group-1]q
[Huawei]undo vlan 50 \删除ID为50的VLAN
[Huawei]undo port-group 1 \删除ID为1的端口组
退出前记得保存
8. 华为交换机配置时! interface eth-trunk 1 这句话表示什么意思
这是创建Eth-Trunk链路聚合端口,详细命令可以参见王达为华为出版的《华为交换机学习指南》这本书,在51CTO学院上还有他针对华为、思科和H3C的全部配套视频课程