6 Replies Latest reply: Apr 22, 2013 2:13 AM by Amr M. el Adel-CCIEx2 (RS,SP) RSS

    BGP configuration

    Paul

      Im having a bit of a problem understanding a BGP setup.  I set up a lab with 4 core routers.  They are all running OSPF.  The 2 edge routers are connected to 2 additional routers.  These additional routers have their own AS each.  I have them connected with eBGP.  The 2 edge routers in the core are connected to each other using iBGP.  My question is on the routers that are on their own AS that connect to the edge routers at the CORE.  Do i just need to put a network statement command on the router BGP configuration or do I need to redistribute the OSPF into BGP as well? 

        • 1. Re: BGP configuration
          David Flores

          Hi Paul,

           

          Well it depends wich routes you are delivering to these eBGP routers, and actually what routes you have in your BGP table on your CORE routers. Setting up a BGP connection doesn't make the networks advertised by the protocol, you have to explicitly configure how to do this. The network statement is a good way to go, the redistribution not so much, but of course it depends on what your topolgy looks like and what you are trying to accomplish.

           

          Maybe if you post some configs we can help out a little more.

          • 2. Re: BGP configuration
            Paul

            hostname PE11

            !!

            interface Loopback0

            ip address 192.168.1.17 255.255.255.255

            !

            interface GigabitEthernet0/1

            ip address 192.168.1.49 255.255.255.240

            !

            interface GigabitEthernet0/2

            router ospf 10

            router-id 192.168.1.17

            log-adjacency-changes

            passive-interface default

            no passive-interface GigabitEthernet0/1

            network 192.168.0.0 0.0.255.255 area 0

            !

            router bgp 65500

            no synchronization

            bgp log-neighbor-changes

            neighbor 192.168.1.33 remote-as 65500

            neighbor 192.168.1.33 description PEER TO PE12

            neighbor 192.168.1.33 update-source Loopback0

            neighbor 192.168.49.6 remote-as 65520

            neighbor 192.168.49.6 description PEER TO MB16

            no auto-summary

            !

            !

            !

            !

            !

            end

            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

            !

            hostname P11

            !

            interface Loopback0

            ip address 192.168.1.81 255.255.255.255

            !

            interface GigabitEthernet0/0

            ip address 192.168.1.113 255.255.255.240

            !

            interface GigabitEthernet0/1

            ip address 192.168.1.50 255.255.255.240

            duplex auto

            speed auto

            media-type rj45

            mpls label protocol ldp

            mpls ip

            mpls mtu 1512

            !

            !

            router ospf 10

            router-id 192.168.1.81

            log-adjacency-changes

            network 192.168.0.0 0.0.255.255 area 0

            !

            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

             

             

            !

            hostname P12

            !

            interface Loopback0

            description LOOPBACK0

            ip address 192.168.1.97 255.255.255.255

            !

            interface GigabitEthernet0/0

            description LINK TO P11

            ip address 192.168.1.114 255.255.255.240

            !

            interface GigabitEthernet0/1

            description LINK TO PE12

            ip address 192.168.1.66 255.255.255.240

            !

            router ospf 10

            router-id 192.168.1.97

            log-adjacency-changes

            network 192.168.0.0 0.0.255.255 area 0

            !

            !

            !

            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

            !

            hostname PE12

            interface Loopback0

            description LOOPBACK0

            ip address 192.168.1.33 255.255.255.255

            !

            interface GigabitEthernet0/0

            ip address 192.168.49.1 255.255.255.252

            duplex auto

            speed auto

            !

            interface GigabitEthernet0/1

            description LINK TO P12

            ip address 192.168.1.65 255.255.255.240

            !

            router ospf 10

            router-id 192.168.1.33

            log-adjacency-changes

            network 192.168.0.0 0.0.255.255 area 0

            !

            router bgp 65500

            no synchronization

            bgp log-neighbor-changes

            neighbor 192.168.1.17 remote-as 65500

            neighbor 192.168.1.17 description PEER TO PE11

            neighbor 192.168.1.17 update-source Loopback0

            neighbor 192.168.49.2 remote-as 65510

            neighbor 192.168.49.2 description PEER TO PE12\

            no auto-summary

            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

             

             

            hostname MB16

            !

            !

            !

            interface Loopback0

            description Network Managment

            ip address 172.22.200.0 255.255.255.255

            !

            interface GigabitEthernet0/0

            description Uplink

            ip address 192.168.49.6 255.255.255.252

            !

            router ospf 10

            router-id 172.22.200.0

            log-adjacency-changes

            area 172.22.200.0 nssa

            area 172.22.200.0 range 172.22.200.0 255.255.248.0

            passive-interface default

            network 172.22.200.0 0.0.7.255 area 172.22.200.0

            !

            router bgp 65520

            no synchronization

            bgp router-id 172.22.200.0

            bgp log-neighbor-changes

            network 172.22.200.0 mask 255.255.248.0

            redistribute ospf 10

            neighbor 192.168.49.5 remote-as 65500

            neighbor 192.168.49.5 description PEER TO PE11

            no auto-summary

             

            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

             

            !

            hostname MB17

            !

            interface Loopback0

            ip address 172.22.208.0 255.255.255.255

            !dress 172.22.208.65 255.255.255.255

            !

            interface GigabitEthernet0/0

            description Uplink

            ip address 192.168.49.2 255.255.255.252

             

             

            !

            router ospf 10

            router-id 172.22.208.0

            log-adjacency-changes

            auto-cost reference-bandwidth 10000

            area 172.22.208.0 range 172.22.208.0 255.255.248.0

            passive-interface default

            network 172.22.208.0 0.0.7.255 area 172.22.208.0

            !

            router bgp 65510

            no synchronization

            bgp router-id 172.22.208.0

            bgp log-neighbor-changes

            network 172.22.208.0 mask 255.255.248.0

            redistribute ospf 10

            neighbor 192.168.49.1 remote-as 65500

            neighbor 192.168.49.1 description PEER TO PE12

            no auto-summary

            !

             

             

             

            BGP.jpg

            • 3. Re: BGP configuration
              amarhold

              Hi !

              I do not exactly understand what you trying to achieve BUT:

              regarding the MB-routers

              1. in OSPF passive-interface default means that you are not exchanging any OSPF with any other router and thus your OSPF will be empty ( no OSPF routes when you do a show ip route)

              2. in BGP when you specify a network statement with a mask you need an EXACT match of this route in the routing table which is not the case as the same network is a /32 on the loopback interface.

              So you need a static route pointing to Null0 to get the network announced by BGP

              ip route 172.22.208.0 255.255.248.0 Null0 250

               

              in your core you have enable LDP only on one link ?!

               

              hope that brings you a step further

              regards

              alexander

              • 4. Re: BGP configuration
                Paul

                Yes thanks for the information.  What I was trying to do was just ping between the routers that connect to the two PE routers.  I was able to make it work but what I did was use redistribution into OSPF on the routers that connect to the PE routers.  Then use the network statement to advertise the routes into BGP.  Is that a save move or is there another way. The LDP is for future work in this lab.

                • 5. Re: BGP configuration
                  blau

                  Hi Paul

                   

                  From topology which you provided it seems that there is no direct connection between PE routers. It means running iBGP session via P routers which will work just fine but P routers will drop all traffic between MB routers cause they are unaware of their networks.

                   

                  One way to solve this problem could be redistribution between BGP and OSPF but it is not recommended.

                  Here is list of other possible solutions:

                   

                  - full mesh iBGP sessions, which means P routers need to run BGP, but this is also not very recommended. P routers are supposed to be BGP free.

                   

                  - route-reflector/confederation, but again P routers will need to run BGP

                   

                  - create direct connection between PE routers, this will work only if direct connection will be functional. If it fail, iBGP session will reroute via P routers so no problem there. BUT also traffic between MB routers will be rerouted via P routers and they will drop it.

                   

                  - create tunnel (IPv4, GRE) between PE routers: P routers are BGP free, external traffic will be forwarded via tunnel between PE routers

                   

                  - last and I think best solution: treat MB routers as customers AS65500, you will run MPLS in core (PEs and Ps) which will take care of forwarding internal and also external traffic, you will create VRF instances on PE routers and BGP will distribute prefixes which you need. simple MPLS L3 VPN scenario

                  • 6. Re: BGP configuration
                    Amr M. el Adel-CCIEx2 (RS,SP)

                    Hi,

                     

                    Paul, there is a blackhole on this network that the P routers don't know about the BGP routes coming from MB networks.

                     

                    So it is either you enable iBGP on these P routers (full mesh) or, run MPLS on the P and PE routers. No need for the VRF and creating MPLS L3 VPN, however it will work also.

                     

                    The scenario of enabling MPLS on core and PE is called MPLS tunnelling. In which, the MPLS core network (P routers) cares only about the reachability of the PEs' loopback interfaces and doesn't care about the destination network.

                     

                    Lab it and it will work.