交换机依靠什么进行数据转发?

交换机依靠什么进行数据转发?

交换机是依靠mac地址表进行数据转发

1、什么是mac地址表?

交换机上----数据转发表----维护交换机正常的数据转发

2、交换机的mac地址转发表的构成?

由mac地址 + vlan + 交换机的接口构成

  • mac地址----硬件地址/物理地址-----烧录在网卡芯片上--用于网卡的身份标识----唯一的、不可重复的
  • Vlan----virtual lan----虚拟局域网----用于识别交换机上的接口是否属于同一网络的默认情况下,交换机上的接口都是属于vlan 1的。
  • 交换机的接口:连接终端设备的接口

3、mac地址表的获取途径?

静态手工配置----通过在交换机上手动的将mac地址 + vlan + 接口捆绑在一起----static

动态的自动获取---- 一旦终端设备产生数据,到达交换机的接口,交换机就会自动记录下这个接口所对应终端设备的mac地址---mac地址 + vlan + 接口--dynamic

实验内容

静态手工配置 手工输入mac地址为:0000-0102-0304

<Huawei>sy

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]undo inf

[Huawei]undo info-center en

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sys

[Huawei]sysname LSW1

[LSW1]dis

[LSW1]display mac-add

[LSW1]display mac-address

[LSW1]mac-add

[LSW1]mac-address sta

[LSW1]mac-address static 0000-0102-0304 g0/0/1 vlan 1

[LSW1]display mac-address

MAC address table of slot 0:

---------------------------------------------------------------------------------------------------------------------------------

MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  

               VSI/SI                                              MAC-Tunnel  

---------------------------------------------------------------------------------------------------------------------------------

0000-0102-0304 1           -      -      GE0/0/1             static    -           

---------------------------------------------------------------------------------------------------------------------------------

Total matching items on slot 0 displayed = 1

动态自动获取

[LSW1]display mac-address

MAC address table of slot 0:

----------------------------------------------------------------------------------------------------------------------------

MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  

               VSI/SI                                              MAC-Tunnel  

----------------------------------------------------------------------------------------------------------------------------

0000-0102-0304 1           -      -      GE0/0/1         static    -           

------------------------------------------------------------------------------------------------------------------------------

Total matching items on slot 0 displayed = 1

MAC address table of slot 0:

------------------------------------------------------------------------------------------------------------------------------

MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  

               VSI/SI                                              MAC-Tunnel  

------------------------------------------------------------------------------------------------------------------------------

5489-9816-2e54 1           -      -      GE0/0/1         dynamic   0/-         

5489-98ca-32a6 1           -      -      GE0/0/2         dynamic   0/-         

-----------------------------------------------------------------------------------------------------------------------------

Total matching items on slot 0 displayed = 2

 

 

 

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值