10-06-2014 12:31 PM - edited 03-04-2019 11:54 PM
Hello all. When redistributing BGP routes learned from an IBGP confederation peer into OSPF, do I need to enter the bgp redistribute-internal command under the BGP process in order to ensure that BGP allows the routes to get redistributed? or does BGP treat routes learned from confederation peers like ebgp routes for all intents and purposes.
Thanks,
10-08-2014 06:06 AM
Hi,
do you mean a situation like this:
c2811-R1#sh ip bgp
BGP table version is 7, local router ID is 200.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
...
*>i200.8.8.8/32 192.168.20.3 0 100 0 (65002) i
c2811-R1#sh run | sec bgp
router bgp 65001
bgp confederation identifier 200
bgp confederation peers 65000 65002
...
neighbor 192.168.20.3 remote-as 65001
So an iBGP neigbor is advertising a prefix received from other AS within the same confederation.
c2811-R1#sh run | sec ospf
router ospf 1
redistribute bgp 65001 subnets
network 192.168.20.0 0.0.0.255 area 0
c2811-R1#sh ip ospf data
OSPF Router with ID (200.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
200.1.1.1 200.1.1.1 575 0x8000152F 0x002DAA 1
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.200.238.0 200.1.1.1 315 0x80000007 0x00C857 0
192.168.11.0 200.1.1.1 575 0x80000007 0x00CD9F 0
c2811-R1#
The prefix 200.8.8.8/32 is not redistributed to OSPF.
After adding
c2811-R1(config)#router bgp 65001
c2811-R1(config-router)#bgp redistribute-internal
I can see:
c2811-R1#sh ip ospf data
OSPF Router with ID (200.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
200.1.1.1 200.1.1.1 660 0x8000152F 0x002DAA 1
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.200.238.0 200.1.1.1 400 0x80000007 0x00C857 0
192.168.11.0 200.1.1.1 660 0x80000007 0x00CD9F 0
192.168.22.0 200.1.1.1 34 0x80000001 0x00BF28 0
200.3.3.0 200.1.1.1 34 0x80000001 0x00ECAB 0
200.8.8.8 200.1.1.1 34 0x80000001 0x008B12 65002
c2811-R1#
Now the prefix is redistributed.
Does this answer your question?
Best regards,
Milan
10-19-2014 10:15 PM
No, this does not answer my question. Im aware about the bgp redistribute-internal command to redistribute iBGP routes into IGP.
My question is whether you need the redistribute-internal command in order to redistribute routes learned from a BGP confederation peer.
To use your example above:
c2811-R1#sh run | sec bgp
router bgp 65001
bgp confederation identifier 200
bgp confederation peers 65000 65002
neighbor 192.168.20.3 remote-as 65002
router ospf 1
redistribute bgp 65001 subnets
10-20-2014 01:54 AM
Hi,
ok, so here is my lab router config:
router ospf 1
redistribute bgp 65001 subnets
network 192.168.20.0 0.0.0.255 area 0
!
router bgp 65001
bgp confederation identifier 200
bgp confederation peers 65000 65002
network 10.200.238.0 mask 255.255.255.0
neighbor 192.168.11.8 remote-as 65002
!
I can see:
c2811-R1#sh ip bgp
...
Network Next Hop Metric LocPrf Weight Path
*> 10.200.238.0/24 0.0.0.0 0 32768 i
*> 200.8.8.8/32 192.168.11.8 0 100 0 (65002) i
And
c2811-R1#sh ip ospf data
OSPF Router with ID (200.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
200.1.1.1 200.1.1.1 285 0x8000172C 0x002DAB 1
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.200.238.0 200.1.1.1 285 0x80000203 0x00CA57 0
200.8.8.8 200.1.1.1 262 0x80000001 0x002CF1 65002
c2811-R1#
So the answer to your question is:
No, you don't need redistribute-internal command in order to redistribute routes learned from a BGP confederation peer.
Best regards,
Milan
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