静态MAC

Posted 大大大S

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了静态MAC相关的知识,希望对你有一定的参考价值。

静态MAC

  • 实验拓扑图

  • 实验要求
    在S1交换机上完成以下配置:
    1.将两个服务器的MAC地址配置为静态MAC,MAC地址表老化时间改为20秒。
    2.从 PC1 上分别 PING PC2、PC3、PC4、Server1、Server2,查看 S1 的MAC地址表,截图待用。
    3.配置E0/0/3接口的MAC地址最大数量为2。
    4.从 PC1 上分别 PING PC2、PC3、PC4、Server1、Server2,查看 S1 的MAC地址表,与上面截图进行对比。
    5.查看交换机的告警信息,思考静态MAC和动态有什么区别。

  • 配置

The device is running!
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable 
Info: Information center is disabled.

将两个服务器的MAC地址配置为静态MAC ,MAC地址表老化时间改为20秒

[Huawei]mac-address static 5489-98E3-2210 Ethernet 0/0/2 vlan 1
[Huawei]mac-address static 5489-988D-6820 Ethernet 0/0/3 vlan 1
[Huawei]mac-address aging-time 20

从 PC1 上分别 Ping PC2、PC3、PC4、Server1、Server2,查看 S1 的MAC地址表:

因为限制了接口的MAC地址学习数量是2,所以接口E0/0/3的动态MAC地址只有两条,而人为指定的静态MAC地址是永远不会被老化的

[Huawei]q
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 0.
Save the configuration successfully.

以上是关于静态MAC的主要内容,如果未能解决你的问题,请参考以下文章

如何在VMware ESXi虚拟机上设置静态MAC地址

数据中心交换机配置教程 | 静态MAC表项

MAC 虚拟机NAT模式下linux静态IP后无法连外网

C ++静态库未在mac上的xcode中编译[重复]

mac上使用Vmware Fusion虚拟机配置Centos的静态ip

使用 CMake 在 Mac 上链接静态 GLFW 和 OpenGL