Skip to content
Ask AI

MAP Configuration

[Command] show map interface [role {CE|BR}]

[Purpose]

Display the MAP binding port

[Parameter]

ParameterDescription
CEA Customer Edge device, which acts as the user’s edge router in a MAP deployment
BRA Border Relay device, which acts as the service provider’s edge router in a MAP deployment

[View]

System view

[Use Cases]

sonic# show map interface
+-----------------------------+
| MAP_BR_ZONE |
+===============+
| Ethernet16 |
+------------------------------+
+------------------------------+
| MAP_CE_ZONE |
+===============+
+------------------------------+

[Command] show map-e domain [namedomain_name**|role {CE|BR}]**

[Purpose]

Display MAP-E configuration

[View]

System view

[Use Cases]

sonic# show map-e domain role BR
BR Domain:
Name : test1
basic-mapping-rule : BMR
rule_ipv6_prefix : 2001:db8:1012::/48
rule_ipv4_prefix : 192.0.2.0/24
ea_length : 16
psid_len : 8
psid_offset : 4
forwarding-mapping-rule : None
br-ipv6-address-rule : BRaddr
ipv6_address : 2001:db8:1012:1234::10/64
sharing-ip-no-embedded-rule : None
Params :
END

[Command] show map-e statistics [namedomain_name**|role {CE|BR}]**

[Purpose]

Display MAP-E packet hit statistics

[View]

System view

[Use Cases]

sonic# show map-e statistics role BR
MAP-E Border Relay Statistics:
+--------+--------------+---------------+---------------+----------------+
| name | Input Pkts | Input Bytes | Output Pkts | Output Bytes |
+========+==============+===============+===============+================+
| test1 | 0 | 0 | 0 | 0 |
+--------+--------------+---------------+---------------+----------------+

[Command] show map-t domain [namedomain_name**|role {CE|BR}]**

[Purpose]

Display MAP-T configuration

[View]

System view

[Use Cases]

sonic# show map-t domain role BR
BR Domain:
Name : test2
basic-mapping-rule : BMR
rule_ipv6_prefix : 2001:db8:1012::/48
rule_ipv4_prefix : 192.0.2.0/24
ea_length : 16
psid_len : 8
psid_offset : 4
forwarding-mapping-rule : None
default-mapping-rule : DMR
ipv6_prefix : 2001:db8:1012:1234::/64
sharing-ip-no-embedded-rule : None
Params :
END

[Command] show map-t statistics [namedomain_name**|role {CE|BR}]**

[Purpose]

Display MAP-T packet hit statistics

[View]

System view

[Use Cases]

sonic# show map-t statistics role BR
MAP-T Border Relay Statistics:
+--------+--------------+---------------+---------------+----------------+
| name | Input Pkts | Input Bytes | Output Pkts | Output Bytes |
+========+==============+===============+===============+================+
| test2 | 0 | 0 | 0 | 0 |
+--------+--------------+---------------+---------------+----------------+

