cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
815
Views
0
Helpful
7
Replies

IP routes to present in BGP table only

riyasrasheed
Level 1
Level 1

Dear Friends,

I came across this question while I am practicing R&S lab on GNS3.

The question is to advertise the loopback address of one router, But it should be seen only on the BGP table of

the rest of the routers.

The scenario is running OSPF with an area 0 on all routers and EBGP/ IBGP between ASes and within AS.

How to make this possible.

Appreicte your advice on this,

Thanks

7 Replies 7

Bilal Nawaz
VIP Alumni
VIP Alumni

I'm not sure if this would be feasible and would answer the lab question. If the loopback address is known to the routers over static routes or dynamically learned routes that has a better AD than what BGP uses, the BGP advertised route won't make it in the routing tables, but should make it to the BGP table I think. This would achieve the goal here. However it might not be appropriate to do that, but I'm not sure how else it can be possible.

You could advertise the better prefix (one that matches closely to the loop back address in ospf, than the one bgp would advertise out.

E.g. If the loop back is a /32 you would advertise as a /32 in ospf
And then advertise the same loopback address as a /24?
Therefore will always use the OSPF route to get to the prefix because of the longest match.

Or you can suppress the /32 route in bgp with the aggregate-address x.x.x.x x.x.x.x summary only
This will suppress the more specific route and advertise out the aggregate.

Since they are different routes/prefix, both will be installed in the routing table if they are seen to be better prefixes within their rights. Is there any redistribution?

I'd be really interested to know of a way to achieve this other than what is mentioned.

:-) great lab'ing!

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

hello
Sounds like your running ospf as the NLRI for bgp then running bgp over the top?
Is thie loopback address already in the ospf and bgp and you need to prohibit it from ospf?

Would you be able to post a topology and then it may make more sense ..well to me at least! ... Lol

Res
Paul

Sent from Cisco Technical Support iPad App


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello,

I have labed this as follows

R1----(ospf)---R2

(R1 has loop back 9.9.9.9)

R2

ip access-list standard deny

permit 9.9.9.9

router ospf 1

log-adjacency-changes

network 1.1.1.0 0.0.0.255 area 0

network 9.9.0.2 0.0.0.0 area 0

network 9.9.1.1 0.0.0.0 area 0

distribute-list deny in

output in R2

R2#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Ethernet1/0
L        1.1.1.2/32 is directly connected, Ethernet1/0
      9.0.0.0/32 is subnetted, 4 subnets
C        9.9.0.2 is directly connected, Loopback0
B        9.9.0.9 [200/0] via 1.1.1.1, 00:10:00
C        9.9.1.1 is directly connected, Loopback1
O        9.9.9.9 [110/11] via 1.1.1.1, 00:09:22, Ethernet1/0

Please rate helpful posts

Regards
Thanveer
"Everybody is genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is a stupid."

Adrian Coto
Level 1
Level 1

Hello riyasrasheed

If "only on the BGP table" means not even in RIB, then do not announce the route in your IGP, announce it in BGP, then use BGP—Selective Route Download:

   http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_bgp/configuration/xe-3s/irg-selective-download.html

Which is away to filter BGP routes towards the routing table.

Two concerns:

  - You will need a different IP address to establish the BGP sessions.

  - It may be hard to find a GNS3 compatible image with that feature.

Regards,

Adrian

I am very sorry, that I have understood the quetion in an otherway.

do yoy mean that it can be in ospf database as well as bgp rouing table, in the router where the route is getting orginated but in the rest it must only be in  bgp routing table but not in the database of ospf.

The route being in bgp routing table and not in ospf database means the route should appear as a bgp route.

can u please elaborate, i think i understood it wrong?

Regards
Thanveer
"Everybody is genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is a stupid."

riyasrasheed
Level 1
Level 1

Dear all, thanks for your briefing and commends..

I attached below the topology to make it clear, here the question is this, "advertise Lo of router R5(172.10.5.5) in BGP all routers should be able to see this network in their BGP tables only".

You cannot disable Synchronization in BGP.


I configured, ospf on all routers as IGP with area 0 on all routers and later configured BGP as shown, since it mentioned not to disable synchronization in BGP, either i need to redistribute  BGP to OSPFor Advertise networks in BGP.

I advertise networks in BGP and redistribute OSPF to BGP. So both routing table and BGP table have router entries....

But to remove the router from Route table didnt works ...

Kinldy advice what i have done and please correct if my understabding is not correct..

Thanks much..

Hello,

What do you mean by

I configured, ospf on all routers as IGP with area 0 on all routers 

I think you are supposed to configure IGP only within same AS. You should not run IGP with routers that are not in your domain, BGP is used to exchange prefixes between different domains (ASs).

So I think that solution is quite simple. Run OSPF only between R5 and R# because they are in same AS. Include Lo_R5 into OSPF domain. Then configure BGP, use network command or redistribution OSFP_to_BGP to inject Lo_R5 into BGP.

BGP will then advertise IP prefix of loopback to other BGP peers, so it will be in BGP table as you requested (not in routing table).

Best Regards

Please rate all helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions
Review Cisco Networking products for a $25 gift card