大家好,又见面了,我是全栈君。
MAC(Medium/Media Access Control)地址,采用十六进制数表示,共六个字节(48位)。其中,前三个字节是由IEEE的注册管理机构RA负责给不同厂家分配的代码(高位24位),也称为“编制上唯一的标识符”(Organizationally Unique Identifier),后三个字节(低位24位)由各厂家自行指派给生产的适配器接口,称为扩展标识符(唯一性).
交换机或hub转发数据时会利用MAC和ARP来通讯,当主机要发送目的MAC不知道时用全1的地址广播给同一网段的所有主机,主机收到后会进行单播应答;然后主机互相添加对方MAC和IP关联表,这样就可以单播通讯了。cisco设备更改MAC 地址表的分两类
Dynamic address: a source MAC address that the switch learns and then ages when it is not
in use. 动态地址:交换机学习的源mac;当不适用时会老化。
Static address: a manually entered unicast address that does not age and that is not lost when
the switch resets 静态地址:手工输入的单播地址,若没有手动改动就不会老化.
更改cisco设备mac
Step 1 configure terminal //Enter global configuration mode.
Step 2 switch(config) # mac-address-table static mac_address vlan vlan-id {
drop | interface {
type slot/port} | port-channel number} [auto-learn] //手工指定mac
Setp 3 no mac-address-table learning {vlan
vlan-id [,vlan-id | -vlan-id] | interface
interface slot/port} //关闭接口学习mac 功能
//Disable MAC address learning on an interface or on a specified VLAN or
VLANs.
You can specify a single VLAN ID or a range of VLAN IDs separated by
a hyphen or comma. Valid VLAN IDs 1 to 4094. It cannot be an internal
VLAN.
Step 4 end Return to privileged EXEC mode.
Step 5 show mac address-table learning [vlan
vlan-id | interface interface slot/port]
Verify the configuration.
Step 5 copy running-config startup-config //(Optional) Save your entries in the configuration file.
转载于:https://blog.51cto.com/4097978/1927733
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/108485.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...