09-27-2013 09:57 AM - edited 03-07-2019 03:42 PM
When auditing a switch to determine if a vlan is being used, or needs to be present, i can do a "sh vlan brief" to see what ports are assigned to what vlan. what I would like to see more is when a switchport is active in a vlan, how can i retrive the IP address associated with that port. ie..if port fa0/44 is connected and assigned to vlan800, how can I then find the IP that is using that switch port.
09-28-2013 12:17 PM
Hi,
a port on a switch can't have an IP address unless it is a L3 port( with no switchport command), the only interface having an IP on a switch can be a SVI or Vlan interface or a loopback address.If it is a Vlan interface then it has the same vlan id and then all trunk ports with this vlan not pruned or every interface in access mode in this vlan can use this IP if the switch is doing inter vlan routing.
Regards
Alain
Don't forget to rate helpful posts.
09-30-2013 05:20 AM
Hi,
for layer 2: you assign IP address to the created vlans in your swtich vlan database. by then you may assign the required ports to the specific vlans ans this is depending on your requiredment. also you can creat many vlans in your switch.
for Layer 3 you can directly assign the IP address to the interface that connected to the different networks, LAN/WAN.
please let me know if this is not cleare.
regards,
10-02-2013 07:24 AM
I think you can use show mac-address-table on your switch and then notic the mac address which is learned on that port (For example Port Fa 0/44), After that you can use show arp in order to understand the IP Address that is using Port Fa 0/44. That's it.
10-06-2013 07:40 PM
Hi
Like they said a switchport doesn't have ip addresses. Then any of the ports in the show vlan will have an ip address, Now if you have a port in vlan 800, and you know what is the network address for vlan 800 you may guess that the host connected to that switchport is within the range of available ip addresses.
If you want to see what ip address are assinged locally to your switch, then run the command
"Show ip interface br | ex una"
"Show ip alias"
Regards.
Wilson B.
11-22-2013 11:44 AM
Hey p-allen,
Try this and see if it works for you.
Getting the IP Address of devices connected to a Layer 2 switch (C2960 & C3750).
conf t
ip device tracking
interface range g1/0/1 - 48
ip device tracking max 10
end
---- Wait for approximately 10 seconds ----
sh ip device tracking interface
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide