map-template
Use the map-template command to create map templates and share them with users associated with specified roles. Map-templates provide a way to create generic sets of rules that can be shared with other GigaVUE‑OS users. Once a map-template is shared, a user with the rights to use it can create a new map based on the template.
The criteria available for the map-template command are the same as those available for the map command described inmap. The only differences are that map-templates do not include any network ports, tool ports, or GigaSMART operations. Also, a map-template requires at least one rule.
The map-template command has the following syntax:
map-template alias <alias>
   comment <comment>
   roles <assign | replace> <role> [to <role list>]
   rule
      add <drop | pass>
delete <all | rule-id <rule ID>>
Refer to map for details.
The map-template rule command has the following syntax:
rule add <drop | pass>
   bidir
   comment <comment>
   dscp <af11 | af12 | af13 | af21 | af22 | af23 | af31 | af32 | af33 | af41 | af42 | af43 | ef>
   ethertype <2-byte-hex>
inner-ethertype <2-byte-hex>
inner-ipver <4 or 6>
inner-ipfrag <no-frag|all-frag|all-frag-no-first|first-frag|first-or-no-frag>
inner-ipdst <IP address>
inner-ipsrc <IP address>
inner-ip6dst <IPv6 address>
inner-ip6src <IPv6 address>
inner-protocol <1-byte-hex>
inner-portdst <0~65535 | x..y> inner-portdst-subset <even|odd>
inner-portsrc <0~65535 | x..y> inner-portsrc-subset <even|odd>
   inner-uda1-data <16-byte-hex> inner-uda1-mask <16-byte-hex> inner-uda1-offset <0-120 bytes>
   inner-uda2-data <16-byte-hex> inner-uda2-mask <16-byte-hex> inner-uda2-offset <0-120 bytes>
   inner-vlan <vlan  | vlan1..vlan2> innervlan-subset <even | odd>
   ip6dst <IPv6 address> <IPv6 netmask>
   ip6fl <3-byte-hex>
   ip6src <IPv6 address> <IPv6 netmask>
   ipdst <IP address> <netmask>
   ipfrag <no-frag | all-frag | all-frag-no-first | first-frag | first-or-no-frag>
   ipsrc <IP address> <netmask>
   ipver <4 | 6>
   macdst <MAC address> <MAC netmask>
   macsrc <MAC address> <MAC netmask>
mpls-label-id <0~1048575 | x..y> pos <any | 1~7> mpls-label-id-subset <even|odd>
mpls-label-exp <0~7> pos <any | 1~7>
mpls-label-bos <0/1> pos <any | 1~7>
mpls-label-ttl <0~255 | x..y> pos <any | 1~7> mpls-label-ttl-subset <even|odd>
   portdst <0-65535 | x..y> portdst-subset <even | odd>
   portsrc <0-65535 | x..y> portsrc-subset <even | odd>
   protocol <ipv6-hop | icmp-ipv4 | igmp | ipv4ov4 | tcp | udp | ipv6 | rsvp | gre | icmp-ipv6> <1-byte-hex>
   rewrite-dstip <value>
   rewrite-dstmac <value>
   rewrite-srcip <value>
   rewrite-srcmac <value> 
   tcpctl <1-byte-hex> tcpctlmask <1-byte-hex>
   tosval <1-byte-hex>
   ttl <ttl | ttl1..ttl2>
   uda1-data <16-byte-hex> uda1-mask <16-byte-hex> uda1-offset <2-110 bytes>
   uda2-data <16-byte-hex> uda2-mask <16-byte-hex> uda2-offset <2-110 bytes>
   vlan <vlan | vlan1..vlan2> vlan-subset <even | odd>
Refer to map rule for details.
Related Commands
The following table summarizes other commands related to the map-template command:
| Task | Command | 
| Deletes a specified map template. | (config) # no map-template alias mytemplate | 
| Deletes the comments for a specified map template. | (config) # no map-template alias mytemplate comment | 
| Deletes an assigned role from a specified map template. | (config) # no map-template alias mytemplate roles assign monitor | 
| Deletes all assigned roles from a specified map template. | (config) # no map-template alias mytemplate roles assign all | 



