Mapping of Address and Port Using Encapsulation

The MAP-E feature provides rules to define the mapping between an IPv6 prefix and an IPv4 address or between a shared IPv4 address and an IPv6 prefix/address. The MAP-E feature is supported by the Stateless NAT64 feature and does not change the system flow of the NAT64 client.

Feature Information for Mapping of Address and Port Using Encapsulation

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Table 1. Feature Information

Feature Name

Releases

Feature Information

MAP-E

Cisco IOS XE Amsterdam 17.2.1

The MAP-E feature provides support for configurable rules used to define the mapping between an IPv6 prefix and an IPv4 address or between a shared IPv4 address and an IPv6 prefix/address.

The following commands were introduced or modified: basic-mapping-rule , default-mapping-rule , nat64 map-e, port-parameters , show nat64 map-e .

Restrictions for Mapping of Address and Port Using Encapsulation

  • The MAP-E feature supports only a single basic mapping rule (BMR) per IPv6 prefix. This requires you to configure different mapping rules for every address and port translation.

  • Default mapping rule (DMR) with 128 prefix must be configured before starting the MAP-E BMR configuration.

  • This feature does not support BMR prefix length of 64, fragmentation, and local packet generation.

Information About Mapping of Address and Port Using Encapsulation

Mapping of Address and Port Using Encapsulation

MAP-E refers to Mapping of Address and Port Encapsulation (MAP-E). The MAP-E feature enables you to configure mapping rules for translation between IPv4 and IPv6 addresses. Each mapping of address and port using MAP-E domain uses a different mapping rule. A MAP-E configuration comprises of one basic mapping rule (BMR), one default mapping rule (DMR), and one or more forwarding mapping rules (FMRs) for each MAP-E domain.

A BMR configures the MAP IPv6 address or prefix. You can configure only one BMR per IPv6 prefix. The MAP-E CE uses the BMR to configure itself with an IPv4 address, an IPv4 prefix, or a shared IPv4 address from an IPv6 prefix. A BMR can also be used for forwarding packets in such scenarios where an IPv4 source address and source port are mapped into an IPv6 address/prefix. Every MAP-E node (CE device is a MAP-E node) must be provisioned with a BMR. The BMR prefix along with the port parameter is used as tunnel source address. You can use the port-parameters command to configure port parameters for the MAP-E BMR.

A DMR prefix which matches with the interface address is recognized as hosts and a DMR prefix with a prefix length of 128 is recognized as the tunnel source address. A border relay IPv6 address is used as the tunnel destination address.

How to Configure Mapping of Address Port Using Encapsulation

Configuring Mapping of Address and Port Using Encapsulation

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. nat64 map-e domain number
  4. border-relay-address br-ipv6-address
  5. basic-mapping-rule
  6. ipv4-prefix ipv4-prefix/length
  7. ipv6-prefix ipv6-prefix/length
  8. port-parameters share-ratio number port-offet-bits number start-port port-number no-eabits number
  9. port-set-id number
  10. exit
  11. end

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

nat64 map-e domain number

Example:

Device(config)# nat64 map-e domain 01

Specifies the nat64 MAP-E domain and enters the MAP-E configuration mode.

  • The range is from 1 to 128.

Step 4

border-relay-address br-ipv6-address

Example:

Device(config)# border-relay-address 2002:DB8::9

Specifies the IPv6 address of the border relay router.

Step 5

basic-mapping-rule

Example:

Device(config-nat64-mape)# basic-mapping-rule

Specifies the MAP-E mapping rule and enters the basic mapping rule configuration mode.

Step 6

ipv4-prefix ipv4-prefix/length

Example:

Device(config-nat64-mape-bmr)# ipv4-prefix
10.1.1.0/24

Specifies the IPv4 prefix and length for translation.

Step 7

ipv6-prefix ipv6-prefix/length

Example:

Device(config-nat64-mape-bmr)# ipv6-prefix
2001:100::0/64

Specifies the IPv6 prefix and length for translation.

Step 8

port-parameters share-ratio number port-offet-bits number start-port port-number no-eabits number

