Re: Unable to import routes from one vrf to another vrf

From: garry baker <baker.garry_at_gmail.com>
Date: Wed, 17 Nov 2010 13:02:41 -0600

looks like you can bring them in from the Global Routing Table with the
'import ip4'

http://www.cisco.com/en/US/docs/ios/12_3t/12_3t14/feature/guide/gt_bgivt.html

using your same setup:

Router#sh ip route
     50.0.0.0/32 is subnetted, 1 subnets
C 50.50.50.1 is directly connected, Loopback50
     40.0.0.0/32 is subnetted, 1 subnets
C 40.40.40.1 is directly connected, Loopback40

Router#sh ip route vrf SITEL
     40.0.0.0/32 is subnetted, 1 subnets
B 40.40.40.1 is directly connected, 00:03:43, Loopback40

look no route-targets in BGP:

Router#sh bgp vpnv4 unicast all
BGP table version is 14, local router ID is 1.1.1.1
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: 10:10 (default for vrf SITEL)
Import Map: 40, Address-Family: IPv4 Unicast, Pfx Count/Limit: 1/1000
*> 40.40.40.1/32 0.0.0.0 0 32768 ?
Route Distinguisher: 20:20 (default for vrf VXI)
*> 10.10.10.1/32 0.0.0.0 0 32768 i
*> 20.20.20.1/32 0.0.0.0 0 32768 i
*> 30.30.30.1/32 0.0.0.0 0 32768 i

