[c-nsp] BGP and VRFs

Bruce Pinsky bep at whack.org
Wed Mar 15 14:43:42 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alex Foster wrote:
> All,
> 
> I am trying to work through a configuration that will allow me to run
> BGP to a service providers network.  I need to run the BGP and iBGP
> processes within a VRF, so that they do not become part of the default
> routing table - this is for a good reason.  This configuration is not
> for an uplink to an ISP but a bespoke project.
> 
> I have two routers running iBGP between them (OSPF) and both have
> uplinks (paths) to the service providers network (same AS), I have some
> policies in place to prefer one path over the other and advertise a
> couple of /32s to the provider.
> 

Here do you mean you are running an IGP and that IGP is OSPF and you are
going to be using iBGP in addition to eBGP?

> What I am not clear on is where the iBGP neighbor statement should
> appear.  Should it appear as part of the global BGP config. or under the
> address-family ipv4 vrf config.
>

If you want the BGP session and the associated routes in the VRF context,
they must be in the IPv4 VRF address family context.

Here is a sample where iBGP sessions on the same router are in two
different contexts:

router bgp 1111
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 1111
 !
 address-family ipv4
 neighbor 3.3.3.3 activate
 no auto-summary
 no synchronization
 network 6.6.6.0 mask 255.255.255.0
 exit-address-family
 !
 address-family ipv4 vrf foo
 neighbor 2.2.2.2 remote-as 1111
 neighbor 2.2.2.2 activate
 no synchronization
 network 5.5.5.0 mask 255.255.255.0
 exit-address-family

R1#sh ip bgp sum
BGP router identifier 1.1.1.1, local AS number 1111
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down
State/PfxRcd
3.3.3.3         4  1111       35       33        1    0    0 00:13:41 0

R1#sh ip bgp v v foo sum
BGP router identifier 1.1.1.1, local AS number 1111
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down
State/PfxRcd
2.2.2.2         4  1111       47       51        1    0    0 00:15:23 0


- --
=========
bep

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEGG5uE1XcgMgrtyYRAr8ZAJ4q+/6KzKexjlPbZt/2hZgEjuqeCQCdH48M
8VbFRinI5nsfUxJsYJoKpQc=
=lgu7
-----END PGP SIGNATURE-----


More information about the cisco-nsp mailing list