You need to know how to read
MAC addresses and what they mean and to help us do that.
Let's make this practical and use Packet Tracer.
So please open packet tracer and follow me and make sure that you see something similar.
The numbers that you get may be different but we'll manually configure MAC addresses in Packet Tracer
because it's easy to do that.
So make sure that you can view the MAC addresses and then gonna show you how to work with hexadecimal
and how to convert numbers from binary to hex, hexadecimal to decimal and so forth.
So the first thing is let's get a switch and I'll get a 3560 switch and drag that into the topology.
I'll go to end devices.
Grab a PC, grab a laptop, add that to the topology go to network connections and get a straight-through
cable and connect the PCs Ethernet interface to the switch on gigabit 001.
You don't have to use exactly the same interfaces it's really up to you but what I've done here is connect
the PC to the switch to make it easier to follow.
I'll go to preferences and I'll show the port labels in my diagram, so fast
Ethernet0 in the PC he is connected to gigabit 101 on the switch.
I'll connect to the second gig interface to the laptop on fastethernet0 so we've got our devices
in our topology.
The switch needs a power supply so grab a power supply and add that to the switch.
And as you can see the switch is now booting up.
But now let's view the MAC addresses on the devices it's on PC 1 go to fast ethernet0
this is the MAC address of the PC by default.
I'm gonna give it an IP address of 10 1 1 1 with a subnet mask of slash 24 or 2 5 5 2 5 5 2 5 5 0
If you don't understand that yet don't worry too much we'll talk a lot about subnetting, in later videos
but for the moment, I've configured the PC with those details.
I'll go to desktop.
Command prompt and if we type IP config like you would on a Windows computer.
Notice there's the IP address of the PC, IP config slash all.
There is the MAC address of the PC not easy to read.
We'll change that in a moment, but for the moment I want to show you that the switch will learn those
MAC addresses so hence it's important for you to learn hexadecimal on the laptop go to config fast
ethernet0
I'll configure this laptop with an IP address of 10.1.1.1 and a subnet mask of that
255 255 255 0
There's the MAC address of this PC, so if I go to command prompt on the laptop and type IP config slash
all there's the IP address there's the MAC address back on the P.C..
PC1, PC starts with 0 0 0 4 laptop starts with triple 0 6, the first half of this address is the
vendor code.
Second half is a unique identifier for the MAC address, but notice please when I type a command such
as ARP dash a.
It says there are no arp entries.
arp is used to find the MAC address of another device in the network
It's basically a broadcast sent out into the network saying who has this IP address and then that device
will reply back with its MAC address.
So back on the laptop,
If I type arp dash A, notice it says no arp entries are found arp is used to discover the MAC address of
another device in ethernet devices have MAC addresses allocated to them by vendors
If I want to talk to your device I need to know what your MAC address is to be able to send the traffic
onto the ethernet network.
So if the laptop pings the PC, it's basically going to send a broadcast into the network saying who
has this IP address and then that PC will reply back.
Notice now when we type arp-a, we see that this IP address is using this MAC address and that's correct.
Per the information on PC1, back on the PC IP config slash all shows us that the PC has this
IP address and this MAC address, the laptop has learnt the MAC address of the PC and in the same way
the PC has learnt the MAC address of the laptop.
So that's an example where hexadecimal values are used but it's not only there.
If I have a look at the switch, I'm gonna bypass the initial configuration on the switch.
Now don't worry too much if you don't know the commands on Cisco switches in a lot of detail yet you'll
learn as we go along.
Enable takes us to privilege mode and here I can type show MAC address table to see the MAC address table
on the switch, the switch has learned where the devices are the whole idea with a switch is when it
receives traffic at one port it needs to switch that traffic out of another port needs to know where
the devices are so that it can efficiently send the traffic to only the correct ports.
So in other words if traffic arrives on this interface going to the laptop we only want to send it out
of this interface.
Now the switch doesn't have other interfaces connected at the moment but if we did we wouldn't want
to send that traffic out of all interfaces we would want to limit it to this one interface.
So the switch learns where devices are in the network.
If we change the MAC address of the PC so going back to the PCs config, we will click on fastethernet
0
I could as an example set the MAC address to 0 0 C 0 and then just make it a number like that a whole
bunch of ones notice a MAC address consists of six hexadecimal values this is hex which is the vendor
code and then six hexadecimal values which is the unique identifier for the MAC address a hex value
is 4 binary bits and I'll explain that in more detail in a moment.
This is a 48
bit number, we've got twelve hexadecimal values and a MAC address twelve times 4, 48 bits, each number has
a hexadecimal number.
What I'll do now is change the MAC address of the laptop so go to config fast ethernet0
Let's make that 0 0 C 0 2 2 2 2 and a bunch of twos.
So I've changed the MAC address of the laptop as well if I type IP config that's the IP address to slash
all.
Make this bigger that shows us the MAC address of the P.C. has changed or the laptop in this case has
changed.
So now arp-a, the arp cache has timed out or has been flushed in this example there are no arp entries.
If the laptop pings the PC and type arp-a now you can see that the Mac address of value has been
updated.
So the laptop has learnt the new MAC address associated with the PC and in the same way the PC has
learnt that was the previous entry but PC has learnt the new MAC address of the laptop and the switch
will have learnt the new MAC addresses.
Now it still has the old MAC addresses in its MAC address table they will time out after a period of
time but for the moment it's got both the old MAC addresses and the new MAC addresses in its MAC address
table, a switch learns where the MAC addresses of devices are in the network and then basically switches
the traffic from one MAC address to another depending on who's talking to who.
So as you can see here MAC addresses are used in a lot of places you need to know how to read MAC addresses
you need to know what that means.
If I tell you that that's a 48 bit number, you need to know that.
Why, why is it 48?
So let's talk about the theory and I'll show you how to do conversions from one numbering system to
another.
Don't forget that IP version 6 also uses hexadecimal.
So if I type IP config slash all on the
PC notice link-local IP version 6 address, DHCP client identifier.
These are all hexadecimal numbers.
We've got a Bluetooth hexadecimal number, hexadecimal is used in multiple places you need to know how
to work with hexadecimal.
So now let's talk about the theory of hexadecimal and how to do conversions.