使用交换机构建简单局域网
创建交换机SW-1
交换机接口规划
序号 | 交换机名 | 接口 | 连接设备 | 接口类型 |
---|---|---|---|---|
1 | SW-1 | Ethernet 0/0/1 | Host-1 | 默认 |
2 | SW-1 | Ethernet 0/0/2 | Host-2 | 默认 |
3 | SW-1 | Ethernet 0/0/5 | Host-3 | 默认 |
4 | SW-1 | Ethernet 0/0/6 | Host-4 | 默认 |
主机IP规划
Host-1:192.168.64.11/24,接入SW-1 Ethernet 0/0/1
Host-2:192.168.64.12/24,接入SW-1 Ethernet 0/0/2
Host-3:192.168.64.13/24,接入SW-1 Ethernet 0/0/5
Host-4:192.168.64.14/24,接入SW-1 Ethernet 0/0/6
进行主机的相关配置
交换机相关配置
<SW-1>sys
<SW-1>system-view
Enter system view, return user view with Ctrl+Z.
[SW-1]sysna
[SW-1]sysname SW-1
[SW-1]disp
[SW-1]display mac
[SW-1]display mac-add
[SW-1]display mac-address
验证mac表学习功能
各主机进行ping命令测试
查看交换机mac地址表
[SW-1]display mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID
VSI/SI MAC-Tunnel
-------------------------------------------------------------------------------
5489-983b-1329 1 - - Eth0/0/1 dynamic 0/-
5489-98ba-78f8 1 - - Eth0/0/2 dynamic 0/-
5489-98dc-0699 1 - - Eth0/0/5 dynamic 0/-
5489-988a-40a1 1 - - Eth0/0/6 dynamic 0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 4