Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Flexible assignment of UDP port numbers for decapsulation

Want to summarize with AI?

Log in

This topic describes flexible assignment of UDP port numbers for Generic UDP Encapsulation (GUE) decapsulation on the Cisco 8000 Series Router, which lets you assign UDP port numbers from 1000 through 64000 to decapsulate IPv4, IPv6, and MPLS packets.


This feature provides decapsulation support for GUE packets. In GUE, the payload is encapsulated in an IP packet—IPv4 or IPv6 carrier. The UDP header is added to provide extra hashing parameters and optional payload demultiplexing. At the decapsulation node, the carrier IP and UDP headers are removed, and the packet is forwarded based on the inner payload. Prior to Release 7.3.3, packets were decapsulated using UDP port numbers 6080, 6615, and 6635 for IPv4, IPv6, and MPLS payloads respectively. Starting from Release 7.3.3, you can assign UDP port numbers from 1000 through 64000 to decapsulate IPv4, IPv6, and MPLS packets. Define different port numbers for IPv4, IPv6, and MPLS.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

Flexible Assignment of UDP Port Numbers for Decapsulation

Release 25.4.1

Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*)

*This feature is supported on:

  • 8011-32Y8L2H2FH

  • 8011-12G12X4Y-A/D

Flexible Assignment of UDP Port Numbers for Decapsulation

Release 25.1.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100], 8010 [ASIC: A100])(select variants only*)

*This feature is supported on:

  • 8712-MOD-M

  • 8011-4G24Y4H-I

Flexible Assignment of UDP Port Numbers for Decapsulation

Release 24.4.1

Introduced in this release on: Fixed Systems (8200 [ASIC: P100], 8700 [ASIC: P100])(select variants only*); Modular Systems (8800 [LC ASIC: P100])(select variants only*)

*This feature is now supported on:

  • 8212-48FH-M

  • 8711-32FH-M

  • 88-LC1-12TH24FH-E

  • 88-LC1-36EH

  • 88-LC1-52Y8H-EM

Flexible Assignment of UDP Port Numbers for Decapsulation

Release 7.3.3

This feature gives you the flexibility to assign UDP port numbers from 1000 through 6400 through which IPv4, IPv6, and MPLS packets can be decapsulated. Such flexibility allows you to segregate the ingress traffic based on a QoS policy.

In earlier releases, you could assign only default ports for decapsulation.

The following command is introduced for this feature: hw-module profile gue udp-dest-port ipv4 port-number ipv6 port-number mpls port-number .


Guidelines for setting up decapsulation using flexible port numbers

Apply these guidelines when assigning flexible port numbers for decapsulation:

Packet

IPv4

IPv6

MPLS

UDP outer header

Configure IPv4 port on the hardware module.

Configure IPv6 port on the hardware module.

Configure MPLS port on the hardware module.

Encapsulation outer header

Configure an IPv4 encapsulation outer header that matches with the class map source.

Inner payload

Packets are forwarded based on the inner IPv4 payload.

Packets are forwarded based on the inner IPv6 payload.

Packets are forwarded based on the inner MPLS payload.

Note
  • During the decapsulation of the IPv4, IPv6, and MPLS packets, the following headers are removed:

    • The UDP outer header

    • The IPv4 encapsulation outer header

  • Select different values for each of these protocols. Valid port numbers are from 1000 through 64000.


Restrictions for flexible UDP port assignment

