导航:首页 > 器材知识 > 交换机如何储存设备的MAC地址

交换机如何储存设备的MAC地址

发布时间:2021-02-16 00:36:44

㈠ 交换机如何建立MAC地址表

A通讯B 通过交换机上多对应关系建立mac地址表,就是所谓的源携带过来的包携带的目的地址版在寻找B的端口,出自身权外,会向其他所有端口泛洪。待得到回应时就得到了mac地址及接口。mac表就会有 源和目的地接口对应关系。mac地址就建立了。

㈡ 交换机如何学习mac地址过程

我说简单点,来交换机工自作在数据链接层,当一台主机发送数据时,交换机会收到mac帧,我包含发送主机的mac地址和接收主机的地址,交换机收到这个帧后,会把这个发送主机的mac地址记录在自己的mac表中,并记下这个发送主机对应的端口号。之后交换机会查看自己mac表看有没得接收主机的记录,如果有就直接发到对应的端口,如果没有就广播出去(这里还涉及到arp协议,反正大体就是这个意,我自己写的,嘿嘿)

㈢ 华为交换机知道IP怎么查看设备mac地址

.对于连接终端设备的交换机来说,直接运行display arp 即可,弹出的详细信息里,IP地址后专面有所在端属口;
2.如果是处在第二层的话,只能用display mac-address来查看端口下的MAC,然后在三层上用display arp 找IP对应的MAC,通过IP后面的端口号就可以知道二层某个端口下所连接的设备信息。

㈣ 如何在CISCO交换机配置动态学习MAC地址,并保存到NVRAM,然后重启不丢失!求教!

通常动态学到的mac不会保存到nvram的,除非你交换机配置了端口粘滞安全MAC地址,交换机内就会将学习到的容mac增加到运行配置里。基本的命令是switchport port-security mac-address sticky,你可以搜一下端口安全性看看。

㈤ 交换机是如何建立起它的MAC地址表的

1给2发消来息

首先生成数据 IP层封装自为包 2层封装为FRAME,传到交换机

交换机就会记录 1----MAC1

然后查询2的MAC和端口

但是发现找不到 就会从除1外所有端口广播出去

2再回发的时候就会记录 2----MAC2

这样通过 FRAME的源地址来学习地址表.

㈥ 如何配置交换机的mac地址表

cisco交换机配置清除、启动及基本配置 CISCO交换机基本配置

switch>ena 进入特权模式
switch#erase nvram 全部清除交换机的所有配置
switch#reload 重新启动交换机(初始提示符为switch> )
------------------------------------------------------------------------------------
CISCO交换机基本配置:Console端口连接
用户模式hostname> ;
特权模式hostname(config)# ;
全局配置模式hostname(config-if)# ;

