something strange going on with my BGP config here.

rakemrakem Member Posts: 800
having some strange issues with the routers in AS5100, as shown in the diagram. Dotted lines indicate a neighbor adjacency.

bgpnet2.jpg

so i have added the 33.33.33.0/24 network to R3 and the 22.22.22.0/24 network to R2.
R1 is configured as a route reflector, the problem is that somehow R3 is picking up the network 22.22.22.0/24 with a next hop of 2.2.2.2 but i have no idea it is getting the next hop of 2.2.2.2 as I have not configured any next-hop-self commands on R1.

R2 does the opposite, it learns of the 33.33.33.0 network but its not marked as best because it has no route to the next hop of 3.3.3.3. If i add the next-hop-self command for R1 this does not change anything.

here are the relevant configs:
R1 Running config:
!
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Serial1/0
ip address 10.1.21.1 255.255.255.252
ip pim sparse-dense-mode
no fair-queue
serial restart-delay 0
!
interface Serial1/1
ip address 10.1.22.1 255.255.255.252
ip pim sparse-dense-mode
serial restart-delay 0
!
router bgp 5100
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 5100
neighbor 2.2.2.2 update-source Loopback1
neighbor 2.2.2.2 route-reflector-client
neighbor 2.2.2.2 next-hop-self
neighbor 3.3.3.3 remote-as 5100
neighbor 3.3.3.3 update-source Loopback1
neighbor 3.3.3.3 route-reflector-client
no auto-summary
!
ip route 2.2.2.2 255.255.255.255 10.1.21.2
ip route 3.3.3.3 255.255.255.255 10.1.22.2

R1 BGP table:
Network Next Hop Metric LocPrf Weight Path
*>i22.22.22.0/24 2.2.2.2 0 100 0 i
*>i33.33.33.0/24 3.3.3.3 0 100 0 i
R1#

R1 BGP Neighbour table:
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 5100 99 102 5 0 0 01:17:34 1
3.3.3.3 4 5100 96 97 5 0 0 01:26:55 1
R1#

So everything looks good on R1. Notice i only have next-hop-self configured on the 2.2.2.2 neighbor.

R2 Running Config:
!

interface Loopback1
ip address 2.2.2.2 255.255.255.255
!
interface Loopback22
ip address 22.22.22.22 255.255.255.0
!
interface Serial1/0
ip address 10.1.21.2 255.255.255.252
ip pim sparse-dense-mode
no fair-queue
serial restart-delay 0
!
interface Serial1/2
bandwidth 1200
ip address 10.1.23.1 255.255.255.252
ip pim sparse-dense-mode
serial restart-delay 0
!
!
router bgp 5100
no synchronization
bgp log-neighbor-changes
network 22.22.22.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 5100
neighbor 1.1.1.1 update-source Loopback1
no auto-summary
!
ip route 1.1.1.1 255.255.255.255 10.1.21.1
ip route 4.4.4.4 255.255.255.255 100.1.1.2

R2 BGP Table
Network Next Hop Metric LocPrf Weight Path
*> 22.22.22.0/24 0.0.0.0 0 32768 i
* i33.33.33.0/24 3.3.3.3 0 100 0 i
R2#

Notice here that it has a valid route to the 33.33.33.0 network but its not best since it has no idea how to get to 3.3.3.3. (even though next-hop-self is on R1)

R2 Neighbor Table:
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 5100 105 102 2 0 0 01:20:20 1
R2#



R3 Running config:

interface Loopback1
ip address 3.3.3.3 255.255.255.255
!
interface Loopback33
ip address 33.33.33.33 255.255.255.0
!
!
interface Serial1/1
ip address 10.1.22.2 255.255.255.252
ip pim sparse-dense-mode
serial restart-delay 0
!
interface Serial1/2
bandwidth 1200
ip address 10.1.23.2 255.255.255.252
serial restart-delay 0
!
interface Serial1/3
ip address 200.1.1.1 255.255.255.252
ip pim sparse-dense-mode
serial restart-delay 0
!
router bgp 5100
no synchronization
bgp log-neighbor-changes
network 33.33.33.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 5100
neighbor 1.1.1.1 update-source Loopback1
no auto-summary
!
ip route 0.0.0.0 0.0.0.0 200.1.1.2
ip route 1.1.1.1 255.255.255.255 10.1.22.1
ip route 6.6.6.6 255.255.255.255 200.1.1.2

