Lab Objective:
The focus of this lab is to understand Virtual Routing and Forwarding Lite implementation and verification in Cisco IOS Software using EIGRP and OSPF. Additional technologies tested also include VRF-aware Network Address Translation (NAT).
Lab Topology:
The lab network topology is illustrated below:
|
IMPORTANT NOTE If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no interface fastethernet 0/0 Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab. |
Task 1
Configure hostnames, IP addressing on all routers as illustrated in the network topology.
Task 2
Configure the following VRFs on the devices in the network:
- R1: VRF Name – VRFONE: RD – 100:100
- R2: VRF Name – VRFTWO: RD – 200:200
- R3: VRF Name – VRFONE: RD – 100:100
- R3: VRF Name – VRFTWO: RD – 200:200
- R4: VRF Name – VRFONE: RD – 100:100
- R4: VRF Name – VRFTWO: RD – 200:200
Verify your configuration using the appropriate commands:
Task 3
Configure EIGRP using AS 254 on R1 and assign interface Serial0/1 and LAN interfaces to VRF VRFONE. Verify your configuration using the appropriate commands.
Task 4
Configure OSPF on R2 and assign interface Serial0/1 and LAN interfaces to VRF VRFTWO. Verify your configuration using the appropriate commands.
Task 5
Configure EIGRP and OSPF for VRFONE and VRFTWO on R3. Verify your configuration using the appropriate commands.
Task 6
Configure EIGRP and OSPF for VRFONE and VRFTWO on R4. Verify your configuration using the appropriate commands.
Task 7
Configure two additional Loopback interfaces on R4 as follows:
- Loopback 100: IP Address 100.4.4.4/32 – VRF: VRFONE
- Loopback 200: IP Address 100.4.4.4/32 – VRF: VRFTWO
Do NOT advertise these Loopbacks via OSPF or EIGRP. However, ensure that R4 is able to ping the 150.1.1.0/24 subnet in VRFONE from the Loopback100 interface and R4 is able to ping the 150.2.2.0/24 subnet in VRFTWO from the Loopback200 interface.
Lab Validation
Task 1
Please refer to previous labs for basic IPv4 addressing and hostname configuration. This will not be included in this section to avoid being redundant.
Task 2
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.
This task is completed on all routers as follows:
| R1(config)#ip vrf VRFONE R1(config-vrf)#rd 100:100 R1(config-vrf)#exit |
| R2(config)#ip vrf VRFTWO R2(config-vrf)#rd 200:200 R2(config-vrf)#exit |
| R3(config)#ip vrf VRFONE R3(config-vrf)#rd 100:100 R3(config-vrf)#exit R3(config)#ip vrf VRFTWO R3(config-vrf)#rd 200:200 R3(config-vrf)#exit |
| R4(config)#ip vrf VRFONE R4(config-vrf)#rd 100:100 R4(config-vrf)#exit R4(config)#ip vrf VRFTWO R4(config-vrf)#rd 200:200 R4(config-vrf)#exit |
Following this, verify your solution using the show ip vrf command on all routers:
| R1#show ip vrf Name Default RD Interfaces |
| R2#show ip vrf Name Default RD Interfaces VRFTWO 200:200 |
| R3#show ip vrf Name Default RD Interfaces VRFONE 100:100 VRFTWO 200:200 |
| R4#show ip vrf Name Default RD Interfaces VRFONE 100:100 VRFTWO 200:200 |
Task 3
The requirements of this task are straightforward. 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 the ip route vrf [prefix] [mask] [interface | address] global configuration command. This task is completed as follows:
| R1(config)#interface fastethernet 0/0 R1(config-if)#ip vrf forwarding VRFONE % Interface FastEthernet0/0 IP address 150.1.1.1 removed due to enabling VRF VRFONE R1(config-if)#ip address 150.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#interface serial 0/1 R1(config-if)#ip vrf forwarding VRFONE % Interface Serial0/1 IP address 10.0.0.5 removed due to enabling VRF VRFONE R1(config-if)#ip address 10.0.0.5 255.255.255.252 R1(config-if)#exit R1(config)#router eigrp 1 R1(config-router)#address-family ipv4 vrf VRFONE R1(config-router-af)#network 150.1.1.1 0.0.0.0 R1(config-router-af)#network 10.0.0.5 0.0.0.0 R1(config-router-af)#no auto-summary R1(config-router-af)#autonomous-system 254 R1(config-router-af)#exit |
Verify your configuration using the show ip eigrp vrf <name> commands:
| R1#show ip eigrp vrf VRFONE interfaces IP-EIGRP interfaces for process 254 Xmit Queue Mean Pacing Time Multicast Pending Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes Se0/1 0 0/0 0 0/1 0 0 Fa0/0 0 0/0 0 0/1 0 0 |
Task 4
The requirements of this task are straightforward. 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. This task is completed as follows:
| R2(config)#interface fastethernet 0/0 R2(config-if)#ip vrf forwarding VRFTWO % Interface FastEthernet0/0 IP address 150.2.2.2 removed due to enabling VRF VRFTWO R2(config-if)#ip address 150.2.2.2 255.255.255.0 R2(config-if)#exit R2(config)#interface serial 0/1 R2(config-if)#ip vrf forwarding VRFTWO % Interface Serial0/1 IP address 10.0.0.9 removed due to enabling VRF VRFTWO R2(config-if)#ip address 10.0.0.9 255.255.255.252 R2(config-if)#exit R2(config)#router ospf 2 R2(config-router)#exit R2(config)#router ospf 2 vrf VRFTWO R2(config-router)#capability vrf-lite R2(config-router)#router-id 2.2.2.2 R2(config-router)#network 150.2.2.2 0.0.0.0 area 0 R2(config-router)#network 10.0.0.9 0.0.0.0 area 0 R2(config-router)#exit |
Verify your configuration using the show ip ospf commands:
| R2#show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Se0/1 2 0 10.0.0.9/30 64 P2P 0/0 Fa0/0 2 0 150.2.2.2/24 1 DR 0/0 |
Task 5
The requirements of this task are straightforward. Following the same logic used in the previous tasks, this task is completed as follows:
| R3(config)#interface serial 1/0 R3(config-if)#ip vrf forwarding VRFONE % Interface Serial1/0 IP address 10.0.0.6 removed due to enabling VRF VRFONE R3(config-if)#ip address 10.0.0.6 255.255.255.252 R3(config-if)#exit R3(config)#interface serial 1/1 R3(config-if)#ip vrf forwarding VRFTWO % Interface Serial1/1 IP address 10.0.0.10 removed due to enabling VRF VRFTWO R3(config-if)#ip address 10.0.0.10 255.255.255.252 R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#ip vrf forwarding VRFONE % Interface Serial1/2 IP address 10.0.0.13 removed due to enabling VRF VRFONE R3(config-if)#ip address 10.0.0.13 255.255.255.252 R3(config-if)#exit R3(config)#interface serial 1/3 R3(config-if)#ip vrf forwarding VRFTWO % Interface Serial1/3 IP address 10.0.0.17 removed due to enabling VRF VRFTWO R3(config-if)#ip address 10.0.0.17 255.255.255.252 R3(config-if)#exit R3(config)#router eigrp 1 R3(config-router)#address-family ipv4 vrf VRFONE R3(config-router-af)#no auto-summary R3(config-router-af)#network 10.0.0.6 0.0.0.0 R3(config-router-af)#network 10.0.0.13 0.0.0.0 R3(config-router-af)#autonomous-system 254 R3(config-router-af)#exit R3(config-router)#exit R3(config)#router ospf 3 vrf VRFTWO R3(config-router)#capability vrf-lite R3(config-router)#router-id 3.3.3.3 R3(config-router)#network 10.0.0.10 0.0.0.0 area 0 R3(config-router)#network 10.0.0.17 0.0.0.0 area 0 R3(config-router)#exit |
Verify your EIGRP configuration using the show ip eigrp vrf <name> commands:
| R3#show ip eigrp vrf VRFONE interfaces IP-EIGRP interfaces for process 254 Xmit Queue Mean Pacing Time Multicast Pending Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes Se1/0 1 0/0 9 5/190 226 0 Se1/2 0 0/0 0 5/5 0 0 |
| R3#show ip eigrp vrf VRFONE neighbors IP-EIGRP neighbors for process 254 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.0.0.5 Se1/0 11 00:03:07 9 1140 0 3 |
Verify your configuration using the show ip ospf commands:
| R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
Task 6
Following the same logic applied in previous tasks, this task is completed as follows:
| R4(config)#interface serial 0/0 R4(config-if)#ip vrf forwarding VRFONE % Interface Serial0/0 IP address 10.0.0.14 removed due to enabling VRF VRFONE R4(config-if)#ip address 10.0.0.14 255.255.255.252 R4(config-if)#exit R4(config)#interface serial 0/1 R4(config-if)#ip vrf forwarding VRFTWO % Interface Serial0/1 IP address 10.0.0.18 removed due to enabling VRF VRFTWO R4(config-if)#ip address 10.0.0.18 255.255.255.252 R4(config-if)#exit R4(config)#router eigrp 1 R4(config-router)#address-family ipv4 vrf VRFONE R4(config-router-af)#no auto-summary R4(config-router-af)#network 10.0.0.14 0.0.0.0 R4(config-router-af)#autonomous-system 254 R4(config-router-af)#exit R4(config-router)#exit R4(config)#router ospf 4 vrf VRFTWO R4(config-router)#capability vrf-lite R4(config-router)#router-id 4.4.4.4 R4(config-router)#network 10.0.0.18 0.0.0.0 area 0 R4(config-router)#exit |
Verify your EIGRP configuration using the show ip eigrp vrf <name> commands:
| R4#show ip eigrp vrf VRFONE interfaces IP-EIGRP interfaces for process 254 Xmit Queue Mean Pacing Time Multicast Pending Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes Se0/0 1 0/0 23 0/15 127 0 |
| R4#show ip eigrp vrf VRFONE neighbors IP-EIGRP neighbors for process 254 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.0.0.13 Se0/0 13 00:02:19 23 200 0 8 |
Verify your configuration using the show ip ospf commands:
| R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
At this point, verify VRF routing tables using the show ip route vrf <name> command:
| R1#show ip route vrf VRFONE
Routing Table: VRFONE Gateway of last resort is not set 10.0.0.0/30 is subnetted, 2 subnets |
| R2#show ip route vrf VRFTWO
Routing Table: VRFTWO Gateway of last resort is not set 10.0.0.0/30 is subnetted, 2 subnets |
| R3#show ip route vrf VRFONE
Routing Table: VRFONE Gateway of last resort is not set 10.0.0.0/30 is subnetted, 2 subnets |
| R3#show ip route vrf VRFTWO
Routing Table: VRFTWO Gateway of last resort is not set 10.0.0.0/30 is subnetted, 2 subnets |
| R4#show ip route vrf VRFONE
Routing Table: VRFONE Gateway of last resort is not set 10.0.0.0/30 is subnetted, 2 subnets |
| R4#show ip route vrf VRFTWO
Routing Table: VRFTWO Gateway of last resort is not set 10.0.0.0/30 is subnetted, 2 subnets |
Task 7
Simply because we have introduced VRF Lite into the network does not mean that the basic or core fundamentals do not apply. If VRF Lite was not used, we would use NAT to complete this task. Fortunately, Cisco IOS NAT is VRF-aware. This task is therefore completed as follows:
| R4(config)#interface loopback 100 R4(config-if)#ip vrf forwarding VRFONE R4(config-if)#ip address 100.4.4.4 255.255.255.255 R4(config-if)#ip nat inside R4(config-if)#exit R4(config)#interface loopback 200 R4(config-if)#ip vrf forwarding VRFTWO R4(config-if)#ip address 100.4.4.4 255.255.255.255 R4(config-if)#ip nat inside R4(config-if)#exit R4(config)#interface serial 0/0 R4(config-if)#ip nat outside R4(config-if)#exit R4(config)#interface serial 0/1 R4(config-if)#ip nat outside R4(config-if)#exit R4(config)#access-list 100 permit ip host 100.4.4.4 any R4(config)#$de source list 100 interface serial 0/0 vrf VRFONE overload R4(config)#$de source list 100 interface serial 0/1 vrf VRFTWO overload |
Following this configuration, test VRFONE NAT by pinging 150.1.1.1 from R4s Loopback100:
| R4#ping vrf VRFONE 150.1.1.1 source loopback 100
Type escape sequence to abort. |
Verify VRFONE NAT translations using the show ip nat translations command:
| R4#show ip nat translations vrf VRFONE verbose Pro Inside global Inside local Outside local Outside global icmp 10.0.0.14:1 100.4.4.4:1 150.1.1.1:1 150.1.1.1:1 create 00:00:20, use 00:00:20 timeout:60000, left 00:00:39, Map-Id(In): 1, flags: extended, use_count: 0, VRF : VRFONE, entry-id: 1, lc_entries: 0 |
Next, test VRFONE NAT by pinging 150.2.2.2 from R4s Loopback100:
| R4#ping vrf VRFTWO 150.2.2.2 source loopback 200
Type escape sequence to abort. |
Finally, verify VRFTWO NAT operation using the show ip nat translations command:
| R4#show ip nat translations vrf VRFTWO verbose Pro Inside global Inside local Outside local Outside global icmp 10.0.0.18:3 100.4.4.4:3 150.2.2.2:3 150.2.2.2:3 create 00:00:09, use 00:00:09 timeout:60000, left 00:00:50, Map-Id(In): 2, flags: extended, use_count: 0, VRF : VRFTWO, entry-id: 3, lc_entries: 0 |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1066 bytes R1# |
R2
|
R2#term len 0 Current configuration : 1029 bytes R2# |
R3
|
R3#term len 0 Current configuration : 1680 bytes R3# |
R4
|
R4#term len 0 Current configuration : 1699 bytes R4# |
