取消
显示结果 
搜索替代 
您的意思是: 
cancel
17210
查看次数
16
有帮助
11
回复

求教最快速查看交换机各端口当前设备IP地址的命令组合

fengxue801568
Level 1
Level 1
求教最快速查看交换机各端口当前设备IP地址的命令组合。
因为单位有大量的POE交换机,也使用了大量的IP话机(Avaya),交换机端口都配置了data VLAN和voice VLAN,有些端口接两个设备(先连接到话机,话机上有网口再连接电脑),话机和电脑都是DHCP,但是获取的地址网段不同;有些端口则只连接了一台电脑。
问题来了,如何快速从交换机上查看到所有端口,哪些连接了话机和电脑,哪些只连接了电脑,它们的IP地址分别是什么?
附上接入交换机的端口配置
vlan internal allocation policy ascending
!
vlan 100
name Video_Conference
!
vlan 200
name PBX
!
!
!
!
!
!
!
!
!
!
!
interface Port-channel10
switchport mode trunk
speed nonegotiate
!
interface FastEthernet0
no ip address
shutdown
!
interface GigabitEthernet1/0/1
switchport mode access
switchport voice vlan 200
switchport port-security maximum 2
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
macro description cisco-desktop | cisco-desktop
spanning-tree portfast
spanning-tree bpduguard enable
!
interface GigabitEthernet1/0/2
switchport mode access
switchport voice vlan 200
switchport port-security maximum 2
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
macro description cisco-desktop | cisco-desktop
spanning-tree portfast
spanning-tree bpduguard enable
!
interface GigabitEthernet1/0/25
description link to 3850_Coreswitch
switchport mode trunk
speed nonegotiate
channel-group 10 mode on
!
interface GigabitEthernet1/0/26
description link to 3850_Coreswitch
switchport mode trunk
speed nonegotiate
channel-group 10 mode on
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface Vlan1
ip address 10.12.124.57 255.255.252.0
no ip route-cache
!
1 个已接受解答

已接受的解答

suyan
Spotlight
Spotlight
show ip arp 找出 ip地址对应的mac地址
show mac address-table 找出 MAC地址对应的接口
把两部分信息放到excel里,已mac地址排序,就能对应起来了。

在原帖中查看解决方案

11 条回复11

suyan
Spotlight
Spotlight
show ip arp 找出 ip地址对应的mac地址
show mac address-table 找出 MAC地址对应的接口
把两部分信息放到excel里,已mac地址排序,就能对应起来了。

gejunyu
Spotlight
Spotlight
show arp可以看下

fengxue801568
Level 1
Level 1
gejunyu 发表于 2018-12-7 13:07
show arp可以看下

很多在用的设备IP地址用show arp看不到的。

stoneyeye
Level 1
Level 1
show ip int b lollol

完全感觉
Spotlight
Spotlight
show ip arp?
show cdp nei 不过这个是针对思科的话机,SEP开头

sumingwang
Level 1
Level 1
show ip source binding,会显示该交换机所连的所有设备的动态ip地址。

zhengwei272
Spotlight
Spotlight
show ip int bri
show ip source bind
show ip dhcp bind
show ip arp dynamic
差不多就这些吧。。

wuhao0015
Spotlight
Spotlight
show ip inter brief
show ip dh b
show ip arp
show mac address-table
show inter status
show inter brief

gejunyu
Spotlight
Spotlight
fengxue801568 发表于 2018-12-8 03:18
很多在用的设备IP地址用show arp看不到的。

那就show mac address-table然后根据mac地址去查arp

one-time
Level 13
Level 13
如果楼主问题已解决,记得标注最佳答案哦,也是对热心解答的小伙伴们的认可。最佳答案按钮在回复贴的右下角哦~
:handshake 感谢各位专家解答,谢谢!

fengxue801568
Level 1
Level 1
sumingwang 发表于 2018-12-11 15:19
show ip source binding,会显示该交换机所连的所有设备的动态ip地址。

cnzbsw01-20-01#show ip source binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
Total number of bindings: 0
cnzbsw01-20-01#
没有哦,:lol
入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接