www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / ROUTE / Module 5 / Path Control – Virtual Routing and Forwarding

Path Control – Virtual Routing and Forwarding

Virtual Routing and Forwarding (VRF) allows multiple routing table instances to co-exist on the same physical router at the same time by creating logical routing tables for each VRF. A VRF routing table is also referred to as a Virtual Private Network (VPN) routing table. The routing instances of each VPN routing table are independent of each other. This allows the same or overlapping IP address space to be used within the different VPNs.

While Virtual RF is commonly implemented by Service Providers using Multiprotocol Label Switching (MPLS) networks, a simpler form, referred to as VRF Lite or Multi-VRF, is also commonly used within enterprise networks to segregate Layer 3 traffic. Within the enterprise, VRF Lite can be used to perform Layer 3 segregation of network the traffic for different departments within the same organization, for example. The same IP address space can be allocated to all departments, without creating any conflicts.

Another example might be separating the management network from the production network. And yet another example might be separating guest traffic from corporate traffic. The traffic belonging to the different VRFs can then be routed over different paths, some of which may even traverse the same physical devices. This concept is illustrated in Figure 5-2:

5-2

Fig. 5-2. Virtual Routing and Forwarding

In Figure 5-2, multiple VRFs have been configured on R1. All the VRFs are using the 10.0.0.0/8 address space. Because the routing tables for each VRF are independent instances, this configuration is supported.  In addition to this, given the illustrated VRF implementation, R1 forwards traffic in different VRFs through different paths as defined by the administrators. For example, users in VRF A will never have access to the datacenter. Similarly, based on the configuration, users in VRF C have no access to the Internet. However, users in VRF B have access to both the datacenter and the Internet.

NOTE: You are not required to implement any IOS VRF configurations in the current ROUTE exam. The following section is included only to demonstrate the configuration and verification of a basic VRF Lite implementation using Cisco IOS software.

Implementing Virtual Routing and Forwarding Lite

While the configuration of VRF is technically beyond the scope of the current ROUTE exam, it takes nothing from you to have a basic understanding of how to configure and verify VRF Lite in Cisco IOS software. VRF Lite implementation, configuration and verification is described in this and the following section.

In Cisco IOS software, the configuration of VRF Lite is a simple and straightforward task. First, the VRF name must be defined using the ip vrf [name] global configuration command. Next, a route distinguisher is assigned to the VRF using the rd [route distinguisher] VRF configuration command. The route distinguisher is used to identify the VPN and is used to distinguish multiple VPN routes that have an identical prefix. The route distinguisher can be configured using either ASN:nn or IP-address:nn format.

NOTE: The n is simply represents and integer. You can use specify one integer or two integers.

Next, assign an interface to a particular VRF using the ip vrf forwarding [name] interface configuration command. And finally, configure either static routing or a dynamic routing protocol for the VRF. In Cisco IOS software, supported dynamic IGP routing protocols include OSPF, EIGRP, and RIPv2. VRF Lite is not supported for IS-IS.

In Cisco IOS software VRF Lite using OSPF is configured using the router ospf [process ID] vrf [name] global configuration command followed by the capability vrf-lite router configuration command. The remainder of the configuration, e.g. network statements, is performed in a similar manner to when VRF Lite is not being used.

For EIGRP and RIPv2, VRF configuration is implemented using the address-family ipv4 vrf [name] router configuration command. In addition, for EIGRP, the autonomous-system [number] VRF configuration subcommand must be used to specify the autonomous system number. Static routes for each VRF can be configured using theip route vrf [prefix] [mask] [interface | address] global configuration command.
Configuring and Verifying Virtual Routing and Forwarding Lite

Figure 4-1 shows a basic network. R1 is connected to router R2. R1 and R2 are running VRF Lite. The FastEthernet0/0-to-FastEthernet0/0 link between R1 and R2 respectively is assigned to and is used for traffic in VRF-A. The FastEthernet0/1-to-FastEthernet0/0 link between R1 and R2 respectively is assigned to and is used for traffic in VRF-B. Both VRFs are using the 10.10.0.0/16 address space. OSPF will be used on the FastEthernet0/0-to-FastEthernet0/0 link between R1 and R2 respectively, while EIGRP is used for the FastEthernet0/1-to-FastEthernet0/0 link that is between R1 and R2 respectively. The network topology is illustrated below:

4-1

Fig. 4-1. Configuring and Verifying VRF Lite

The first task when configuring VRF Lite is to configure the VRF name and assign it a route distinguisher. This implemented as follows on router R1:

R1(config)#ip vrf VRF-A
R1(config-vrf)#rd 1:1
R1(config-vrf)#exit
R1(config)#ip vrf VRF-B
R1(config-vrf)#rd 2:2
R1(config-vrf)#exit

A similar configuration is also implemented on router R2 as illustrated below:

R2(config)#ip vrf VRF-A
R2(config-vrf)#rd 1:1
R2(config-vrf)#exit
R2(config)#ip vrf VRF-B
R2(config-vrf)#rd 2:2
R2(config-vrf)#exit

Next, the interfaces are assigned to the configured VRFs on router R1 as illustrated below:

R1(config)#interface fastethernet 0/0
R1(config-if)#ip vrf forwarding VRF-A
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#exit
R1(config)#interface fastethernet 0/1
R1(config-if)#ip vrf forwarding VRF-B
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#exit

