10

I have a bunch of Cisco routers and switches in our buildings. Basically, every building has one router and one or more switches. I use just two VLANs for each building: VLAN1 is the data VLAN (native as well) and VLAN200 is the voice VLAN. Each switch’s VLAN is “connected” to a subinterface on its respective building’s router (802.1q), and on every switch, the port connected to the router’s subinterface is configured as a trunk port, so we have two VLANs adjacency.

The thing is, I noticed, switches with IOS 12.2, can “choose” the correct VLAN interface when I try to reach (ping) a remote subnet. All switches have 192.168.X.0/24 for data and 10.10.X.0 /24 for voice, so if I try to ping 192.168.1.2, the switch uses the VLAN interface (192.168.20.2) as its source ping’s interface, and if I try to ping my Call Manager (10.10.254.1), the switch uses VLAN interface 10.10.248.2 as its source.

Switches with IOS 15 (new ones), with the same configuration and connected to the same kind of routers (like switches with IOS 12.2), don’t use the correct VLAN interface. They always use the voice VLAN interface (200 in my case), so I have to choose the source interface if I want to expect a reply from the remote device (of course depending on the remote destination subnet). Strange behavior since I am using basically the same configuration but in different places. New switches use “dual-ipv4-and-ipv6” template and the old ones (12.2) use “desktop default” template. Computers behind the switches do not have any connectivity issue because the router routes the packets to the correct destination, but why the switches do not? Any idea?

I am not sure if my switches support routing, below the result of the command "sh sdm prefer":

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

This is the switch configuration:

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
    Can you post the config from one that works and one that doesn't? – Ron Trunk Jul 22 '15 at 17:43
  • 4
    In addition to configs, maybe a show ip route from a working and non-working one? – Todd Wilcox Jul 22 '15 at 17:49
  • Switches are L2 – Abdel Jul 22 '15 at 18:06
  • @Abdel It is entirely possible that your 2960 switches with IOS 15.x support routing, and this might explain what you're seeing. See this document from Cisco on configuring IP routing on 2960 with IOS 15.0(1): cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/… – Todd Wilcox Jul 22 '15 at 18:28
  • 1
    I didn't see an ip default-gateway or ip route 0.0.0.0 0.0.0.0 command in this config. If you are pinging from the switch itself, this could be the issue. – Justin Jahn Jul 23 '15 at 23:15
1

The Cisco 2960 switch is a L3 capable switch. Today switches are usually no longer confined to L2 and the router/switch delineation is blurred from the traditional definitions.

You are missing the ip routing command from your config. If you add this command you will find that the VLAN SVIs can route directly between each other on the switch. More information on this feature can be found here: Configure InterVLAN Routing on Layer 3 Switches

However I do not see any routing configuration or default gateway configured on your switch whatsoever, so I doubt that the switch itself could reach any remote network assistance. I suspect that proxy-arp is what is being used here and the major classes are what is 'choosing' the VLAN. Proxy ARP

| improve this answer | |
  • 1
    You need at least the IP Base license to use it as a layer-3 switch. If you get LAN Base, it is a layer-2-only switch. – Ron Maupin Aug 19 '16 at 0:12
1

My guess is the local networks aren't added to the routing table automatically. Check show ip route whether they show up and add the local routes if necessary.

| improve this answer | |
0

the switch or router uses by default the outgoing interface, if you have two outgoing interfaces with the same mask, I think the switch uses the lowest ip address. I know from personal experience that, if you have a 32 bit mask ip address on a loopback the switch will use that ip for all pings if you dont define the source. In your case when you ping a device that is on another subnet than the 10.x.x.x network you dont get a reply because that gateway is not aware of other subnets, since its a voip network that gateway is only aware of voip ip addresses.

| improve this answer | |
0

you have configured theinterfaces for voice vlan, please try to use below command for interfaces

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

and also put ip default-gateway <ip of router interface>.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.