我的网络上出现2960奇怪的行为


10

我的建筑物中有一堆Cisco路由器和交换机。基本上,每个建筑物都有一个路由器和一个或多个交换机。对于每个建筑物,我仅使用两个VLAN:VLAN1是数据VLAN(也包括本地VLAN),而VLAN200是语音VLAN。每个交换机的VLAN被“连接”到其各自建筑物的路由器(802.1q)上的一个子接口,并且在每个交换机上,连接到该路由器的子接口的端口被配置为中继端口,因此我们有两个VLAN邻接。

我发现,当我尝试访问(ping)远程子网时,具有IOS 12.2的交换机可以“选择”正确的VLAN接口。所有交换机都具有192.168.X.0/24数据和10.10.X.0 /24语音功能,因此,如果我尝试ping 192.168.1.2,则该交换机使用VLAN接口(192.168.20.2)作为其源ping的接口,如果尝试ping我的呼叫管理器(10.10.254.1),则该交换机使用VLAN接口10.10.248.2作为其源。 。

使用IOS 15(新的)的交换机具有相同的配置并连接到相同类型的路由器(例如具有IOS 12.2的交换机),请不要使用正确的VLAN接口。他们总是使用语音VLAN接口(在我的情况下为200),因此,如果我希望收到远程设备的答复,则必须选择源接口(当然,这取决于远程目标子网)。由于我使用的是基本相同的配置,但在不同的地方,所以行为异常。新交换机使用“ dual-ipv4-and-ipv6”模板,旧交换机(12.2)使用“ desktop default”模板。交换机后面的计算机没有任何连接问题,因为路由器将数据包路由到正确的目的地,但是为什么交换机没有?任何的想法?

我不确定我的交换机是否支持路由,低于命令“ sh sdm preferred”的结果:

  default             Default bias
  dual-ipv4-and-ipv6  Support both IPv4 and IPv6
  lanbase-routing     Supports both IPv4 and IPv6 Static Routing
  qos                 QoS bias

这是交换机配置:

Current configuration : 9403 bytes
!
! Last configuration change at 00:09:28 UTC Mon Jun 27 2011 by admin
! NVRAM config last updated at 23:32:34 UTC Sun Jun 26 2011 by admin
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!

!
boot-start-marker
boot-end-marker
!
enable secret 5 *Removed*
!
username admin privilege 15 secret 5 *Removed*
no aaa new-model
system mtu routing 1500
!
!
ip domain-name lvdomain.local
ip name-server 192.168.0.43
ip name-server 192.168.0.45
!
mls qos map cos-dscp 0 8 16 24 32 46 48 56
mls qos srr-queue input bandwidth 70 30
mls qos srr-queue input threshold 1 80 90
mls qos srr-queue input priority-queue 2 bandwidth 30
mls qos srr-queue input cos-map queue 1 threshold 2 3
mls qos srr-queue input cos-map queue 1 threshold 3 6 7
mls qos srr-queue input cos-map queue 2 threshold 1 4
mls qos srr-queue input dscp-map queue 1 threshold 2 24
mls qos srr-queue input dscp-map queue 1 threshold 3 48 49 50 51 52 53 54 55
mls qos srr-queue input dscp-map queue 1 threshold 3 56 57 58 59 60 61 62 63
mls qos srr-queue input dscp-map queue 2 threshold 3 32 33 40 41 42 43 44 45
mls qos srr-queue input dscp-map queue 2 threshold 3 46 47
mls qos srr-queue output cos-map queue 1 threshold 3 4 5
mls qos srr-queue output cos-map queue 2 threshold 1 2
mls qos srr-queue output cos-map queue 2 threshold 2 3
mls qos srr-queue output cos-map queue 2 threshold 3 6 7
mls qos srr-queue output cos-map queue 3 threshold 3 0
mls qos srr-queue output cos-map queue 4 threshold 3 1
mls qos srr-queue output dscp-map queue 1 threshold 3 32 33 40 41 42 43 44 45
mls qos srr-queue output dscp-map queue 1 threshold 3 46 47
mls qos srr-queue output dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
mls qos srr-queue output dscp-map queue 2 threshold 1 26 27 28 29 30 31 34 35
mls qos srr-queue output dscp-map queue 2 threshold 1 36 37 38 39
mls qos srr-queue output dscp-map queue 2 threshold 2 24
mls qos srr-queue output dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55
mls qos srr-queue output dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63
mls qos srr-queue output dscp-map queue 3 threshold 3 0 1 2 3 4 5 6 7
mls qos srr-queue output dscp-map queue 4 threshold 1 8 9 11 13 15
mls qos srr-queue output dscp-map queue 4 threshold 2 10 12 14
mls qos queue-set output 1 threshold 1 100 100 50 200
mls qos queue-set output 1 threshold 2 125 125 100 400
mls qos queue-set output 1 threshold 3 100 100 100 400
mls qos queue-set output 1 threshold 4 60 150 50 200
mls qos queue-set output 1 buffers 15 25 40 20
mls qos
!
crypto pki trustpoint TP-self-signed-3287232768
 enrollment selfsigned
 subject-name cn=IOS-Self-Signed-Certificate-3287232768
 revocation-check none
 rsakeypair TP-self-signed-3287232768
