cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3144
Views
5
Helpful
18
Replies

bgp between 2 routers

carl_townshend
Spotlight
Spotlight

Hi all

I have an issue, I have 2 routers, router A has 192.168.1.1/30 and router B has 192.168.1.2/30 , on each router I have included in the bgp network command network 192.168.1.0 mask 255.255.252

however one of the routers wont add the route to the bgp table its saying rib failure (higher admin distance),

can you not do this in BGP, I can see that both routers are adversiting the same network. however on my other router it is OK,  Am I doing the right thing here and should it work ?

cheers

Carl

2 Accepted Solutions

Accepted Solutions

Carl,

It depends.

Usualy it needs to be advertised.

If you have 3 routers as you wrote : A--------B ------ C , and all of them are running iBGP:

  -    if you advertise the both interconnects networks AB and BC from router B it will work

  -    if you advertise those networkers from the edge routers ( router A and C ) , the you will have a issue - iBGP loop prevention : do not advertise a prefixes received from a iBGP neighbour to another iBGP neighbour. This means that A will not receive the BC network and C will not receive the AB network

Dan

View solution in original post

BGP is usually  used for specific services. It was initialy designed for the internet prefix exchange and currently there are some other services that require BGP : like MPLS VPN.

I think that the answer to your question is : depends on your organization , and requirements.

As I see it, in any of cases BGP is not a IGP. For example if your organization is a financial company where fast failover is a must , then BGP is not the answer. On the other hand, on an ISP environment, you will run BGP together with an IGP ( IS-IS or OSPF ).

I think that in order to answer this kind of questions , you must start with the required result. But at any time you must know your options.

In your case , you can advertise the interconnect prefix from router B, or you can use a IGP.

Another ( using the same A---B---C topology ) if you will create a loopback interface on each router A,B,C and advertised it into BGP. It will require B to be the Route-reflector , in order to A and C to receive each others Loopbacks, But also to advertise from B  AB and BC networks into BGP.

Dan

View solution in original post

18 Replies 18

fb_webuser
Level 6
Level 6

you need "neighbor 192.168.1.1 remote-as 65xxx" on router that has IP of 192.168.1.2 and "neighbor 192.168.1.2 remote-as 65xxx" on router with ip of 192.168.1.1.

this is in my lab:

NJ-R1(config-router)#neighbor 192.168.1.2 remote-as 65116

NJ-R1(config-router)#%BGP-5-ADJCHANGE: neighbor 192.168.1.2 Up

---

Posted by WebUser Neeraj Jagga from Cisco Support Community App

hi there

all the neighbour statements are already installed, they are in the same AS using IBGP.

should it work when advertising /30s into the network, why does it say rib failure, higher admin distance on one of them ?

Hi Carl,

This is an expected behaviour.

Both routers , A and B , have this route as a connected route in the routing table.

BGP tells you that it cannot install the route in the routing table because some other protocol ( connected in this case ) has a better AD for it.

Dan

so how would you get BGP working between 2 routers if this is the case ? the connected route exists in the routing table so why wont it work?

The bgp is working. With "rib failure" it tells you that the BGP process received the prefix, but it cannot install it into RIB ( routing table ) because there is already a route installed with a better administrative distance. This is only a local behaviour, because if you have another running bgp router in the topology you will see the prefix installed in the routing table ( if the next hop is reachable ).

Dan

Hi there

when using bgp between point to point links and using a /30 mask, do I really need to add the network command for the point to point links? and just advertise the other networks attached ?

what is best practice here?

For example if I have 3 routers in a triangle, A B C, both connect to B on a single link, i notice that C cannot see A's interface even with a route reflector, the subnet for A is directly connected to router B so how come the traffic doesnt get there, though on C I can see the next hop A's inteface in the BGP table, but it wont ping.

do i need a static route? , surely it should work as 192.168.1.1 (Router A's interface) is directly connected to B

cheers

Carl,

It depends.

Usualy it needs to be advertised.

If you have 3 routers as you wrote : A--------B ------ C , and all of them are running iBGP:

  -    if you advertise the both interconnects networks AB and BC from router B it will work

  -    if you advertise those networkers from the edge routers ( router A and C ) , the you will have a issue - iBGP loop prevention : do not advertise a prefixes received from a iBGP neighbour to another iBGP neighbour. This means that A will not receive the BC network and C will not receive the AB network

Dan

hi

so what do people normally do in this case ? whats the best practice ?

fb_webuser
Level 6
Level 6

If you have a static route or a null route, please remove that as those routes have admin distance of 1.

---

Posted by WebUser Neeraj Jagga from Cisco Support Community App

what is the normal way of doing such setup? do most people use an IGP, then run BGP on top ?

BGP is usually  used for specific services. It was initialy designed for the internet prefix exchange and currently there are some other services that require BGP : like MPLS VPN.

I think that the answer to your question is : depends on your organization , and requirements.

As I see it, in any of cases BGP is not a IGP. For example if your organization is a financial company where fast failover is a must , then BGP is not the answer. On the other hand, on an ISP environment, you will run BGP together with an IGP ( IS-IS or OSPF ).

I think that in order to answer this kind of questions , you must start with the required result. But at any time you must know your options.

In your case , you can advertise the interconnect prefix from router B, or you can use a IGP.

Another ( using the same A---B---C topology ) if you will create a loopback interface on each router A,B,C and advertised it into BGP. It will require B to be the Route-reflector , in order to A and C to receive each others Loopbacks, But also to advertise from B  AB and BC networks into BGP.

Dan

Do many people use BGP on its own ? or do they normally run an IGP underneath it?, and do most people just run in on the Edge router to ISP's thats all ?

Usually you run BGP on the edge routes with your SP if you are an enterprise.

Dan

Just set up a lab ,

Router A B C in in Same AS

did as you said, and now that works fine with the /30s, I had to set up the middle router as a route reflector to get the routes from the loopbacks from A to C, However router A is showing  the next Hop from C, and its not directly connected, so I wanted the update to come from B, so on B I issued the neighbour C.C.C.C next hop self command, however the route on C from A has not changed, why is this ?

cheers

Carl

Review Cisco Networking for a $25 gift card