cisco · 30 pp.
Cisco configuring VRF aware PBR: Руководство по настройке и ограничениям
Related manuals
Contents
Document text
Overview
Configuring VRF aware PBR Restrictions for VRF aware PBR, on page 1 Information about VRF aware PBR, on page 1 How to Configure VRF aware PBR, on page 3 Configuration Examples for VRF aware PBR, on page 23 Feature History for VRF aware PBR, on page 30 Restrictions for VRF aware PBR • The route map commands set global and set vrf cannot be configured together on the same route-map. • The same PBR cannot be applied to multiple unique VRF interfaces. The exception is when the PBR policy contains a set global or set vrf as the set command.
• Different route map command options ( set ip vrf , set ip default vrf , set vrf ) cannot be configured on the same route-map under the same sequence or a different sequence. Multiple unique route map command options (such as set vrf ) can be configured using different sequence number in route-map. Information about VRF aware PBR The following sections provide information about VRF aware PBR. Overview VRF-lite is a feature that enables a service provider to support two or more VPNs with overlapping IP addresses. VRF-lite uses input interfaces to distinguish routes for different VPNs. It forms virtual packet-forwarding tables by associating one or more Layer 3 interfaces with each VRF.
Starting with the Cisco IOS XE 16.12.1 release, you can configure PBR on VRF-lite interfaces. You can't configure MPLS on the same VRF-lite interface that has PBR configured on it. VRF aware PBR can be of the following types: Inherit-VRF : For Inherit-VRF the ingress interface implicitly inherits theVRF context. Packets enter the VRF interface and are policy routed or forwarded out of the same VRF. The VRF table is used when a route lookup is required to apply a set route policy to a packet. Configuring VRF aware PBR 1
VRF aware PBR set clauses
Inter-VRF : For Inter-VRF the VRF context is specified explicitly. In this case, packets enter a VRF interface and are policy routed or forwarded to another VRF interface. VRF to Global Routing Table : Packets enter the VRF interface and are policy routed or forwarded out of the Global Routing Table. The context for the Global Routing Table is explicitly specified. Global Routing Table to VRF : Packets enter a global interface and are policy routed or forwarded out of a VRF interface. VRF aware PBR set clauses You can enable VRF selection by PBR packets through one of the following options:
• A route map • The Global Routing Table • A specified VRF You can enable policy-based routing of packets for a VRF instance by using route map commands with the following set clauses: set ip vrf vrf-name next-hop ip-address [ ip-address ]: Indicates where to route IPv4 packets that pass a match criteria of a route map using the next-hop specified for the VRF. set ipv6 vrf vrf-name next-hop ip-address [ ip-address ]: Indicates where to route IPv6 packets that pass a match criteria of a route map using the next-hop specified for the VRF. set global : Routes the packets through the global routing table.
The command is useful to route ingress packets belonging to a specific VRF through the global routing table. set vrf : Routes packets using a particular VRF table. The command routes the packets through any of the interfaces belonging to that VRF. If there's no route in the VRF table, the packet is dropped. set ip global next-hop : Indicates which next hop to forward the IPv4 packets to that match the criterion of a route-map for PBR. Uses the Global Routing table for reaching the next hop. set ipv6 global next-hop : Indicates which next hop to forward the IPv6 packets to that match the criterion of a route-map for PBR. Uses the Global Routing table for reaching the next hop.
set ip default vrf vrf-name nexthop ip-address [ ip-address ]: Verifies the presence of the IP address in the routing table of the VRF. When the IP address is present in the routing table, the packet isn't policy routed but forwarded based on the routing table. When the IP address is absent in the routing table, the packet is policy routed and sent to the specified next hop. set ipv6 default vrf vrf-name nexthop ip-address [ ip-address ]: Verifies the presence of the IPv6 address in the routing table of the VRF. When the IPv6 address is present in the routing table, the packet isn't policy routed but forwarded based on the routing table.
When the IPv6 address is absent in the routing table, the packet is policy routed and sent to the specified next hop. set ip default global : Configures IPv4 VRF to global routing. set ipv6 default global : Configures IPv6 VRF to global routing. set ip default next-hop : Indicates where to send IPv4 packets that pass a match criterion of a route map for PBR and for which no explicit route to a destination is specified. Configuring VRF aware PBR VRF aware PBR set clauses Configuring VRF aware PBR 2
Configuring Inherit-VRF in a Route Map
set ipv6 default next-hop : Indicates where to send IPv6 output packets that pass a match criterion of a route map for policy routing and for which no explicit route to a destination is specified. How to Configure VRF aware PBR The following sections provide information on how to configure VRF aware PBR. Configuring Inherit-VRF in a Route Map To configure a VRF interface as an Inherit-VRF in a route map, perform this procedure: Procedure Configuring VRF aware PBR How to Configure VRF aware PBR Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. Enter your password, if prompted. Step 2 configure terminal Example:
Device# configure terminal Enters global configuration mode. Step 3 ip access-list{standard|extended}[access-list-name|access-list-number] Example: Device(config)# ip access-list standard 10 Specifies the IP access list type and enters the corresponding access list configuration mode. You can specify a standard, extended, or named access list. Step 4 [sequence-number]{permit|deny}protocol source source-wildcard destination destination-wildcard Example: Device(config-ipv4-acl)# 10 permit 133.33.33.0 0.0.0.255 Defines the criteria for which the access list permits or denies packets. Step 5 route-map map-tag [permit |deny][sequence-number] Example:
Device(config-route-map)# route-map vrf1 vrf1 permit 10 _ Defines the conditions for enabling Policy-Based Routing. Enters route-map configuration mode. Configuring VRF aware PBR 3
Configuring Inherit-VRF in a Route Map
Configuring VRF aware PBR Configuring Inherit-VRF in a Route Map Command or Action Purpose Step 6 match ip-address{acl-number [acl-number|acl-name ]|acl-name [acl-name |acl-number]} Example: Device(config-route-map)# match ip address 10 Performs policy routing on matched packets. Supports IP access lists and extended ACLs. Step 7 match length min max Example: Device(config-route-map)# match length 64 1500 Matches the length of the packet. Step 8 set ip next-hop ip-address[ip-address] Example: Device(config-route-map)# set ip next-hop 135.35.35.2 Specifies the next hop for routing packets. Step 9 interface HundredGigE rack/slot/module/port Example:
Device(config-if)# interface HundredGigE1/0/11 Configures a Hundred Gigabit Ethernet interface and enters interface configuration mode. Step 10 no switchport Example: Device(config-if)# no switchport Configures the interface as a Layer 3 Ethernet interface. Step 11 vrf forwarding vrf-name Example: Device(config-if)vrf forwarding vrf1 Associates the VRF with the Layer 3 interface. Step 12 ip address ip-address subnet-mask Example: Device(config-if-vrf)ip address 100.1.1.1 255.255.255.0 Enters the IP address for the interface. Step 13 ip policy route-map map-tag Example: Device(config-if) ip policy route-map vrf1 vrf1 _ Identifies the route map to use for PBR. Step 14 end Example:
Device(config-f)# end Exits interface configuration mode and returns to privileged EXEC mode. Configuring VRF aware PBR 4