Mapping of Address and Port Using EncapsulationDevice(config-nat64-mape-bmr)#ipv6-prefix...
Transcript of Mapping of Address and Port Using EncapsulationDevice(config-nat64-mape-bmr)#ipv6-prefix...
Mapping of Address and Port UsingEncapsulation
The MAP-E feature provides rules to define the mapping between an IPv6 prefix and an IPv4 address orbetween a shared IPv4 address and an IPv6 prefix/address. The MAP-E feature is supported by the StatelessNAT64 feature and does not change the system flow of the NAT64 client.
• Feature Information for Mapping of Address and Port Using Encapsulation, on page 1• Restrictions for Mapping of Address and Port Using Encapsu, on page 2• Information About Mapping of Address Port Using Encapsulation, on page 2• How to Configure Mapping of Address Port Using Encapsulation, on page 3• Configuration Examples for Mapping of Address and Port Using Encapsulation, on page 5• Additional References for Mapping of Address and Port Using Encapsulation, on page 6
Feature Information for Mapping of Address and Port UsingEncapsulation
The following table provides release information about the feature or features described in this module. Thistable lists only the software release that introduced support for a given feature in a given software releasetrain. 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.
Feature InformationReleasesFeatureName
The MAP-E feature provides support for configurable rules used to define themapping between an IPv4 prefix and an IPv4 address or between a shared IPv4address 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.
15.6(1)TMAP-E
Mapping of Address and Port Using Encapsulation1
Restrictions for Mapping of Address and Port Using Encapsu• The MAP-E feature supports only a single basic mapping rule (BMR) per IPv6 prefix. This requires youto 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 BMRconfiguration.
• This feature does not BMR prefix length of 64, fragmentation, and local packet generation.
InformationAboutMappingofAddressPortUsingEncapsulation
Mapping of Address and Port Using EncapsulationMAP-E refers to Mapping of Address and Port Encapsulation (MAP-E). The MAP-E feature enables you toconfigure mapping rules for translation between IPv4 and IPv6 addresses. Each mapping of address and portusingMAP-E domain uses a different mapping rule. AMAP-E configuration comprises of one basic mappingrule (BMR), one default mapping rule (DMR), and one or more forwarding mapping rules (FMRs) for eachMAP-E domain.
A BMR configures the MAP IPv6 address or prefix. You can configure only one BMR per IPv6 prefix. TheMAP-E CE uses the BMR to configure itself with an IPv4 address, an IPv4 prefix, or a shared IPv4 addressfrom an IPv6 prefix. A BMR can also be used for forwarding packets in such scenarios where an IPv4destination address and a destination port are mapped into an IPv6 address/prefix. Every MAP-E node (CEdevice is a MAP-E node) must be provisioned with a BMR. The BMR prefix along with the port parameteris used as tunnel destination address. You can use the port-parameters command to configure port parametersfor the MAP-E BMR.
A DMR prefix which matches with the interface address is recognized as hosts and a DMR prefix with aprefix length of 128 is recognized as the tunnel source address.
Persistent StorageWhen a Customer Edge (CE) boots up for the first time, it sends the HTTP request to the rule server immediatelyto acquire the MAP-E rules. After the CE receives the MAP-E rules, it saves a copy in the persistent storage,such as bootflash.When the subsequent reboot happens, the CE detects a copy ofMAP-E rules in the bootflash,so it does not send the HTTP request immediately. Instead, it sends the HTTP request in a random timebetween 1 minute and 10 minutes.
Below files are created once the MAP-E rules are downloaded:
• /bootflash/mape/mape-rule.json
• /bootflash/mape/hostname (for the fixed IP case)
In a fixed IP case, a tunnel interface (IP in IP) is used instead of a NAT64 configuration. The nat64provisioning mode command is used to enable the tunnel interface.
Note
Mapping of Address and Port Using Encapsulation2
Mapping of Address and Port Using EncapsulationRestrictions for Mapping of Address and Port Using Encapsu
How to Configure Mapping of Address Port Using Encapsulation
Configuring Mapping of Address and Port Using Encapsulation
SUMMARY STEPS
1. enable2. configure terminal3. nat64 map-e domain number4. basic-mapping-rule5. ipv4-prefix ipv4-prefix/length6. ipv6-prefix ipv6-prefix/length7. port-parameters share-ratio number port-offset-bits number| start-port port-number| no-eabits
number8. exit9. default-mapping-rule ipv6 prefix/length10. mode map-e11. end
DETAILED STEPS
PurposeCommand or Action
Enables privileged EXEC mode.enableStep 1
Example: • Enter your password if prompted.Device> enable
Enters global configuration mode.configure terminal
Example:
Step 2
Device# configure terminal
Specifies the nat64MAP-E domain and enters theMAP-Econfiguration mode.
nat64 map-e domain number
Example:
Step 3
• The range is from 1 to 128.Device(config)# nat64 map-e domain 1
Specifies the MAP-E mapping rule and enters the basicmapping rule configuration mode.
basic-mapping-rule
Example:
Step 4
Device(config-nat64-mape)# basic-mapping-rule
Specifies the IPv4 prefix and length for translation.ipv4-prefix ipv4-prefix/length
Example:
Step 5
Device(config-nat64-mape-bmr)# ipv4-prefix10.1.1.0/24
Mapping of Address and Port Using Encapsulation3
Mapping of Address and Port Using EncapsulationHow to Configure Mapping of Address Port Using Encapsulation
PurposeCommand or Action
Specifies the IPv6 prefix and length for translation.ipv6-prefix ipv6-prefix/length
Example:
Step 6
Device(config-nat64-mape-bmr)# ipv6-prefix2001:100::0/64
Specifies the values for port-parameters share-ratio,contiguous ports and start-port forMAP-EBasicMappingRule (BMR).
port-parameters share-ratio number port-offset-bitsnumber| start-port port-number| no-eabits number
Example:
Step 7
• If the share ratio is greater than 1, the configurationthrows an error if the startport value is incorrect. The
Device(config-nat64-mape-bmr)# port-parametersshare-ratio 2 port-offset-bits 5 start-port 1024
calculation is based on the share-ratio and port-offsetbits. The configuration throws error and displays thevalue to be configured.
• If the share ratio is 1, there are no port-offset bits asthe values is automatically set to 6 and the start portis set to 1024.
Exits basic mapping rule configuration mode and returnsto MAP-E configuration mode.
exit
Example:
Step 8
Device(config-nat64-mape-bmr)# exit
Specifies the values of IPv6 prefix and length for MAP-EDefault Mapping Rule (DMR).
default-mapping-rule ipv6 prefix/length
Example:
Step 9
Device(config-nat64-map-e-dmr)#default-mapping-rule 2001:22::0/128
Specifies the value for MAP-E mode.mode map-e
Example:
Step 10
Device(config-nat64-map-e)# mode map-e
ExitsMAP-E configurationmode and returns to privilegedEXEC mode.
end
Example:
Step 11
Device(config-route-map)# end
Verifying Mapping of Address and Port Using Encapsulation Configuration
SUMMARY STEPS
1. enable2. show nat64 MAP-E [domain number]
Mapping of Address and Port Using Encapsulation4
Mapping of Address and Port Using EncapsulationVerifying Mapping of Address and Port Using Encapsulation Configuration
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 1MAP-E Domain 1Mode MAP-EDefault-mapping-rule
Ip-v6-prefix 2001:22::/128Basic-mapping-rule
Ip-v6-prefix 2001:100::/64Ip-v4-prefix 10.1.1.0/24Port-parameters
Share-ratio 2 Contiguous-ports 1024 Start-port 1024Share-ratio-bits 1 Contiguous-ports-bits 10 Port-offset-bits 5
Displays MAP-E configuration.
Configuration Examples for Mapping of Address and Port UsingEncapsulation
Example: Mapping of Address and Port Using Encapsulation Configuration
The following example shows how to configure MAP-E:enableconfigure terminalnat64 map-e domain 1basic-mapping-ruleipv6-prefix 4001:DB8::/40ipv4-prefix 50.50.50.0/24port-parameters share-ratio 1 start-port 1default-mapping-rule 3001:1::C0A8:105/128end
Mapping of Address and Port Using Encapsulation5
Mapping of Address and Port Using EncapsulationConfiguration Examples for Mapping of Address and Port Using Encapsulation
Additional References for Mapping of Address and Port UsingEncapsulation
Related Documents
Document TitleRelated Topic
Cisco IOS Master Command List, All ReleasesCisco IOS commands
Cisco IOS IP Addressing Services Command ReferenceNAT commands
Standards and RFCs
TitleStandard/RFC
Mapping of Address and Port (MAP)MAP
MAP Encapsulation (MAP-E) - specificationMAP Encapsulation
IPv6 Addressing of IPv4/IPv6 TranslatorsRFC 6052
Framework for IPv4/IPv6 TranslationRFC 6144
IP/ICMP Translation AlgorithmRFC 6145
Technical Assistance
LinkDescription
http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite providesonline resources to download documentation, software,and tools. Use these resources to install and configurethe software and to troubleshoot and resolve technicalissues with Cisco products and technologies. Access tomost tools on the Cisco Support and Documentationwebsite requires a Cisco.com user ID and password.
Mapping of Address and Port Using Encapsulation6
Mapping of Address and Port Using EncapsulationAdditional References for Mapping of Address and Port Using Encapsulation