A similar configuration is also implemented on router R2 as illustrated in the following output:

R2(config)#interface fastethernet 0/0
R2(config-if)#ip vrf forwarding VRF-A
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#exit
R2(config)#interface fastethernet 0/1
R2(config-if)#ip vrf forwarding VRF-B
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#exit

NOTE: When and interface is assigned to or removed from a particular VRF, the interface IP address is removed by default. This is illustrated in the following output:

R1(config)#interface fastethernet 0/1
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#ip vrf forwarding VRF-B
% Interface FastEthernet0/1 IP address 10.0.0.1 removed due to enabling VRF VRF-B
R1(config-if)#exit
R1(config)#interface fastethernet 0/1
R1(config-if)#no ip vrf forwarding VRF-B
% Interface FastEthernet0/1 IP address 10.0.0.1 removed due to disabling VRF VRF-B

Therefore, when assigning an interface to a VRF, configure the VRF first, and then assign the IP address. It saves the additional step of having to re-specify the IP address again.

Continuing with the VRF Lite configuration example, this initial configuration can be validated using the show ip vrf [<name> | brief | detail | id <name> | interfaces <name>] command. On R1, the show ip vrf detailcommand prints out the following:

R1#show ip vrf detail
VRF VRF-A; default RD 1:1; default VPNID <not set>
Interfaces:
    Fa0/0
Connected addresses are not in global routing table
No Export VPN route-target communities
No Import VPN route-target communities
No import route-map
No export route-map
VRF label distribution protocol: not configured
VRF VRF-B; default RD 2:2; default VPNID <not set>
Interfaces:
    Fa0/1
Connected addresses are not in global routing table
No Export VPN route-target communities
No Import VPN route-target communities
No import route-map
No export route-map
VRF label distribution protocol: not configured

The third step is to configure the routing protocol. First, OSPF will be configured for the partner 1 VRF. This configuration is implemented on R1 as follows:

R1(config)#router ospf 1 vrf VRF-A
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 10.0.0.0 0.0.0.3 area 1
R1(config-router)#capability vrf-lite
R1(config-router)#exit

The OSPF VRF Lite configuration on R2 is implemented as follows:

R2(config)#router ospf 1 vrf VRF-A
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 10.10.0.0 0.0.255.255 area 0
R2(config-router)#network 10.0.0.0 0.0.0.3 area 1
R2(config-router)#capability vrf-lite
R2(config-router)#exit

Following this configuration, the show ip ospf neighbor command is used to verify that the adjacency between R1 and R2 has been established.

R1#show ip ospf neighborNeighbor ID     Pri   State       Dead Time   Address     Interface
2.2.2.2           0   FULL/  –    00:00:39    10.0.0.2    FastEthernet0/0

NOTE: For simplicity, the LAN segment has been configured as a point-to-point network type, which is why there is no DR/BDR elected for this segment. This is not a requirement when configuring VRF Lite. However, it prevents the unnecessary Type 2 LSA for this LAN segment.

When VRF Lite is configured, the show ip route vrf [name] command must be used to view the routing table(s) for each VRF. If you do not specify the VRF name, the command will show the contents of the global IP routing table only, and not for any VRFs. The routing table for VRF-A shows the following entry on R1 based on the implemented configurations:

 

R1#show ip route vrf VRF-A | begin Gateway
Gateway of last resort is not set10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O IA    10.10.0.0/16 [110/2] via 10.0.0.2, 00:03:49, FastEthernet0/0
C       10.0.0.0/30 is directly connected, FastEthernet0/0

Next, EIGRP will be configured for VRF-B. This configuration is implemented on R1 as follows:

R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#address-family ipv4 vrf VRF-B
R1(config-router-af)#autonomous-system 2
R1(config-router-af)#network 10.0.0.0 0.0.0.3
R1(config-router-af)#no auto-summary
R1(config-router-af)#exit

In the output above, EIGRP autonomous system 1 is the global routing process for the business. The VRF configuration for partner 2 is configured in address-family mode and the autonomous system and any networks for the partner 2 VRF are specified there.

The show ip eigrp vrf [name] neighbors command can be used to verify the EIGRP neighbor relationship(s) for the specified VRF as shown in the following output:

R1#show ip eigrp vrf VRF-B neighbors
IP-EIGRP neighbors for process 2
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
(sec)         (ms)       Cnt Num
0   10.0.0.2                Fa0/1             13 00:00:13    4   200  0  3

Again, the show ip route vrf [name] command is used to view the routing table for the VRF configured for partner 2. The output of this command shows the following:

R1#show ip route vrf VRF-B | begin Gateway
Gateway of last resort is not set10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       10.10.0.0/16 [90/156160] via 10.0.0.2, 00:11:28, FastEthernet0/1
C       10.0.0.0/30 is directly connected, FastEthernet0/1

To verify reachability to the 10.10.0.0/16 subnets of partner 1 and partner 2, a simple ping using the ping vrf [name] command is used as illustrated in the following output:

R1#ping vrf VRF-A 10.10.0.2Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

 

R1#ping vrf VRF-B 10.10.0.2Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

While simple to deploy and appropriate for small to medium-sized enterprises as well as shared data center environments, VRF Lite does not scale to the size required by global enterprises or large carriers, as there is the need to implement each VRF instance on every router or Layer 3 switch within the network. Additional configuration is also required to leak routes between the different VRFs allowing connectivity to shared resources.

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.