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>
   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>

    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>

   vlan-op add <vlan id> tpid <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