R3 BGP Table
Network Next Hop Metric LocPrf Weight Path
*>i22.22.22.0/24 2.2.2.2 0 100 0 i
*> 33.33.33.0/24 0.0.0.0 0 32768 i
R3#

This is the weird bit.... R3 has a best and valid route to 22.22.22.0 somehow using 2.2.2.2 as the next hop, even though it has no route to 2.2.2.2. I cant ping 2.2.2.2.

R3 BGP Neighbor table
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 5100 103 102 5 0 0 01:32:49 1
R3#


so anyone got some ideas on whats going on here?
thanks.
CCIE# 38186
showroute.net

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    rakem wrote:
    having some strange issues with the routers in AS5100, as shown in the diagram. Dotted lines indicate a neighbor adjacency.

    so i have added the 33.33.33.0/24 network to R3 and the 22.22.22.0/24 network to R2.
    R1 is configured as a route reflector, the problem is that somehow R3 is picking up the network 22.22.22.0/24 with a next hop of 2.2.2.2 but i have no idea it is getting the next hop of 2.2.2.2 as I have not configured any next-hop-self commands on R1.

    R2 does the opposite, it learns of the 33.33.33.0 network but its not marked as best because it has no route to the next hop of 3.3.3.3. If i add the next-hop-self command for R1 this does not change anything.

    R1 is a route reflector, it doesnt modify routing information received by R2 is reflects it.The reason you have a route reflector is so that you dont have to create a full mesh of ibgp neighbors.All R2 routing info received on R1 is reflected to R3. R1 has a route 22.22.22.22, it sends this route to R1 marking itself i.e. its own router-id as the next-hop, R1 receives this and reflects it to R3, R3 doesnt have a route to R2 hence you dont have a path to 22.22.22.22 as next-hop is unknown.This is why you need an IGP, advertise all you router-ids and then no problem, alternatively make statics to all router-ids. You should read up about the NEXT-HOP attribute as its clear you dont understand how it works.Next-hop self is used between ASs so why are you concerned about it here within an AS? my guess is because you dont understand what the command is for.
    Read read and read somemore!
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • rakemrakem Member Posts: 800
    the configuration on R2 and R3 is identical. R1 has a route reflector for both R2 and R3. Why then does R3 have a valid route to 22.22.22.0 and R3 does not have a valid route to 33.33.33.0. I dont get how why R3 has a valid route to 22.22.22.0 and R2 doesn't have a route to 33.33.33.0.

    Thats what i'm asking, i know what the next-hop-self command does. Im just mucking around with different setups in a lab, which is a good way to learn in my opinion.
    CCIE# 38186
    showroute.net
  • larkspurlarkspur Member Posts: 235
    dang someone is a bit grumpy!!!
    just trying to keep it all in perspective!
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    rakem wrote:
    the configuration on R2 and R3 is identical. R1 has a route reflector for both R2 and R3. Why then does R3 have a valid route to 22.22.22.0 and R3 does not have a valid route to 33.33.33.0. I dont get how why R3 has a valid route to 22.22.22.0 and R2 doesn't have a route to 33.33.33.0.

    Thats what i'm asking, i know what the next-hop-self command does. Im just mucking around with different setups in a lab, which is a good way to learn in my opinion.

    R3 is doing recursive lookup for its next-hop via the default route you have configured, R3 is assuming it has a path to the next-hop.The configs of R2 and R3 are not identical as R2 does not have a default route configured.When troubleshooting bgp you should also look at the ip routing table, "sh ip route" .
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • rakemrakem Member Posts: 800
    EdTheLad wrote:

    R3 is doing recursive lookup for its next-hop via the default route you have configured, R3 is assuming it has a path to the next-hop.

    ah yep your right.. removed the default route and the best route from R3 was removed....

    thanks for the help, sorry if i was a bit abrupt before, i do appreciate all the help from everyone in the forum
    CCIE# 38186
    showroute.net
Sign In or Register to comment.