These restrictions apply when configuring unique GUE destination port numbers to decapsulate IPv4, IPv6, and MPLS packets using UDP:

  • While configuring the tunnel, select one of the following:

    • Match only 16 unique source IP addresses, as shown in this example:

      Router(config-cmap)# match source-address ipv4 210.100.20.0 255.255.255.255
    • Match a combination of 64 unique source and destination IP addresses, as shown in this example:

      Router(config-cmap)# match destination-address ipv4 220.100.20.0 255.255.255.255
      Router(config-cmap)# match source-address ipv4 210.100.20.0 255.255.255.255
  • The Classless Inter-Domain Routing (CIDR) value in the source IP address subnet mask must be only /32.

  • The destination address subnet mask supports all CIDR values. However, the destination address, along with the subnet mask, must be unique for all three UDP payload types—IPv4, IPv6, and MPLS. The configuration fails when the destination IP address and the subnet mask are the same for all three payloads, as seen in this example:

    Router(config)# class-map type traffic match-all SRTE-GUE-DECAP-IPv4
    Router(config-cmap)# match destination-address ipv4 10.216.101.0 255.255.255.255
    ..
    Router(config)# class-map type traffic match-all SRTE-GUE-DECAP-IPv6
    Router(config-cmap)# match destination-address ipv4 10.216.101.0 255.255.255.255
    ..
    Router(config)# class-map type traffic match-all SRTE-GUE-DECAP-MPLS
    Router(config-cmap)# match destination-address ipv4 10.216.101.0 255.255.255.255
    ..

Configure port numbers for decapsulation

By configuring different port numbers on the destination router, you can match and direct traffic to different paths. For example, traffic for a specific video service can be decapsulated and sent through different ports.

Note

For the hardware module flexible port configuration to take effect, you must reload the line card.

Procedure

1.

Configure the UDP destination ports for decapsulation of the required IPv4, IPv6, and MPLS payloads.

Example:

Router# configure
Router# hw-module profile gue udp-dest-port ipv4 1001 ipv6 1002 mpls 1003
2.

Configure the traffic classes to match the destination ports.

Example:

Router# configure
Router(config)# class-map type traffic match-all udp-v4
Router(config-cmap)# match protocol udp
Router(config-cmap)# match source-address ipv4 210.100.20.0 255.255.255.255
Router(config-cmap)# match destination-address ipv4 220.100.20.0 255.255.255.255
Router(config-cmap)# match destination-port 1001
Router(config-cmap)# end-class-map
Router(config)# commit

Router(config)# class-map type traffic match-all udp-v6
Router(config-cmap)# match protocol udp
Router(config-cmap)# match destination-address ipv4 220.100.20.0 255.255.255.255
Router(config-cmap)# match source-address ipv4 210.100.20.0 255.255.255.255
Router(config-cmap)# match destination-port 1002
Router(config-cmap)# end-class-map
Router(config)# commit

Router(config)# class-map type traffic match-all udp-mpls1
Router(config-cmap)# match protocol udp
Router(config-cmap)# match destination-address ipv4 220.100.20.0 255.255.255.255
Router(config-cmap)# match source-address ipv4 210.100.20.0 255.255.255.255
Router(config-cmap)# match destination-port 1003
Router(config-cmap)# end-class-map
Router(config)# commit
3.

Define a policy map and associate the traffic class with the traffic policy.

Example:

Router(config)# policy-map type pbr magic-decap
Router(config-pmap)# class type traffic udp-v4
Router(config-pmap-c)# decapsulate gue variant 1
Router(config-pmap-c)# exit
Router(config-pmap)# class type traffic udp-v6
Router(config-pmap-c)# decapsulate gue variant 1
Router(config-pmap-c)# exit
Router(config-pmap)# class type traffic udp-mpls1
Router(config-pmap-c)# decapsulate gue variant 1
Router(config-pmap-c)# exit
Router(config-pmap)# class type traffic class-default
Router(config-pmap-c)# exit
Router(config-pmap)# end-policy-map
Router(config)# commit
Router(config)# exit
4.

Apply the policy for each VRF.

Example:

Router# configure
Router(config)# vrf-policy
Router(config-vrf-policy)# vrf default address-family ipv4 policy type pbr input magic-decap
Router(config-vrf-policy)# commit
5.

Run the show ofa objects sys location 0/0/CPU0 | inc gue command in XR Config mode to verify that the unique GUE port numbers have been configured to decapsulate IPv4, IPv6, and MPLS payloads.

Example:

Router# show ofa objects sys location 0/0/CPU0 | inc gue
uint32_t gue_ipv4_port => 1001
uint32_t gue_ipv6_port => 1002
uint32_t gue_mpls_port => 1003