A VRF is a Virtual Routing and Forwarding instance, it's basically a virtualization technique for IOS routers. Each VRF has its own interfaces (you cannot put a L3 interface in 2 different VRFs), it has its own routing table and everything.
You create a VRF by typing:
ip vrf my-out-vrf
You assign interfaces to a VRF using:
int fa0/0 ip vrf forwarding my-out-vrf
You create a static route and you look at the routing table for a VRF using:
ip route vrf my-out-vrf 10.1.1.0 255.255.255.0 192.168.5.5 sho ip route vrf my-out-vrf
lots of commands and features are "vrf-aware", just use the question mark to find out...
ping vrf my-vrf-out 10.1.1.2 sho ip cef vrf my-vrf-out 10.1.1.2 ip nat inside source list 199 interface fa0/0 vrf my-vrf-out overload
VPNs are MAGIC because they can have their encrypted traffic in 1 VRF and the decrypted traffic in another VRF.
The typical use case for this is an ISP that provides VPN service to multiple enterprise customers on the same box, the users and branches connect using internet for the encrypted traffic, but the decrypted traffic needs to go to the private network of each separate customer and this traffic cannot be mixed.
ivrf : Inside VRF, the VRF that contains the clear-text traffic (before encryption for outbound flows and after decryption for inbound flows)
fvrf : Front-door VRF (or outside VRF), the VRF that contain the encrypted traffic
global VRF: the routing instance that is used if no specific VRF is defined. If no VRF-aware config is used, everything is done in the global VRF and all interfaces are in the global VRF.
Crypto map-based with ivrf=cust1-vrf and fvrf=internet-vrf
ip cef ip vrf cust1-vrf ! ip vrf internet-vrf ! ! crypto keyring internet-keyring vrf internet-vrf pre-shared-key address 10.1.1.2 key cisco123 ! crypto isakmp policy 10 encr 3des authentication pre-share group 2
crypto isakmp profile cust1-ike-prof vrf cust1-vrf keyring internet-keyring match identity address 10.1.1.2 255.255.255.255 internet-vrf isakmp authorization list default ! crypto ipsec transform-set esp-3des-sha esp-3des esp-sha-hmac ! crypto map mymap 10 ipsec-isakmp set peer 10.1.1.2 set transform-set esp-3des-sha set isakmp-profile cust1-ike-prof match address 199 reverse-route
interface GigabitEthernet0/0 description internet WAN link ip vrf forwarding internet-vrf ip address 10.1.1.3 255.255.255.224 crypto map mymap ! interface GigabitEthernet0/1 description cust1 private VRF ip vrf forwarding cust1-vrf ip address 192.168.88.20 255.255.255.0 ! interface loopback10 ip vrf forwarding cust1-vrf ip address 18.104.22.168 255.255.255.255
ip route vrf internet-vrf 0.0.0.0 0.0.0.0 10.1.1.1 access-list 199 permit ip host 22.214.171.124 host 126.96.36.199
"vrf <ivrf>" on isakmp profile
fvrf on match statement of isakmp profile
keyring tagged with fvrf
RRI for route leaking (otherwise we don't hit the crypto map) or a static route like "ip route vrf cust1-vrf 188.8.131.52 255.255.255.255 GigabitEthernet0/0 10.1.1.1" (note that the route is on the ivrf routing table but points to an interface of the fvrf)
interfaces in their respective VRF
proper routes in each VRF
Tunnel-protection with ivrf=cust1-vrf and fvrf=internet-vrf
ip cef ip vrf cust1-vrf ! ip vrf internet-vrf ! crypto keyring internet-keyring vrf internet-vrf pre-shared-key address 10.1.1.2 key cisco123 ! crypto isakmp policy 10 encr 3des authentication pre-share group 2 ! crypto isakmp profile cust1-ike-prof keyring internet-keyring match identity address 10.1.1.2 255.255.255.255 internet-vrf isakmp authorization list default local-address GigabitEthernet0/0 ! crypto ipsec transform-set esp-3des-sha esp-3des esp-sha-hmac ! crypto ipsec profile cust1-ipsec-prof set transform-set esp-3des-sha set isakmp-profile cust1-ike-prof ! ! interface Tunnel200 ip vrf forwarding cust1-vrf ip address 172.16.4.4 255.255.255.0 tunnel source GigabitEthernet0/0 tunnel destination 10.1.1.2 tunnel mode ipsec ipv4 tunnel vrf internet-vrf tunnel protection ipsec profile cust1-ipsec-prof ! interface GigabitEthernet0/0 description internet WAN link ip vrf forwarding internet-vrf ip address 10.1.1.3 255.255.255.224 ! interface GigabitEthernet0/1 description cust1 private VRF ip vrf forwarding cust1-vrf ip address 192.168.88.20 255.255.255.0 ! ip route vrf internet-vrf 0.0.0.0 0.0.0.0 10.1.1.1
"ip vrf forwarding <ivrf>" on the tunnel interface
"tunnel vrf <fvrf>" on the tunnel interface
crypto keyring tagged with fvrf
NO "vrf <ivrf>" on isakmp profile
fvrf on match statement of isakmp profile
no need to worry about RRI (tunnel destination needs to be reachable in fvrf), inside traffic gets routed to the tunnel interface
interfaces in their VRF and proper routes in each VRF as well
Which scenarios are supported?
everything except fvrf=vrf1 and ivrf=global i.e.
ivrf=fvrf=global is OK (this is normal non-vrf aware ipsec)
ivrf=fvrf=vrf1 is OK (this is the example shown in the video)
ivrf=vrf1 and fvrf=vrf2 is OK
ivrf=vrf1 and fvrf=global is OK
in ISAKMP debugs, scroll up and make sure that you match the expected profile!!!, don't focus too much on the errors that you see later on, if you don't match the right profile, start by verifying this.
is the PSK in a keyring and tagged to the right VRF? Does the profile we match have the keyring?
Tunnel is up but traffic not passing
Check the routes in each VRF
confirm with "show ip cef vrf <ivrf> <remote-subnet-ip>" the adjacency for the remote subnet and the interface it goes to
confirm with "show ip cef vrf <fvrf> <peer-ip>" the adjacency for the remote peer
look for "protected vrf" in "show crypto ipsec sa", are we protecting the expected VRF?
A customer of mine is doing validation testing for ISE 2.6 and came across FN 70357. https://www.cisco.com/c/en/us/support/docs/field-notices/703/fn70357.html
Based on this, it is clear that TLS 1.2 support is not available in ISE 2.6. W...
Hello,I am facing an issue with SSH/HTTPS management access on a Firepower 4100. After un-boxing the device, I consoled in and ran through the initial setup. I assigned the IP, subnet, hostname, default gateway, and IP blocks on the interface....
Hello all, I was trying to upgrade to the latest Anyconnect version on the ASA pair. I successfully did that, to both of them but in the process, the Primary active FW became as Secondary active to make it back to Primary active I gave the command: "...
I am trying to figure out the best way to set this up on an ASA (9.6).We want 10.0.1.0 to go out ISP1 unless it fails, then choose ISP2.We want 10.0.2.0 to go out ISP2 unless it fails, then choose ISP1.(This is for simplicity there are several networks)&n...