!
!
crypto pki certificate chain TP-self-signed-3287232768
 certificate self-signed 01
  *Removed*
        quit
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
vlan internal allocation policy ascending
!
!
class-map match-all AutoQoS-VoIP-RTP-Trust
  match ip dscp ef
class-map match-all AutoQoS-VoIP-Control-Trust
  match ip dscp cs3  af31
!
policy-map AutoQoS-Police-CiscoPhone
 class AutoQoS-VoIP-RTP-Trust
   set dscp ef
  police 1000000 8000 exceed-action policed-dscp-transmit
 class AutoQoS-VoIP-Control-Trust
   set dscp cs3
  police 1000000 8000 exceed-action policed-dscp-transmit
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/1
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/2
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/3
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/4
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/5
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/6
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/7
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/8
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/9
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/10
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/11
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface FastEthernet0/12
 description *****IP PHONES and PC*****
 switchport voice vlan 200
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust device cisco-phone
 mls qos trust cos
 auto qos trust
 spanning-tree portfast
 service-policy input AutoQoS-Police-CiscoPhone
!
interface GigabitEthernet0/1
 description *****Trunk to FRIAS.3580.1941*****
 switchport mode trunk
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust cos
 auto qos trust
!
interface GigabitEthernet0/2
 description *****Trunk to FRIAS.3580.1941*****
 switchport mode trunk
 srr-queue bandwidth share 1 30 35 5
 queue-set 2
 priority-queue out
 mls qos trust cos
 auto qos trust
!
interface Vlan1
 description *****3580 Data VLAN 1*****
 ip address 192.168.26.2 255.255.255.0
 no ip route-cache
!
interface Vlan200
 description *****3580 Voice VLAN 200*****
 ip address 10.10.253.2 255.255.255.0
 no ip route-cache
!
ip http server
ip http authentication local
ip http secure-server
!
!
snmp-server community public RO
!
ipv6 access-list IPv6_In_Traffic_Shutdown
 deny ipv6 any any
!
!
line con 0
line vty 0 4
 logging synchronous
 login local
 length 0
line vty 5 15
 login
!
end

4
您可以从一种有效的配置中发布配置吗?
罗恩·

4
除了配置外,也许还有一个工作和非工作中的show ip路由
Todd Wilcox

交换机为L2
Abdel

@Abdel您的带有IOS 15.x的2960交换机完全有可能支持路由,这也许可以解释您所看到的内容。查看与IOS 15.0(1)2960配置IP路由思科此文件:cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/...
托德威尔考克斯

1
我在此配置中没有看到ip default-gatewayor ip route 0.0.0.0 0.0.0.0命令。如果要从交换机本身ping通,则可能是问题所在。
贾斯汀·贾恩

Answers:


1

Cisco 2960交换机是支持L3的交换机。如今,交换机通常不再局限于L2,并且路由器/交换机的描述与传统定义不符。

您缺少ip routing配置中的命令。如果添加此命令,您会发现VLAN SVI可以直接在交换机之间相互路由。可在此处找到有关此功能的更多信息: 在第3层交换机上配置VLAN间路由

但是,我在交换机上看不到任何路由配置或默认网关配置,因此我怀疑交换机本身是否可以提供任何远程网络帮助。我怀疑这里使用的是proxy-arp,而主要的类是“选择” VLAN的东西。 代理ARP


1
您至少需要IP Base许可证才能将其用作第3层交换机。如果获得LAN Base,则它是仅第2层的交换机。
罗恩·莫平

1

我的猜测是本地网络不会自动添加到路由表中。检查show ip route它们是否显示并在必要时添加本地路由。


0

交换机或路由器默认情况下使用传出接口,如果您有两个具有相同掩码的传出接口,我认为交换机使用的是最低的IP地址。我从个人经验中知道,如果您在回送上有一个32位掩码IP地址,并且您未定义源,则交换机将对所有ping使用该IP。在您的情况下,当您对除10.xxx网络之外的另一个子网中的设备执行ping操作时,您不会收到答复,因为该网关不知道其他子网,因为该网关是voip网络,因此网关仅知道voip ip地址。


0

您已经为语音VLAN配置了接口,请尝试对接口使用以下命令

switchport mode dynamic desirable
switchport voice vlan 200
duplex auto
speed auto
mls qos trust device cisco-phone
mls qos trust cos
spanning-tree portfast
no shutdown

并把ip default-gateway <ip of router interface>

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.