Virtual Routing Forwarding

A virtual routing/forwarding (VRF) is a VPN routing and forwarding instance. It is the name for the combination of the VPN routing table, the VRF Cisco Express Forwarding (CEF) table, and the associated IP routing protocols on the PE router. A PE router has a VRF instance for each attached VPN. Look at Figure 7-3 to see that a PE router holds the global IP routing table, but also a VRF routing table per VPN connected to the PE.

Figure 7-3 VRFs on a PE Router

Figure 7-3 VRFs on a PE Router

Because the routing should be separate and private for each customer (VPN) on a PE router, each VPN should have its own routing table. This private routing table is called the VRF routing table. The interface on the PE router toward the CE router can belong to only one VRF. As such, all IP packets received on the VRF interface are unambiguously identified as belonging to that VRF. Because there is a separate routing table per VPN, there is a separate CEF table per VPN to forward these packets on the PE router. This is the VRF CEF table. As with the global routing table and the global CEF table, the VRF CEF table is derived from the VRF routing table.

You create the VRF on the PE router with the ip vrf command. You use the ip vrf forwarding command to assign PE-CE interfaces on the PE router to a VRF. You can assign an interface to only one VRF, but you can assign several interfaces to the same VRF. The PE router then automatically creates a VRF routing table and CEF table. The VRF routing table does not differ from a regular routing table in Cisco IOS other than that it is used for a set of VPN sites only and is completely separated from all other routing tables. The routing table as you have known it to this point will now be referred to as the global or the default routing table. Look at Example 7-1, where the VRF configured is the VRF cust-one.

Example 7-1 Configuring a VRF

ip vrf cust-one rd 1:1

route-target export 1:1 route-target import 1:1

interface Serial5/1 ip vrf forwarding cust-one ip address 10.10.4.1 255.255.255.0

sydney#show ip route vrf cust-one

Routing Table: cust-one

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks

C 10.10.4.0/24 is directly connected, Serial5/1

C 10.10.4.2/32 is directly connected, Serial5/1

B 10.10.100.1/32 [200/1] via 10.200.254.2, 00:31:04

sydney#show ip cef vrf cust-one

Prefix

Next Hop

Interface

0.0.0.0/0

no route

0.0.0.0/32

receive

10.10.2.0/24

10.200.214.1

POS0/1/0

10.10.4.0/24

attached

Serial5/1

10.10.4.0/32

receive

10.10.4.1/32

receive

10.10.4.2/32

attached

Serial5/1

10.10.4.255/32

receive

10.10.100.1/32

10.200.214.1

POS0/1/0

Example 7-1 Configuring a VRF (Continued)

10.10.100.3/32 10.10.4.2 Serial5/1

224.0.0.0/24 receive

255.255.255.255/32 receive

The VRF routing table cust-one has prefixes in it that are populated by dynamic routing protocols and static routing, just like the global routing table. The concept of metrics, distance, next hop, and so on does not change. Because the VRF instance is associated with interfaces, only IP packets that are entering the PE router via those VRF interfaces are forwarded according to that VRF CEF table.

NOTE In Cisco IOS, CEF is the only switching method supported for forwarding IP packets from the VRF interface. As such, CEF must be enabled globally on all PE routers and all VRF interfaces.

Micro Expression Master

Micro Expression Master

If You Could Read Everyone Life A Book You Can Have Better Career, Great Relationships And Become Successful. This Book Is One Of The Most Valuable Resources In The World When It Comes To Reading the smallest and tiniest body Language and know what people are thinking about.

Get My Free Ebook


Post a comment