On-Change Notifications for L2VPN Pseudowire

Table 1. Feature History

Feature Name

Release Information

Description

On-Change Notifications for L2VPN Pseudowire

Cisco IOS XE Bengaluru 17.5.1

This feature allows you to subscribe on-change Network Configuration Protocol (NETCONF) notifications for L2VPN pseudowire. You can generate an alert from a device when the pseudowire status changes.

Prior to Cisco IOS XE Bengaluru Release 17.5.1, it was not possible to externalize the internal IOS state for operational data. Thus, the on-change notifications were not generated for any change of state.

Starting with Cisco IOS XE Bengaluru Release 17.5.1, you can access the internal IOS state of the router to configure or view the running state of the router. The feature allows the externalization of the internal state of the router for the operational data. It helps in sending on-change notifications to the receiver for any chang of state, for example, when the pseudowire goes up or down. Thus, you can generate on-change NETCONF notifications for L2VPN pseudowire.

Use the Cisco-IOS-XE-l2vpn-pw-events operational module to configure the feature. The notification event and event data are included in the operational module.

IOS State

The IOS state can be divided into the following conceptual groups:

  • Configuration or configuration state includes:

    • Feature default configuration state (use show running-config all command with no user configuration)

    • Non-default configuration state (use show running-config command)

    • Nonvisible non-persistent feature configuration state (subscriber profiles)

  • Operational state includes:

    • Feature state that is not configuration state (pseudowire status)

Telemetry and L2VPN Pseudowire

Telemetry is the process of measuring the state of the components in a system and transmitting it to a remote location for further processing and analysis. Event-driven Telemetry (EDT) optimizes data collected at the receiver by streaming data only when a state transition occurs (for example, stream data only when an interface state transitions, IP route updates, and so on).

For L2VPN pseudowire, the on-change notifications are sent when the pseudowire state changes with link flaps, configuration delete or add, and so on. For more information on the Telemetry feature, see the Programmability Configuration Guide, Cisco IOS XE Bengaluru 17.4.x.

The following events are supported:
  • L2VPN Pseudowire status is up

  • L2VPN Pseudowire status is down

  • VPLS status is up

  • VPLS status is down

Configuration Examples: On-Change Notifications for L2VPN Pseudowire

The following examples show the configurations for on-change notifications for L2VPN Pseudowire:

On Router PE1:

Configuration for L2VPN Xconnect:

interface pseudowire1
encapsulation mpls
neighbor 2.2.2.2 1
!
interface pseudowire2
encapsulation mpls
neighbor 3.3.3.3 2
!
interface gi0/2/0
service instance 10 ethernet
encapsulation dot1q 10
rewrite ingress tag pop 1 symmetric
!
l2vpn xconnect context test
member pseudowire1 group 1 priority 1
member pseudowire2 group 2 priority 2
member gi0/2/0 service-instance 10

Sample Telemetry Configuration for Notification:

telemetry ietf subscription 1
encoding encode-tdl
filter tdl-uri /services;serviceName=iosevent/q_pw_session_state
stream native
update-policy on-change
receiver ip address x.x.x.x 45000 protocol native

Verification of On-Change Notifications for L2VPN Pseudowire Configuration

Establish Subscription via NETCONF for On-Change Notifications:

The following output displays the subscription creation and establishment that captures pseudowire events via NETCONF:

<establish-subscription
xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"
xmlns:cyp="urn:cisco:params:xml:ns:yang:cisco-xe-ietf-yang-push-ext">
<stream>cyp:yang-notif-native</stream>
<yp:xpath-filter>/l2vpn-pw-ios-xe-events:l2vpn-pw-vc-status</yp:xpath-filter>
<yp:dampening-period>0</yp:dampening-period>
</establish-subscription>

Confirm Subscription Establishment:

This following output confirms subscription requested for events via NETCONF. This captures the pseudowire events when there is any change in the pseudowire state.

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
<subscription-result xmlns="urn:ietf:params:xml:ns:yang:ietf-event- notifications" xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">notif-bis:ok</subscription-result>
<subscription-id xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications">2147483670</subscription-id>
</rpc-reply>

The output below shows the verification of on-change notifications for L2VPN psuedowire state configuration.

The following output shows when pseudowire goes Down:

<?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2020-08-25T07:32:35.52Z</eventTime>
<l2vpn-pw-vc-status xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-l2vpn-pw-events">
<vc-status>pw-vc-down</vc-status>
<vc-id>1022</vc-id>
<peer-ip>1.1.1.2</peer-ip>
</l2vpn-pw-vc-status>
</notification>

The following output shows when pseudowire comes Up:

<?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2020-08-25T07:55:35.52Z</eventTime>
<l2vpn-pw-vc-status xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-l2vpn-pw-events">
<vc-status>pw-vc-up</vc-status>
<vc-id>1022</vc-id>
<peer-ip>1.1.1.2</peer-ip>
</l2vpn-pw-vc-status>
</notification>