IPv6 Policy-Based Routing Commands
Use these commands to configure policy-based routing for IPv6 traffic.
The following commands that are described for IPv4 traffic in Routing Policy Commands can also be used for IPv6 traffic:
- match-length
- match-mac-list
- set interface
ipv6 policy
This command specifies a route map that must be used for policy-based IPv6 routing on an interface.
M4250
M4350
The route-map-name argument specifies the name of the route map that must be used for policy routing. It must match a map tag specified by a route-map command. If you try to apply a route-map name that is not yet created, an error message is displayed.
| Format | ipv6 policy route-map route-map-name |
| Mode | Interface Config |
Usage Guidelines
A route-map statement must contain eligible match and set conditions for policy-based routing to be applied to hardware:
- Valid match conditions: match ipv6 address acl, match mac-list, match length
- Valid set conditions: set ipv6 next-hop, set ipv6 default next-hop, set ipv6 precedence
A route map must contain at least one match condition and one set condition. If it does not, the route map is not applied to hardware.
A route map and a DiffServ policy cannot function together on the same interface. When you apply a route map on a VLAN interface and a DiffServ policy on a member port of the same VLAN interface, the port policy has priority over the VLAN policy.
The same route map cannot be applied using both the ip policy and ipv6 policy commands on an interface. When a route map has both IPv4 and IPv6 statements provisioned and you apply the route map using the ipv6 policy command, the IPv4 statements in the route map do not take effect, and a message is displayed.
Command example:
(NETGEAR Switch) (Interface vlan 40)#ipv6 policy route-map rm4
no ipv6 policy
This command disables a specified route map on an interface.
| Format | no ipv6 policy route-map route-map-name |
| Mode | Global Config |
ipv6 prefix-list description
M4250
M4350
This command adds an IPv6 prefix list with a description, or adds a description to an existing IPv6 prefix list, but does not configure the IPv6 address in the prefix list. To configure the IPv6 address in the prefix list, use the ipv6 prefix-list command.
| Format | ipv6 prefix-list list-name description text |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| prefix-list-name | The text name of the prefix list. The name can be up to 32 characters. |
| description text | A description of the prefix list. The description can be up to 80 characters in length. |
no ipv6 prefix-list description
This command removes the description from an IPv6 prefix list.
| Format | no ipv6 prefix-list list-name description |
| Mode | Global Config |
ipv6 prefix-list
M4250
M4350
To create a prefix list or add a prefix list entry, use the ipv6 prefix-list command in Global Configuration mode. Prefix lists allow matching of route prefixes with those specified in the prefix list. Each prefix list includes a sequence of prefix list entries ordered by their sequence numbers. A router or switch sequentially examines each prefix list entry to determine if the route’s prefix matches that of the entry. An empty or nonexistent prefix list permits all prefixes. An implicit deny is assumed if a prefix does not match any entries of a prefix list. Once a match or deny occurs, the router or switch does not go through the rest of the list.
Up to 128 prefix lists may be configured. The maximum number of statements allowed in a prefix list is 64.
To add a description to the IPv6 prefix list, use the ipv6 prefix-list description command.
To renumber an IPv6 prefix list, use the ipv6 prefix-list renumber command.
| Default | No prefix lists are configured by default. When neither the ge nor the le option is configured, the destination prefix must match the network/length exactly. If the ge option is configured without the le option, any prefix with a network mask greater than or equal to the ge value is considered a match. Similarly, if the le option is configured without the ge option, a prefix with a network mask less than or equal to the le value is considered a match. |
| Format | ipv6 prefix-list list-name [seq number] {permit | deny} ipv6-prefix/prefix-length [ge length] [le length] |
| Mode | Global Configuration |
| Parameter | Description |
|---|---|
| list-name | The text name of the prefix list. The name can be up to 32 characters. |
| seq number | (Optional) The sequence number for this prefix list statement. Prefix list statements are ordered from lowest sequence number to highest and applied in that order. If you do not specify a sequence number, the system will automatically select a sequence number five larger than the last sequence number in the list. Two statements may not be configured with the same sequence number. The value range for number is from 1 to 4,294,967,294. |
| permit | Permit routes whose destination prefix matches the statement. |
| deny | Deny routes whose destination prefix matches the statement. |
| ipv6-prefix/prefix-length | Specifies the match criteria for routes being compared to the prefix list statement. The ipv6-prefix can be any valid IP prefix. The length is any IPv6 prefix length from 0 to 32. |
| ge length | (Optional) If this option is configured, then a prefix is only considered a match if its network mask length is greater than or equal to this value. This value must be longer than the network length and less than or equal to 32. |
| le length | (Optional) If this option is configured, then a prefix is only considered a match if its network mask length is less than or equal to this value. This value must be longer than the ge length and less than or equal to 32. |
no ip prefix-list
To delete a prefix list or a statement in a prefix list, use the no ip prefix-list command. The no ip prefix-list list-name command deletes the entire prefix list. To remove an individual statement from a prefix list, you must specify the statement exactly, with all its options.
| Format | no ipv6 prefix-list list-name [seq number] {permit | deny} ipv6-prefix/prefix-length [ge length] [le length] |
| Mode | Global Configuration |
ipv6 prefix-list renumber
M4250
M4350
You can renumber the sequence numbers of the statements in an IPv6 prefix list. You need to specify the renumber interval and the number of the first statement where the renumbering must start.
| Format | ipv6 prefix-list list-name renumber renumber-interval first-statement-number |
| Mode | Global Configuration |
| Parameter | Description |
|---|---|
| list-name | The text name of the prefix list. The name can be up to 32 characters. |
| renumber-interval | The renumber interval. The range is from 1 to 100. |
| first-statement-number | The first statement where renumbering must start. The range is from 1 to 1000. |
clear ipv6 prefix-list
M4250
M4350
This command resets and clears the IPv6 prefix-list counter. The counter indicates the number of matches to a specific prefix list entry.
| Format | clear ipv6 prefix-list [prefix-list-name] [ipv6-prefix/prefix-length] |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| prefix-list-name | (Optional) The name of the prefix list for which the counter must be cleared. |
| ipv6-prefix/prefix-length | (Optional) The IPv6 prefix number and length (in bits) of the network mask for which the counter must be cleared. |
match ipv6 address
M4250
M4350
Use this command to configure a route map that must match based on the match criteria configured in one or more existing IPv6 access lists (ACLs). (If you specify an IPv6 ACL name or number that does not exist, an error message is displayed.)
Actions that are configured in an IPv6 ACL are applied with other actions involved in the route map. When an IPv6 ACL referenced by a route-map is removed or rules are added or deleted from that ACL, the configuration is rejected. However, you can add ACLs to or remove ACLs from a route map that is attached to an interface.
If you specify a list of IPv6 ACLs and a packet matches at least one of these ACL match criteria, the corresponding set actions in the route map are applied to the packet.
If you specify duplicate IPv6 ACL numbers or names in this command, the duplicate configuration is ignored.
To enter the Route Map Configuration mode, from the Config mode, enter the route-map map-tag command.
| Default | No match criteria are defined by default. |
| Format | match ipv6 address {access-list-number | access-list-name} […access-list-number | access-list-name] |
| Mode | Route Map Configuration |
| Parameter | Description |
|---|---|
| access-list-number |
The IPv6 ACL number that identifies an ACL configured through access-list CLI configuration commands. This number is from 1 to 99 for a standard ACL. This number is from 100 to 199 for an extended ACL. You can specify a maximum of four ACLs in this match clause. |
| access-list-name |
The IPv6 ACL name that identifies the named IPv6 ACL. The name can be up to 31 characters in length. You can specify a maximum of four ACLs in this match clause. |
Command example:
The following command sequence shows how to first create an ACL and then a route map with a match clause on the ACL number and apply that route map to an interface.
(NETGEAR Switch) (Config)#ipv6 access-list acl2
(NETGEAR Switch) (Config-ipv6-acl)#permit ipv6 1001::1 any
(NETGEAR Switch) (Config-ipv6-acl)#exit
(NETGEAR Switch) (Config)#route-map rm1 permit 40
(NETGEAR Switch) (route-map)#match ipv6 address acl2
(NETGEAR Switch) (config-route-map)#set ipv6 default next-hop 2001::2
(NETGEAR Switch) (config)#interface 0/1
(NETGEAR Switch) (Interface 1/0/4)#ip address 10.1.1.1 255.255.255.0
(NETGEAR Switch) (Interface 1/0/4)#ipv6 policy route-map rm1
The results are the following:
- The ipv6 policy route-map rm1 command is applied to interface 1/0/4. All packets that enter on that interface are policy-routed if a match is made per the IPv6 ACL.
- Sequence number 40 in route map rm1 is used to match all packets sourced from host 1001::1. If there is a match, and if the switch has no explicit route for the packet destination, the packets are sent to next-hop address 2001::2.
- The rest of the packets are forwarded per normal L3 destination-based routing.
no match ipv6 address
Use the no match ipv6 address command to delete a match statement from a route map.
| Format | no match ipv6 address […access-list-number | access-list-name] |
| Mode | Route Map Configuration |
set ipv6 next-hop
M4250
M4350
Use this command to specify the adjacent next-hop router in the path toward the destination to which the packets must be forwarded. If more than one IPv6 address is specified, the first IPv6 address associated with an interface that is up is used to route the packets.
To specify a next-hop IPv6 address that is a link-local address, use the interface unit/slot/port or interface vlan vlan-id options.
You can specify up to four IPv6 addresses for next-hop routers. However, if you use the interface or interface vlan keyword, you can optionally specify one IPv6 address for a next-hop router.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
| Format | set ipv6 next-hop {interface unit/slot/port [next-hop-ipv6-address] | vlan vlan-id [next-hop-ipv6-address] | next-hop-ipv6-address […next-hop-ipv6-address]} |
| Mode | Route Map Configuration |
| Parameter | Description |
|---|---|
| unit/slot/port | If the IPv6 address is a link-local address, specify a routing interface (or VLAN ID). |
| vlan-id | If the IPv6 address is a link-local address, specify a VLAN ID in the range from 1 to 4093 (or an interface). |
| next-hop-ipv6-address | The global IPv6 address of the next-hop router to which packets are routed. This address must be the address of an adjacent router. You can specify up to four IPv6 addresses. However, if you use the interface or interface vlan keyword, you can optionally specify one IPv6 address for a next-hop router. |
Usage guidelines
This command affects all incoming packet types and is always used if enabled and configured. The switch checks the NDP table to see if the next-hop router is resolved, and if so, packets are forwarded to the next-hop router.
In a route-map statement, the set ipv6 next-hop and set ipv6 default next-hop commands are mutually exclusive. However, you can configure the set ipv6 default next-hop command in a separate route-map statement.
Command example:
(NETGEAR Switch)(Config)#route-map RouteMapName
(NETGEAR Switch)(route-map)#set ipv6 next-hop 3333::2
no set ipv6 next-hop
Use this command to delete a next-hop match statement from a route map.
| Format | no set ipv6 next-hop {interface unit/slot/port [next-hop-ipv6-address] | vlan vlan-id [next-hop-ipv6-address] | next-hop-ipv6-address […next-hop-ipv6-address]} |
| Mode | Route Map Configuration |
set ipv6 default next-hop
M4250
M4350
Use this command to specify a list of default next-hop IPv6 addresses. If more than one IPv6 address is specified, the first specified next-hop IPv6 address that is adjacent to the router is used. The other specified IPv6 addresses are tried in turn.
To specify a next-hop IPv6 address that is a link-local address, use the interface unit/slot/port or interface vlan vlan-id options.
You can specify up to four IPv6 addresses for next-hop routers. However, if you use the interface or interface vlan option, you can optionally specify a single IPv6 address for a next-hop router.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
| Default | No match criteria are defined by default. |
| Format | set ipv6 default next-hop {interface {unit/slot/port | vlan vlan-id} […default-next-hop-ipv6-address] | next-hop-ipv6-address […default-next-hop-ipv6-address]} |
| Mode | Route Map Configuration |
| Parameter | Description |
|---|---|
| unit/slot/port | If the IPv6 address is a link-local address, specify a routing interface (or VLAN ID). |
| vlan-id | If the IPv6 address is a link-local address, specify a VLAN ID in the range from 1 to 4093 (or an interface). |
| default-next-hop-ipv6-address | The global IPv6 address of the default next-hop router to which packets are routed. This address must be the address of an adjacent router. You can specify up to four IPv6 addresses. However, if you use the interface or interface vlan option, you can optionally specify one IPv6 address for a default next-hop router. |
Usage guidelines
A packet is routed to the next-hop IPv6 address that is specified by the set ipv6 default next-hop command only if no explicit route for the packet destination address exists in the routing table. A default route in the routing table is not considered an explicit route for an unknown destination address.
In a route-map statement, the set ipv6 next-hop and set ipv6 default next-hop commands are mutually exclusive. However, you can configure the set ipv6 default next-hop command in a separate route-map statement.
When you configure the set ipv6 default next-hop command in a route map and apply it to an interface when a default route is also present on the switch, packets that match the route-map rules are routed according to the route map. This occurs because a default route is not considered an explicit route to a destination.
Command example:
(NETGEAR Switch)(Config)#route-map RouteMapName
(NETGEAR Switch)(route-map)#set ipv6 default next-hop 2002::2
no set ipv6 default next-hop
Use this command to delete a default next-hop match statement from a route map.
| Format | no set ipv6 default next-hop {interface {unit/slot/port | vlan vlan-id} […default-next-hop-ipv6-address] | next-hop-ipv6-address […default-next-hop-ipv6-address]} |
| Mode | Route Map Configuration |
set ipv6 precedence
M4250
M4350
Use this command to set the three IP precedence bits in the IP packet header. With three bits, you have eight possible values for the IP precedence; value can be a number from 0 through 7. This command is used when implementing QoS and can be used by other QoS services, such as weighted fair queuing (WFQ) and weighted random early detection (WRED).
| Default | No match criteria are defined by default. |
| Format | set ipv6 precedence value |
| Mode | Route Map Configuration |
| Parameter | Description |
|---|---|
| 0 | Sets the routine precedence. |
| 1 | Sets the priority precedence. |
| 2 | Sets the immediate precedence. |
| 3 | Sets the Flash precedence. |
| 4 | Sets the Flash override precedence. |
| 5 | Sets the critical precedence. |
| 6 | Sets the internetwork control precedence. |
| 7 | Sets the network control precedence. |
no set ipv6 precedence
Use this command to reset the three IP precedence bits in the IP packet header to the default. By default, no match criteria are defined.
| Format | no set ipv6 precedence |
| Mode | Route Map Configuration |