Example:

Device(config-nat64-mape-bmr)# port-parameters
share-ratio 2 port-offset-bits 5 start-port 1024

Specifies the values for port-parameters share-ratio, contiguous ports and start-port for MAP-E Basic Mapping Rule (BMR).

  • If the share ratio is greater than 1, the configuration throws an error if the startport value is incorrect. The calculation is based on the share-ratio and port-offset bits. The configuration throws error and displays the value to be configured.

  • If the share ratio is 1, there are no port-offset bits as the values is automatically set to 6 and the start port is set to 1024.

Step 9

port-set-id number

Example:

Device(config-nat64-mape-bmr)# port-set-id 1

Specifies the port-set identifier.

Step 10

exit

Example:

Device(config-nat64-mape-bmr)# exit

Exits basic mapping rule configuration mode and returns to MAP-E configuration mode.

Step 11

end

Example:

Device(config)# end

Exits MAP-E configuration mode and returns to privileged EXEC mode.

Verifying Mapping of Address and Port Using Encapsulation Configuration

SUMMARY STEPS

  1. enable
  2. show nat64 MAP-E [domain number ]

DETAILED STEPS


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

show nat64 MAP-E [domain number ]

Example:

Device# show nat64 MAP-E domain 1
  MAP-E Domain 1
   Mode MAP-E
   Default-mapping-rule
      Ip-v6-prefix 2001:22::/128
   Basic-mapping-rule
      Ip-v6-prefix 2001:100::/64
      Ip-v4-prefix 10.1.1.0/24
      Port-parameters
         Share-ratio 2   Contiguous-ports 1024   Start-port 1024
         Share-ratio-bits 1   Contiguous-ports-bits 10   Port-offset-bits 5

Displays MAP-E configuration.


Configuration Examples for Mapping of Address and Port Using Encapsulation

Example: Mapping of Address and Port Using Encapsulation

The following example shows how to configure MAP-E:

!
ipv6 unicast-routing
!
interface GigabitEthernet0/1/0
switchport access vlan 10
!
interface GigabitEthernet0/1/1
switchport access vlan 10
!
interface GigabitEthernet0/1/2
switchport access vlan 11
!
interface GigabitEthernet0/1/3
switchport access vlan 11
!
!
interface Vlan10
ip address 10.0.0.1 255.255.255.0
nat64 enable
ip virtual-reassembly
!
interface Vlan11
no ip address
ipv6 address 2001:DB8:0001:80:0:CBC8:34:1/64
ipv6 enable
ipv6 virtual-reassembly in
nat64 enable
!
ip nat pool p3 209.165.200.225 209.165.200.225 netmask 255.255.255.224
ip nat inside source route-map rm1 pool p3 overload
!
!
ip access-list extended inside-local
20 permit ip 10.10.0.0 255.255.0.0 any
!
ipv6 route ::/0 2001:DB8:0001:80::9
!
!
route-map rm1 permit 10
match ip address inside-local
!
!
nat64 settings fragmentation header disable
nat64 route 0.0.0.0/0 Vlan11
nat64 map-e domain 1
border-relay-address 2001:DB8::9
basic-mapping-rule
ipv6-prefix 2001:DB8:0001::/56
ipv4-prefix 209.165.200.225/32
port-parameters share-ratio 2 start-port 4096
port-set-id 1
local-ipv4-prefix 192.168.0.0/16
!
!
!
!
!
end

Additional References for Mapping of Address and Port Using Encapsulation

Related Documents

Related Topic

Document Title

Cisco IOS commands

Cisco IOS Master Command List, All Releases

NAT commands

Cisco IOS IP Addressing Services Command Reference

Standards and RFCs

Standard/RFC

Title

MAP

Mapping of Address and Port (MAP)

MAP Encapsulation

MAP Encapsulation (MAP-E) - specification

RFC 6052

IPv6 Addressing of IPv4/IPv6 Translators

RFC 6144

Framework for IPv4/IPv6 Translation

RFC 6145

IP/ICMP Translation Algorithm

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html