cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
436
Views
0
Helpful
2
Replies

Setting up test BGP

peterepka
Level 1
Level 1

In a test/training scenario

How do I specify if i only want to receive 3 routes from an AS in BGP with the IP A.B.C.D/24 E.F.G.H/27 and W.X.Y.Z/29

 

 

 

2 Replies 2

Sam Byers
Level 1
Level 1

There are a few ways, but this is how I usually do it:

! These guys define our interesting networks

ip prefix-list NETWORKS-WE-WANT seq 5 permit A.B.C.D/24
ip prefix-list NETWORKS-WE-WANT seq 10 permit E.F.G.H/27
ip prefix-list NETWORKS-WE-WANT seq 15 permit W.X.Y.Z/29

! This route map tells BGP to filter the routes according to the logic below.

route-map BGP-INGRESS permit 10

 match ip address prefix-list NETWORKS-WE-WANT

route-map BGP-INGRESS deny 15

! The last statment in the route map is like an implicit deny any.

router bgp XXXX

! This actually applies the route map to incoming routes.

neighbor x.x.x.x route-map BGP-INGRESS in

or you can apply the prefix-list directly to the neighbor

neighbor x.x.x.x prefix-list NETWORKS-WE-WANT in

Review Cisco Networking for a $25 gift card