10-14-2010 04:00 PM - edited 08-24-2017 05:05 AM
ip vrf my-out-vrf
int fa0/0
ip vrf forwarding my-out-vrf
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
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
...
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.
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 1.1.1.1 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 1.1.1.1 host 2.2.2.2
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
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
=> everything
http://www.ccbootcamp.com/keith-cln.mov is not active anymore, do we have any other video available for this.
Why did you have "ip vrf forwarding" command applied to the interface with crypto map?
I tried this but it is not working in my lab.
Could you please help?
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
!
I have searched Cisco's document and there is not example with the above configuration. I understand that you are configuring iVRF and fVRF here.
It does work with VTI or without the "ip vrf forwarding" command.
Regards.
Adil.
Hi Adil, there are very few examples where the fvrf is configured, but I did include it in my example in order to show the most complete example. you can remove the fvrf from everywhere in the config and it will work just fine, but it will also work with it, you just need to make sure that you declare a default route in that VRF, so for example:
ip route vrf internet-vrf 0.0.0.0 0.0.0.0 10.1.1.1
If you post your entire lab config, I can have a look to see if I can figure out what's wrong.
Thanks Nicolas.
great article!
Great article, but I am having some problems. The VPN tunnel is up i see the decaps packets come all the way to the computer behind the IVRF and the reply going from the computer(did some sniffing), but I never see the packets go back throught the tunnel in encap. And when i do a trace route i see that the packets go all the way to the router.
But it's like the crypto is not aware, I have tried to set a static route and with different versions of the OS, but still nothing.
When running the follwing commands I get this:
IVRF
sh ip cef vrf KOMASP 172.23.1.0
172.23.1.0/24
unresolved via x.x.x.x
sh ip route vrf KOMASP
172.23.0.0/24 is subnetted, 1 subnets
S 172.23.1.0 [1/0] via 81.26.33.24
FVRF
sh ip cef vrf KOMASPVPN x.x.x.x
0.0.0.0/0
nexthop 85.89.198.81 GigabitEthernet0/0.101
Anyone got a clue why it's not picking up the packets or not sending them through the crypto?
Looks like we're missing the CEF adjacency for outbound traffic in the IVRF. Could you be hitting
Have you tried configuring "reverse-route remote-peer <next-hop-ip>" to force RRI to install a route in the IVRF pointing to the next-hop on the WAN?
After I defined reverse-route remote-peer 85.89.x.x i get this:
#sh ip cef vrf KOMASP 172.23.1.0
172.23.1.0/32
nexthop 85.89.x.x GigabitEthernet0/0.101
And the
#sh ip route vrf KOMASP 172.23.1.0
Routing Table: KOMASP
Routing entry for 172.23.1.0/32
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 85.89.x.x, via GigabitEthernet0/0.101
Route metric is 0, traffic share count is 1
So everything is looking a bit better, but I am still not hitting the cryptomap. no encaps.
But then I entered a static route
ip route vrf KOMASP 172.23.1.0 255.255.255.0 85.89.x.x gig0/0.101
then it started to work...
I guess they have not fixed this bug, I have tried version
c2900-universalk9-mz.SPA.152-4.M1.bin and c2900-universalk9-mz.SPA.152-3.T1.bin
Any chance you can do a config for Cisco VPN Client connecting to a router with vrf ? Thanks!
In Crypto map-based with ivrf=cust1-vrf and fvrf=internet-vrf case : when you have peer behind NAT IP, make sure to use the match identity address as actual IP of the peer (pre-nat address) if it is using default identity as the IP address
I have a 2547oDMVPN setup and trying to apply crypto.
When I apply crypto, the SA seems active and eBGP over the DMVPN returns, vpnv4 labels swap, cef table looks right. However, no traffic flows from local IP to remote IP in the VRF after applying configurations.
From what I can tell, it looks like there is no definition of the protected VRF (e.g. FVRF defined but IFRV is not).
basic crypto configs:
crypto isakmp policy 10
encryption 3des
authentication pre-share
hash md5
group 2
!
crypto keyring DMVPN_KEY_RING vrf FD_VRF
pre-shared-key address 0.0.0.0 key 0 cisco123
crypto isakmp profile DMVPN_ISAKMP
keyring DMVPN_KEY_RING
match identity address 0.0.0.0 FD_VRF
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
mode transport
!
crypto ipsec profile DMVPN
set transform-set 3DES_MD5
set isakmp-profile DMVPN_ISAKMP
!
# apply to hub and spoke tunnels
interface Tunnel 0
tunnel protection ipsec profile DMVPN shared
What happens to this setup when you add a second DMVPN tunnel for a new customer? Can you share the source-interface for the additional DMVPN tunnel or do you need a new Internet interface to source the second tunnel?
I have a dual hub, single DMVPN setup supporting multiple customers. I am unable to get crypto endpoints established on the correct tunnel at the hub routers. Some do terminate properly while others are in limbo or terminate to the incorrect VRF.
Can 2 iVRFs use one fVRF?
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: