This Blog is related with how BGP will rejecting Route using Route Filter
Created Route-Map
R6#sh route-map Block-in
route-map Block-in, permit, sequence 10
Match clauses:
ip address prefix-lists: Block
Set clauses:
Policy routing matches: 0 packets, 0 bytes
Created Prefix List to Block Some Routes
R6#sh ip prefix-list Block
ip prefix-list Block: 2 entries
seq 5 deny 1.1.1.0/24
seq 10 permit 0.0.0.0/0 ge 1
Validate
R6#sh ip pro
Routing Protocol is "bgp 200"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Redistributing: connected
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
10.10.10.10
192.168.46.4 Block-in
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
192.168.46.4 20 00:14:11
Distance: external 20 internal 200 local 200
DEBUG LOGS SAYS HOW IT WORKS
*Mar 1 00:37:28.183: BGP(0): start inbound soft reconfiguration for 192.168.46.4
*Mar 1 00:37:28.183: BGP(0): process 1.1.1.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.183: BGP(0): Prefix 1.1.1.0/24 rejected by inbound route-map.
*Mar 1 00:37:28.187: BGP(0): update denied
*Mar 1 00:37:28.187: BGP(0): process 2.2.2.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.187: BGP(0): process 3.3.3.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.191: BGP(0): process 4.4.4.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.191: BGP(0): process 172.16.1.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.195: BGP(0): process 192.168.12.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.195: BGP(0): process 192.168.13.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.199: BGP(0): process 192.168.24.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.199: BGP(0): process 192.168.34.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.199: BGP(0): process 192.168.45.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.199: BGP(0): process 192.168.46.0/24, next hop 192.168.46.4, metric 0 from 192.168.46.4
*Mar 1 00:37:28.199: BGP(0): complete inbound soft reconfiguration, ran for 16ms
*Mar 1 00:37:28.643: BGP: 10.10.10.10 active open failed - no route to peer, open active delayed 29134ms (35000ms max, 28% jitter)
R6#
No comments:
Post a Comment