交换机口令设置:
switch>enable ;进入特权模式
switch#config;进入全局配置模式
switch(config)#hostname csico ;设置交换机的主机名
switch(config)#enable secret csico1 ;设置特权加密口令
switch(config)#enable password csico8 ;设置特权非密口令
switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4 ;进入虚拟终端
switch(config-line)#login ;虚拟终端允许登录
switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6
switch#write 保存配置设置
switch# running-config startup-config 保存配置设置,与write一样
switch#exit ;返回命令
配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时
switch#conf t
switch(config)#line con 0
switch(config-line)#exec-timeout 0
---------------------------------------------------------------------------------
交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show vlan name vlan2
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息
switch#show int f0/0 status;查看指定端口状态
switch#show interface status
switch#dir flash: ;查看闪存
switch#show running-config
switch(config)#do show running-config 显示存储在内存中的当前正确配置文件。
show startup-configuration:显示存储在非易失性存储器(NVRAM)的配置文件。
show users:显示所有连接到路由器的用户。
show hosts:显示主机名和地址信息。
switch(config)#do show interface
switch(config-if)#do show int f0/21
switch#show arp
switch#show mac-address-table
------------------------------------------------------------------------------
2960交换机上配置,配置IP及网关
switch#conf t
switch(config)#interface vlan1 进入vlan 1特殊接口配置模式
switch(config-if)#ip address 192.168.1.1 255.255.255.0 设置交换机的管理IP地址
switch(config)#ip default-gateway 192.168.1.1 设置交换机的网关地址
switch(config)#ip domain-name pctc.com.cn 设置交换机所连域的域名
switch(config)#no ip domain-name
switch#ip name-server 218.87.18.230 设置交换机所连域的域名服务器IP
switch#show int vlan 1 查看交换机的VLAN 1特殊接口配置信息
switch#show run 查看交换机的当前运行配置等全部信息
--------------------------------------------------------------------------------
交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:
switch(config)#vlan 2
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config)#speed ? 查看speed命令的子命令
switch(config)#speed 100 设置该端口速率为100mb/s (10/auto)
switch(config-if)#do show int f0/21 显示21口配置信息
switch(config-if)#shut ;shutdown 关闭当前端口
switch(config-if)#no shut ;no shutdown 开启当前端口
switch(config)#plex ? 查看plex的子命令
switch(config)#plex full 设置该端口为全双工(auto/half)
switch(config)#description TO_PC1 这是该端口描述为TO_PC1
switch(config)#interface f0/21
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继
switch(config)#vtp domain vtpserver ;设置vtp域名相同
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp server ;设置vtp服务器模式
switch(config)#vtp client ;设置vtp客户机模式
---------------------------------------------------------------------------------------
交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:
switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址
switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关
switch(config)#ip domain-name cisco.com 设置域名
switch(config)#ip name-server 192.168.1.18 设置域名服务器
switch(config)#mac-address-table? 查看mac-address-table的子命令
switch(config)#mac-address-table aging-time 100 设置超时时间为100ms
switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口
switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7
switch(config)#end
switch#show mac-address-table 查看整个MAC地址表
switch#clear mac-address-table restricted static 清除限制性静态地址
-----------------------------------------------------------------------------------
交换机端口加入vlan
将多个端口加入到VLAN2
switch(config)#interface range fa 0/17-24
switch(config-if-range)#switchport access vlan 2
单个端口加入VLAN
switch(config)#interface f0/1
switch(config-if-range)#switchport access vlan 2
--------------------------------------------------------------------------------
交换机的端口和MAC地址表的设置
2960交换机配置端口属性
switch#conf t
switch#interface ethernet 0/1
进入第1个端口
switch#description switch-e0/1-pc1
给端口写入注释信息
switch#plex auto/full/full-flow-control/half
设置端口的工作模式
switch#port secure
启用端口安全性
switch#port secure max-mac-count 1
设置该端口允许对应的MAC地址数(默认132个)
switch#sh mac-address-table security
查看端口安全性

2912交换机配置端口属性

switch#conf t
进入全局配置模式
switch#interface fastethernet 0/1
进入第1个端口
switch#description switch-f0/1-pc1
给端口写入注释信息
switch#plex auto/full/half
设置端口的工作模式
switch#port security
启用端口安全性
switch#port security max-mac-count 1
设置该端口允许对应的MAC地址数(默认132个)
switch#end
返回特权模式
switch#sh port security
查看端口安全性

配置和查看MAC地址表
1924交换机配置MAC地址表

switch#mac-address-table aging-time 600
设置动态地址超时时间
switch#mac-address-table permanent 0000.0cdd.5a4d e0/3
定义永久MAC地址(绑定MAC地址)
switch#mac-address-table restricted static 0000.0cdd.aaed e0/6 e0/7
定义受限MAC地址
switch#address-violation disable/ignore/suspend
定义地址安全违规
switch#show mac-address-table
查看上述配置
switch#clear mac-addr restric static
清除受限MAC地址表项

2912交换机配置MAC地址表

switch#mac-address-table aging-time 700
设置动态地址超时时间
switch#mac-address-table static 0000.0cdd.5a4d e0/3
定义永久MAC地址(绑定MAC地址)
switch#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1
定义受限MAC地址
switch#port security action shutdown/trap
定义地址安全违规
switch#show port security
查看上述配置

