Weird BGP Problem

kpjunglekpjungle Member Posts: 426
Hi Folks,

I am having a problem with BGP and redistributing it into EIGRP. Heres my scenario: I have R1 connected to R2 which again is connected to R3. R1 and R3 have an iBGP peering. R1 is peering with R4 through eBGP.

Problem: I receive a route from R4 (7.7.7.7) with an AD of 20. I then redistribute this into EIGRP which is received by R3 as having an administrative distance of 170 (redistributed EIGRP routes). At the same time R3 gets an iBGP update on 7.7.7.7 with an AD of 200 (iBGP routes). For some reason, it flaps between installing it into the routing table through EIGRP (170) and iBGP (200). Since R3 is also redistributing into BGP, R1 ends up doing the same, but through eBGP (20) and iBGP (200). All in all it ends up flapping insanely on both R1 and R3.

My question is this, howcome the routing table will even install a route with a worse administrative distance in the first place and then cause the routing flaps?
Studying for CCNP (All done)

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    I just setup the same quickly and it works fine,eigrp route is taking preference over the ibgp route.I didn't bother with the additional funky redistribution as R3 will have precedence with AD 20.

    R1---R2----R3----R4

    R3--R4 ebgp
    R1--R2 ibgp

    100.100.0.0/16 is injected into bgp at R4.

    R4#sh ip bgp
    BGP table version is 2, local router ID is 4.4.4.4
    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
    *> 100.100.0.0/16 0.0.0.0 0 32768 i


    R3#sh runn | be router bgp
    router bgp 65200
    no synchronization
    bgp log-neighbor-changes
    neighbor 1.1.1.1 remote-as 65200
    neighbor 1.1.1.1 ebgp-multihop 2
    neighbor 1.1.1.1 update-source Loopback0
    neighbor 1.1.1.1 next-hop-self
    neighbor 4.4.4.4 remote-as 65300
    neighbor 4.4.4.4 ebgp-multihop 2
    neighbor 4.4.4.4 update-source Loopback0
    no auto-summary


    R3#sh ip route
    Codes: 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

    Gateway of last resort is not set

    1.0.0.0/32 is subnetted, 1 subnets
    D 1.1.1.1 [90/2809856] via 10.0.0.5, 00:17:09, Serial0/0
    100.0.0.0/16 is subnetted, 1 subnets
    B 100.100.0.0 [20/0] via 4.4.4.4, 00:12:36
    3.0.0.0/32 is subnetted, 1 subnets
    C 3.3.3.3 is directly connected, Loopback0
    4.0.0.0/32 is subnetted, 1 subnets
    S 4.4.4.4 [1/0] via 172.16.1.2
    172.16.0.0/24 is subnetted, 1 subnets
    C 172.16.1.0 is directly connected, Serial0/1
    10.0.0.0/30 is subnetted, 2 subnets
    D 10.0.0.0 [90/2681856] via 10.0.0.5, 00:23:18, Serial0/0
    C 10.0.0.4 is directly connected, Serial0/0



    R1#sh ip bgp
    BGP table version is 5, 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
    r>i100.100.0.0/16 3.3.3.3 0 100 0 65300 i
    R1#


    R1#sh runn | be router eigrp 1
    router eigrp 1
    network 1.1.1.1 0.0.0.0
    network 10.0.0.0 0.0.0.255
    no auto-summary
    eigrp router-id 1.1.1.1
    !
    router bgp 65200
    no synchronization
    bgp log-neighbor-changes
    neighbor 3.3.3.3 remote-as 65200
    neighbor 3.3.3.3 ebgp-multihop 2
    neighbor 3.3.3.3 update-source Loopback0
    no auto-summary
    !

    R1#sh ip route
    Codes: 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

    Gateway of last resort is not set

    1.0.0.0/32 is subnetted, 1 subnets
    C 1.1.1.1 is directly connected, Loopback0
    100.0.0.0/16 is subnetted, 1 subnets
    D EX 100.100.0.0 [170/2937856] via 10.0.0.2, 00:07:54, Serial0/0
    3.0.0.0/32 is subnetted, 1 subnets
    D 3.3.3.3 [90/2809856] via 10.0.0.2, 00:18:10, Serial0/0
    10.0.0.0/30 is subnetted, 2 subnets
    C 10.0.0.0 is directly connected, Serial0/0
    D 10.0.0.4 [90/2681856] via 10.0.0.2, 00:32:43, Serial0/0
    R1#
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • kpjunglekpjungle Member Posts: 426
    Hmm. Interesting.. Even though I have R1 connected to R4. Im doing mutual redistribution on both R1 and R3 (I had a link going from R3 to R4, but took it down).

    Heres the topology, for sake of clarity:
    bgp-topology.jpg

    R1:
    router bgp 65000
    no synchronization
    bgp log-neighbor-changes
    network 192.168.12.0
    redistribute eigrp 1
    neighbor 192.168.14.4 remote-as 65001
    neighbor 192.168.14.4 route-map PREFER-THIS-FOR-INCOMMING out
    neighbor 192.168.23.3 remote-as 65000
    neighbor 192.168.23.3 next-hop-self
    no auto-summary

    Im filtering out some routes I dont want advertised to R4.

    router bgp 65000
    no synchronization
    bgp log-neighbor-changes
    network 192.168.23.0
    redistribute eigrp 1
    neighbor 192.168.12.1 remote-as 65000
    neighbor 192.168.12.1 next-hop-self
    neighbor 192.168.34.4 remote-as 65001
    no auto-summary

    Pretty straightforward.

    On both R1 and R3 im redistributing BGP into EIGRP. Nothing special there.

    Now here's how it looks on R1 one second:
    10.0.0.0/32 is subnetted, 1 subnets
    B 10.10.10.10 [20/0] via 192.168.14.4, 00:00:00

    And now barely a second later:
    10.0.0.0/32 is subnetted, 1 subnets
    B 10.10.10.10 [200/6026496] via 192.168.23.3, 00:00:00

    Heres a sample output from "debug ip routing":
    *Mar 1 05:14:33.106: RT: add 10.10.10.10/32 via 192.168.14.4, bgp metric [20/0]
    *Mar 1 05:14:33.106: RT: NET-RED 10.10.10.10/32
    *Mar 1 05:14:33.202: RT
    R1#: del 10.10.10.10/32 via 192.168.14.4, bgp metric [20/0]
    *Mar 1 05:14:33.202: RT: delete subnet route to 10.10.10.10/32
    *Mar 1 05:14:33.202: RT: NET-RED 10.10.10.10/32
    *Mar 1 05:14:33.206: RT: delete network route to 10.0.0.0
    *Mar 1 05:14:33.206: RT: NET-RED 10.0.0.0/8
    *Mar 1 05:14:33.206: RT: SET_LAST_RDB for 10.10.10.10/32
    NEW rdb: via 192.168.23.3

    *Mar 1 05:14:33.210: RT: add 10.10.10.10/32 via 192.168.23.3, bgp metric [200/6026496]
    *Mar 1 05:14:33.210: RT: NET-RED 10.10.10.10/32
    *Mar 1 05:14:33.282: RT: del 10.10.10.10/32 via 192.168.23.3, bgp metric [200/6026496]
    *Mar 1 05:14:33.282: RT: delete subnet route to 10.10.10.10/32
    *Mar 1 05:14:33.282: RT: NET-RED 10.10.10.10/32
    *Mar 1 05:14:33.282: RT: delete network route to 10.0.0.0
    *Mar 1 05:14:33.282: RT: NET-RED 10.0.0.0/8
    *Mar 1 05:14:33.282: RT: SET_LAST_RDB for 10.10.10.10/32
    NEW rdb: via 192.168.14.4

    Really puzzled by this. Maybe if you try the mutual redistribution it will happen?
    Studying for CCNP (All done)
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    It's 3am here so my brain is fried.Can you post or pm me the full configs from all routers and i'll have a look tomorrow.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • kpjunglekpjungle Member Posts: 426
    EdTheLad wrote: »
    It's 3am here so my brain is fried.Can you post or pm me the full configs from all routers and i'll have a look tomorrow.

    Ahh.. sure man thanks! :)

    Sleep tight!
    Studying for CCNP (All done)
Sign In or Register to comment.