cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5047
Views
0
Helpful
7
Replies

BGP Route Injection

alfredobosca
Level 1
Level 1

Hello,

I know that route injection let us to insert prefixes more specific withouth appear in the routing table. Now I am practising but isn't working fine.

The steps are:

  1.  Configure a prefix-list listing all more-specific prefixes
  2.  Configure a ROUTE-MAP using the prefix-list of above
  3.  Configure a second prefix-list with aggregate prefix
  4.  Configure a thirth prefix-list to matching the advertising-router of all more-specific prefixes.
  5.  Second ROUTE-MAP using the second and thirth prefix-lists.
  6.  Finally use both ROUTE-MAPS with this syntax:        

bgp inject-map HOSTS exist-map SUBNET copy-attributes

So I will summarize on R2 Device and will configured Route-Injection on R3 devices. At the end I will go to R4 device to verify that works.

R2 

Loopback1                  10.10.10.1      YES NVRAM  up                    up      

Loopback2                  10.10.10.129    YES NVRAM  up                    up      

Loopback3                  10.10.11.1      YES manual up                    up      

Loopback4                  10.10.12.1      YES manual up                    up

R2#sh ru | s bgp

router bgp 123

 no synchronization

 bgp log-neighbor-changes

 network 1.1.1.1 mask 255.255.255.255

 aggregate-address 10.10.8.0 255.255.248.0 summary-only

 redistribute connected

 neighbor my-group peer-group

 neighbor 1.1.1.1 remote-as 123

 neighbor 1.1.1.1 peer-group my-group

 neighbor 1.1.1.1 password 7 1414110209

 neighbor 1.1.1.1 update-source Loopback0

 neighbor 3.3.3.3 remote-as 123

 neighbor 3.3.3.3 peer-group my-group

 neighbor 3.3.3.3 password 7 0458080F0A

 neighbor 3.3.3.3 update-source Loopback0

 no auto-summary

R3

router bgp 123

 no synchronization

 bgp log-neighbor-changes

 bgp inject-map HOSTS exist-map SUBNET copy-attributes

 neighbor 2.2.2.2 remote-as 123

 neighbor 2.2.2.2 password 7 1511080501

 neighbor 2.2.2.2 update-source Loopback0

 neighbor 4.4.4.4 remote-as 45

 neighbor 4.4.4.4 disable-connected-check

 neighbor 4.4.4.4 update-source Loopback0

 no auto-summary

ip prefix-list AGGREGATE seq 5 permit 10.10.8.0/21

!

ip prefix-list HOSTS seq 5 permit 10.10.10.0/24

ip prefix-list HOSTS seq 10 permit 10.10.11.0/24

!

ip prefix-list adv-router seq 5 permit 172.26.1.1/32 //IP of neighbor R2

ip prefix-list adv-router seq 10 permit 2.2.2.2/32//IP of neighbor R2 (loopback)

route-map SUBNET permit 10

 match ip address prefix-list AGGREGATE

 match ip route-source prefix-list adv-router

!

route-map HOSTS permit 10

 match ip address prefix-list HOSTS

I keep on without see the HOSTS prefixes (more specific). I have already restart the BGP sessions without success.

R4#show ip bgp

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

*> 1.1.1.1/32       3.3.3.3                                0 123 i

*> 2.2.2.2/32       3.3.3.3                                0 123 ?

*> 10.10.8.0/21     3.3.3.3                                0 123 i

*> 172.26.1.0/30    3.3.3.3                                0 123 ?

*> 172.26.1.4/30    3.3.3.3                                0 123 ?

Best regards,

 

7 Replies 7

Hi

Have you verified if the network 10.10.8.0/21 is included on the BGP table? Your Condition is: advertise HOSTS if SUBNET exist (or learned)

Could you please share the output of: show ip bgp




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Of course,

As you can see in output of "show ip bgp" on R4 device appear the 10.10.8.0/21

Best regards,

Hello,

post the full configs of both routers, R2 and R3, you are missing something. Your update source on R2 is Loopback 0, but I don't see Loopback 0 in your configuration...

Thank you Alfredo,

Please let me lab it and share my findings.




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hello,

try the below on R3 (I have changed the names of the route maps for clarity):

router bgp 123
no synchronization
bgp log-neighbor-changes
bgp inject-map ORIGINATE exist-map LEARNED_PATH
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 password 7 1511080501
neighbor 2.2.2.2 update-source Loopback0
!
route-map LEARNED_PATH permit 10
match ip address prefix-list ROUTE
match ip route-source prefix-list ROUTE_SOURCE
!
route-map ORIGINATE permit 10
set ip address prefix-list ORIGINATED_ROUTES
!
ip prefix-list ROUTE seq 5 permit 10.10.8.0/21
!
ip prefix-list ORIGINATED_ROUTES seq 5 permit 10.10.10.0/24
ip prefix-list ORIGINATED_ROUTES seq 10 permit 10.10.11.0/24
!
ip prefix-list ROUTE_SOURCE seq 10 permit 2.2.2.2/32

Is the same config that I applied on GNS3 and it seems doesn't works.

Best regards,

paranoikN
Level 1
Level 1

@alfredobosca you need to use:

route-map HOSTS permit 10
 SET ip address prefix-list HOSTS

instead MATCH... in route-map hosts.

Review Cisco Networking for a $25 gift card