Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
You may experience some slow load times, errors, and slight inconsistencies. We ask for your patience as we finalize the launch. Thank you.

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

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

route-map question 2

Hi

I have two routers in two datacentres.

Router1 has the following config:

router bgp 10???

no synchronization

bgp log-neighbor-changes

network mmm.mmm.11.164 mask 255.255.255.252

network xxx.xxx.17.0 mask 255.255.255.224

network yyy.yyy.21.96 mask 255.255.255.224

neighbor mmm.mmm.11.165 remote-as 3???

neighbor mmm.mmm.11.165 soft-reconfiguration inbound

neighbor mmm.mmm.11.165 route-map isp-to-se in

neighbor mmm.mmm.11.165 route-map se-to-sip out

neighbor xxx.xxx.17.1 remote-as 1???

neighbor xxx.xxx.17.1 soft-reconfiguration inbound

!

access-list 1 remark ***** BGP Distribution List *****

access-list 1 permit xxx.xxx.17.0 0.0.0.31

!

route-map se-to-isp permit 10

match ip address 1

set metric 8000

set local-preference 50

!

route-map se-to-isp permit 10

set metric 50

!

And router 2:

router bgp 10???

no synchronization

bgp log-neighbor-changes

network kkk.kkk.10.0 mask 255.255.255.252

network xxx.xxx.17.0 mask 255.255.255.224

network yyy.yyy.21.96 mask 255.255.255.224

neighbor kkk.kkk.10.1 remote-as 3???

neighbor kkk.kkk.10.1 soft-reconfiguration inbound

neighbor kkk.kkk.10.1 route-map isp-to-se in

neighbor kkk.kkk.10.1 route-map se-to-isp out

neighbor xxx.xxx.17.2 remote-as 10???

neighbor xxx.xxx.17.2 soft-reconfiguration inbound

!

ip prefix-list mx-src seq 10 permit xxx.xxx.17.0/27

ip prefix-list mx-src seq 11 permit yyy.yyy.21.96/27

ip prefix-list mx-src seq 12 permit zzz.zzz.210.64/26

!

access-list 1 remark ***** BGP Distribution List *****

access-list 1 permit xxx.xxx.17.0 0.0.0.31

access-list 1 permit zzz.zzz.210.64 0.0.0.63

!

route-map se-to-isp permit 10

match ip address prefix-list mx-src

set metric 300

!

route-map isp-to-se permit 10

set metric 20

!

Given the above, I am assuming that routes to xxx.xxx.17.0 will be propogated via router1 and routes to yyy.yyy.21.96 via router 2, Could someone please let me know if that is correct.

Additionally could some one please explain to me the relationship between the "permit 10" and "prefix-list" statment in the route-map taken from above in router 2's config:

route-map se-to-isp permit 10

match ip address prefix-list mx-src

set metric 300

Thanks in advance for your help.

Dan

  • Other Network Infrastructure Subjects
1 ACCEPTED SOLUTION

Accepted Solutions
Purple

Re: route-map question 2

Whooops... that was a typo, it should be router2, which is what the rest of my post implied anyway :-)

The behaviour you observe is correct. The reason that yyy.yyy.21.96 enters via router1 is that you are not explicitly setting a MED for it on router1. Therefore, it defaults to 0, which is the best MED possible and so enters via router1.

The 'permit 10' does not relate to the 'seq 10' in the prefix-list at all. It is purely co-incidental that they have used the same sequence number...

Hope that helps - pls do remember to rate posts that help.

Paresh

5 REPLIES
Purple

Re: route-map question 2

Hi Dan,

Both routers 1 and 2 are injecting the xxx.xxx.17.0 route into BGP. Router1 is assigning it a MED of 8000 while router2 is assigning it a MED of 300. Therefore, given that both routers are peering with the same ISP, traffic for this network will enter via router1, since the ISP will prefer the path with the lower MED.

One thing to note is that the 'set local-preference 50' in the route-map on router1 is doing nothing, since this attribute is not passed over EBGP sessions.

The prefix-list mx-src is matching on the following networks:

xxx.xxx.17.0/27

yyy.yyy.21.96/27

permit zzz.zzz.210.64/26

It is then setting the MED attribute of all these routes to 300.

Hope that helps - pls do remember to rate posts that help.

Paresh

Purple

Re: route-map question 2

Just another thing, the 'permit 10' when used with the route-map simply means that:

1. Routes matched by the route-map will be accepted, not denied.

2. The route-map clause is given a sequence number of 10. If you wish to add another route-map clause after this one, you can give it a higher number so that it will appear after this current clause in the config. Or give it a lower number if you want it to appear earlier in the route-map.

Hope that helps - pls do remember to rate posts that help.

Paresh

New Member

Re: route-map question 2

Hi

Thanks for the detailed reply. You said traffic would enter via router 1, is that a mistake as router 2 has the lower MED.

The curernt traffic behaviour is like this

xxx.xxx.17.0 enters via router 2

while

yyy.yyy.21.96 enters via router 1

Does that fit in with the above?

Also, In the route-map on router 2,

route-map se-to-isp permit 10

match ip address prefix-list mx-src

set metric 300

is the "permit 10" related to the "ip prefix-list mx-src seq 10 permit xxx.xxx.17.0/27" statment? Is that what the "10" relates to?

Thanks again

Dan

Purple

Re: route-map question 2

Whooops... that was a typo, it should be router2, which is what the rest of my post implied anyway :-)

The behaviour you observe is correct. The reason that yyy.yyy.21.96 enters via router1 is that you are not explicitly setting a MED for it on router1. Therefore, it defaults to 0, which is the best MED possible and so enters via router1.

The 'permit 10' does not relate to the 'seq 10' in the prefix-list at all. It is purely co-incidental that they have used the same sequence number...

Hope that helps - pls do remember to rate posts that help.

Paresh

New Member

Re: route-map question 2

Hi

Thanks for your help with this.Appreciate it.

Dan

118
Views
0
Helpful
5
Replies