MAC地址表及邻居信息查看

MAC地址表及邻居信息查看

1.1 问题

本例要求为修改计算机名并加入工作组:

1)查看交换机MAC地址表

2)查看CISCO设备邻居信息

1.2 方案

网络拓扑,如图-1所示。

MAC地址表及邻居信息查看_第1张图片

图-1

1.3 步骤

实现此案例需要按照如下步骤进行。

步骤一:查看交换机sw1的mac地址表

1)在PC1上ping PC2:192.168.1.2:

  1. PC>ipconfig /all
  2. FastEthernet0 Connection:(default port)
  3. Connection-specific DNS Suffix..:
  4. Physical Address................: 00E0.B079.7815
  5. Link-local IPv6 Address.........: FE80::2E0:B0FF:FE79:7815
  6. IP Address......................: 192.168.1.1
  7. Subnet Mask.....................: 255.255.255.0
  8. Default Gateway.................: 0.0.0.0
  9. DNS Servers.....................: 0.0.0.0
  10. DHCP Servers....................: 0.0.0.0
  11. DHCPv6 Client DUID..............: 00-01-00-01-E3-E0-53-04-00-E0-B0-79-78-15
  12. PC>ping 192.168.1.2
  13. Pinging 192.168.1.2 with 32 bytes of data:
  14. Reply from 192.168.1.2: bytes=32 time=1ms TTL=128
  15. Reply from 192.168.1.2: bytes=32 time=0ms TTL=128
  16. Reply from 192.168.1.2: bytes=32 time=1ms TTL=128
  17. Reply from 192.168.1.2: bytes=32 time=0ms TTL=128
  18. Ping statistics for 192.168.1.2:
  19. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  20. Approximate round trip times in milli-seconds:
  21. Minimum = 0ms, Maximum = 1ms, Average = 0ms

2)查看PC2的IP信息

 
     
  1. PC>ipconfig /all
  2. FastEthernet0 Connection:(default port)
  3. Connection-specific DNS Suffix..:
  4. Physical Address................: 0003.E49E.6445
  5. Link-local IPv6 Address.........: FE80::203:E4FF:FE9E:6445
  6. IP Address......................: 192.168.1.2
  7. Subnet Mask.....................: 255.255.255.0
  8. Default Gateway.................: 0.0.0.0
  9. DNS Servers.....................: 0.0.0.0
  10. DHCP Servers....................: 0.0.0.0
  11. DHCPv6 Client DUID..............: 00-01-00-01-DB-A7-C6-5E-00-03-E4-9E-64-45

3)在查看交换机sw1的mac地址表

  1. Switch#hostname SW1
  2. SW1#show mac-address-table
  3. Mac Address Table
  4. -------------------------------------------
  5. Vlan Mac Address Type Ports
  6. ---- ----------- -------- -----
  7. 1 0003.e49e.6445 DYNAMIC Fa0/2
  8. 1 0010.1148.9309 DYNAMIC Fa0/24
  9. 1 00e0.b079.7815 DYNAMIC Fa0/1

步骤二:查看交换机sw1邻居信息

1)更改交换机sw2的主机名

 
     
  1. Switch>enable
  2. SW2#configure terminal
  3. SW2(config)#hostname SW2
  4. SW2(config)#

2)进入交换机SW1特权模式通过命令查看CISCO设备邻居信息:

 
    
  1. Switch#show cdp neighbors
  2. Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
  3. S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
  4. Device ID Local Intrfce Holdtme Capability Platform Port ID
  5. SW2 Fas 0/24 174 S 2950 Fas 0/9

你可能感兴趣的:(MAC地址表及邻居信息查看)