cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
615
Views
10
Helpful
3
Replies

Route-map and Network command issues while advertising prefix list

viswa sai
Level 1
Level 1

Hi,

I am facing a issues, while using route-map and prefix list while advertising networks to ISP. I have similar setup in other office and it is working without any issues.  In this router, all the network mention with network statement in BGP config is being advertised and unable to filter networks using route-map. Any suggestions!!!!

Here is my config


router bgp 76
 bgp log-neighbor-changes
 neighbor 1x.1xx.2x.9x remote-as 47
 neighbor 1x.1xx.2x.9x description ## TL 20Mb ##
 neighbor 1x.1xx.2x.9x ebgp-multihop 2
 neighbor 1x.1xx.2x.9x update-source GigabitEthernet0/1
 !
 address-family ipv4
 neighbor 1x.1xx.2x.9x activate
 neighbor 1x.1xx.2x.9x soft-reconfiguration inbound
 neighbor 1x.1xx.2x.9x route-map tl-eth-20mb out
 no auto-summary
 no synchronization
 network 192.168.32.0
 network 192.168.34.0
 network 192.168.35.0
 network 192.168.41.0
 network 192.168.42.0
 network 192.168.58.0
 network 192.168.63.0
 exit-address-family
!
ip route 0.0.0.0 0.0.0.0 14.1xx.2x.9x

ip route 192.168.34.0 255.255.255.0 Null0
ip route 192.168.35.0 255.255.255.0 Null0
ip route 192.168.41.0 255.255.255.0 Null0
ip route 192.168.42.0 255.255.255.0 Null0
ip route 192.168.58.0 255.255.255.0 Null0
ip route 192.168.63.0 255.255.255.0 Null0
!

!

!
ip prefix-list 34nw seq 5 permit 192.168.34.0/24
!
ip prefix-list 35nw seq 5 permit 192.168.35.0/24
!
ip prefix-list 41nw seq 5 permit 192.168.41.0/24
!
ip prefix-list 42nw seq 5 permit 192.168.42.0/24
!
ip prefix-list 55nw seq 5 permit 192.168.55.0/24
!
ip prefix-list 58nw seq 5 permit 192.168.58.0/24

--------------------------------------------------

route map

route-map tl-eth-20mb permit 10
 match ip address prefix-list 41nw 58nw 63nw
!
route-map tl-eth-20mb permit 20
 match ip address prefix-list 58nw
 set as-path prepend 76

---------------------------------------------------------

Output of below commands


#sh ip bgp neighbors 1x.1xx.2x.9x advertised-routes
BGP table version is 42, local router ID is 196.12.62.248
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
*> 192.168.32.0      192.168.34.80             2         32768 i
*> 192.168.34.0      0.0.0.0                  0         32768 i
*> 192.168.35.0      0.0.0.0                  0         32768 i
*> 192.168.41.0      0.0.0.0                  0         32768 i
*> 192.168.42.0      0.0.0.0                  0         32768 i
*> 192.168.58.0      0.0.0.0                  0         32768 i
*> 192.168.63.0      0.0.0.0                  0         32768 i

Total number of prefixes 7

---------------

Rose#sh route-map
route-map tl-eth-20mb, permit, sequence 10
  Match clauses:
    ip address prefix-lists: 41nw 58nw 63nw
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes
route-map tl-eth-20mb, permit, sequence 20
  Match clauses:
    ip address prefix-lists: 58nw
  Set clauses:
    as-path prepend 76
  Policy routing matches: 0 packets, 0 bytes
route-map 20mb-tcl, permit, sequence 10
  Match clauses:
  Set clauses:
    local-preference 100
  Policy routing matches: 0 packets, 0 bytes

-------------------------------------------

3 Replies 3

nspasov
Cisco Employee
Cisco Employee

Hi there-

Are you trying to deny/block the networks listed from being advertised to the BGP peer? If yes, then you need to change the route-map statement from "permit" to "deny"

Thank you for rating helpful posts!

viswa sai
Level 1
Level 1

Thanks, I sloved the issues after create a IP prefix list for 63 network. Then, my route-map is filtering and advertisting the permited networks in route-map

Fantastic! Good job on resolving your own issue and also thank you for taking the time to come back and post the solution (+5 from me). 

Now, since your issue is resolved, you should mark the thread as "answered" :)

Review Cisco Networking for a $25 gift card