Learn how to locate devices in a switch network down to the switchport level using practical discovery techniques and commands.
Ask about this video. Answers come from its transcript only — with the timestamp, so you can check them.
Generated from the transcript and can be wrong — check the timestamp.
Key Takeaways
- Effective device discovery in a switch network requires both documentation and command-line tools.
- Knowing how to resolve hostnames to IP addresses is crucial for network troubleshooting.
- MAC addresses are key to pinpointing devices on a switch and can be found using ARP after pinging the device.
- Switch commands like 'show mac address-table address' help locate the exact switchport a device is connected to.
- Understanding different MAC address formats and how to input them on switches is important for network admins.
What the video covers
- The video focuses on discovering devices within a switch network, specifically locating them down to the switchport level.
- Jeremy Cioara emphasizes the importance of documentation but also covers how to find devices when documentation is missing or outdated.
- The process starts with identifying the device's hostname and resolving it to an IP address using tools like ping and nslookup.
- If DNS resolution fails, grittier methods like logging into the device to find its IP address are recommended.
- Once the IP address is known, the MAC address can be obtained using ARP commands after pinging the device.
- The MAC address is then used on a network switch to find the exact port the device is connected to by using the 'show mac address-table address' command.
- Jeremy explains different MAC address formats and how switches may accept various formats.
- He demonstrates accessing a switch via Telnet to run commands and locate the device.
- The video highlights real-world troubleshooting scenarios such as identifying bandwidth hogs or problematic servers.
- The approach is practical and designed for IT professionals dealing with typical business switch networks.
Full Transcript — Download SRT & Markdown
Speaker A
Discovery: finding devices in the switch network by time. We're done here. You will be able to locate a device in the network down to the switchport level. I've got to be honest, I've kind of fallen in love with our paper napkin network diagram that we have here on the screen. Every nugget, I'm like, "Oh, I need to make this look professional and label everything," and I'm like, "You know, this is just so real and gritty. I like it." We're now approaching the end of this IT expert series, and my mission this entire time is to give you the core of switching, meaning 90% of the switch networks that you're going to run into are going to encounter exactly what we've run into in this series. Outside of VLANs, which I told you was going to be a completely separate series just focused on that technology, and there have been a lot of topics that have made their way into my brain, and I'm like, "Oh, I should talk about that." I'm like, "No, no, that's fringe. That's not the 90. That isn't everything," except for this idea of discovery. It comes at you many different ways in a network environment. You might have a server, and that server is acting up, and you go, "I wonder if that's a network issue," and you think to yourself, "Where is that plugged in?" Or maybe you've got a bandwidth hog on the network. Somebody's sucking up all the internet bandwidth, and you find out what IP address it is from your firewall or internet reporting or however you figure out who that person is, and you think, "Oh, it's the guy with the computer named Bob's PC." Now, where is Bob's PC? These are just two examples of hundreds that I could come up with on locating devices in the network. Now, once again, I'm going to point you back to the documentation and say if we had a full, clear documentation, I'm going to keep going back to that statement where we went through originally and documented every port and what it was connected to. A lot of those issues would resolve themselves simply by looking at the documentation. But you will encounter situations where either there is no documentation or the documentation isn't updated, or you've got a foreign device in your network that simply wouldn't be documented. The last puzzle piece that I want to give you in this series is the ability to find network devices even if you have good documentation, bad documentation, or no documentation at all. So let's come back to the situation I was mentioning just a moment ago. There's a server, and we want to know where it's plugged in, and that's a very real situation. Right now, we have a server at this office named BBUS 3001-03. Now, that's the hostname of the Windows server. A lot of people call that the DNS name. Our first milestone is to try and figure out what IP address that has. Sometimes it's really easy, and sometimes it's a challenge. If you're plugged into the same network as the server, you may be able to just ping it. Ping BBUS 3001-03. In this case, it comes back and says, "Here's the server, and here's its IP address." The reason why is because DNS was able to resolve that. I could also type in nslookup, which is a great little utility where this server is the DNS server, and I could type in that hostname like that. Now, I just typed in the name without any domain after. It's like, "Well, I don't know who that is. I need to type in the fully qualified domain name like this," and it comes back and says, "Oh, that's 10.225.1.252." If all you have is a name and nslookup and ping don't work, you're going to have to resort to some grittier techniques like logging onto that server, typing in ipconfig, working with a Windows admin. Something you can't be left completely in the dark. As soon as you have an IP address, you're going to be able to ping that and get its MAC address. Watch this. Ping 10.225.1.252 comes back and says, "Hey, I'm replying all day." Now, the way that happens is my computer actually sent out an ARP message that said, "Hey, 10.225.1.252, what is your MAC address?" That's a broadcast, and everybody got that, including the server, and the server came back and said, "Here's my MAC address," and then my computer pinged it. So my computer, behind the scenes, knows what the MAC address of this server really is. I can find that out by typing in arp -a, and it gives me a list of all the different devices that it's seen on the network and the MAC addresses that it's cached, meaning kept in memory. And right there, there's my server, 10.225.1.252, and there is the MAC address, the golden piece of information. I'm going to right-click on that to copy it to my clipboard, and we need to have some kind of starting point with the switch. Now, we've got this paper napkin network diagram that we've been building the entire time, so we're very familiar with the network environment. But even if we're not, you need to be able to get onto some switch somewhere as a starting point. So again, that may be a console port. That may be some nitty-gritty techniques if you're just walking into a network environment that you don't know. But most of the time, you'll find some IP address that you have to begin. I'm going to start right here with Suite 4 Switch 2. I don't know where that server is in the network, but we're about to find out. I'm going to open my command prompt again, telnet to 10.225.1.243, which is that switch. Now, you can do this from the graphic interface. It's just not as fast, and you definitely don't look as cool if somebody's looking over your shoulder. I'm going to log in with the username Cisco, type in the password, and I'm there at the prompt. Now, I copied that server's MAC address to the clipboard. I'm going to paste it into Notepad so I don't lose it. Now, we know this whole network. We've been drawing it on the paper napkin behind us this entire series, but I want you to pretend like we don't. Imagine just like this command prompt and Notepad are blocking all the diagram behind it. Imagine the only thing that we know is that we have this switch number two. The command I'm going to type in is show mac address table, and I'll hit the question mark, and it says you can either look at an interface to find out what MAC addresses are under it, a certain VLAN, but the one that I'm after is a specific MAC address. So I'll type in address, and then it says, "Well, what specific MAC address do you want to type in?" Now, notice it's giving me the option of all these different formats. That's because depending on the operating system, you may see all kinds of formats of MAC address. Some people will put dashes between them. That's most often Windows. Some devices will put colons between them instead. I see that all the time on Linux. And some devices will put periods, and instead of every two characters, that'll do it every four like that. These are all the same thing. They're all a 12-character MAC address. It's just what format does it take. Now, this switch is very kind to us in the sense that it accepts any one of those formats, but that's why the question mark is also handy because you may be on a switch platform that only takes this one or this bottom one or whatever the case. So I'm going to copy that top one to the clipboard and paste it into place. I hit the Enter key. Now, this switch says, "Well, wait a second here. This MAC address is actually on port Gi28." Now, you and I who know this network diagram immediately go, "No way. It's not on port 28. Port 28 connects to another switch." But remember, from this switch's perspective, it does see it on port 28, meaning my computer is right here somewhere. I don't know what port it's on, and when I pinged that device, this switch saw the reply come back in port 28. So from all it knows, it's thinking, "Well, that server must be somewhere over there," or at least from this switch's perspective, it knows to reach that server, I've got to go out that port. But that's the behind the scenes. Remember, you and I are not supposed to know what this network looks like. Oh man, I got a drink in it. Time me out. Let me tell that back in there. So what if we didn't have this network diagram? What if I mean, how would we know that this wouldn't be the server itself plugged into that w?
Speaker A
that we have here on the screen every nugget i'm like oh i need to make this look professional and label everything and i'm like you know this is just so real and gritty i like it we're now approaching the end of this it
Speaker A
expert series and my mission this entire time is to give you the core of switching meaning 90 of the switch networks that you're going to run into are going to encounter exactly what we've run into in this series
Speaker A
outside of vlans which i told you was going to be a completely separate series just focused on that technology and there have been a lot of topics that have made their way into my brain and i'm like oh i should talk about that i'm
Speaker A
like no no that's fringe that's not the 90 that isn't everything except for this idea of discovery and it comes at you many different ways in a network environment you might have a server and that server is acting up and you go
Speaker A
i wonder if that's a network issue and you think to yourself where is that plugged in or maybe you've got a bandwidth hog on the network somebody's sucking up all the internet bandwidth and you find out what ip address it is
Speaker A
from your firewall or internet reporting or however you figure out who that person is and you think oh it's the guy with the computer named bob's pc now where is bob's pc these are just two examples of hundreds that i could come up with on
Speaker A
locating devices in the network now once again i'm gonna point you back to the documentation and say if we had a full flare documentation i'm going to keep going back to that statement where we went through originally and
Speaker A
documented every port and what it was connected to a lot of those issues would resolve themselves simply by looking at the documentation but you will encounter situations where either there is no documentation or the documentation isn't updated or
Speaker A
you've got a foreign device in your network that simply wouldn't be documented the last puzzle piece that i want to give you in this series is the ability to find network devices even if you have good documentation bad documentation or no documentation at
Speaker A
all so let's come back to the situation i was mentioning just a moment ago there's a server and we want to know where it's plugged in and that's a very real situation right now we have a server at this office named
Speaker A
bbus 3001-03 now that's the host name of the windows server a lot of people call that the dns name our first milestone is to try and figure out what ip address that has sometimes it's really easy and sometimes
Speaker A
it's a challenge if you're plugged into the same network as the server you may be able to just ping it ping bbus 3001-03 in this case it comes back and says here's the server and here's its ip address the reason why
Speaker A
is because dns was able to resolve that i could also type in nslookup which is a great little utility where this server is the dns server and i could type in that hostname like that now i just typed in the name without any
Speaker A
domain after it's like well i don't know who that is i need to type in the fully qualified domain name like this and it comes back and says oh that's 10.225.1.252.
Speaker A
if all you have is a name and nslookup and ping doesn't work you're gonna have to resort to some grittier techniques like logging onto that server typing in ipconfig working with a windows admin something you can't be left completely in the dark
Speaker A
as soon as you have an ip address you're going to be able to ping that and get its mac address watch this ping 10.225.1.252 comes back and says hey i'm replying all day now the way that happens is my
Speaker A
computer actually sent out an arp message that said hey 10.25.252 what is your mac address that's a broadcast and everybody got that including the server and the server came back and said here's my mac address and then my computer
Speaker A
pinged it so my computer behind the scenes knows what the mac address of this server really is i can find that out by typing in arp dash a and it gives me a list of all the different devices that it's seen on the
Speaker A
network and the mac addresses that it's cached meaning kept in memory and right there's my server 10 25 1 252 and there is the mac address the golden piece of information i'm going to right click on that to copy
Speaker A
it to my clipboard and we need to have some kind of starting point with the switch now we've got this paper napkin network diagram that we've been building the entire time so we're very familiar with the network environment
Speaker A
but even if we're not you need to be able to get onto some switch somewhere as a starting point so again that may be a console port that may be some nitty-gritty techniques if you're just walking into a network
Speaker A
environment that you don't know but most of the time you'll find some ip address that you have to begin i'm going to start right here with suite 4 switch 2.
Speaker A
i don't know where that server is in the network but we're about to find out i'm going to open my command prompt again intelnet to 10.225.1.243 which is that switch now you can do this from the graphic interface it's just not as
Speaker A
fast and you definitely don't look as cool if somebody's looking over your shoulder i'm going to log in with the username cisco type in the password and i'm there at the prompt now i copied that server's mac address
Speaker A
to the clipboard i'm going to paste it into notepad so i don't lose it now we know this whole network we've been drawing it on the paper napkin behind us this entire series but i want you to pretend like we don't
Speaker A
imagine just like this command prompt and notepad are blocking all the diagram behind it imagine the only thing that we know is that we have this switch number two the command i'm going to type in is show mac address table and i'll hit the
Speaker A
question mark and it says you can either look at an interface to find out what mac addresses are under it a certain vlan but the one that i'm after is a specific mac address so i'll type in address and then it says well what
Speaker A
specific mac address do you want to type in now notice it's giving me the option of all these different formats that's because depending on the operating system you may see all kinds of formats of mac address some people will put dashes between them
Speaker A
that's most often windows some devices will put colons between them instead i see that all the time on linux and some devices will put periods and instead of every two characters that'll do it every four like that these are all the same thing
Speaker A
they're all a 12 character mac address it's just what format does it take now this switch is very kind to us in the sense that it accepts any one of those formats but that's why the question mark is also handy because
Speaker A
you may be on a switch platform that only takes this one or this bottom one or whatever the case so i'm going to copy that top one to the clipboard and paste it into place i hit the enter key now this switch says
Speaker A
well wait a second here this mac address is actually on port gi28 now you and i who know this network diagram immediately go no way it's not on port 28 port 28 connects to another switch but remember from this switch's perspective
Speaker A
it does see it on port 28 meaning my computer is right here somewhere i don't know what port it's on and when i pinged that device this switch saw the reply come back in port 28 so from all it knows it's thinking well that
Speaker A
server must be somewhere over there or at least from this switch's perspective it knows to reach that server i've got to go out that port but that's the behind the scenes remember you and i are not supposed to
Speaker A
know what this network looks like oh man i got a drink in it time me out let me tell that back in there so what if we didn't have this network diagram what if i mean how would we know
Speaker A
that this wouldn't be the server itself plugged into that well the first thing that i do anytime i see what port a mac address is on if i don't have a network diagram so i type in show mac address and i say
Speaker A
show me the interface gi 28 because if that truly is the server plugged in there how many mac addresses will be on that port it should just be one right so i'll hit the enter key and what do i
Speaker A
see i see a whole bunch of mac addresses on there so at that point i go ah okay okay that's that's not that's not the the port the server's plugged into that's that's a uplink port so then i
Speaker A
will go show cdp neighbors if i'm on a cisco switch and i'll say okay ah okay port 28 connects over here to port 52 of this and that's where i usually have a paper napkin next to me or at least a
Speaker A
sheet of paper and i'm starting to draw what things are connected to what so i go okay okay then the server must be over there on that switch which at least is a point in the right direction so
Speaker A
i'll type in show cdp neighbors detail and you remember if you're not on a cisco switch you can use lldp to do that or if you don't have any cdp or lldp as i'm scrolling through all this information if you don't have any of
Speaker A
that then you would move your console cable over to the next switch in the chain because you wouldn't have a simple way to figure out what's there so i scrolled to the bottom of the list and i see
Speaker A
the detail about that switch it says okay my interface gi 28 is plugged into the remote interface gi 52 now again you and i can look at this diagram and go well of course that's right 28 comes over here to 52 on that side
Speaker A
but we can't really see that what we do see is the remote i p address of that switch so i open another command prompt and i say okay let's tell that over to 10.225.1.241 which is the remote switch
Speaker A
i log in with cisco type in the password and i'll just save myself some typing time and copy that same command oh yikes this same command from here and paste it right there now it's saying okay this mac address is
Speaker A
actually on port po1 now knowing what we know about switches the chances are pretty slim that we have a lag port configured to the server now the chance is there so i'm still going to verify and i'm going to type in
Speaker A
show mac address address table interface po1 and sure enough it's not just one mac address i've got all kinds of mac addresses on there so once again i'll do a show cdp neighbors and it's going okay well i'm connected to
Speaker A
these switches now i don't see po1 in the list so we'll type in the command show interfaces port channel and hit the enter key and i go ah okay port channel 1 is really comprised of 49 and 50.
Speaker A
so 49 and 50 right here go to 49 and 50 right there okay i'm seeing how that works so i'll come back hit the up arrow and do that show cdp neighbors detail and find out okay port channel 1
Speaker A
which has this mac address right here goes to this switch up here 10.225.1.240. i'm opening another command prompt telling that 10.225.1.240. now i know you might be thinking really is it really this tedious if you don't have network diagram and
Speaker A
documentation absolutely as a matter of fact when i created the documentation nugget i posted a screen cap of the slide showing what documentation you should create to twitter and you know what's funny is somebody replied and they go well what
Speaker A
fun would that be then i wouldn't be able to use show cdp neighbors and show mac address table to figure out where stuff is now obviously he's saying it tongue-in-cheek but we all know there's so much truth in
Speaker A
that statement this is day-to-day life in a switching administrator's book did that make sense at all this is normal network engineering you know what i mean so i'm back here and now i'm going to copy that same show mac address table command out of
Speaker A
here boom right there hit the enter key paste that in and there it is okay so it's saying this is on port gi28 okay well let's do this show mac address table uh interface gi 28 enter ah look at that now i'm down to one mac
Speaker A
address this is the port that that server is plugged into so if i were to go over and unplug or shut down gi 28 this server would be unreachable i've now located that network device it is on rt st1 sw1 port
Speaker A
28 bbus 3001-03 site server you are now equipped with just about every skill i could think of you
Topics:network discoveryswitch networkdevice locationMAC addressswitchportnetwork troubleshootingCisco switch commandspingnslookupARP