show map-rule [rule_type {basic-mapping-rule|default-mapping-rule|br-ipv6-address-rule|sharing-ip-no-embedded-rule|local-ipv4-prefix-rule} | rule_name

Section titled “show map-rule [rule_type {basic-mapping-rule|default-mapping-rule|br-ipv6-address-rule|sharing-ip-no-embedded-rule|local-ipv4-prefix-rule} | rule_name”

[Command] show map-rule [rule_type {basic-mapping-rule|default-mapping-rule|br-ipv6-address-rule|sharing-ip-no-embedded-rule|local-ipv4-prefix-rule} | rule_namerule_name**]**

[Purpose]

Display MAP rules

[View]

System view

[Use Cases]

sonic# show map-rule rule_type basic-mapping-rule
basic-mapping-rule:
+--------+--------------------+--------------------+--------------+------------+---------------+
| name | rule_ipv6_prefix | rule_ipv4_prefix | ea_bit_len | psid_len | psid_offset |
+========+====================+====================+==============+============+===============+
| BMR | 2001:db8:1012::/48 | 192.0.2.0/24 | 16 | 8 | 4 |
+--------+--------------------+--------------------+--------------+------------+---------------+

[Command] nat64 {map-zone-br|map-zone-ce} enable

[Purpose]

Enable MAP on the interface

[Parameter]

ParameterDescription
map-zone-brEnable MAP-BR on the interface
map-zone-ceEnable MAP-CE on the interface

[View]

Interface view

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 16
sonic(config-if-16)# nat64 map-zone-br enable

[Command] map-rule basic-mapping-rulerule_namerule-ip6-prefixipv6_prefixrule-ip4-prefixipv4_prefixea-lengthEmbedded_Address_bitspsid-lenpsid_lenpsid-offsetpsid_offset

[Purpose]

Configure MVRP timer time

[Parameter]

ParameterDescription
rule_nameThe name of the Basic Mapping Rule (BMR)
ipv6_prefixThe IPv6 prefix assigned by the BMR
ipv4_prefixThe IPv4 prefix assigned by the BMR
Embedded_Address_bitsThe total length (in bits) of the IPv4 address and port set information embedded in the subscriber’s IPv6 address. Range: 0-64 bits
psid_lenThe length of the Port Set Identifier (PSID). Range: 0-15 bits
psid_offsetThe starting bit position of the PSID within the port number. Range: 0-15 bits

[View]

System configuration view

[Use Cases]

sonic# configure terminal
sonic(config)# map-rule basic-mapping-rule BMR rule-ip6-prefix 2001:db8:1012::/48 rule-ip4-prefix 192.0.2.0/24 ea-length 16 psid-len 8 psid-offset 4

[Command] map-rule br-ipv6-addressrule_nameipv6-addressbr_ipv6_address

[Purpose]

Configure the Border Relay IPv6 address rule

[Parameter]

ParameterDescription
rule_nameThe name of the rule
br_ipv6_addressThe IPv6 address of the Border Relay (BR) device

[View]

System configuration view

[Notes]

This command specifies the physical address of the BR device to act as the next hop for traffic, typically used in MAP-E mode

[Use Cases]

sonic# configure terminal
sonic(config)# map-rule br-ipv6-address BRaddr ipv6-address 2001:db8:1012:1234::10/64

[Command] map-rule default-mapping-rulerule_nameipv6-prefixipv6_prefix

[Purpose]

Configure the Default Mapping Rule (DMR)

[Parameter]

ParameterDescription
rule_nameThe name of the rule
ipv6_prefixThe IPv6 prefix for the Default Mapping Rule

[View]

System configuration view

[Notes]

This rule is typically used in MAP-T mode

[Use Cases]

sonic# configure terminal
sonic(config)# map-rule default-mapping-rule DMR ipv6-prefix 2001:db8:1012:1234::/64

[Command] map-rule sharing-ip-no-embeddedrule_name

[Purpose]

Configure the Non-embedded Shared IPv4 Address rule

[Parameter]

ParameterDescription
rule_nameThe name of the rule

[View]

System configuration view

[Notes]

This rule is applied when the subscriber does not use the embedded address format

[Use Cases]

sonic# configure terminal
sonic(config)# map-rule sharing-ip-no-embedded test

[Command] map-e domaindomain_name**{CE|BR}**

[Purpose]

Create a MAP-E domain

[Parameter]

ParameterDescription
domain_nameThe name of the MAP-E domain

[View]

System configuration view

[Use Cases]

sonic# configure terminal
sonic(config)# map-e domain test1 BR

[Command] basic-mapping-rulerule_name

[Purpose]

Bind a Basic Mapping Rule within the MAP domain

[Parameter]

ParameterDescription
rule_nameThe name of the rule

[View]

Map-domain view

[Use Cases]

sonic# configure terminal
sonic(config)# map-e domain test1 BR
sonic(config-map-e-domain-test1)# basic-mapping-rule BMR

[Command] br-ipv6-addressrule_name

[Purpose]

Bind a br-ipv6-address Rule within the MAP-E domain

[Parameter]

ParameterDescription
rule_nameThe name of the rule

[View]

MAP-E-domain view

[Use Cases]

sonic# configure terminal
sonic(config)# map-e domain test1 BR
sonic(config-map-e-domain-test1)# br-ipv6-address BRaddr

[Command] frag-ignore-df enable

[Purpose]

Configure to ignore the Don’t Fragment (DF) flag within the MAP domain

[View]

Map-domain view

[Notes]

This is used when a packet with the DF bit set to 1 needs to be fragmented normally after passing through the device

[Use Cases]

sonic# configure terminal
sonic(config)# map-e domain test1 BR
sonic(config-map-e-domain-test1)# frag-ignore-df enable

[Command] frag-inner enable

[Purpose]

Configure inner-layer fragmentation within the MAP-E domain

[View]

MAP-E-domain view

[Notes]

When a packet exceeds the MTU after encapsulation and requires fragmentation, this setting enables fragmentation at the inner IPv4 layer. This configuration is applicable only in MAP-E mode

[Use Cases]

sonic# configure terminal
sonic(config)# map-e domain test1 BR
sonic(config-map-e-domain-test1)# frag-inner enable

[Command] security-check enable

[Purpose]

Configure packet security check within the MAP domain

[View]

Map-domain view

[Notes]

Enables security check for packets in the MAP domain. Packets that do not comply with the rules defined in the MAP domain will be discarded. Enabled by default

[Use Cases]

sonic# configure terminal
sonic(config)# map-e domain test1 BR
sonic(config-map-e-domain-test1)# security-check enable

[Command] tcp-mssvalue

[Purpose]

Configure the TCP maximum segment size (MSS) for packets

[Parameter]

ParameterDescription
valueRange: 160~9540

[View]

Map-domain view

[Use Cases]

sonic# configure terminal
sonic(config)# map-e domain test1 BR
sonic(config-map-e-domain-test1)# tcp-mss 1460

[Command] map-t domaindomain_name**{CE|BR}**

[Purpose]

Create a MAP-T domain

[Parameter]

ParameterDescription
domain_nameThe name of the MAP-E domain

[View]

System configuration view

[Use Cases]

sonic# configure terminal
sonic(config)# map-t domain test2 BR

[Command] default-mapping-rulerule_name

[Purpose]

Bind a Default Mapping Rule within the MAP-T domain

[Parameter]

ParameterDescription
rule_nameThe name of the rule

[View]

MAP-T-domain view

[Use Cases]

sonic# configure terminal
sonic(config)# map-t domain test2 BR
sonic(config-map-t-domain-test2)# default-mapping-rule DMR