04-22-2009 10:22 AM - edited 03-04-2019 04:28 AM
Hi,
I've got a problem to import dynamically a route from a global routing table to a VRF.
So here is my configuration :
ip vrf TEST
rd 1:1
import ipv4 unicast map IMPORT
interface Vlan1
ip address 192.168.1.1 255.255.255.0
ip policy route-map IMPORT
router bgp 300
no synchronization
bgp log-neighbor-changes
network 5.5.5.0 mask 255.255.255.0
neighbor 100.2.1.2 remote-as 400
neighbor 100.2.1.2 ebgp-multihop 255
distribute-list prefix filter in
no auto-summary
ip prefix-list filter seq 5 permit 6.6.6.6/32
route-map IMPORT permit 10
match ip address prefix-list filter
This configuration is working fine but only once. When I am doing a clear ip bgp *, the new route "6.6.6.6" doesn't appear again in my VRF table.
WHen I check the global routing table the route reappear after few secondes (BGP update).
So I have to enter the command "no import ipv4 unicast map IMPORT" then "import ipv4 unicast map IMPORT" to get back the route 6.6.6.6 into the VRF.
Is there a solution to do this automatically without entering these two commands?
Best Regards
Julien
Solved! Go to Solution.
04-22-2009 11:38 AM
Julien,
It works for me, there is a delay of about 1 or 2 minutes but it works.
R2#clear ip bgp *
R2#
00:17:41: %BGP-5-ADJCHANGE: neighbor 192.168.12.1 Down User reset
Then I check CEF
The route appears in the global table
R2#sh ip cef
Prefix Next Hop Interface
0.0.0.0/32 receive
1.1.1.1/32 192.168.12.1
But it's not in the VRF
R2#sh ip cef vrf NETPRO
Prefix Next Hop Interface
0.0.0.0/32 receive
21.1.1.0/24 attached Loopback1
21.1.1.0/32 receive
Waited about 2 minutes then it showed:
R2#sh ip cef vrf NETPRO
Prefix Next Hop Interface
0.0.0.0/32 receive
1.1.1.1/32 192.168.12.1
R2#sh ip bgp vpn all
BGP table version is 2, local router ID is 23.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf NETPRO)
Import Map: NETPRO, Address-Family: IPv4 Unicast, Pfx Count/Limit: 1/1000
*>i1.1.1.1/32 192.168.12.1 0 100 0 i
My config portion:
ip vrf NETPRO
rd 1:1
import ipv4 unicast map NETPRO
ip prefix-list NETPRO seq 5 permit 1.1.1.1/32
!
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
neighbor 192.168.12.1 remote-as 65001
no auto-summary
!
address-family ipv4 vrf NETPRO
no auto-summary
no synchronization
exit-address-family
route-map NETPRO permit 10
match ip address prefix-list NETPRO
!
route-map NETPRO permit 20
!
R2#sh ver | i IOS
Cisco IOS Software, 7200 Software (C7200-K91P-M), Version 12.2(25)S15, RELEASE SOFTWARE (fc1)
I noticed you can accelerate this process by clearing the route table then CEF gets refreshed.
HTH,
__
Edison.
04-22-2009 11:38 AM
Julien,
It works for me, there is a delay of about 1 or 2 minutes but it works.
R2#clear ip bgp *
R2#
00:17:41: %BGP-5-ADJCHANGE: neighbor 192.168.12.1 Down User reset
Then I check CEF
The route appears in the global table
R2#sh ip cef
Prefix Next Hop Interface
0.0.0.0/32 receive
1.1.1.1/32 192.168.12.1
But it's not in the VRF
R2#sh ip cef vrf NETPRO
Prefix Next Hop Interface
0.0.0.0/32 receive
21.1.1.0/24 attached Loopback1
21.1.1.0/32 receive
Waited about 2 minutes then it showed:
R2#sh ip cef vrf NETPRO
Prefix Next Hop Interface
0.0.0.0/32 receive
1.1.1.1/32 192.168.12.1
R2#sh ip bgp vpn all
BGP table version is 2, local router ID is 23.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf NETPRO)
Import Map: NETPRO, Address-Family: IPv4 Unicast, Pfx Count/Limit: 1/1000
*>i1.1.1.1/32 192.168.12.1 0 100 0 i
My config portion:
ip vrf NETPRO
rd 1:1
import ipv4 unicast map NETPRO
ip prefix-list NETPRO seq 5 permit 1.1.1.1/32
!
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
neighbor 192.168.12.1 remote-as 65001
no auto-summary
!
address-family ipv4 vrf NETPRO
no auto-summary
no synchronization
exit-address-family
route-map NETPRO permit 10
match ip address prefix-list NETPRO
!
route-map NETPRO permit 20
!
R2#sh ver | i IOS
Cisco IOS Software, 7200 Software (C7200-K91P-M), Version 12.2(25)S15, RELEASE SOFTWARE (fc1)
I noticed you can accelerate this process by clearing the route table then CEF gets refreshed.
HTH,
__
Edison.
04-23-2009 03:09 AM
Hi Edison
Thanks a lot for answering to my post.
It was very helpfull and now my problem is resolved.
Regards,
Julien
04-23-2009 10:59 AM
Hi,
The trigger for evaluation of this import feature is when an update/withdrawn is received or during the BGP scanner which occurs every 60s.
HTH
Laurent.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide