8 Replies Latest reply: Jun 2, 2015 5:44 AM by Joksan RSS

    BGP default information originate situation

    Gabriel

      Hi,

       

      A simple question for default inf-orig, so:

      A---------B routers bgp relationship.

       

      When i configure router A with:

       

      no synchronization

      bgp log-neighbor-changes

      neighbor 10.1.1.2 remote-as 12302

      default-information originate

      no auto-summary

       

      router B seems isnt receiving any default route...

      =====================================================

      when i configure router A with:

       

      router bgp 12302

      no synchronization

      bgp log-neighbor-changes

      neighbor 10.1.1.2 remote-as 12302

      neighbor 10.1.1.2 default-originate

      no auto-summary

       

      router B receive default route:

         Network          Next Hop            Metric LocPrf Weight Path

      *>i0.0.0.0          10.1.1.1                 0    100      0 i

       

      why isnt working in first case? and i must use neighbor 10.1.1.2 default-originate to make it work...

       

       

      tnx

         
        • 1. Re: BGP default information originate situation
          Keith Barker - CCIE RS/Security, CISSP

          Hi Gabriel,

           

          In the first situation, it is most likely that Router A didn't have a default route to share.    Using just the first situation, if you create a static default route, and then redistribute that into BGP, then the default-information originate should share the default route with Router B.

           

          Keith

          • 2. Re: BGP default information originate situation
            Gabriel

            Dear Keith,

             

            Yes you are right with a static default route + redist static + default-infor orignate i`ll be able to advertise the default route.

            But why in the second case its working just with

            neighbor 10.1.1.2 default-originate

             

            Tnx

            • 3. Re: BGP default information originate situation
              Keith Barker - CCIE RS/Security, CISSP

              Hello Gabrial-

               

              In second case, with the

               

              neighbor 10.1.1.2 default-originate

               

              command, it says to advertise a default route to the peer, regardless if you have one or not.

               

              Here is an example,



              R1#show ip route

              <snip>

               

              Gateway of last resort is not set

              ! Notice, no default route on R1


                   1.0.0.0/24 is subnetted, 1 subnets

              C       1.1.1.0 is directly connected, Loopback0

                   2.0.0.0/24 is subnetted, 1 subnets

              O       2.2.2.0 [110/2] via 10.0.0.2, 00:02:52, FastEthernet0/0

                   3.0.0.0/32 is subnetted, 1 subnets

              O       3.3.3.3 [110/3] via 10.0.0.2, 00:02:52, FastEthernet0/0

                   23.0.0.0/24 is subnetted, 1 subnets

              O       23.0.0.0 [110/2] via 10.0.0.2, 00:02:52, FastEthernet0/0

                   10.0.0.0/24 is subnetted, 1 subnets

              C       10.0.0.0 is directly connected, FastEthernet0/0

               

              ! Sending the a default advertisement to the peer at 2.2.2.2

              R1#show run | sec router bgp                    

              router bgp 1

              no synchronization

              bgp log-neighbor-changes

              network 1.1.1.0 mask 255.255.255.0

              neighbor 2.2.2.2 remote-as 1

              neighbor 2.2.2.2 update-source Loopback0

              neighbor 2.2.2.2 default-originate

              no auto-summary

               


              R1#show ip bgp neighbor 2.2.2.2 advertised-routes

              BGP table version is 10, 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

               

              ! Indicates tht we are advertising the default

              Originating default network 0.0.0.0

               

                 Network          Next Hop            Metric LocPrf Weight Path

              *> 1.1.1.0/24       0.0.0.0                  0         32768 i

               

              Total number of prefixes 1

               

               

               

              Keith

              • 4. Re: BGP default information originate situation
                Marcel Loesberg

                Hi Keith,

                Sorry to re-open such an old post but I have a similar problem.

                I want to advertise only a default router to a BGP neighbor.
                When I use "neighbor x.x.x.x default-originate" and check on the neighbor what I receive I see this:

                 

                Router#show bgp ipv4 unicast neighbors 212.78.201.41 received-routes

                BGP table version is 7, local router ID is 185.42.68.65

                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

                *> 0.0.0.0          212.78.201.41            0             0 65444 i

                *> 171.13.42.0/24   212.78.201.41                          0 65444 123 i

                *> 212.78.192.0/19  212.78.201.41            0             0 65444 i

                 

                Total number of prefixes 3

                 

                The "problem" lies in the fact that the default route "0.0.0.0" doesn't seem to have a subnet length of "/0".

                This causes my prefix list not to catch it;

                 

                Otherrouter#sh ip prefix-list

                ip prefix-list DEFAULT-ONLY: 1 entries

                   seq 10 permit 0.0.0.0/0

                 

                The prefix list looks for "0.0.0.0/0" but the originating router advertises "0.0.0.0".

                How can I build a prefix-list (or other type of filter) that denies everything but the "0.0.0.0"?

                 

                I hope you can help me with this.

                 

                With kind regards,

                 

                Marcel

                • 5. Re: BGP default information originate situation
                  Michal

                  Hello Marcel,

                   

                  received-rotues displays the routes your router is receiving from neighbor without any filtering applied. So if you want to see routes with the filtering applied, use show ip bgp neighbor x.x.x.x routes. You should see then only default route from neighbor(assuming your local router is configured with BGP filtering using DEFAULT-ONLY prefix-list).

                   

                  Michal

                  • 6. Re: BGP default information originate situation
                    Freddy

                    Hi Keith, this is really and old post but i was hoping to clarify some doubts i have... so in order to the default information originate to work, we need to redistribute the static default route into BGP.. but isnt just easier to just redistribute static only? without the default-information originate?

                     

                    Freddy

                    • 7. Re: BGP default information originate situation
                      Conwyn

                      Hi Freddy

                       

                      Does this help?

                       

                      Router 1

                      interface FastEthernet0/0
                      ip address 10.0.0.5 255.255.255.252
                      duplex auto
                      speed auto
                      !

                       

                      interface POS1/0

                      Description to router2
                      ip address 10.0.0.1 255.255.255.252
                      !
                      router bgp 1
                      bgp log-neighbor-changes
                      network 0.0.0.0
                      network 10.0.0.4 mask 255.255.255.252
                      neighbor 10.0.0.2 remote-as 1
                      !

                      ip route 0.0.0.0 0.0.0.0 10.0.0.6

                       

                      Router 2

                      show ip bgp
                      BGP table version is 3, local router ID is 10.0.0.2
                      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
                      *>i0.0.0.0          10.0.0.6                 0    100      0 i
                      *>i10.0.0.4/30      10.0.0.1                 0    100      0 i
                      R2#show ip route 0.0.0.0
                      Routing entry for 0.0.0.0/0, supernet
                        Known via "bgp 1", distance 200, metric 0, candidate default path, type internal
                        Last update from 10.0.0.6 00:00:23 ago
                        Routing Descriptor Blocks:
                        * 10.0.0.6, from 10.0.0.1, 00:00:23 ago
                            Route metric is 0, traffic share count is 1
                            AS Hops 0
                            MPLS label: none

                      • 8. Re: BGP default information originate situation
                        Joksan

                        The default-information will only insert a default when it is known to BGP via redistribution. To bypass this you should use a network statement in conjunction with a default route.