HCNP-路由交换:交换机基础

本文介绍了交换机的基础配置,包括查看MAC表、ARP表老化时间设置、端口速率与模式配置以及端口描述。重点讨论了VLAN的配置,如单个与批量创建,并解析了access、trunk和hybrid三种链路类型的收发数据帧原则,强调了Trunk端口的本征VLAN和端口权限设定。提供了SW1和SW2的配置示例,以及PC1的测试步骤。
摘要由CSDN通过智能技术生成

1. 基本配置

A. 查看MAC表

<Huawei>dis mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  
               VSI/SI                                              MAC-Tunnel  
-------------------------------------------------------------------------------
5489-982e-0171 1           -      -      Eth0/0/2        dynamic   0/-         
5489-986c-4022 1           -      -      Eth0/0/1        dynamic   0/-         
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 2

B. 设置ARP表老化时间

<Huawei>sys
//设置arp老化时间为200秒
[Huawei]mac-address aging-time 200

C. 配置端口的速率和工作模式

[Huawei]int e0/0/1
//关闭端口自动协商	
[Huawei-Ethernet0/0/1]undo negotiation auto
//设定端口速率为10M
[Huawei-Ethernet0/0/1]speed 10
//设定端口速率为100M
[Huawei-Ethernet0/0/1]speed 100
//设置端口工作模式为全双工
[Huawei-Ethernet0/0/1]duplex full
//设置端口工作模式为半双工
[Huawei-Ethernet0/0/1]duplex half

D. 设置端口描述

[Huawei]int eth0/0/1
//描述的内容为“TO-SW2-E0/0/1”
[Huawei-Ethernet0/0/1]description TO-SW2-E0/0/1

E. 清空端口配置

[Huawei]clear configuration int eth0/0/1
Warning: All configurations of the interface will be cleared, and its state will
 be shutdown. Continue? [Y/N] :y
Info: Total execute 2 command(s), 2 successful, 0 failed.

2. VLAN

A. 配置单个VLAN

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//创建vlan 10
[Huawei]vlan 10
  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值