MAC Addressing Lab
MAC Addressing Lab
In this short lab, I’m going to configure MAC addresses on two machines, use the arp command to show how both devices learn each other’s MAC addresses, and I’m also going to see how the switch’s MAC address table is populated.
To start, I’m going to add a 3650 switch along with a desktop and a laptop and connect them using a straight through cable using Gigabit1/0/1 for the PC and Gigabit1/0/2 for the laptop. I’m also going to add a power supply to the switch.
Now I’m going to quickly configure IPv4 addressing for both devices. The PC will get 10.1.1.1; the laptop will get 10.1.1.2 each with a subnet mask of 255.255.255.0.
For a quick demo, I’m going to now try the arp -a command in the PCs CLI to see if it knows the MAC address of the laptop (which it will not since it’s never communicated with it before).
Now we’ll run a quick ping from PC1 to the laptop.
Now let’s check the CLI of the switch.
The switch has learned the MAC addresses of both machines. For fun, let’s mess with the MAC addresses and see how the switch adjusts. I’m going into FastEthernet0 and changing the PC to 00c0.1111.1111 (6 hexadecimal characters for the OUI and 6 hexadecimal characters for the device).
If I run a quick ipconfig /all on both machines, that will show that the MAC address has now changed to the new assigned MAC address we came up with.
Arp -a is now blank on the PCs since it has timed out.
Let’s check the switch.
And as we can see, the switch has learned the new MAC addresses we came up with.
Just a short demo here to show how arp works, how computers learn each other’s mac addresses, how to configure mac addresses, and also how switches learn mac addresses.