05-05-2008 06:48 PM - edited 03-03-2019 09:49 PM
Hey guys,
I keep getting the
% route-map:can not set interface.
% Use P2P interfaces for set interface clause
every time I try to set ("set interface null0") a null interface inside a route map.
Has anyone seen this?
My route map is:
route-map MY-LOCAL-POLICY permit 10
match ip address 150
set ip next-hop 98.98.98.98
In this route map, I want to add the set interca null0 command but it gives me those errors messages.
thanks
05-05-2008 07:54 PM
Hi, why do you want to use null0 in route-map ? Null0 can be used only for certain purposes, eg permanent static routes for bgp, or packet discard.
05-06-2008 02:25 AM
HI, [Pls Rate if HELPS]
If your requirement is to block certain IP @ Address: The below is the Example Config:
Create an ACL:
R2(config)#access-list 30 permit host 20.2.2.2
R2(config)#access-list 31 permit host 20.3.3.3
Perhaps if you want to specifically block traffic sourced from 20.3.3.3 or 20.4.4.4. You can use multiple match statements in one single route map, and have packets matching those two addresses sent to the bit bucket - the interface null0.
R2(config)#route-map EXAMPLE permit 30
R2(config-route-map)#match ip address 31
R2(config-route-map)#match ip address 32
R2(config-route-map)#set interface null0
Any traffic matching ACLs 31 or 32 will be sent to null0, resulting in its being discarded by the router. Any traffic that didn't match any of the route map statements will be returned to the routing engine for normal processing.
Hope I am Informative.
Pls RATE if HELPS
Best Regards,
Guru Prasad R
05-06-2008 11:35 AM
Hello,
if you want traffic matching the access-list 150 to be sent to null0 why you want also to set an ip next-hop at the same time ?
I guess that if you remote the set ip next-hop you will be able to use the set interface null0 in this route-map clause.
there is no sense in setting an ip next hop if you want to discard traffic.
Of course I may be wrong, but experience says that it is not possible to use any combination of commands inside a route-map.
In this case if you set a next hop the IOS code treats the outgoing interface as multiaccess and does not allow you to use set interface that can be used for serial point-to-point interface only.
null0 is a logic interface for a waste bin.
hope to help
best regards
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide