首页 > 编程知识 正文

华为交换机打开指定端口命令,华为端口指令

时间:2023-05-06 18:43:45 阅读:275936 作者:4137

1.配置端口组
[Huawei]port-group group-member g 0/0/1 to g 0/0/3 //将端口加入临时端口组
[Huawei]port-group a1 //创建永久端口组
[Huawei-port-group-a1]group-member g 0/0/4 to g 0/0/6 //将端口加入永久端口组
2.配置端口隔离
(1)接口之间的二层数据隔离,三层数据互通
[HUAWEI] port-isolate mode l2
[HUAWEI-GigabitEthernet1/0/1]port-isolate enable group 1
[HUAWEI-GigabitEthernet1/0/2]port-isolate enable group 1
(2)接口之间的二三层数据均隔离
[HUAWEI] port-isolate mode all
[HUAWEI] port-group a1
[HUAWEI-port-group-a1] group-member gigabitethernet 0/0/10 to gigabitethernet 0/0/20
3. 配置Combo接口工作模式:Combo接口又叫光电复用接口,是由设备面板上的两个以太网口(一个光口和一个电口)组成。Combo电口与其对应的光口在逻辑上是光电复用的,用户可根据实际组网情况选择其中的一个使用,但两者不能同时工作。Combo接口工作模式为auto模式时,只要Combo光口已插上光模块,则设备重启后,Combo接口都将选择光口模式;如果本端Combo电口与对端电口相连,则需要强制指定Combo接口的工作模式为copper;如果本端Combo光口与对端光口相连,则需要强制指定Combo接口的工作模式为fiber。
[HUAWEI-GigabitEthernet0/0/1] combo-port copper //配置工作模式为电口
4.配置接口速率:自协商和非自协商模式下,配置接口速率
[HUAWEI-GigabitEthernet0/0/1] negotiation auto
[HUAWEI-GigabitEthernet0/0/1] auto speed 100
[HUAWEI-GigabitEthernet0/0/1] undo negotiation auto
[HUAWEI-GigabitEthernet0/0/1] speed 100
5.配置双工模式
[HUAWEI-GigabitEthernet0/0/1] negotiation auto
[HUAWEI-GigabitEthernet0/0/1] auto duplex full
[HUAWEI-GigabitEthernet0/0/1] undo negotiation auto
[HUAWEI-GigabitEthernet0/0/1] duplex half
6. 接口切换到三层模式:缺省情况下,以太网接口处于二层模式
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
7. 清除接口下的配置
[HUAWEI] clear configuration interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] clear configuration this

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。