Introduction
This document describes the behavioural difference between Aggregation Services Routers 1000 series (ASR1K) and Integrated Services Routers 4000 series (ISR4K) routers in accounting for input and output packets when a sub-interface is configured with encapulation dot1q even though they run the same IOS-XE software.
Contributed by Venkat Ramasamy Kannan, Cisco TAC Engineer.
Prerequisites
Requirements
Cisco recommends that you have knowledge of ASR1K and ISR4K routers along with basic vlan and sub-interface tagging concepts.
Components Used
This document is not restricted to specific software and hardware versions.
However, The information in the document is created using the below hardware.
- ASR 1006 running IOS-XE 3.13.3S
- ISR 4321 running IOS-XE 3.16.0C
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Configure
Default Behaviour - ASR 1006
Config
!
interface GigabitEthernet0/0/1
no ip address
load-interval 30
negotiation auto
!
interface GigabitEthernet0/0/1.1115
encapsulation dot1Q 1115 native
ip address 192.168.2.1 255.255.255.0
!
Input and Output Counters
R-ASR1006-2#show vlans dot1q 1115
Total statistics for 802.1Q VLAN 1115:
4021 packets, 241260 bytes input <-- counter is very low (and frozen)
10 packets, 420 bytes output <-- counter is very low (and frozen)
0 oversubscription packet drops
However these counters seem to be wrong because this is the only sub-interface under the physical interface, and there is a huge mismatch in the values.
NR-ASR1002-2#sh int gigabitEthernet 0/0/1
GigabitEthernet0/0/1 is up, line protocol is up
<trunc>
2429325386 packets input, 1438158021764 bytes, 0 no buffer
2429263775 packets output, 1438124149520 bytes, 0 underruns
<trunc>
Default Behaviour - ISR4321
Config
!
interface GigabitEthernet0/0/1
no ip address
load-interval 30
negotiation auto
!
interface GigabitEthernet0/0/1.3503
encapsulation dot1Q 1115 native
ip address 57.211.249.6 255.255.255.252
!
Input and Output Counters
ISR4321-1#show vlans dot1q 3503
Total statistics for 802.1Q VLAN 3503:
141584463 packets, 101578951916 bytes input
142482559 packets, 45106997466 bytes output
ISR4321-1#show int gig 0/1
<trunc>
141584583 packets input, 2794771512 bytes, 0 no buffer
142609327 packets output, 2166121790 bytes, 0 underruns
<trunc>
ISR4321-1#
Values between physical interface gig0/1 and the subinterface gig0/1.3503 match.
Reason for the Behavioural Difference
The reson for this behavioural difference between ASR1K and ISR4K even though they run the same IOS-XE is that, when encap dot1q 10 native is configured, the stats are grabbed from the data-plane. However in ASR1K, the stats are grabbed from the Shared Port Adaptor (SPA) hardware and the SPA is not as intelligent as the data-plane processor, so it doesn't know how to count untagged packets against a specific vlan.
Configuration/Workaround
In order to make the ASR1K work like the ISR4K, you should count the packets at the data-plane level like the ISR4k.The way to do that is to configure this on the ASR.
Router(config)# hw-module subslot x/y ethernet vlan unlimited
Warning: This command must be used with caution. Once this is enabled, the SPA stops doing the packet classification. So, if the router is already in an over-subscribed scenario, any packet (high or low priority, because the packets are not classified anymore) could be dropped
Verify
Counters on the ASR after configuration is added
R-ASR1006-2#show int giga 0/1
<trunc>
2429657821 packets input, 1438159132874 bytes, 0 no buffer
2429643228 packets output, 1438125250620 bytes, 0 underruns
<trunc>
R-ASR1006-2# R-ASR1006-2#show vlans dot1q 1115
Total statistics for 802.1Q VLAN 1115:
2429657834 packets, 1438159133962 bytes input
2429643241 packets, 1438125251511 bytes output