Objective
To understand the mapping between MACs and portsTopology
Basic Setting
A HUB and a switch are connected in IP segment of 192.168.0.0/24 and IPs for computers are assigned by DHCP.Requirement
Check Mac table on the switch.Steps
On Switch0
Switch#show mac-address-tableMac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
: Mac table is empty.At the beginning, the switch does not have the mapping between ports and MACs.
On PC2
PC>ping 192.168.0.11Pinging 192.168.0.11 with 32 bytes of data:
Reply from 192.168.0.11: bytes=32 time=8ms TTL=128
Reply from 192.168.0.11: bytes=32 time=9ms TTL=128
Reply from 192.168.0.11: bytes=32 time=9ms TTL=128
Reply from 192.168.0.11: bytes=32 time=8ms TTL=128
Ping statistics for 192.168.0.11:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 8ms, Maximum = 9ms, Average = 8ms
PC>ping 192.168.0.12
Pinging 192.168.0.12 with 32 bytes of data:
Reply from 192.168.0.12: bytes=32 time=7ms TTL=128
Reply from 192.168.0.12: bytes=32 time=8ms TTL=128
Reply from 192.168.0.12: bytes=32 time=9ms TTL=128
Reply from 192.168.0.12: bytes=32 time=10ms TTL=128
Ping statistics for 192.168.0.12:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 7ms, Maximum = 10ms, Average = 8ms
PC>ping 192.168.0.13
Pinging 192.168.0.13 with 32 bytes of data:
Reply from 192.168.0.13: bytes=32 time=21ms TTL=128
Reply from 192.168.0.13: bytes=32 time=10ms TTL=128
Reply from 192.168.0.13: bytes=32 time=11ms TTL=128
Reply from 192.168.0.13: bytes=32 time=9ms TTL=128
Ping statistics for 192.168.0.13:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 9ms, Maximum = 21ms, Average = 12ms
PC>ping 192.168.0.14
Pinging 192.168.0.14 with 32 bytes of data:
Reply from 192.168.0.14: bytes=32 time=20ms TTL=128
Reply from 192.168.0.14: bytes=32 time=11ms TTL=128
Reply from 192.168.0.14: bytes=32 time=11ms TTL=128
Reply from 192.168.0.14: bytes=32 time=10ms TTL=128
Ping statistics for 192.168.0.14:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 20ms, Average = 13ms
PC>
After these pings, the switch learnt the MACs.
Check MAC table again on the Switch0
Switch#show mac-address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
1 0000.0c7c.7e49 DYNAMIC Fa0/1
1 0001.63c6.e338 DYNAMIC Fa0/5
1 0030.a336.362b DYNAMIC Fa0/4
1 0030.a3e4.e4c6 DYNAMIC Fa0/4
1 0090.0cd7.65c8 DYNAMIC Fa0/2
1 00d0.ffce.0eb4 DYNAMIC Fa0/3
Note: you can find that Fa02/4 has 2 MACs, because this port is connected to a HUB which is connected to 2 PCs.
No comments :
Post a Comment