Example for Configuring Centralized MAP-E
This section provides an example for configuring the centralized MAP-E function.
Networking Requirements
In a centralized scenario shown in Figure 3-7, the MAP-BR and BRAS reside on different devices. The BRAS functions as a DHCPv6 server to deliver MAP addresses and mapping rules to MAP-CEs in DHCPv6 IA_PD mode. (In this example, only key configurations of IPv6 address assignment of the BRAS are provided. For details, see HUAWEI NE20E-S Universal Service Router Configuration Guide - User Access - IPv6 Address Management Configuration.) Router A resides on the edge of a MAP domain and allows MAP-CEs to access the public IPv4 network through the IPv6 network that is within the MAP domain. The MAP-CEs use each other's public IPv4 address to communicate through the MAP-BR.
Prerequisites
The MAP license has been loaded to the MAP-BR, and the MAP function has been activated.
The MAP-BR has at least one interface board that supports the MAP function.
Configuration Roadmap
The configuration roadmap is as follows:
- Configure a BR.
- Configure BMR rules.
- Configure a MAP-E instance and bind the BMR and BR rules to the MAP-E instance.
- Configure an IPv6 prefix pool and an address pool on the BRAS.
- Configure the IP address for each interface and a static route.
Data Preparation
BR name (br_name), IPv6 address (2234::1), and prefix length (96 bits)
BMR name (bmr_name), IPv6 address (1111::1), prefix length (48), IPv4 address (1.1.1.0), mask length (24), EA-length (16), and PSID-offset length (4)
MAP-E instance name (2) and ID (2)
Interface1's IPv6 address (2222::1), IPv6 mask length (64 bits), IPv4 address (10.1.1.1), and IPv4 mask length (24 bits)
Interface2's IPv4 address (11.1.1.1) and mask length (24 bits)
Procedure
- Configure the BR function on a BRAS named br_name and set the IPv6 address to 1124::1 and the prefix length to 96. Use the BR's IPv6 address as the destination address carried in packets sent by MAP-CEs.
<BRAS> system-view [~BRAS] br-ipv6-address br_name ipv6-address 1124::1 prefix-length 96 [*BRAS] commit
- Configure a BMR on the BRAS to instruct the BRAS to assign IPv6 and IPv4 addresses to the MAP-CEs. In this example, the IPv6 prefix address assigned to the MAP-CE is 1111::1, the prefix length is 48, and the length of the EA-bits is 16. The public IPv4 prefix address allocated to the MAP-CE is 1.1.1.0 and the prefix length is 24. The offset length of the PSID field is 4, which means that ports 0 to 4096 are reserved.
[~BRAS] map rule bmr_name [*BRAS-map-rule-bmr_name] rule-prefix 1111::1 prefix-length 48 ipv4-prefix 1.1.1.0 prefix-length 24 ea-length 16 psid-offset 4 [*BRAS-map-rule-bmr_name] commit [~BRAS-map-rule-bmr_name] quit
- Configure an IPv6 prefix pool and an address pool on the BRAS.
- Configure an IPv6 prefix pool named pre1 and bind it to the BMR rule named bmr_name to allocate PD prefixes to MAP-CEs.
[~BRAS] ipv6 prefix pre1 delegation [*BRAS-ipv6-prefix-pre1] map-rule bmr_name [*BRAS-ipv6-prefix-pre1] commit [~BRAS-ipv6-prefix-pre1] quit
- Configure an IPv6 address pool named pool1 and bind it to the prefix pool named pre1. Bind the BR name br_name to the IPv6 address pool. Then, the BRAS encapsulates the IPv6 prefix into Option 90 information (OPTION_S46_BR) carried in the IPv6 prefix into the DHCPv6RESPONSE message sent to MAP-CEs.
<BRAS> system-view [~BRAS] ipv6 pool pool1 bas delegation [*BRAS-ipv6-pool-pool1] prefix pre1 [*BRAS-ipv6-pool-pool1] option-s46 br-ipv6-address br_name [*BRAS-ipv6-pool-pool1] commit [~BRAS-ipv6-pool-pool1] quit
- Configure an IPv6 prefix pool named pre1 and bind it to the BMR rule named bmr_name to allocate PD prefixes to MAP-CEs.
- On the MAP-BR, configure the BR that is the local IPv6 address as the destination address of IPv6 packets sent by MAP-CEs. Set the BR name to br_name, the IPv6 address to 1124::1, and the prefix length to 96.
<RouterA> system-view [~RouterA] br-ipv6-address br_name ipv6-address 1124::1 prefix-length 96 [*RouterA] commit
- Configure BMRs on the MAP-BR. Configure the BMR to remove the user-side IPv4 address from the IPv6 address and encapsulate IPv6 information into the IPv4 address and port number of the network-side traffic.
[~RouterA] map rule bmr_name [*RouterA-map-rule-bmr_name] rule-prefix 1111::1 prefix-length 48 ipv4-prefix 1.1.1.0 prefix-length 24 ea-length 16 psid-offset 4 [*RouterA-map-rule-bmr_name] commit [~RouterA-map-rule-bmr_name] quit
- Configure a MAP-E instance on the MAP-BR and bind the configured BR and BMR rules to the MAP-E instance. The BR is used to import the encapsulated traffic of MAP-CEs to an interface board, select the MAP-E instance for conversion, and bind the BMR rule to encapsulate and verify the packets in the instance.
[~RouterA] map-e instance 2 id 2 [*RouterA-map-e-instance-2] br-ipv6-address br_name [*RouterA-map-e-instance-2] map-rule bmr_name [*RouterA-map-e-instance-2] commit [~RouterA-map-e-instance-2] quit
- Configure IP addresses of the user- and network-side interfaces on the MAP-BR.
[~RouterA] interface GigabitEthernet0/2/0 [~RouterA-GigabitEthernet0/2/0] ipv6 enable [*RouterA-GigabitEthernet0/2/0] ipv6 address 2222::1 64 [*RouterA-GigabitEthernet0/2/0] ip address 10.1.1.1 24 [*RouterA-GigabitEthernet0/2/0] commit [~RouterA-GigabitEthernet0/2/0] quit [~RouterA] interface GigabitEthernet0/2/1 [~RouterA-GigabitEthernet0/2/1] ip address 11.1.1.1 24 [*RouterA-GigabitEthernet0/2/1] commit [~RouterA-GigabitEthernet0/2/1] quit [~RouterA] quit
Router A Configuration File (MAP-BR)
# br-ipv6-address br_name ipv6-address 1124::1 prefix-length 96 # map rule bmr_name rule-prefix 1111::1 prefix-length 48 ipv4-prefix 1.1.1.0 prefix-length 24 ea-length 16 psid-offset 4 # map-e instance 2 id 2 br-ipv6-address br_name map-rule bmr_name # interface GigabitEthernet0/2/0 undo negotiation auto undo shutdown ipv6 enable ip address 10.1.1.1 255.255.255.0 ipv6 address 2222::/64 # interface GigabitEthernet0/2/1 undo negotiation auto undo shutdown control-flap ip address 11.1.1.1 255.255.255.0 # ipv6 route-static 1111::1 48 2222::1 #
BRAS Configuration File
# br-ipv6-address br_name ipv6-address 1124::1 prefix-length 96 # map rule bmr_name rule-prefix 1111::1 prefix-length 48 ipv4-prefix 1.1.1.0 prefix-length 24 ea-length 16 psid-offset 4 # ipv6 prefix pre1 delegation map rule bmr_name ipv6 pool pool1 delegation prefix pre1 option-s46 br-ipv6-address br_name #