Lab: Introduction to Switching
Topology
In this lab, we have two switches and four servers. The two switches are connected to each other.
If you are using the lab files below, the switches will ask you for a password. This password is cisco.
This is the topology that has been used in the video, however for practice, we’ll change the process a little.
Goal
Before looking at the solution below, try to work through these items on your own:
- Using the switches, find the MAC addresses of each server
- Find the current aging time
- Disable the ageing timer
- Configure the static address 0e00.43ac.19bc on interface Gi1/1 of switch 2
- Determine the number of remaining entries in the MAC table
- Clear the MAC address table
Solution
If we were to look at the MAC table, we’d probably find that the servers addresses have aged out.
This is because of the MAC ageing timer. Check what this is with:
Switch-1#show mac address-table aging-time Global Aging Time: 300 Vlan Aging Time ---- ----------
We can see that this is 300 seconds, or 5 minutes. That covers Goal #2.
To get our addresses to stay in the table permanently, we can disable the ageing timer completely by setting it to zero.
Switch-1#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch-1(config)#mac address-table aging-time 0
Of course, you should make the same change on Switch-1. And that’s Goal #3 covered.
Now we can log on to the servers to generate some traffic. If you downloaded the lab files, you will need a username/password, which is cisco/cisco.
Log on to server-1, and use it to ‘ping’ the other three:
cisco@server-1:~$ ping 10.0.0.2 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=8.27 ms 64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=5.23 ms ^C --- 10.0.0.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 5.232/6.755/8.279/1.525 ms cisco@server-1:~$ ping 10.0.0.3 PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data. 64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=16.7 ms 64 bytes from 10.0.0.3: icmp_seq=2 ttl=64 time=6.43 ms ^C --- 10.0.0.3 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 6.439/11.584/16.730/5.146 ms cisco@server-1:~$ ping 10.0.0.4 PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data. 64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=12.0 ms ^C --- 10.0.0.4 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 12.005/12.005/12.005/0.000 ms
That generates some traffic, which causes the switches to learn the MAC addresses again:
Switch-1#show mac address-table Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 fa16.3e17.5864 DYNAMIC Gi1/1 2 fa16.3e66.ee4d DYNAMIC Gi1/1 2 fa16.3e70.688c DYNAMIC Gi1/1 2 fa16.3e9f.762a DYNAMIC Gi0/1 2 fa16.3eb4.c47f DYNAMIC Gi0/2 Total Mac Addresses for this criterion: 5
We now know the MAC addresses for Server-1 and Server-2. Your results may look different to mine, depending on how your lab generated the server addresses.
We know 3 and 4 too, but we can’t tell which is which. To find this out, repeat the command above on Switch-2.
And that’s Goal #1 completed!
Goal #4 is fairly simple. Enter configuration mode, and configure a manual entry. If you want to remove it, just add a no to the beginning of the command.
Switch-2#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch-2(config)#mac address-table static 0e00.43ac.19bc vlan 1 interface gi1/1
We can see the number of MAC entries available (Goal #5) like this:
Switch-2#show mac address-table count Mac Entries for Vlan 1: --------------------------- Dynamic Address Count : 1 Static Address Count : 1 Total Mac Addresses : 2 Mac Entries for Vlan 1006: --------------------------- Dynamic Address Count : 0 Static Address Count : 0 Total Mac Addresses : 0 Mac Entries for Vlan 2: --------------------------- Dynamic Address Count : 4 Static Address Count : 0 Total Mac Addresses : 4 Total Mac Address Space Available: 70152664
That’s quite a lot of entries left! Real switches may not have so many entries available.
And finally, we can clear out the dynamically learned MAC entries
Switch-1#clear mac address-table dynamic
Next Steps
That’s the end of the lab! If you got stuck on something, you can leave a comment below.
Next we’ll be looking at VLANs!
for some reason its impossible for me to ping from server1 to 10.0.0.2. it does ping to 10.0.0.1 thou. pls help
Mate, for some reason when I try to open your projects it gives a Bad request http://localhost:3080, “message”: “JSON schema error with API request .
And also noexisting.bin.
Can you help with it?
Thanks
Same here, help would be appreciated
labs do not work for me either same error