Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP network command with route-map

Hi ,

Anbody used bgp network command wit route-map ?

I have used this command with one route-map but I am facing issue.

router bgp 65272
no synchronization
bgp log-neighbor-changes
network 193.122.25.0 route-map LAN_to_BGP
neighbor 10.255.200.157 remote-as 4445
no auto-summary

!

route-map LAN_to_BGP deny 50
match tag 7001
!
route-map LAN_to_BGP deny 51
match tag 7002
!
route-map LAN_to_BGP permit 100
set metric 50

For me with this route-map , the advertisement is not happening for  193.122.25.0/24...I don't see any problem in the route-map. Can anybody suggest if there is somrthing I am missing in the config ?

Thanks in advance.

Mathew

8 REPLIES
Hall of Fame Super Silver

Re: BGP network command with route-map

Hello Mathew,

post sh ip route 193.122.25.0

also you have no auto-summary, this requires an exact match in IP routing table, if you are using a subnet of 193.122.25.0/24 (more specific) you need to add the correct mask to the network command.

you can then create the /24 IP prefix using the aggregate command

Hope to help

Giuseppe

New Member

Re: BGP network command with route-map

Hi Giuslar,

Thanks for your reply.

As requested :-

sh ip route 193.122.25.1
Routing entry for 193.122.25.0/24
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Advertised by bgp 65272
  Routing Descriptor Blocks:
  * directly connected, via Loopback200
      Route metric is 0, traffic share count is 1

Please note that , with route-map applied I am not able to advertise the prefix. If I remove the route-map it is working for me.

Regards

Mathew

Hall of Fame Super Silver

Re: BGP network command with route-map

Hello Matthew,

the route-map should be used to set one or more BGP attributes of the IP prefix referenced by the network command

what if you use only the last route-map clause?

Example:

route-map LAN_to_BGP2 permit 100
set metric 50

Hope to help

Giuseppe

New Member

Re: BGP network command with route-map

Hi Giuslar,

I got a requirement to deny all those routes with tag 7001 and 7002.

I just want to understand

1. Is there any problem with route-map ?

2. Is the route-map working different for network command than the neighbor command?

Regards

Mathew

New Member

Re: BGP network command with route-map

Hi,

When I am applying the route-map and debug , I am getting below logs..

*Mar  1 00:41:49.783: BGP(0): delete invalid sourced route for 193.122.25.0/24 path 0
*Mar  1 00:41:49.787: BGP(0): no valid path for 193.122.25.0/24
*Mar  1 00:41:50.539: BGP(0): nettable_walker 193.122.25.0/24 no best path
*Mar  1 00:41:50.543: BGP(0): 10.255.200.157 send unreachable 193.122.25.0/24
*Mar  1 00:41:50.543: BGP(0): 10.255.200.157 send UPDATE 193.122.25.0/24 -- unreachable

Regards

Mathew

Hall of Fame Super Silver

Re: BGP network command with route-map

Hello Mathew,

>> 2. Is the route-map working different for network command than the neighbor command?

I would say yes, when used with the network command the route-map should be used only for setting BGP attributes of the IP prefix that matches that network command

when used towards a neighbor a route-map can act as a route filter and can deny some routes based on different criteria including route tag = 7001 or route tag = 7002.

you can still implement a second route-map towards neighbor where you deny routes with that specific route tag values.

the debug shows that the network is considered not valid. but we know it is a connected route, it is actullay the IP address of a test loopbck or there is a static route using as next-hop the loopback address?

the debug can show the effects of using a route-map like that with the network command

Hope to help

Giuseppe

New Member

Re: BGP network command with route-map

Thanks Giuslar..

Do you have any document reference for the route-map used for network command ? I serached but didn't find any document which says the difference between the route-maps for network and neighbor command.

Regards

Mathew

Hall of Fame Super Silver

Re: BGP network command with route-map

Hello Mathew,

I agree that documentation is not clear about this

even command reference reports generic information

http://www.cisco.com/en/US/docs/ios/iproute_bgp/command/reference/irg_bgp4.html#wp1098414

But if we think about the logic that is behind the command we should agree that:

given the following BGP command:

network 193.122.25.0 route-map  test

a) applies only to IP prefix 193.122.25.0/24

b) route-map test at this point should do something related to prefix 193.122.25.0/24 like setting metric (MED) to 50 no filtering action is required here because only one IP prefix is involved

in other words if I don't want to advertise a prefix I simply do not use a network command for that prefix.

If I use the network command I'm referring to a specific IP prefix.

On the other hand if I use a route-map towards a neighbor things are different all BGP prefixes in local BGP table are processed by the route-map and some filtering action is expected and performed.

Hope to help

Giuseppe

4719
Views
0
Helpful
8
Replies