配置VTP、VLAN、VLAN Trunk和STP
配置VTP

switch#conf t
switch#vtp server
定义VTP的工作模式
switch#vtp domain cisco
定义VTP的域名
switch#trunk on
启用干道
switch#vtp domain cisco
加入VTP域
switch#vtp client
定义VTP的工作模式
switch#trunk on
启用干道
switch#show trunk b
switch#show trunk b allowed-vlans
查看干道信息

配置VLAN

switch#vlan 10 dept1
switch#vlan 20 dept2
switch#vlan 30 dept3
switch#vlan 40 dept4
定义所需VLAN
switch#show vlan
查看VLAN信息
switch#show vlan
switch#show vtp
查看VTP的信息
switch#int e0/1
switch#vlan-membership static 10
switch#int e0/2
switch#vlan-membership static 20
switch#int e0/3
switch#vlan-membership static 30
switch#int e0/4
switch#vlan-membership static 40
把接口划入各自VLAN

配置spanning tree

switch#spantree 1
启用生成树协议
switch#sh spantree 1
查看生成树信息
switch#no spantree 1
关闭生成树协议
switch#sh spantree 1
查看生成树信息

交换机上屏蔽个别MAC地址方法

configure terminal
interface gigabitEthernet 0/20
switchport
sw mode acc
sw port-sec
sw port-sec mac-add [macaddress]
sw port-sec max 1
sw port-sec violation restrict

㈦ 怎么在交换机上获取终端的MAC地址

输入show arp会显示每个IP所对应的MAC地址和连接在设备上的端口号我给你看下我交换机上的端口SW-A#sho arp
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.80.2 33 001a.a907.bffb arpa FastEthernet 0/10
Internet 192.168.80.1 -- 001a.a91a.09df arpa FastEthernet 0/10
Internet 192.168.50.25 34 001a.a93a.4370 arpa FastEthernet 0/11
Internet 192.168.50.26 -- 001a.a91a.09df arpa FastEthernet 0/11
Internet 192.168.200.10 -- 001a.a91a.09df arpa VLAN 1
Internet 192.168.15.254 -- 001a.a91a.09df arpa VLAN 15
Internet 192.168.20.254 -- 001a.a91a.09df arpa VLAN 20
Total number of ARP entries: 7

㈧ 交换机是如何建立起它的MAC地址表的

1给2发消息

首先生成数据 IP层封装为包 2层封装为FRAME,传到交换机

交换机就会记录 1----MAC1

然后版查询2的MAC和端口

但是发现找不到权 就会从除1外所有端口广播出去

2再回发的时候就会记录 2----MAC2

这样通过 FRAME的源地址来学习地址表.

㈨ 如何查看交换机mac地址

如果是华为、H3C的可网管交换机使用 dis mac-address 查看
如果是cisco的 使用show mac-address 查看
如果不是可网管的设备无法查看

阅读全文

与交换机如何储存设备的MAC地址相关的资料

热点内容
steam令牌换设备了怎么办 浏览:246
新生测听力仪器怎么看结果 浏览:224
化学试验排水集气法的实验装置 浏览:156
家用水泵轴承位置漏水怎么回事 浏览:131
羊水镜设备多少钱一台 浏览:125
机械制图里型钢如何表示 浏览:19
测定空气中氧气含量实验装置如图所示 浏览:718
超声波换能器等级怎么分 浏览:800
3万轴承是什么意思 浏览:110
鑫旺五金制品厂 浏览:861
苏州四通阀制冷配件一般加多少 浏览:153
江北全套健身器材哪里有 浏览:106
水表阀门不开怎么办 浏览:109
花冠仪表盘怎么显示时速 浏览:106
洗砂机多少钱一台18沃力机械 浏览:489
超声波碎石用什么材料 浏览:607
组装实验室制取二氧化碳的简易装置的方法 浏览:165
怎么知道天然气充不了阀门关闭 浏览:902
公司卖旧设备挂什么科目 浏览:544
尚叶五金机电 浏览:59