User Tools

Site Tools


cisco_interfaces_in_use

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cisco_interfaces_in_use [2024/01/12 20:18] walkeradmincisco_interfaces_in_use [2024/01/12 20:37] (current) – [Show the Mac Address Table] walkeradmin
Line 5: Line 5:
 ---- ----
 ==== Introduction ==== ==== Introduction ====
-A really useful task to perform when looking at remote systems is to see what interfaces on a Cisco Switch are in use (as in connected). Lets look at how to see what interfaces we are using:+A really useful task to perform when looking at remote systems is to see what interfaces on a Cisco Switch are in use (as in connected). 
 \\  \\ 
 +==== Interface Status ====
 +Lets look at how to see what interfaces we are using: <color #ed1c24>sh interfaces status</color> This has to be performed from the top level, same part of the Cisco menu you would do <color #ed1c24>sh vlan br</color> for instance.
 \\  \\ 
 <file> <file>
Line 61: Line 63:
 Gi0/48                       notconnect              auto   auto Not Present Gi0/48                       notconnect              auto   auto Not Present
 </file> </file>
-In the above example+In the above example above we can see that there are 9 interfaces in use, and we can see the following information for each interface:  
 +\\  
 +<file> 
 +Port      Name               Status       Vlan       Duplex  Speed Type 
 +Gi0/1                        connected    2          a-full a-1000 10/100/1000BaseTX 
 +</file> 
 +\\  
 +The following is what each field means: 
 +<file> 
 +Port - This is the interface number on the switch 
 +Name -  This only shows if any names have been assigned, generally they are not. 
 +Status - Connected. 
 +VLAN - What VLAN the interfaces is currently in. 
 +DUPLEX -  a-full (automatic-full) 
 +SPEED - a-1000 (auto 1000) 
 +TYPE - 10/100/1000BaseTX (this interface supports 10Mb/s / 100Mbs and 1GBs) 
 +</file> 
 +\\  
 +\\  
 +---- 
 +==== Show the Mac Address Table ==== 
 +We can use the following to show what MAC Addresses are present on each interface. If you have an interface that is connected to another switch then you will see all MAC addresses from that switch interface. 
 +\\  
 +<file> 
 +sh mac address-table 
 + 
 +Vlan    Mac Address       Type        Ports 
 +----    -----------       --------    ----- 
 + All    0100.0ccc.cccc    STATIC      CPU 
 + All    0100.0ccc.cccd    STATIC      CPU 
 + All    0180.c200.0000    STATIC      CPU 
 + All    0180.c200.0001    STATIC      CPU 
 + All    0180.c200.0002    STATIC      CPU 
 + All    0180.c200.0003    STATIC      CPU 
 + All    0180.c200.0004    STATIC      CPU 
 + All    0180.c200.0005    STATIC      CPU 
 + All    0180.c200.0006    STATIC      CPU 
 + All    0180.c200.0007    STATIC      CPU 
 + All    0180.c200.0008    STATIC      CPU 
 + All    0180.c200.0009    STATIC      CPU 
 + All    0180.c200.000a    STATIC      CPU 
 + All    0180.c200.000b    STATIC      CPU 
 + All    0180.c200.000c    STATIC      CPU 
 + All    0180.c200.000d    STATIC      CPU 
 + All    0180.c200.000e    STATIC      CPU 
 + All    0180.c200.000f    STATIC      CPU 
 + All    0180.c200.0010    STATIC      CPU 
 + All    ffff.ffff.ffff    STATIC      CPU 
 +      0025.b4bc.2901    DYNAMIC     Gi0/
 +      74fe.4857.6d4a    DYNAMIC     Gi0/
 +      74fe.4857.72a5    DYNAMIC     Gi0/
 +      a4bf.0169.b7af    DYNAMIC     Gi0/
 +      a4bf.016a.d0eb    DYNAMIC     Gi0/
 +      74fe.4857.6d4c    DYNAMIC     Gi0/33 
 +      74fe.4857.72a7    DYNAMIC     Gi0/34 
 +      74fe.4828.799d    DYNAMIC     Gi0/45 
 +      74fe.4828.c136    DYNAMIC     Gi0/45 
 +      9418.8266.b82c    DYNAMIC     Gi0/45 
 +      9418.8266.b82d    DYNAMIC     Gi0/45 
 +      a4bf.0169.b7ad    DYNAMIC     Gi0/45 
 +      a4bf.016a.d0e9    DYNAMIC     Gi0/45 
 +</file> 
 +\\  
 +I want to look at this specific interface: 
 +<file> 
 +Vlan    Mac Address       Type        Ports 
 +2       a4bf.0169.b7af    DYNAMIC     Gi0/
 +</file> 
 +It can be seen that this is interface 5 on our Cisco, that is in VLAN2 and there is a device connected to it with the MAC Address <color #ed1c24>a4-bf-01-69-b7-af</color>
 +\\  
 +\\  
 +I have logged in to the server that I know is connected to this interface (the servers eno3 is connected) and if I run the command (Linux): 
 +\\  
 +<file> 
 +ip a show eno3 
 + 
 +5: eno3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master data-out state UP group default qlen 1000 
 +    link/ether a4:bf:01:69:b7:af brd ff:ff:ff:ff:ff:ff 
 +    altname enp61s0f2 
 +</file> 
 +We can see that the link/ether address is listed as: a4:bf:01:69:b7:af 
 +\\  
 +\\  
 +==== Look for a specific MAC Address ==== 
 +Because there could be many MAC addresses present on an interface when you use the command <color #ed1c24>sh mac address-table</color> we can use a simple filter to only show what we require: (remember, our last search revealed that the MAC Address on Gi05 ended in 'af' 
 +\\  
 +<file> 
 +sh mac address-table | incl af 
 + 
 +Now the only result we get back is this: 
 +2    a4bf.0169.b7af    DYNAMIC     Gi0/
 +</file> 
 +We may not know what MAC we are looking for, but if we  do this is very useful. 
 +\\  
 +\\ 
  
cisco_interfaces_in_use.1705090684.txt.gz · Last modified: 2024/01/12 20:18 by walkeradmin