Router#sh bgp vpnv4 unicast all 40.40.40.1/32
BGP routing table entry for 10:10:40.40.40.1/32, version 14
Paths: (1 available, best #1, table SITEL)
Flag: 0x820
  Not advertised to any peer
  Local, imported path from 40.40.40.1/32
    0.0.0.0 from 0.0.0.0 (1.1.1.1)
      Origin incomplete, metric 0, localpref 100, weight 32768, valid,
sourced, no-import, best
      mpls labels in/out 19/nolabel

Router#sh bgp
BGP table version is 3, local router ID is 1.1.1.1
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
*> 40.40.40.1/32 0.0.0.0 0 32768 ?
*> 50.50.50.1/32 0.0.0.0 0 32768 ?

CONFIG:

ip vrf SITEL
 rd 10:10
 import ipv4 unicast map 40
 route-target export 100:100
 route-target import 200:200
!
ip vrf VXI
 rd 20:20
 route-target export 200:200
!
!
interface Loopback10
 ip vrf forwarding VXI
 ip address 10.10.10.1 255.255.255.255
!
interface Loopback20
 ip vrf forwarding VXI
 ip address 20.20.20.1 255.255.255.255
!
interface Loopback30
 ip vrf forwarding VXI
 ip address 30.30.30.1 255.255.255.255
!
interface Loopback40
 ip address 40.40.40.1 255.255.255.255
!
interface Loopback50
 ip address 50.50.50.1 255.255.255.255
!
router bgp 1
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 bgp scan-time 5
 redistribute connected
 no auto-summary
 !
 address-family ipv4 vrf VXI
  no synchronization
  network 10.10.10.1 mask 255.255.255.255
  network 20.20.20.1 mask 255.255.255.255
  network 30.30.30.1 mask 255.255.255.255
 exit-address-family
 !
 address-family ipv4 vrf SITEL
  no synchronization
 exit-address-family
!

--
Garry L. Baker
"There is no 'patch' for stupidity." - www.sqlsecurity.com
On Wed, Nov 17, 2010 at 12:13 PM, Naufal Jamal <naufalccie_at_yahoo.in> wrote:
> Thanks for your reply guys..unfortunately i lost the topology file for this
> and will have to redo it. I will test once again. This is a two router
> setup.
> R1 having two connections to R2 and each interface in a different VRF. The
> peer router is not in vrf.
>
> One more clarification i need : what is the difference between using import
> map <route-map> and import ipv4 unicast map <route-map> inside vrf?
>
> --- On Wed, 17/11/10, Marko Milivojevic <markom_at_ipexpert.com> wrote:
>
> From: Marko Milivojevic <markom_at_ipexpert.com>
> Subject: Re: Unable to import routes from one vrf to another vrf
> To: "George Goglidze" <goglidze_at_gmail.com>
> Cc: "garry baker" <baker.garry_at_gmail.com>, "Naufal Jamal"
> <naufalccie_at_yahoo.in>, ccielab_at_groupstudy.com
> Date: Wednesday, 17 November, 2010, 3:36 PM
>
> When in doubt, lab it up :-).
>
> --
> Marko Milivojevic - CCIE #18427
> Senior Technical Instructor - IPexpert
>
> FREE CCIE training: http://bit.ly/vLecture
>
> Mailto: markom_at_ipexpert.com
> Telephone: +1.810.326.1444
> Web: http://www.ipexpert.com/
>
> On Wed, Nov 17, 2010 at 15:32, George Goglidze <goglidze_at_gmail.com> wrote:
> > Nice one!!!
> > I didn't think that was possible... thanks for info. :)
> > Actually I think I'll lab it up, to see it for myself... never tried it
> > before, just sort of assumed it wouldn't work! :)
> > Cheers,
> >
> > On Wed, Nov 17, 2010 at 2:54 PM, Marko Milivojevic <markom_at_ipexpert.com>
> > wrote:
> >>
> >> Thanks Garry for saving me the time to post the same :-)
> >>
> >> --
> >> Marko Milivojevic - CCIE #18427
> >> Senior Technical Instructor - IPexpert
> >>
> >> FREE CCIE training: http://bit.ly/vLecture
> >>
> >> Mailto: markom_at_ipexpert.com
> >> Telephone: +1.810.326.1444
> >> Web: http://www.ipexpert.com/
> >>
> >> On Wed, Nov 17, 2010 at 14:49, garry baker <baker.garry_at_gmail.com>
> wrote:
> >> > seems to work on a single router setup? can you check your rt
> >> > communities to
> >> > make sure they are coming in with the markings you think they are, if
> >> > they
> >> > are coming from another router?
> >> >
> >> > ip vrf SITEL
> >> > B rd 10:10
> >> > B route-target export 100:100
> >> > B route-target import 200:200
> >> > !
> >> > ip vrf VXI
> >> > B rd 20:20
> >> > B route-target export 200:200
> >> > !
> >> > interface Loopback10
> >> > B ip vrf forwarding VXI
> >> > B ip address 10.10.10.1 255.255.255.255
> >> > !
> >> > interface Loopback20
> >> > B ip vrf forwarding VXI
> >> > B ip address 20.20.20.1 255.255.255.255
> >> > !
> >> > interface Loopback30
> >> > B ip vrf forwarding VXI
> >> > B ip address 30.30.30.1 255.255.255.255
> >> > !
> >> > router bgp 1
> >> > B no synchronization
> >> > B bgp router-id 1.1.1.1
> >> > B bgp log-neighbor-changes
> >> > B no auto-summary
> >> > B !
> >> > B address-family ipv4 vrf VXI
> >> > B no synchronization
> >> > B network 10.10.10.1 mask 255.255.255.255
> >> > B network 20.20.20.1 mask 255.255.255.255
> >> > B network 30.30.30.1 mask 255.255.255.255
> >> > B exit-address-family
> >> > !
> >> > ip extcommunity-list 1 permit rt 200:200
> >> > !
> >> > ip prefix-list VXI seq 5 permit 30.30.30.1/32
> >> > !
> >> > route-map VXI-SITEL permit 10
> >> > B match ip address prefix-list VXI
> >> > B match extcommunity 1
> >> >
> >> >
> >> > WITH import map VXI-SITEL:
> >> >
> >> > Router#sh bgp vpnv4 unicast all
> >> > BGP table version is 8, local router ID is 1.1.1.1
> >> > Status codes: s suppressed, d damped, h history, * valid, > best, i -
> >> > internal,
> >> > B  B  B  B  B  B  B r RIB-failure, S Stale
> >> > Origin codes: i - IGP, e - EGP, ? - incomplete
> >> >
> >> > B  Network B  B  B  B  B Next Hop B  B  B  B  B  B Metric LocPrf
> Weight
> >> > Path
> >> > Route Distinguisher: 10:10 (default for vrf SITEL)
> >> > *> 30.30.30.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > Route Distinguisher: 20:20 (default for vrf VXI)
> >> > *> 10.10.10.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > *> 20.20.20.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > *> 30.30.30.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> >
> >> > Router#sh ip route vrf SITEL
> >> > Routing Table: SITEL
> >> > B  B  30.0.0.0/32 is subnetted, 1 subnets
> >> > B B  B  B  30.30.30.1 is directly connected, 00:02:46, Loopback30
> >> >
> >> >
> >> >
> >> > WITHOUT import map VXI-SITEL:
> >> >
> >> > Router#conf t
> >> > Enter configuration commands, one per line. B End with CNTL/Z.
> >> > Router(config)#ip vrf SITEL
> >> > Router(config-vrf)#no B import map VXI-SITEL
> >> > Router(config-vrf)#do clear bgp all 1
> >> > %BGP: No peer is configured with AS 1
> >> >
> >> > Router(config-vrf)#do sh bgp vpnv4 unicast all
> >> > BGP table version is 10, local router ID is 1.1.1.1
> >> > Status codes: s suppressed, d damped, h history, * valid, > best, i -
> >> > internal,
> >> > B  B  B  B  B  B  B r RIB-failure, S Stale
> >> > Origin codes: i - IGP, e - EGP, ? - incomplete
> >> >
> >> > B  Network B  B  B  B  B Next Hop B  B  B  B  B  B Metric LocPrf
> Weight
> >> > Path
> >> > Route Distinguisher: 10:10 (default for vrf SITEL)
> >> > *> 10.10.10.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > *> 20.20.20.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > *> 30.30.30.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > Route Distinguisher: 20:20 (default for vrf VXI)
> >> > *> 10.10.10.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > *> 20.20.20.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> > *> 30.30.30.1/32 B  B 0.0.0.0 B  B  B  B  B  B  B  B  B 0 B  B  B  B
> >> >  32768 i
> >> >
> >> >
> >> > Router(config)#do sh ip route vrf SITEL
> >> >
> >> > Routing Table: SITEL
> >> > B  B  20.0.0.0/32 is subnetted, 1 subnets
> >> > B B  B  B  20.20.20.1 is directly connected, 00:00:38, Loopback20
> >> > B  B  10.0.0.0/32 is subnetted, 1 subnets
> >> > B B  B  B  10.10.10.1 is directly connected, 00:00:38, Loopback10
> >> > B  B  30.0.0.0/32 is subnetted, 1 subnets
> >> > B B  B  B  30.30.30.1 is directly connected, 00:04:56, Loopback30
> >> >
> >> > --
> >> > Garry L. Baker
> >> >
> >> > "There is no 'patch' for stupidity." - www.sqlsecurity.com
> >> >
> >> >
> >> > On Tue, Nov 16, 2010 at 6:54 PM, Naufal Jamal <naufalccie_at_yahoo.in>
> >> > wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I am trying to import a specific subnet 30.30.30.1/32 subnet routes
> >> >> from
> >> >> VXI
> >> >> to SITEL VRF.
> >> >> I am able to import all the routes from VXI to SITEL but unable to
> >> >> import
> >> >> specific one route.
> >> >>
> >> >> Can any one look into the below config and help out please?
> >> >>
> >> >> ip vrf SITEL
> >> >> B rd 10:10
> >> >> B import map VXI-SITEL
> >> >> B route-target export 100:100
> >> >> B route-target import 200:200
> >> >> !
> >> >> ip vrf VXI
> >> >> B rd 20:20
> >> >> B route-target export 200:200
> >> >>
> >> >>
> >> >> ip extcommunity-list 1 permit rt 200:200
> >> >>
> >> >> ip prefix-list VXI seq 5 permit 30.30.30.1/32
> >> >> !
> >> >> !
> >> >> !
> >> >> route-map VXI-SITEL permit 10
> >> >> B match ip address prefix-list VXI
> >> >> B match extcommunity 1
> >> >>
> >> >>
> >> >>
> >> >> MDCXRC#sh ip bgp vpnv4 vrf SITEL
> >> >> BGP table version is 43, local router ID is 1.1.1.1
> >> >> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> >> >> internal,
> >> >> B  B  B  B  B  B  B r RIB-failure, S Stale
> >> >> Origin codes: i - IGP, e - EGP, ? - incomplete
> >> >>
> >> >> B  Network B  B  B  B  B Next Hop B  B  B  B  B  B Metric LocPrf
> Weight
> >> >> Path
> >> >> Route Distinguisher: 10:10 (default for vrf SITEL)
> >> >> *> 20.20.20.1/32 B  B 1.1.1.2 B  B  B  B  B  B  B  B  B 0 B  B  B  B
>  B
> >> >>  B  0 200 i
> >> >>
> >> >>
> >> >> MDCXRC#sh ip bgp vpnv4 vrf VXI
> >> >> BGP table version is 43, local router ID is 1.1.1.1
> >> >> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> >> >> internal,
> >> >> B  B  B  B  B  B  B r RIB-failure, S Stale
> >> >> Origin codes: i - IGP, e - EGP, ? - incomplete
> >> >>
> >> >> B  Network B  B  B  B  B Next Hop B  B  B  B  B  B Metric LocPrf
> Weight
> >> >> Path
> >> >> Route Distinguisher: 20:20 (default for vrf VXI)
> >> >> *> 10.10.10.1/32 B  B 2.2.2.2 B  B  B  B  B  B  B  B  B 0 B  B  B  B
>  B
> >> >>  B  0 200 i
> >> >> *> 30.30.30.1/32 B  B 2.2.2.2 B  B  B  B  B  B  B  B  B 0 B  B  B  B
>  B
> >> >>  B  0 200 i
> >> >>
> >> >>
> >> >> Blogs and organic groups at http://www.ccie.net
> >> >>
> >> >>
> _______________________________________________________________________
> >> >> Subscription information may be found at:
> >> >> http://www.groupstudy.com/list/CCIELab.html
> >> >
> >> >
> >> > Blogs and organic groups at http://www.ccie.net
> >> >
> >> >
> _______________________________________________________________________
> >> > Subscription information may be found at:
> >> > http://www.groupstudy.com/list/CCIELab.html
> >>
> >>
> >> Blogs and organic groups at http://www.ccie.net
> >>
> >> _______________________________________________________________________
> >> Subscription information may be found at:
> >> http://www.groupstudy.com/list/CCIELab.html
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
Blogs and organic groups at http://www.ccie.net
Received on Wed Nov 17 2010 - 13:02:41 ART

This archive was generated by hypermail 2.2.0 : Sun Dec 05 2010 - 22:14:56 ART