1 2 Previous Next 25 Replies Latest reply: Apr 20, 2012 8:29 AM by sg4rb0sss Go to original post RSS
      • 15. Re: Is this a bug?
        Erick

        Without checking the running configuration, I have no idea.

        • 16. Re: Is this a bug?
          sg4rb0sss

          BGP Deterministic MED copy.png

           

           

          //R1

          interface FastEthernet0/0

          ip address 12.12.12.1 255.255.255.252

          !

          interface FastEthernet0/1

          ip address 13.13.13.1 255.255.255.252

          !

          interface FastEthernet1/0

          no switchport

          ip address 14.14.14.1 255.255.255.252

          !

          router bgp 10

          no synchronization

          bgp router-id 1.1.1.1

          bgp log-neighbor-changes

          network 12.12.12.0 mask 255.255.255.252

          network 13.13.13.0 mask 255.255.255.252

          network 14.14.14.0 mask 255.255.255.252

          neighbor 12.12.12.2 remote-as 20

          neighbor 13.13.13.2 remote-as 30

          neighbor 14.14.14.2 remote-as 30

          no auto-summary

           

           

          //R2

          interface FastEthernet0/0

          ip address 12.12.12.2 255.255.255.252

          !

          interface FastEthernet0/1

          ip address 25.25.25.1 255.255.255.252

          !

          router bgp 20

          no synchronization

          bgp router-id 2.2.2.2

          bgp log-neighbor-changes

          network 12.12.12.0 mask 255.255.255.252

          network 25.25.25.0 mask 255.255.255.252

          neighbor 12.12.12.1 remote-as 10

          neighbor 12.12.12.1 route-map med out

          neighbor 25.25.25.2 remote-as 40

          no auto-summary

          !

          ip prefix-list med seq 5 permit 100.100.100.0/24

          !

          route-map med permit 10

          match ip address prefix-list med

          set metric 150

           

          //R3

          interface FastEthernet0/0

          ip address 13.13.13.2 255.255.255.252

          !

          interface FastEthernet0/1

          ip address 35.35.35.1 255.255.255.252

          !

          interface FastEthernet1/0

          no switchport

          ip address 34.34.34.1 255.255.255.252

          !

          router bgp 30

          no synchronization

          bgp router-id 3.3.3.3

          bgp log-neighbor-changes

          network 13.13.13.0 mask 255.255.255.252

          network 34.34.34.0 mask 255.255.255.252

          network 35.35.35.0 mask 255.255.255.252

          neighbor 13.13.13.1 remote-as 10

          neighbor 13.13.13.1 route-map med out

          neighbor 34.34.34.2 remote-as 30

          neighbor 35.35.35.2 remote-as 40

          no auto-summary

          !

          ip prefix-list med seq 5 permit 100.100.100.0/24

          !

          route-map med permit 10

          match ip address prefix-list med

          set metric 100

           

          //R4

          interface FastEthernet0/0

          ip address 14.14.14.2 255.255.255.252

          !

          interface FastEthernet0/1

          ip address 34.34.34.2 255.255.255.252

          !

          interface FastEthernet1/0

          no switchport

          ip address 45.45.45.1 255.255.255.252

          !

          router bgp 30

          no synchronization

          bgp router-id 4.4.4.4

          bgp log-neighbor-changes

          network 14.14.14.0 mask 255.255.255.252

          network 34.34.34.0 mask 255.255.255.252

          network 45.45.45.0 mask 255.255.255.252

          neighbor 14.14.14.1 remote-as 10

          neighbor 14.14.14.1 route-map med out

          neighbor 34.34.34.1 remote-as 30

          neighbor 45.45.45.2 remote-as 40

          no auto-summary

          !

          ip prefix-list med seq 5 permit 100.100.100.0/24

          !

          route-map med permit 10

          match ip address prefix-list med

          set metric 200

           

          //R5

          interface Loopback0

          ip address 100.100.100.1 255.255.255.0

          !

          interface FastEthernet0/0

          ip address 35.35.35.2 255.255.255.252

          !

          interface FastEthernet0/1

          ip address 25.25.25.2 255.255.255.252

          !

          interface FastEthernet1/0

          no switchport

          ip address 45.45.45.2 255.255.255.252

          !

          router bgp 40

          no synchronization

          bgp router-id 5.5.5.5

          bgp log-neighbor-changes

          network 25.25.25.0 mask 255.255.255.252

          network 35.35.35.0 mask 255.255.255.252

          network 45.45.45.0 mask 255.255.255.252

          network 100.100.100.0 mask 255.255.255.0

          neighbor 25.25.25.1 remote-as 20

          neighbor 35.35.35.1 remote-as 30

          neighbor 45.45.45.1 remote-as 30

          no auto-summary

          • 17. Re: Is this a bug?
            Martin

            here are my results; as of 4:44 pm (thinking about reloading)

             

            R1#sh ip bgp summary

             

            Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

            12.12.12.2      4    20      33      35        6    0    0 00:28:44        1

            13.13.13.2      4    30      34      35        6    0    0 00:27:37        1

            14.14.14.2      4    30      31      33        6    0    0 00:25:25        1

            R1#

            R1#sh ip bgp  100.100.100.0

            BGP routing table entry for 100.100.100.0/24, version 6

            Paths: (3 available, best #2, table Default-IP-Routing-Table)

              Advertised to update-groups:

                    1

              20 40

                12.12.12.2 from 12.12.12.2 (2.2.2.2)

                  Origin IGP, metric 150, localpref 100, valid, external

              30 40

                13.13.13.2 from 13.13.13.2 (3.3.3.3)

                  Origin IGP, metric 100, localpref 100, valid, external, best

              30 40

                14.14.14.2 from 14.14.14.2 (4.4.4.4)

                  Origin IGP, metric 200, localpref 100, valid, external

            R1#

            will play a bit more later...

            after Reloading R3, we have a change; the leader is R2

             

            Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

            12.12.12.2      4    20      58      61        7    0    0 00:53:33        1

            13.13.13.2      4    30      63      66        7    0    0 00:02:11        1

            14.14.14.2      4    30      56      59        7    0    0 00:50:14        1

            R1#sh ip bgp  100.100.100.0/24

            BGP routing table entry for 100.100.100.0/24, version 7

            Paths: (3 available, best #2, table Default-IP-Routing-Table)

            Flag: 0x820

              Advertised to update-groups:

                    1

              30 40

                13.13.13.2 from 13.13.13.2 (3.3.3.3)

                  Origin IGP, metric 100, localpref 100, valid, external

              20 40

                12.12.12.2 from 12.12.12.2 (2.2.2.2)

                  Origin IGP, metric 150, localpref 100, valid, external, best

              30 40

                14.14.14.2 from 14.14.14.2 (4.4.4.4)

                  Origin IGP, metric 200, localpref 100, valid, external

            R1#

            the following is result of reloading in order of 1, 5, 4, 2, 3

            R1#sh ip bgp  100.100.100.0

            BGP routing table entry for 100.100.100.0/24, version 5

            Paths: (3 available, best #3, table Default-IP-Routing-Table)

              Advertised to update-groups:

                    1

              30 40

                13.13.13.2 from 13.13.13.2 (3.3.3.3)

                  Origin IGP, metric 100, localpref 100, valid, external

              20 40

                12.12.12.2 from 12.12.12.2 (2.2.2.2)

                  Origin IGP, metric 150, localpref 100, valid, external

              30 40

                14.14.14.2 from 14.14.14.2 (4.4.4.4)

                  Origin IGP, metric 200, localpref 100, valid, external, best

            R1#

            any of this making any sense?

            • 18. Re: Is this a bug?
              Mohit Kansal  CCIE RS

              Hi Guys,

               

               

              I setup and tested with same scenario and results are almost same. I guess entries are not compared in the sequence they are being represented in Sh ip bgp x.x.x.x output.

               

              Here is the topology i used.

               

              Image.bmp

               

              """Msitake in diagram...R2 and R4 are in AS 200 and R3 is in AS 300."""

               

               

              R1#sh run | sec bgp

              router bgp 100

              no synchronization

              bgp log-neighbor-changes

              neighbor 155.1.12.2 remote-as 300

              neighbor 155.1.13.3 remote-as 200

              neighbor 155.1.14.4 remote-as 300

              no auto-summary

               

               

              BGP determinisic med is off, BGP is not comparing router id for comparision.

               

              Case - 1:-

               

              Neighborship with R3 and R2 is up

               

              R1#sh ip bgp 2.2.2.0

              BGP routing table entry for 2.2.2.0/24, version 14

              Paths: (2 available, best #2, table Default-IP-Routing-Table)

              Flag: 0x4860

                Advertised to update-groups:

                   1

                200

                  155.1.12.2 from 155.1.12.2 (22.22.22.22)

                    Origin IGP, metric 100, localpref 100, valid, external

                300

                  155.1.13.3 from 155.1.13.3 (33.33.33.33)

                    Origin IGP, metric 150, localpref 100, valid, external, best

               

              MED is not being compared as AS is different so the older route is preferred as expected.

               

               

               

              After R4 comes up

               

              R1#sh ip bgp 2.2.2.0

              BGP routing table entry for 2.2.2.0/24, version 14

              Paths: (3 available, best #3, table Default-IP-Routing-Table)

              Flag: 0x4860

                Advertised to update-groups:

                   1

                200

                  155.1.14.4 from 155.1.14.4 (44.44.44.44)

                    Origin IGP, metric 50, localpref 100, valid, external

                200

                  155.1.12.2 from 155.1.12.2 (22.22.22.22)

                    Origin IGP, metric 100, localpref 100, valid, external

                300

                  155.1.13.3 from 155.1.13.3 (33.33.33.33)

                    Origin IGP, metric 150, localpref 100, valid, external, best

               

              Results are as expected.

               

               

              Case 2-

               

              R2 and R3 are up

               

              R1#sh ip bgp 2.2.2.0

              BGP routing table entry for 2.2.2.0/24, version 10

              Paths: (2 available, best #2, table Default-IP-Routing-Table)

              Flag: 0x4860

                Advertised to update-groups:

                   1

                300

                  155.1.13.3 from 155.1.13.3 (33.33.33.33)

                    Origin IGP, metric 150, localpref 100, valid, external

                200

                  155.1.12.2 from 155.1.12.2 (22.22.22.22)

                    Origin IGP, metric 100, localpref 100, valid, external, best

               

              R2 is older and being preffered.

               

               

              Now R4 comes up

               

              R1#sh ip bgp 2.2.2.0

              BGP routing table entry for 2.2.2.0/24, version 11

              Paths: (3 available, best #1, table Default-IP-Routing-Table)

              Flag: 0x4860

                Advertised to update-groups:

                   1

                200

                  155.1.14.4 from 155.1.14.4 (44.44.44.44)

                    Origin IGP, metric 50, localpref 100, valid, external, best

                300

                  155.1.13.3 from 155.1.13.3 (33.33.33.33)

                    Origin IGP, metric 150, localpref 100, valid, external

                200

                  155.1.12.2 from 155.1.12.2 (22.22.22.22)

                    Origin IGP, metric 100, localpref 100, valid, external

               

               

              This time R4 route is being preffered while as per below link R2 should be preffered.

               

              http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094934.shtml#med

               

              I tried it different ways and realized that whenever new entry is received it is being compared with the current best route only (not with all) and then best is updated accordingly.

               

              Consider we have 2 entries x and y in table for same prefix. Out of these two x is best.

               

              When we receive third entry z, then z is compared only with current best "x" and results are updated accordingly.

               

              It might be wrong but I tried it in different ways and found it suits.

               

              Mohit Kansal

              • 19. Re: Is this a bug?
                sg4rb0sss

                Thanks for sharing!  Hey Martin, look at that second table vs the 3rd table.  They're identical, but select different best paths! I don't get how that can happen?  I wonder if you left either table long enough for the bgp scanner process to kick in & reselect the best path?

                • 20. Re: Is this a bug?
                  Martin

                  actually, 1st example is messed up; 2 and 3rd have different booting order;

                  see my attachment which relates to 3rd example of reloading in order of 1, 5, 4, 2, 3

                  does my summary make sense ?

                  • 21. Re: Is this a bug?
                    sg4rb0sss

                    Hey, yeah it makes sense. In your second #show ip bgp 100.100.100.0 output, Med wasn't compared in your first two paths because the AS_PATH's are non-identical. The output at the bottom of that page is what I'd expect my output to be! Obviously my table looks like this:

                     

                    R1#sh ip bgp 100.100.100.0/24

                    BGP routing table entry for 100.100.100.0/24, version 55

                    Paths: (3 available, best #1, table Default-IP-Routing-Table)

                      Advertised to update-groups:

                         1

                      30 40

                        13.13.13.2 from 13.13.13.2 (3.3.3.3)

                          Origin IGP, metric 100, localpref 100, valid, external, best

                      20 40

                        12.12.12.2 from 12.12.12.2 (2.2.2.2)

                          Origin IGP, metric 150, localpref 100, valid, external

                      30 40

                        14.14.14.2 from 14.14.14.2 (4.4.4.4)

                          Origin IGP, metric 200, localpref 100, valid, external

                     

                    Which suggests it's a bug (in my opinion).  It should be selecting the 4.4.4.4 route as the best path.  Check out my outputs

                    • 22. Re: Is this a bug?
                      Martin

                      To check for Bugs you must be registered user;

                      there are buggy versions for 3660 but i did not see yours specifically.

                      you did say you tried other models but with same A3JK9S-M IOS 12.4, right?

                      I found out that have A3JK9S-M for 7200 or 3745 router, i will try it tomorrow;

                       

                      What was your boot order (if you remember) ?

                      Did you apply any of clear ip bgp * (options) command?

                      Load routers following my order with a gap of 2 minutes apart, one at a time.

                      Let see show ip bgp summary and sh ip bgp

                      is your GNS  with default settings?

                       

                      Attaching further testing of same topology and same boot order;

                       

                      What about Mohit idea?

                      • 23. Re: Is this a bug?
                        sg4rb0sss

                        hehe.  I didn't do it by boot order, I did it by removing all neighbors from R1, then adding them one at a time.  Since the order is listed by the time R1 learned the path (according to cisco's document, step 10: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml) i don't really see it necessary to check the boot order when I can just remove the neighbor, then add them back one at a time.  I didn't clear any neighbors.  Will get back to you with #sh ip bgp sum.

                         

                        Good thing is that I will be getting my routers/switches from work tomorrow.  So I can test everything on real devices!

                        • 24. Re: Is this a bug?
                          Martin

                          #10 is the oldest route, which I was concerned about it a bit just in case some GNS3 settings, RAM and IOS ghost caching messing up results;

                          but I tired with C3745-A3JK9S-M, Version 12.3(4)T2, and have got the same results as you did!

                           

                           

                          From:

                              12.12.12.2 from 12.12.12.2 (2.2.2.2)

                                Origin IGP, metric 150, localpref 100, valid, external

                            30 40

                              14.14.14.2 from 14.14.14.2 (4.4.4.4)

                                Origin IGP, metric 200, localpref 100, valid, external, best

                           

                           

                          Adding R3 in same AS as 4 (AS30), revisied BGP table making R3 the Best;

                           

                            30 40

                              13.13.13.2 from 13.13.13.2 (3.3.3.3)

                                Origin IGP, metric 100, localpref 100, valid, external, best

                            20 40

                              12.12.12.2 from 12.12.12.2 (2.2.2.2)

                                Origin IGP, metric 150, localpref 100, valid, external

                           

                            30 40

                              14.14.14.2 from 14.14.14.2 (4.4.4.4)

                                Origin IGP, metric 200, localpref 100, valid, external

                           

                          Conclusion: this version comes with always compare MED, I gess or it is the BUG.

                          • 25. Re: Is this a bug?
                            sg4rb0sss

                            Thanks very much for spending this time to help me.  You are very kind.


                            Regards,
                            Stephen

                            1 2 Previous Next