10-29-2012 02:38 AM - edited 03-04-2019 05:59 PM
Please advise
I have BGP peer with upstaream ISP
I need recieve default route only
I want to do this via route-map with prefix-list (not just perfix-list)
How can I do this?
Now I do next (but it doesn't work)
router bgp 5xxxx
bgp log-neighbor-changes
bgp deterministic-med
neighbor 193.xxx.zzz.xx remote-as 900
neighbor 193.xxx.zzz.xx description ISP UpStream
neighbor 193.xxx.zzz.xx version 4
address-family ipv4
network 193.0.0.0 mask 255.255.252.0
neighbor 193.xxx.zzz.xx activate
neighbor 193.xxx.zzz.xx soft-reconfiguration inbound
neighbor 193.xxx.zzz.xx route-map map-900-ISP-in in
neighbor 193.xxx.zzz.xx route-map map-900-ISP-out out
sh route-map map-900-ISP-in
route-map map-900-ISP-in, permit, sequence 30
Match clauses:
ip address prefix-lists: def_only
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map map-900-ISP-in, permit, sequence 40
Match clauses:
Set clauses:
local-preference 90
Policy routing matches: 0 packets, 0 bytes
sh ip prefix-list def_only
ip prefix-list def_only: 2 entries
seq 15 deny 0.0.0.0/0 ge 1
seq 20 permit 0.0.0.0/0
Solved! Go to Solution.
10-29-2012 04:55 AM
Hi,
get rid of the permit 30 statement in your inbound route-map
Regards.
Alain
Don't forget to rate helpful posts.
10-29-2012 05:03 AM
Hi Cadet,
Not too sure how removing seq 30 will resolve the issue. As seq 30 is for prefix list.
If we go by the route-map, it will first match AS-PATH list 1 ( which is permiting couple if as-path) and will deny it.
Then it will logically ORed with seq 30 ( which is prefix list ) allowing only 0.0.0.0/0.
And then it will logically ORed with seq 40 ( which doesn't have anything in it).
So based on the above logic, if any one of the condition matches, it will exit out of the route-map.
Regards,
Smitesh
10-29-2012 05:15 AM
Hi,
in BGP if you specify a catch-all route-map statement then everything not matched by previous statements will get matched by this one.
to get a AND logic and not OR logic you would have to get more than one match action in a single statement( permit or deny).
Regards.
Alain
Don't forget to rate helpful posts.
10-29-2012 05:38 AM
why?
route-map map-900-ISP-in, permit, sequence 30
Match clauses:
ip address prefix-lists: def_only
Set clauses:
exactly this seq for my task
I need receive default only
10-29-2012 05:53 AM
Could you please post output from
#sh run | s route-map map-900-ISP-in
10-29-2012 06:01 AM
statement 40, thaks this was issue
10-29-2012 05:16 AM
Hi,
Can you please explain, why you have network 193.XX.ZZ.00 mask 255.255.252.0 in your BGP config.
If it is not one of you prefixes, remove that network entry from BGP config.
router bgp 5xxx
address-family ipv4
no network 193.xxx.zzz.00 mask 255.255.252.0
SOFT clear the BGP Peers:
clear ip bgp * soft in
clear ip bgp * soft out
and then check whether issue still persists.
Regards,
Smitesh
10-29-2012 05:30 AM
Hi Smitesh,
can you tell me how having a network command for a prefix can influence what you receive from the ISP when you apply a inbound route-map to filter prefixes?
Also as a sidenote, almost every router supports route-refresh so no need for the soft keyword anymore in this case.
Regards.
Alain
Don't forget to rate helpful posts.
10-29-2012 05:43 AM
Hi Cadet,
The prefix which he is getting in his BGP table was same which he is advertising.
I expected then that prefix to be something like:
*>193.XX.ZZ.0/22 0.0.0.0 0 32768 i
* 193.XXZZ.XX
However, his BGP table only showed that he is learning that prefix from his service provider. So I thought if in case if he is not suppose to originate that prefix from his own AS, why was it then advertise from his AS. Hence recommended to remove.
Editted: Very much aware about route-refresh. Just plain old habbit of doing things that way.
Regards,
Smitesh
Message was edited by: smitesh kharecha
10-29-2012 05:31 AM
it's my network which I advertise to peer
10-29-2012 05:38 AM
Hi,
If it is your network, it is quit strange that your ISP is advertised it to you showing that prefix as originated from their AS.
Can you please check with your ISP and ask them why they are originating 193.XX.ZZ.00/22 prefix ?
Regards,
Smitesh
10-29-2012 06:02 AM
sorry, my misstake when print and change real otput of show command
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: